diff options
author | beck <> | 2014-07-13 08:24:20 +0000 |
---|---|---|
committer | beck <> | 2014-07-13 08:24:20 +0000 |
commit | ebcfa9213de55892e384e1b884c4751637991f5f (patch) | |
tree | cc700dd34961148aad099ecbd212e3b44328c09f /src/lib/libcrypto/crypto/getentropy_linux.c | |
parent | a6ba1a5d2fcf97f553aee1fbc4215ea2f01ff04c (diff) | |
download | openbsd-ebcfa9213de55892e384e1b884c4751637991f5f.tar.gz openbsd-ebcfa9213de55892e384e1b884c4751637991f5f.tar.bz2 openbsd-ebcfa9213de55892e384e1b884c4751637991f5f.zip |
Take away the use of the address of main as a source of entropy. Causes
distractions to people testing and seeing link errors in some setups.
This will come back in another form
ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/crypto/getentropy_linux.c')
-rw-r--r-- | src/lib/libcrypto/crypto/getentropy_linux.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/crypto/getentropy_linux.c b/src/lib/libcrypto/crypto/getentropy_linux.c index f550a9d365..e9a1ddb2e2 100644 --- a/src/lib/libcrypto/crypto/getentropy_linux.c +++ b/src/lib/libcrypto/crypto/getentropy_linux.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getentropy_linux.c,v 1.21 2014/07/12 20:41:47 wouter Exp $ */ | 1 | /* $OpenBSD: getentropy_linux.c,v 1.22 2014/07/13 08:24:20 beck Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> | 4 | * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> |
@@ -69,7 +69,9 @@ | |||
69 | 69 | ||
70 | int getentropy(void *buf, size_t len); | 70 | int getentropy(void *buf, size_t len); |
71 | 71 | ||
72 | #if 0 | ||
72 | extern int main(int, char *argv[]); | 73 | extern int main(int, char *argv[]); |
74 | #endif | ||
73 | static int gotdata(char *buf, size_t len); | 75 | static int gotdata(char *buf, size_t len); |
74 | static int getentropy_urandom(void *buf, size_t len); | 76 | static int getentropy_urandom(void *buf, size_t len); |
75 | #ifdef CTL_MAXNAME | 77 | #ifdef CTL_MAXNAME |
@@ -342,7 +344,9 @@ getentropy_fallback(void *buf, size_t len) | |||
342 | HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1, | 344 | HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1, |
343 | sigset); | 345 | sigset); |
344 | 346 | ||
347 | #if 0 | ||
345 | HF(main); /* an addr in program */ | 348 | HF(main); /* an addr in program */ |
349 | #endif | ||
346 | HF(getentropy); /* an addr in this library */ | 350 | HF(getentropy); /* an addr in this library */ |
347 | HF(printf); /* an addr in libc */ | 351 | HF(printf); /* an addr in libc */ |
348 | p = (char *)&p; | 352 | p = (char *)&p; |