Whamcloud - gitweb
libuuid: Make sure fd's 0, 1, and 2 are valid before exec'ing uuidd
authorTheodore Ts'o <tytso@mit.edu>
Mon, 29 Jun 2009 23:06:45 +0000 (19:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 29 Jun 2009 23:06:45 +0000 (19:06 -0400)
commite8b9466fc9d4aec66476f1bc7a48436da02ab557
tree83566be798ca00f1d4c5f08ec55e4575c598cca8
parentd9206a341452845c7a9da9e84d54520859f0eca3
libuuid: Make sure fd's 0, 1, and 2 are valid before exec'ing uuidd

When closing all of the file descriptors before starting uuidd, make
sure file descriptors 0, 1, and 2 are reserved by opening /dev/null.
This prevents strange bugs caused by assumptions regarding file
descriptors <= 2 as being special.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/uuid/gen_uuid.c