aboutsummaryrefslogtreecommitdiff
path: root/trans/random.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-30 21:03:55 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-30 23:25:13 +0100
commit34c71acbc9ae19575aa11a1b0f79b39ba02ba784 (patch)
treeddfee1da5168fa62170f57c960c693be07175f31 /trans/random.c
parent0a9e994335f5436c0c1e77c8c79e7b322f5da746 (diff)
downloadhurd-34c71acbc9ae19575aa11a1b0f79b39ba02ba784.tar.gz
hurd-34c71acbc9ae19575aa11a1b0f79b39ba02ba784.tar.bz2
hurd-34c71acbc9ae19575aa11a1b0f79b39ba02ba784.zip
random: Add a trivfs_server_name
glibc uses /dev/urandom for getrandom(), and from version 2.34 malloc initialization uses it. We need to be able to know whether we are running the random translator itself, in which case we can't read ourself.
Diffstat (limited to 'trans/random.c')
-rw-r--r--trans/random.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/trans/random.c b/trans/random.c
index f0b99dd4..b409d39f 100644
--- a/trans/random.c
+++ b/trans/random.c
@@ -44,6 +44,8 @@
+char *trivfs_server_name = "random";
+
/* Entropy pool. We use one of the SHAKE algorithms from the Keccak
family. Being a sponge construction, it allows the extraction of
arbitrary amounts of pseudorandom data. */