d017ad
From cae4f3f433e4a308f70103e166c6afad30b59ca7 Mon Sep 17 00:00:00 2001
d017ad
From: Karel Zak <kzak@redhat.com>
d017ad
Date: Mon, 10 Oct 2022 09:37:51 +0200
d017ad
Subject: uuidd: fix random UUIDs
d017ad
d017ad
Commit f27876f introduces copy & past bug and replaces
d017ad
__uuid_generate_random() with __uuid_generate_time().
d017ad
d017ad
Fixes: https://github.com/util-linux/util-linux/issues/1837
d017ad
Signed-off-by: Karel Zak <kzak@redhat.com>
d017ad
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2133385
d017ad
Upstream: http://github.com/util-linux/util-linux/commit/b408a291d39e9b637f6104eb4e1f8e60816421e2
d017ad
---
d017ad
 misc-utils/uuidd.c | 4 +---
d017ad
 1 file changed, 1 insertion(+), 3 deletions(-)
d017ad
d017ad
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c
d017ad
index b859ccb8c..489d6b79a 100644
d017ad
--- a/misc-utils/uuidd.c
d017ad
+++ b/misc-utils/uuidd.c
d017ad
@@ -519,9 +519,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
d017ad
 			break;
d017ad
 		case UUIDD_OP_RANDOM_UUID:
d017ad
 			num = 1;
d017ad
-			ret = __uuid_generate_time_cont(uu, &num, uuidd_cxt->cont_clock_offset);
d017ad
-			if (ret < 0 && !uuidd_cxt->quiet)
d017ad
-				warnx(_("failed to open/lock clock counter"));
d017ad
+			__uuid_generate_random(uu, &num);
d017ad
 			if (uuidd_cxt->debug) {
d017ad
 				uuid_unparse(uu, str);
d017ad
 				fprintf(stderr, _("Generated random UUID: %s\n"), str);
d017ad
-- 
d017ad
2.39.1
d017ad