Bug 195944

Summary: [PATCH] ggated: Properly report permission problems to the client
Product: Base System Reporter: Fabian Keil <fk>
Component: binAssignee: Christian Brueffer <brueffer>
Status: Closed FIXED    
Severity: Affects Some People CC: brueffer
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
ggated: Properly report permission problems to the client none

Description Fabian Keil 2014-12-13 12:54:31 UTC
Created attachment 150540 [details]
ggated: Properly report permission problems to the client

If ggated's exports_find() fails, the connection is removed before
(trying to) report the problem to the client.

sendfail() is called with an already closed socket and thus it
fails to inform the client about the problem.

The attached patch fixes this by calling sendfail() before
connection_remove().
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-07-14 09:25:43 UTC
A commit references this bug:

Author: brueffer
Date: Tue Jul 14 09:25:11 UTC 2015
New revision: 285529
URL: https://svnweb.freebsd.org/changeset/base/285529

Log:
  If ggated's exports_find() fails, the connection is removed before
  (trying to) report the problem to the client.

  sendfail() is called with an already closed socket and thus it
  fails to inform the client about the problem.

  Fix this by calling sendfail() before connection_remove().

  PR:		195944
  Submitted by:	Fabian Keil
  Reviewed by:	pjd
  MFC after:	1 week

Changes:
  head/sbin/ggate/ggated/ggated.c
Comment 2 Christian Brueffer freebsd_committer freebsd_triage 2015-07-14 09:29:44 UTC
Fixed in HEAD, will merge to the stable branches in a week.  Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-07-21 14:28:39 UTC
A commit references this bug:

Author: brueffer
Date: Tue Jul 21 14:27:37 UTC 2015
New revision: 285749
URL: https://svnweb.freebsd.org/changeset/base/285749

Log:
  MFC: r285529

  If ggated's exports_find() fails, the connection is removed before
  (trying to) report the problem to the client.

  sendfail() is called with an already closed socket and thus it
  fails to inform the client about the problem.

  Fix this by calling sendfail() before connection_remove().

  PR:		195944
  Submitted by:	Fabian Keil
  Reviewed by:	pjd
  Approved by:	re (gjb)

Changes:
_U  stable/10/
  stable/10/sbin/ggate/ggated/ggated.c
Comment 4 Christian Brueffer freebsd_committer freebsd_triage 2015-07-21 14:29:28 UTC
Merge done; thanks again!