diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-10-12 19:40:41 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-10-12 19:40:41 +0000 |
commit | 2fb630e447810d268b9cdb20e950e2b2cf09ef52 (patch) | |
tree | bb549e616ea52b6501dc04941223fb603b9185e0 /libc/misc | |
parent | c752a13fff78cc0e30d79c0462d8628a5f3ff4a8 (diff) |
Remove /dev/erandom support, as [h]lfs does not use it in this form.
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/internals/__uClibc_main.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 4e2960918..1f2061e58 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -115,35 +115,10 @@ static __always_inline uintptr_t _dl_guard_setup(void) { uintptr_t ret; #ifndef __SSP_QUICK_CANARY__ - - size_t size; - -# ifdef __SSP_USE_ERANDOM__ - { - int mib[3]; - /* Random is another depth in Linux, hence an array of 3. */ - mib[0] = CTL_KERN; - mib[1] = KERN_RANDOM; - mib[2] = RANDOM_ERANDOM; - - if (SYSCTL(mib, 3, &ret, &size, NULL, 0) != (-1)) - if (size == (size_t) sizeof(ret)) - return ret; - } -# endif /* ifdef __SSP_USE_ERANDOM__ */ { - int fd; - -# ifdef __SSP_USE_ERANDOM__ - /* - * Attempt to open kernel pseudo random device if one exists before - * opening urandom to avoid system entropy depletion. - */ - if ((fd = OPEN("/dev/erandom", O_RDONLY)) == (-1)) -# endif - fd = OPEN("/dev/urandom", O_RDONLY); + int fd = OPEN("/dev/urandom", O_RDONLY); if (fd >= 0) { - size = READ(fd, &ret, sizeof(ret)); + size_t size = READ(fd, &ret, sizeof(ret)); CLOSE(fd); if (size == (size_t) sizeof(ret)) return ret; |