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
F174640121: D7984.diff
Sun, Oct 4, 9:11 PM
Unknown Object (File)
Sat, Oct 3, 3:18 PM
Unknown Object (File)
Wed, Sep 30, 4:03 AM
Unknown Object (File)
Sun, Sep 27, 4:58 PM
Unknown Object (File)
Fri, Sep 25, 9:51 PM
Unknown Object (File)
Sun, Sep 20, 11:50 AM
Unknown Object (File)
Fri, Sep 18, 3:41 AM
Unknown Object (File)
Sat, Sep 12, 8:20 PM
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.