Whamcloud - gitweb
libuuid, uuidd: Avoid infinite loop while reading from the socket fd
authorTheodore Ts'o <tytso@mit.edu>
Tue, 30 Jun 2009 00:03:20 +0000 (20:03 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 30 Jun 2009 00:03:20 +0000 (20:03 -0400)
commitcaa6003b6419d001593478a46fb4cbf8e502e818
tree26e046457fef03f6ee15b8113e0b09b1f30c7e7a
parent2842bb31880643f270e79622769def0f9b1fac59
libuuid, uuidd: Avoid infinite loop while reading from the socket fd

If for some reason the uuidd daemon or the process calling uuidd
exited unexpectely, the read_all() function would end up looping
forever, either in uuidd or in libuuid.  Fix this terminating the loop
if no data can be read after five tries to read from the file
descriptor.

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