Page MenuHomeFreeBSD

Limit stdin in cmp(1).
ClosedPublic

Authored by oshogbo on Oct 7 2016, 6:11 PM.
Tags
None
Referenced Files
F87249211: D8184.diff
Sun, Jun 30, 7:57 PM
Unknown Object (File)
Fri, Jun 28, 5:59 PM
Unknown Object (File)
May 24 2024, 9:18 PM
Unknown Object (File)
Apr 20 2024, 3:58 AM
Unknown Object (File)
Apr 20 2024, 3:56 AM
Unknown Object (File)
Mar 8 2024, 3:15 AM
Unknown Object (File)
Dec 27 2023, 5:39 PM
Unknown Object (File)
Dec 27 2023, 5:11 PM
Subscribers
None

Details

Summary

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

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

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

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