Page MenuHomeFreeBSD

Limit stdin in cmp(1).
ClosedPublic

Authored by oshogbo on Oct 7 2016, 6:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 16, 8:50 PM
Unknown Object (File)
Jan 18 2026, 10:38 AM
Unknown Object (File)
Jan 17 2026, 8:00 AM
Unknown Object (File)
Jan 10 2026, 2:51 AM
Unknown Object (File)
Dec 31 2025, 9:46 PM
Unknown Object (File)
Dec 30 2025, 4:09 AM
Unknown Object (File)
Dec 11 2025, 7:02 AM
Unknown Object (File)
Dec 1 2025, 11:56 PM
Subscribers
None

Details

Summary

If stdin was not choose as one of the input descriptor, limit it.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

oshogbo retitled this revision from to Limit stdin in cmp(1)..
oshogbo updated this object.
oshogbo edited the test plan for this revision. (Show Details)
oshogbo added reviewers: allanjude, emaste, cem.
cem edited edge metadata.
This revision is now accepted and ready to land.Oct 7 2016, 6:28 PM
cmp.c
168–169 ↗(On Diff #21159)

FYI you can do this as cap_rights_limit(STDIN_FILENO, cap_rights_init(&rights)) if you're so inclined.

emaste edited edge metadata.
This revision was automatically updated to reflect the committed changes.
cmp.c
168–169 ↗(On Diff #21159)

That generally wraps in an ugly way if you're at any indentation at all.