diff options
author | 2022-04-10 23:01:53 +0200 | |
---|---|---|
committer | 2022-04-10 23:01:53 +0200 | |
commit | d810539a73ec6b976007b8aa075cb9046507afba (patch) | |
tree | 95dd0f5af3bdb70495e552f451e9cd9a0f05d174 | |
parent | Use *at family of functions (diff) | |
download | seedrng-d810539a73ec6b976007b8aa075cb9046507afba.tar.xz seedrng-d810539a73ec6b976007b8aa075cb9046507afba.zip |
An ioctl does not require write access
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | seedrng.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -292,7 +292,7 @@ static int seed_rng(uint8_t *seed, size_t len, bool credit) } memcpy(req.buffer, seed, len); - random_fd = open("/dev/random", O_RDWR); + random_fd = open("/dev/random", O_RDONLY); if (random_fd < 0) return -1; ret = ioctl(random_fd, RNDADDENTROPY, &req); |