util-linux/libuuid
Karel Zak d6ddf07d31 libuuid: fix name-based UUIDs
The current version is not fully compatible with RFC4122. It
incorrectly encodes UUID variant

	xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

where M is UUID version and N is UUID variant.

 $ python -c "import uuid ; print(uuid.uuid5(uuid.UUID(int=0), 'foo'))"
 aa752cea-8222-5bc8-acd9-555b090c0ccb
                    ^^

Old version:

 $ uuidgen --namespace 00000000-0000-0000-0000-000000000000 --name 'foo' --sha1
 aa752cea-8222-5bc8-8cd9-555b090c0ccb
                    ^^

Fixed version:
 ./uuidgen --namespace 00000000-0000-0000-0000-000000000000 --name 'foo' --sha1;
 aa752cea-8222-5bc8-acd9-555b090c0ccb
                    ^^

The patch uses uuid_unpack and uuid_pack. It makes code more readable
and allow to access proper octens. The same way we already use for
time and random based UUIDs.

Addresses: https://github.com/karelzak/util-linux/issues/683
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-31 12:43:17 +02:00
..
man Fix man page typos 2018-08-16 11:09:15 +02:00
src libuuid: fix name-based UUIDs 2018-08-31 12:43:17 +02:00
COPYING docs: use SPDX license names 2018-08-16 14:47:21 +02:00
Makemodule.am build-sys: expand paths at make time 2012-08-15 02:06:53 +02:00
uuid.pc.in build-sys: use top-level directory for libuuid rather than shlibs/uuid 2011-06-09 21:54:05 +02:00