1 Star 0 Fork 25

dashnfschina/util-linux

forked from src-anolis-os/util-linux 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0086-libuuid-check-clock-value-from-LIBUUID_CLOCK_FILE.patch 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
小龙 提交于 2023-05-24 11:31 . update to util-linux-2.32.1-42.el8_8
From 44cebf3e692053541f362b62f88f327c2c96e70e Mon Sep 17 00:00:00 2001
From: Michael Trapp <michael.trapp@sap.com>
Date: Tue, 2 Aug 2022 14:16:43 +0200
Subject: libuuid: check clock value from LIBUUID_CLOCK_FILE
The clock value from the LIBUUID_CLOCK_FILE must be checked in
case of an update of libuuid. If clock==CLOCK_SEQ_CONT it must
be set to a new value.
Signed-off-by: Karel Zak <kzak@redhat.com>
Upstream: http://github.com/util-linux/util-linux/commit/5d1424d85ac9e2a1369ee920038825c154ee5443
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2141969
---
libuuid/src/gen_uuid.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
index f557053f7..8dc38559f 100644
--- a/libuuid/src/gen_uuid.c
+++ b/libuuid/src/gen_uuid.c
@@ -274,6 +274,11 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
last.tv_usec = tv2;
adjustment = a;
}
+ // reset in case of reserved CLOCK_SEQ_CONT
+ if (clock_seq == CLOCK_SEQ_CONT) {
+ last.tv_sec = 0;
+ last.tv_usec = 0;
+ }
}
if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
--
2.38.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dashnfschina/util-linux.git
git@gitee.com:dashnfschina/util-linux.git
dashnfschina
util-linux
util-linux
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385