forked from pool/glibc
Andreas Schwab
38c25e64ac
(bsc#1230965, BZ #32214) - Use nss-systemd by default also in SLE (bsc#1230638) OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=721
29 lines
766 B
Diff
29 lines
766 B
Diff
From 5f62cf88c4530c11904482775b7582bd7f6d80d2 Mon Sep 17 00:00:00 2001
|
|
From: Andreas Schwab <schwab@suse.de>
|
|
Date: Wed, 25 Sep 2024 11:49:30 +0200
|
|
Subject: [PATCH] Fix missing randomness in __gen_tempname (bug 32214)
|
|
|
|
Make sure to update the random value also if getrandom fails.
|
|
|
|
Fixes: 686d542025 ("posix: Sync tempname with gnulib")
|
|
---
|
|
sysdeps/posix/tempname.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
|
|
index c00fe0c181..fc30958a0c 100644
|
|
--- a/sysdeps/posix/tempname.c
|
|
+++ b/sysdeps/posix/tempname.c
|
|
@@ -117,6 +117,8 @@ random_bits (random_value *r, random_value s)
|
|
succeed. */
|
|
#if !_LIBC
|
|
*r = mix_random_values (v, clock ());
|
|
+#else
|
|
+ *r = v;
|
|
#endif
|
|
return false;
|
|
}
|
|
--
|
|
2.46.2
|
|
|