util-linux/include
Petr Uzel 6126f7a53c libuuid: avoid double open and leaking descriptor
We are opening /dev/urandom twice in uuid_generate(): first to check if
the file is available and then later __uuid_generate_random() again to
actually get the random data. Moreover, descriptor from the first open
is leaking.

Fix by passign the descriptor down the stack and reusing it there.

References: http://marc.info/?l=util-linux-ng&m=133406051131131&w=2

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-05-04 15:14:24 +02:00
..
Makefile.am build-sys: add ttyutils.h to dist 2012-04-27 12:30:37 +02:00
at.h lib: [at.c] add readlink_at(), fix semantic for absolute paths 2011-05-18 15:57:16 +02:00
bitops.h include: [bitops.h] make return values consistent 2011-08-02 12:33:10 +02:00
blkdev.h fdisk: move kernel geometry into blkdev 2012-04-10 12:21:16 +02:00
c.h losetup: make xgetpass more robust 2012-01-17 17:02:34 +01:00
canonicalize.h mount: and libblkid: covert /dev/dm-N to /dev/mapper/<name> 2009-10-26 13:33:03 +01:00
carefulputc.h Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
closestream.h build-sys: determine availability of __fpending() 2012-04-23 14:26:23 +02:00
cpuset.h lscpu: use function to search in cpu masks arrays 2011-09-09 23:27:40 +02:00
crc32.h lib: add a generic crc32() 2009-09-16 16:17:41 +02:00
env.h lib: [env] consolidate safe_getenv() usage 2011-01-03 12:28:48 +01:00
exitcodes.h include/exitcodes: clean up names, add _EX_ suffix 2012-03-20 11:22:08 +01:00
fileutils.h lib/fileutils: add get_fd_tabsize() 2012-04-23 13:58:39 +02:00
ismounted.h lib: import whole ismounted.c code from e2fsprogs 2009-10-14 01:13:18 +02:00
linux_reboot.h Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
linux_version.h lib: add linux_version.{c,h} 2007-11-06 02:40:13 +01:00
list.h libmount: fix "already mounted" detection on systems with mtab 2012-03-09 13:11:24 +01:00
loopdev.h lib/loopdev: more robust initialization 2012-04-02 17:33:41 +02:00
mangle.h lib/mangle: cleanup, add unhexmangle 2012-04-26 09:17:44 +02:00
match.h lib,match: split match_fstype() from libmount 2011-11-15 15:17:19 +01:00
mbsalign.h cfdisk: support non-ascii characters in input 2010-05-07 14:12:26 +02:00
md5.h build-sys: check HAVE_ definitions with #ifdef [smatch scan] 2011-12-02 18:21:46 +01:00
minix.h minix: add MINIX_ prefix to some global macros 2011-07-21 12:23:01 +02:00
nls.h include: [nls.h] define a macro for handling plurals with ngettext() 2011-08-02 14:13:44 +02:00
optutils.h include,optutils: add option_to_longopt() 2011-11-29 18:21:49 +01:00
pager.h lib: add pager functionality 2012-04-23 11:52:39 +02:00
pamfail.h chfn, chsh: new file pamfail.h for error printing 2011-11-29 17:57:39 +01:00
path.h chcpu: convert to use lib/path.c 2011-09-27 13:36:54 +02:00
pathnames.h wdctl: align with other util-linux commands 2012-05-03 15:00:07 +02:00
procutils.h procutils: include missing header 2011-05-05 14:01:39 +02:00
randutils.h libuuid: avoid double open and leaking descriptor 2012-05-04 15:14:24 +02:00
rpmatch.h include: add fallback for rpmatch() 2011-01-05 16:18:08 +01:00
setproctitle.h lib: cleanup setproctitle.c 2011-10-26 23:17:15 +02:00
strutils.h lib/strutils: add string_to_bitmask() 2012-05-03 17:28:44 +02:00
swapheader.h swaplabel: new command 2010-04-02 16:16:59 +02:00
sysfs.h sysfs: move blkid_devno_to_wholedisk to sysfs_devno_to_wholedisk 2012-03-27 13:16:19 +02:00
tt.h include/tt: remove obsolete stuff 2012-05-03 15:25:23 +02:00
ttyutils.h include/ttyutils.h: add include guards 2012-03-20 09:53:48 +01:00
usleep.h replace usleep() for systems that don't have them 2009-08-21 09:58:17 +02:00
wholedisk.h lib: wholedisk - extend API, add test program 2009-03-12 14:31:50 +01:00
widechar.h build-sys: fix ifdef ENABLE_WIDECHAR usage 2007-01-30 13:49:50 +01:00
writeall.h include: [writeall] add fwrite_all() 2011-08-02 13:53:41 +02:00
xalloc.h include: add asprintf wrapper 2012-03-18 14:28:05 +01:00
xgetpass.h losetup: move xgetpass() to lib/xgetpass.c 2012-01-11 15:17:06 +01:00