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
Unknown Object (File)
Sun, Jan 12, 2:51 AM
Unknown Object (File)
Dec 14 2024, 4:32 PM
Unknown Object (File)
Nov 25 2024, 11:36 AM
Unknown Object (File)
Nov 24 2024, 5:12 PM
Unknown Object (File)
Nov 19 2024, 7:30 AM
Unknown Object (File)
Nov 19 2024, 7:28 AM
Unknown Object (File)
Nov 16 2024, 8:03 AM
Unknown Object (File)
Nov 13 2024, 3:54 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

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

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.