]> git.ipfire.org Git - thirdparty/util-linux.git/commit
uuidd: Avoid closing the server socket when calling create_daemon()
authorTheodore Ts'o <tytso@mit.edu>
Wed, 1 Jul 2009 02:47:54 +0000 (22:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Jul 2009 03:26:09 +0000 (23:26 -0400)
commitfdb3e93ce907cce3a2133f22bb780ecb317af76a
treee29e24bc33a24c37b1f56e9106bfb85abdc0a996
parent59ca44715a317ee48afed34ca7ef1ab710ba5046
uuidd: Avoid closing the server socket when calling create_daemon()

In the event that file descriptors 0-2 are closed when uuidd is
started, the server socket could be created as a file descriptor that
will get closed when create_daemon() tries detaching the uuidd daemon
from its controlling tty.   Avoid this case by using dup(2).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc-utils/uuidd.c