diff options
Diffstat (limited to 'src/crypto/rand/rand.c')
-rw-r--r-- | src/crypto/rand/rand.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crypto/rand/rand.c b/src/crypto/rand/rand.c index 8b11728..892b4ba 100644 --- a/src/crypto/rand/rand.c +++ b/src/crypto/rand/rand.c @@ -192,7 +192,12 @@ int RAND_pseudo_bytes(uint8_t *buf, size_t len) { return RAND_bytes(buf, len); } -void RAND_seed(const void *buf, int num) {} +void RAND_seed(const void *buf, int num) { + /* OpenSSH calls |RAND_seed| before jailing on the assumption that any needed + * file descriptors etc will be opened. */ + uint8_t unused; + RAND_bytes(&unused, sizeof(unused)); +} int RAND_load_file(const char *path, long num) { if (num < 0) { /* read the "whole file" */ |