[Bug 234885] cmp(1) Capsicum error if stdin closed

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 14 03:47:20 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234885

Mark Johnston <markj at FreeBSD.org> changed:

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

--- Comment #1 from Mark Johnston <markj at FreeBSD.org> ---
Created attachment 201110
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=201110&action=edit
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 three
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 these
helpers.  I think the fcntl() calls in the patch should be lifted into the
corresponding Capsicum helpers.

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


More information about the freebsd-bugs mailing list