Blame SOURCES/0086-libuuid-check-clock-value-from-LIBUUID_CLOCK_FILE.patch

f46785
From 44cebf3e692053541f362b62f88f327c2c96e70e Mon Sep 17 00:00:00 2001
257b8c
From: Michael Trapp <michael.trapp@sap.com>
257b8c
Date: Tue, 2 Aug 2022 14:16:43 +0200
257b8c
Subject: libuuid: check clock value from LIBUUID_CLOCK_FILE
257b8c
257b8c
The clock value from the LIBUUID_CLOCK_FILE must be checked in
257b8c
case of an update of libuuid. If clock==CLOCK_SEQ_CONT it must
257b8c
be set to a new value.
257b8c
257b8c
Signed-off-by: Karel Zak <kzak@redhat.com>
257b8c
Upstream: http://github.com/util-linux/util-linux/commit/5d1424d85ac9e2a1369ee920038825c154ee5443
257b8c
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2141969
257b8c
---
257b8c
 libuuid/src/gen_uuid.c | 5 +++++
257b8c
 1 file changed, 5 insertions(+)
257b8c
257b8c
diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
257b8c
index f557053f7..8dc38559f 100644
257b8c
--- a/libuuid/src/gen_uuid.c
257b8c
+++ b/libuuid/src/gen_uuid.c
257b8c
@@ -274,6 +274,11 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
257b8c
 			last.tv_usec = tv2;
257b8c
 			adjustment = a;
257b8c
 		}
257b8c
+		// reset in case of reserved CLOCK_SEQ_CONT
257b8c
+		if (clock_seq == CLOCK_SEQ_CONT) {
257b8c
+			last.tv_sec = 0;
257b8c
+			last.tv_usec = 0;
257b8c
+		}
257b8c
 	}
257b8c
 
257b8c
 	if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
257b8c
-- 
257b8c
2.38.1
257b8c