Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2019 03:47:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 234885] cmp(1) Capsicum error if stdin closed
Message-ID:  <bug-234885-227-xFAUYT19Pg@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-234885-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-234885-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234885

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
Created attachment 201110
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D201110&action=
=3Dedit
patch

The attached patch should fix this.  We have the same problem if stdout or
stderr
is closed, since cmp(1) calls caph_limit_{stdout,stderr}().  Also, if all t=
hree
streams are closed, the caph_limit_stderr() call will fail because
STDERR_FILENO isn't a valid fd.

These problems aren't specific to cmp(1), they'll affect anything using the=
se
helpers.  I think the fcntl() calls in the patch should be lifted into the
corresponding Capsicum helpers.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-234885-227-xFAUYT19Pg>