Commit Graph

13 Commits (61de7f84fbdfac5460b7037feb9633d4ab7ef513)

Author SHA1 Message Date
Theodore Ts'o edab294f1c gen_uuid.c (get_random_bytes): Always xor in a stream of bytes
from the system PRNG (i.e., random/srandom, seeded from
	the time, pid, and uid) in case /dev/random isn't doing
	the right thing on a particular system.  It doesn't hurt,
	and it can help, in the case of a buggy /dev/random.
2003-04-03 08:25:15 -05:00
Theodore Ts'o 61bee88d45 gen_uuid.c (get_random_bytes): Don't spin forever if read()
returns EINTR or EAGAIN, so that when /dev/random is
	opened O_NONBLOCK, we don't end up spinning forever.
2002-10-31 15:17:16 -05:00
Theodore Ts'o b1416db322 ChangeLog, compare.c, gen_uuid.c, parse.c:
parse.c, compare.c: Include string.h to fix gcc -Wall complaints.
  gen_uuid.c: Define _SVID_SOURCE to avoid gcc -Wall errors because some
  	required structures wouldn't be otherwise defined.  Fix a minor gcc
  	-Wall nit in the declaration of get_random_fd().
2001-05-01 15:32:44 +00:00
Theodore Ts'o 96394d11b0 ChangeLog, copy.c, gen_uuid.c, tst_uuid.c, uuid_time.c:
uuid_time.c (main), tst_uuid.c (main): Fix gcc -Wall complaints.
  copy.c (uuid_copy): Change arguments to make it clear which argument
  	is the source and which is the destination.
  gen_uuid.c (get_random_fd): Use gettimeofday to seed the PRNG, so we
  	can take advantage of tv_usec to do (slightly) better at seeding it.
2001-01-12 18:30:54 +00:00
Theodore Ts'o 5dd7ff07d0 ChangeLog, gen_uuid.c:
gen_uuid.c (get_random_bytes): Use O_NONBLOCK when trying to open
  	/dev/random.  Break out the /dev/random initialization code into a
  	get_random_fd() function, and use that function in uuid_generate() to
  	determine whether to use uuid_generate_random() or
  	uuid_generate_time().
2000-06-12 17:35:13 +00:00
Theodore Ts'o 3030daa8ab Many files:
clear.c, compare.c, copy.c, gen_uuid.c, isnull.c, pack.c, parse.c,
  	uuid.h, uuidP.h: Changed copyright to be the LGPL.
2000-04-07 20:06:04 +00:00
Theodore Ts'o fa7cc28004 ChangeLog, gen_uuid.c:
gen_uuid.c (get_clock): Fix bug where the last timeval wasn't getting
  	set, causing potentially duplicate UUID's to be generated.
2000-04-03 16:51:06 +00:00
Theodore Ts'o e589f678e1 ChangeLog, gen_uuid.c:
gen_uuid.c (get_random_bytes): Make more paranoid about misbehaving
  	/dev/urandom.  If we get a return of zero without an error more than 8
  	times in a row, we break out and return an error.  Also, if
  	/dev/urandom doesn't exist, try /dev/random.
ChangeLog, ext2fs.h:
  ext2fs.h: Use AUTOCONF SIZEOF_* macros if available to determine how
  	to define __s64 and __u64.  Turn off "compression is experimental"
  	warning if the cpp macro I_KNOW_THAT_COMPRESSION_IS_EXPERIMENTAL is
  	defined.
2000-04-03 13:45:40 +00:00
Theodore Ts'o b19d1a959e Many files:
* gen_uuid.c (get_random_bytes): Use a while loop when reading from
  	/dev/urandom so that if we get interrupted while reading the right
  	thing happens.
  	(uuid_generate_random): Add new function which uses the new UUID
  	format which uses 122 random bits to form the 128-bit UUID.
  	(uuid_generate): Rename the old uuid_generate to be
  	uuid_generate_time, and create a new uuid_generate function which
  	calls either uuid_generate_random or uuid_genereate_time depending on
  	whether /dev/urandom is present.
  uuid_generate.3.in: Update to reflect changesin uuid_generate and its
  	two new variants.
  tst_uuid.c: Updated to test new uuid_generate functions, and to
  	reflect new semantics of uuid_compare.  Added tests to make sure the
  	UUID type and variant created by UUID generate is correct.
  uuid_time.c (uuid_variant, uuid_type): Added new functions to return
  	the UUID variant and type information.  The debugging program now
  	prints the UUID variant and type, and warns if the unparsed time
  	information is likely to be incorrect.
  uuid_parse.3.in, libuuid.3.in: Miscellaneous text cleanups.
uuidgen.1.in:
  Miscellaneous text cleanups.
1999-06-18 00:32:03 +00:00
Theodore Ts'o dc3710e5ea ChangeLog, gen_uuid.c:
gen_uuid.c (get_node_id): Use char * instead of caddr_t, which doesn't
  always exist for glibc.
1998-03-09 03:34:48 +00:00
Theodore Ts'o d546447fda ChangeLog, gen_uuid.c:
Use clock_reg instead of clock, since clock conflicts with a header
  file declaration.
1997-10-15 01:52:44 +00:00
Theodore Ts'o 19c78dc07f Many files:
Checked in e2fsprogs-1.07
1997-04-29 16:17:09 +00:00
Theodore Ts'o 1e3472c5f3 Many files:
Checked in e2fsprogs 1.05
1997-04-29 14:53:37 +00:00