summaryrefslogtreecommitdiff
path: root/misc/uuidd.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-09Fix more spelling errors found by translators and add pluralizationTheodore Ts'o1-3/+8
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-18Shorten compile commands run by the build systemTheodore Ts'o1-0/+1
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-16uuidd: Add missing break to option case statementEric Sandeen1-0/+1
Specifying the "-n" option to uuidd would incorrectly fall through to the "-p" case, and assign that number to the pidfile_path. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2009-06-29libuuid, uuidd: Avoid infinite loop while reading from the socket fdTheodore Ts'o1-5/+9
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>
2009-06-29uuidd: Avoid closing the server socket when calling create_daemon()Theodore Ts'o1-0/+12
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>
2009-04-18uuidd: Fix warn_unused_result warnings from gccTheodore Ts'o1-7/+26
Fixed a potential bug caused by partial returns from the write system call (especially possible for network connections). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27Remove trailing whitespace for the entire source treeTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-17Fix miscellaneous gcc -Wall warningsTheodore Ts'o1-7/+8
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-14uuidd: Fix issues identified by SuSE's security teamMatthias Koenig1-15/+29
SuSE's security team audited uuidd and came up with these issues. None of them are serious given that uuidd runs setuid as a unprivileged user which has no special access other than libuuid directory, but it's good to get them fixed. Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-17uuidd: Fix pid file so it has the correct pid numberTheodore Ts'o1-132/+132
The pid file was getting created before the fork(), so it had the incorrect pid number. No one noticed for a while, since "uuidd -k" will kill the daemon and it has enough automatic convenience functions that it's usually not necessary to refer to the pid file except as a convenient place for uuidd to lock against multiple instances of the daemon starting up. Addresses-Sourceforge-Bug: #1893244 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-01uuidd: Add _GNU_SOURCE #define to pick up setres[ug]id() prototypesTheodore Ts'o1-0/+2
Addresses-Sourceforge-Patch: #1861663 Reported-by: Mike Frysinger <vapier@users.sourceforge.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-25uuidd: Avoid race conditions to that only one uuidd is startedTheodore Ts'o1-42/+64
Use an improved locking protocol based on the pid file to assure that only one uuidd is started. Apparently the kernel does not prevent multiple processes from racing to bind to a Unix domain socket. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-12-16Add uuidd daemon to prevent duplicate time-based UUID'sTheodore Ts'o1-0/+518
Also store the clock sequence information in a state file in /var/lib/misc/uuid-clock so that if the time goes backwards the clock sequence counter can get bumped. This allows us to completely correctly generate time-based (version 1) UUID's according to the algorithm specified RFC 4122. Addresses-Sourceforge-Bug: #1529672 Addresses-Red-Hat-Bugzilla: #233471 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>