Bug 195944 - [PATCH] ggated: Properly report permission problems to the client
Summary: [PATCH] ggated: Properly report permission problems to the client
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Christian Brueffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-13 12:54 UTC by Fabian Keil
Modified: 2015-07-21 14:29 UTC (History)
1 user (show)

See Also:


Attachments
ggated: Properly report permission problems to the client (747 bytes, patch)
2014-12-13 12:54 UTC, Fabian Keil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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 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 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 2015-07-21 14:29:28 UTC
Merge done; thanks again!