summaryrefslogtreecommitdiffstats
path: root/libuuid
Commit message (Collapse)AuthorAgeFilesLines
* misc: fix some printf format stringsRuediger Meier2016-02-112-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the warnings below for OSX clang and add a few more casts for timeval: lib/at.c:131:27: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'off_t' (aka 'long long') [-Wformat] printf("%16jd bytes ", st.st_size); ~~~~~ ^~~~~~~~~~ lib/strutils.c:522:52: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] snprintf(buf, sizeof(buf), "%d%s%jd%s", dec, dp, frac, suffix); ~~~ ^~~~ lib/sysfs.c:468:42: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] len = snprintf(buf, sizeof(buf), "%ju", num); ~~~ ^~~ libuuid/src/gen_uuid.c:316:34: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat] clock_seq, last.tv_sec, last.tv_usec, adjustment); ^~~~~~~~~~~~ Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: make test_uuid_parser to read filesSami Kerola2015-10-181-111/+45Star
| | | | | | | This allows using the command to check uuidgen and uuidd are generating valid outputs. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add uuid parser checkSami Kerola2015-10-182-5/+11
| | | | | | | The check is based on code by Theodore Ts'o to test libuuid, from which unstable output is commented out. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libuuid: fix buffer overflow with long pathsKarel Zak2015-09-301-1/+6
| | | | | | | | | | Based on patch from Justin Akers, he wrote: > When building Openembedded inside a Jenkins matrix job the paths can > get quite long. This ensures libuuid won't crash when attempting to > connect to uuidd in such a scenario. Reported-by: Justin Akers <dafugg@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libuuid: return correct value for uuid_generate_time_safeRomain Bouvier2015-06-181-0/+3
| | | | | | | | | | Make return value consistent for consecutive calls. If you call uuid_generate_time_safe, it should always return -1 if it can't guarantee uniqueness. Without this patch, on consecutive calls where it can't guarantee uniqueness, the first call returns -1, but later calls return 0. Reported-by: Romain Bouvier <skunnyk@alteroot.org> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* build-sys: cleanup library symbol filesKarel Zak2014-11-202-5/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libuuid: remove _SVID_SOURCE pre-processor definitionSami Kerola2014-10-011-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | The _SVID_SOURCE is deprecated. In file included from /usr/include/stdio.h:27:0, from libuuid/src/gen_uuid.c:46: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] Notice that the Makefile.am has AM_CPPFLAGS = \ -include config.h \ that enforces the config.h is included before any other hearer. In the configure.ac there is AC_USE_SYSTEM_EXTENSIONS that makes all possible features that can be supported in a system are turned on. With these two there is absolutely no need for any legacy _SOURCE definitions. Reference: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=c941736c92fa3a319221f65f6755659b2a5e0a20 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libuuid: add extern qualifiers to uuid/uuid.h system headerSami Kerola2014-09-191-15/+15
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Only move shared libraries to /lib if they existsThomas Petazzoni2014-06-161-1/+1
| | | | | | | | | | | | | | | | | | In several Makemodule.am, there is a install-exec-hook-<library> target whose role is to move the shared library from /usr/lib to /lib, while keeping a symbolic link /usr/lib/libuuid.so -> ../../lib/<library>.so.<version>. However, when util-linux is built with --enable-static --disable-shared (as is needed on noMMU platforms that don't support shared libraries), no <library>.so is built, but the install-exec-hook-libuuid creates an invalid /usr/lib/<library>.so symbolic link, pointing to ../../lib (yes, the directory). This causes troubles later one when other libraries/programs are compiled with -l<library>, as gcc thinks a shared library is available because there's a file named /usr/lib/<library>.so. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* libuuid: (uuid.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-1/+1
| | | | | | Protect a full stop (.), that begins or ends a string, with \& Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (uuid_unparse.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-2/+4
| | | | | | | | | | | | | | | Change '\-' (minus) to '-' (code "hyphen-minus", rendered with the glyph 'hyphen' in troff), if it is a part of a compound word. Use \e to print the escape character, instead of \\, as \e is not interpreted in copy mode Protect a full stop (.), that begins or ends a string, with \& Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or use '.ad l' for the entire manual Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (man/uuid_time.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-1/+3
| | | | | | | | | Protect a full stop (.), that begins or ends a string, with \& Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or use '.ad l' for the entire manual Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (uuid_parse.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-2/+4
| | | | | | | | | | | Use \e for the printable escape character instead of \\ Protect a full stop (.), that begins or ends a string, with \& Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or use '.ad l' for the entire manual Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (uuid_is_null.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-1/+3
| | | | | | | | | Protect a full stop (.), that begins or ends a string, with \& Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or use '.ad l' for the entire manual Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (uuid_generate) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-2/+2
| | | | | | | | Change '-' to '\-', if it means a minus Protect a full stop (.), that begins or ends a string, with \& Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (uuid_copy.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-1/+3
| | | | | | | | | Protect a full stop (.), that begins or ends a string, with \& Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or use '.ad l' for the entire manual Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (uuid_compare.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-1/+3
| | | | | | | | | Protect a full stop (.), that begins or ends a string, with \& Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or use '.ad l' for the entire manual Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libuuid: (uuid_clear.3) Improve the typesetting of the manualBjarni Ingi Gislason2014-05-061-1/+3
| | | | | | | | | Protect a full stop (.), that begins or ends a string, with \& Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or use '.ad l' for the entire manual Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* COPYING: fix grammar of referring phrase, and indicate location betterBenno Schulenberg2013-10-081-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: add CFLAGS and LDFLAGS for daemons and shared libsKarel Zak2013-08-271-1/+6
| | | | | | | | This is necessary for paranoid security guys who believe that things like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the world a safer place... Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: remove repeated words [checkmans.sh]Sami Kerola2013-04-091-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libuuid: use O_CLOEXECKarel Zak2013-04-031-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: expand paths at make timeKarel Zak2012-08-151-1/+2
| | | | | | | | | | | | | autoconf docs about *dir variables (e.g bindir): ... A corollary is that you should not use these variables except in makefiles... ...you should not rely on AC_CONFIG_FILES to replace bindir and friends in your shell scripts and other files; instead, let make manage their replacement. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move tests to check_PROGRAMSKarel Zak2012-07-301-1/+1
| | | | | | Thanks to Mike Frysinger. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add minisg COPYING filesKarel Zak2012-07-271-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidd: use run configured state directorySami Kerola2012-07-101-1/+1
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: create static uuid_generate_*.3 filesKarel Zak2012-06-264-9/+4Star
| | | | | | | | | | | It seems more simple to create small three files with man page links than generate the files on the fly. Note that the libuuid/man directory is not in builddir by default so you have to create proper directory and then create the man pages... too complex task for this three tiny files. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup .gitignore filesKarel Zak2012-06-261-1/+0Star
| | | | | | | - move all binaries to top-level .gitignore - remove unnecessary */.gitignore files Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert libuuid/ to moduleKarel Zak2012-06-268-177/+87Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidd: move from /var/run/uuidd to /run/uuiddKarel Zak2012-06-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libuuid: move clock.txt path to header fileKarel Zak2012-06-182-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libuuid: use max() from c.hPetr Uzel2012-05-231-3/+1Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libuuid: move read_all to include/all-io.hPetr Uzel2012-05-151-25/+1Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libuuid: avoid double open and leaking fd (reworked)Petr Uzel2012-05-102-11/+19
| | | | | | | | | | | | | | This reverts commit 6126f7a53c57485a9a29ddd772765695f23c92e6 and fixes the double open and leaking descriptor in a different way, that is by using newly introduced function 'have_random_source()' to check whether good random source is available while deciding which uuid type to generate (random/time). This is better than calling random_get_fd() twice, passing the file descriptor down the stack and reusing it in next call to random_get_fd(). Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libuuid: avoid double open and leaking descriptorPetr Uzel2012-05-042-8/+11
| | | | | | | | | | | | | 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>
* libuuid: don't exec uuiddPetr Uzel2012-05-042-46/+3Star
| | | | | | | | | | Executing the daemon from the shared library is not quite elegant solution. Drop this functionality and require uuidd (should it be needed) to be started from the initscript or by socket-activation. References: http://www.spinics.net/lists/util-linux-ng/msg05967.html Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libuuid: use EXIT_FAILUREPetr Uzel2012-05-041-1/+1
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libuuid: fix typo in uuid_compare manpagePetr Uzel2012-04-271-1/+1
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libuuid: use get_fd_tabsize()Karel Zak2012-04-232-14/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libuuid: use randutilsDavidlohr Bueso2012-04-102-95/+7Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* build-sys: enhance readability of the autotools filesSami Kerola2012-02-283-9/+31
| | | | | | | | Several horizontal lists are turned to vertical, and sorted to alphabetical order. Additionally spaces are converted to tabs where ever possible. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libuuid: fix includes in man pagesKarel Zak2011-11-039-9/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libuuid: add limits.h include for OPEN_MAXmaximilian attems2011-09-071-0/+1
| | | | | | | Needed as definition for usage in close_all_fds(). Noticed on klibc build. Signed-off-by: maximilian attems <max@stro.at>
* docs: remove duplicated textSami Kerola2011-08-301-0/+5
| | | | | | | | | | Duplicate text is dealt by referring to license files. The `pg' command does not need separated license file because the source file has same text at top of it. http://www.spinics.net/lists/util-linux-ng/msg05069.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: Documentation directory addedSami Kerola2011-08-122-26/+1Star
| | | | | | | | Move readme, licence, change log, relese notes and other supplementary files to a Documentation directory. This commit does not change contents of any other but few Makefile.am files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: use top-level directory for libuuid rather than shlibs/uuidKarel Zak2011-06-0932-0/+2662
Signed-off-by: Karel Zak <kzak@redhat.com>