8000 libuuid: move clock state file from /var/lib to /var/run · karelzak/util-linux-work@ab2e7dd · GitHub
[go: up one dir, main page]

Skip to content

Commit ab2e7dd

Browse files
committed
libuuid: move clock state file from /var/lib to /var/run
Signed-off-by: Karel Zak <kzak@redhat.com>
1 parent a0fca6a commit ab2e7dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shlibs/uuid/src/gen_uuid.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
THREAD_LOCAL unsigned short jrand_seed[3];
110110
#endif
111111

112+
#define UUID_CLOCK_STATE "/var/run/libuuid/clock"
113+
112114
#ifdef _WIN32
113115
static void gettimeofday (struct timeval *tv, void *dummy)
114116
{
@@ -322,8 +324,7 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
322324

323325
if (state_fd == -2) {
324326
save_umask = umask(0);
325-
state_fd = open("/var/lib/libuuid/clock.txt",
326-
O_RDWR|O_CREAT, 0660);
327+
state_fd = open(UUID_CLOCK_STATE, O_RDWR|O_CREAT, 0660);
327328
(void) umask(save_umask);
328329
state_f = fdopen(state_fd, "r+");
329330
if (!state_f) {

0 commit comments

Comments
 (0)
0