Page MenuHomeFreeBSD

elfdump: limit STDIN to no rights rather than closing it
ClosedPublic

Authored by emaste on Sep 20 2016, 7:15 PM.
Tags
None
Referenced Files
F85727980: D7984.diff
Sun, Jun 9, 4:56 PM
Unknown Object (File)
Fri, Jun 7, 1:28 PM
Unknown Object (File)
Fri, Jun 7, 4:15 AM
Unknown Object (File)
Fri, Jun 7, 3:10 AM
Unknown Object (File)
Mon, May 13, 10:41 AM
Unknown Object (File)
May 9 2024, 10:05 AM
Unknown Object (File)
May 2 2024, 6:22 AM
Unknown Object (File)
Mar 18 2024, 12:22 AM
Subscribers
None

Details

Summary

Closing stdin/stdout/stderr is often a bad idea as a future open() can end up with its fd. Leave STDIN_FILENO open and limit it to no rights instead.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste retitled this revision from to elfdump: limit STDIN to no rights rather than closing it.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: oshogbo, cem.
cem edited edge metadata.
This revision is now accepted and ready to land.Sep 20 2016, 7:24 PM
This revision was automatically updated to reflect the committed changes.