Prevent unintended file desriptor leak in grantpt.
authorUlrich Drepper <drepper@redhat.com>
Wed, 25 Nov 2009 02:24:14 +0000 (18:24 -0800)
committerUlrich Drepper <drepper@redhat.com>
Wed, 25 Nov 2009 02:24:14 +0000 (18:24 -0800)
commit139ee080b6b428240bf49f3e6361f3ac729f891a
tree6d995b56cab939c5107371e83cd5fa53fe3c3284
parentfa214705b957d20621cb1190b467aa88bc9b69a3
Prevent unintended file desriptor leak in grantpt.

The pt_chown program is completely transparently called.  It might
not be able to live with the various file descriptors the program
has open at the time of the call (e.g., under SELinux).  Close all
but the needed descriptor and connect stdin, stdout, and stderr
with /dev/null.  pt_chown shouldn't print anything when called to
do real work.
ChangeLog
login/programs/pt_chown.c
sysdeps/unix/grantpt.c
sysdeps/unix/sysv/linux/grantpt.c [new file with mode: 0644]