Commit Graph

13 Commits (b2f5ce5516a0b6d261876884139043c8e6579f0a)

Author SHA1 Message Date
Theodore Ts'o 3fcd8fe8ac Fix more spelling errors found by translators and add pluralization
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 17:54:23 -04:00
Theodore Ts'o d1154eb460 Shorten compile commands run by the build system
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-18 17:34:37 -04:00
Eric Sandeen 6a1dfb3b62 uuidd: Add missing break to option case statement
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>
2011-09-16 18:43:05 -04:00
Theodore Ts'o caa6003b64 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>
2009-06-29 20:03:20 -04:00
Theodore Ts'o 2842bb3188 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>
2009-06-29 19:32:50 -04:00
Theodore Ts'o 38e7385e74 uuidd: Fix warn_unused_result warnings from gcc
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>
2009-04-18 09:14:31 -04:00
Theodore Ts'o efc6f628e1 Remove trailing whitespace for the entire source tree
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-08-27 23:07:54 -04:00
Theodore Ts'o 2d328bb76d Fix miscellaneous gcc -Wall warnings
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-03-17 23:17:13 -04:00
Matthias Koenig 4415b03eaa uuidd: Fix issues identified by SuSE's security team
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-03-14 14:38:42 -04:00
Theodore Ts'o cfa30fd554 uuidd: Fix pid file so it has the correct pid number
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-02-17 17:33:48 -05:00
Theodore Ts'o e5679a6ca4 uuidd: Add _GNU_SOURCE #define to pick up setres[ug]id() prototypes
Addresses-Sourceforge-Patch: #1861663

Reported-by: Mike Frysinger <vapier@users.sourceforge.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-01-01 09:30:46 -05:00
Theodore Ts'o 113d636a2b uuidd: Avoid race conditions to that only one uuidd is started
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-25 14:19:15 -05:00
Theodore Ts'o 740837def7 Add uuidd daemon to prevent duplicate time-based UUID's
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>
2007-12-16 17:28:46 -05:00