[Bug 234885] cmp(1) Capsicum error if stdin closed
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jan 11 20:07:07 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234885
Bug ID: 234885
Summary: cmp(1) Capsicum error if stdin closed
Product: Base System
Version: 12.0-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: naddy at FreeBSD.org
cmp(1) errors out with a Capsicum error when called with stdin closed:
$ sh -c 'cmp /bin/ls /bin/cat <&-'
cmp: /bin/ls: Capabilities insufficient
Since fd 0 is closed, open() of the first file argument returns fd=0, and a
subsequent fstat(0, ...) produces the error.
I found this because GNU tar 1.31's test suite includes some test scripts that,
for whatever reason, close stdin (exec <&-) and later call cmp.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list