summaryrefslogtreecommitdiff
path: root/entropy.c
diff options
context:
space:
mode:
Diffstat (limited to 'entropy.c')
-rw-r--r--entropy.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/entropy.c b/entropy.c
index 84c15eb76..da1a391f3 100644
--- a/entropy.c
+++ b/entropy.c
@@ -45,7 +45,7 @@
45 * XXX: we should tell the child how many bytes we need. 45 * XXX: we should tell the child how many bytes we need.
46 */ 46 */
47 47
48RCSID("$Id: entropy.c,v 1.42 2002/04/18 12:53:27 djm Exp $"); 48RCSID("$Id: entropy.c,v 1.43 2002/04/21 18:26:10 tim Exp $");
49 49
50#ifndef OPENSSL_PRNG_ONLY 50#ifndef OPENSSL_PRNG_ONLY
51#define RANDOM_SEED_SIZE 48 51#define RANDOM_SEED_SIZE 48
@@ -87,9 +87,10 @@ seed_rng(void)
87 close(devnull); 87 close(devnull);
88 88
89 if (original_uid != original_euid && 89 if (original_uid != original_euid &&
90 setuid(original_uid) == -1) { 90 ( seteuid(getuid()) == -1 ||
91 fprintf(stderr, "(rand child) setuid: %s\n", 91 setuid(original_uid) == -1) ) {
92 strerror(errno)); 92 fprintf(stderr, "(rand child) setuid(%d): %s\n",
93 original_uid, strerror(errno));
93 _exit(1); 94 _exit(1);
94 } 95 }
95 96