Posted Aug 27, 2009 9:47 UTC (Thu) by epa (subscriber, #39769)
[Link]
I think if the kernel developers don't have the guts to just turn on O_NOSTD
for all open() calls by default, then maybe the C library will. (With an
O_ALLOW_STD flag for those cases like the shell where you really do want to
fiddle with the standard file descriptors.)
O_NOSTD
Posted Aug 28, 2009 0:53 UTC (Fri) by willy (subscriber, #9762)
[Link]
This was already fixed years ago after Chuck Lever came up with the problem originally. Try running a setuid program with a standard file descriptor closed. You'll find that libcrt0 opens them again.