summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--entropy.c10
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f743c781..258bc047e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@
12 - (djm) Search for -lcrypt on FreeBSD too 12 - (djm) Search for -lcrypt on FreeBSD too
13 - (djm) fatal() on OpenSSL version mismatch 13 - (djm) fatal() on OpenSSL version mismatch
14 - (djm) Move PAM init to after fork for non-Solaris derived PAMs 14 - (djm) Move PAM init to after fork for non-Solaris derived PAMs
15 - (djm) Warning fix on entropy.c saved uid stuff. Patch from Mark Miller
16 <markm@swoon.net>
15 17
1620010226 1820010226
17 - (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again. 19 - (bal) Fixed bsd-snprinf.c so it now honors 'BROKEN_SNPRINTF' again.
@@ -4146,4 +4148,4 @@
4146 - Wrote replacements for strlcpy and mkdtemp 4148 - Wrote replacements for strlcpy and mkdtemp
4147 - Released 1.0pre1 4149 - Released 1.0pre1
4148 4150
4149$Id: ChangeLog,v 1.831 2001/02/26 22:28:23 djm Exp $ 4151$Id: ChangeLog,v 1.832 2001/02/26 22:47:16 djm Exp $
diff --git a/entropy.c b/entropy.c
index 2b983bba3..04fdc5cce 100644
--- a/entropy.c
+++ b/entropy.c
@@ -40,7 +40,7 @@
40#include "pathnames.h" 40#include "pathnames.h"
41#include "log.h" 41#include "log.h"
42 42
43RCSID("$Id: entropy.c,v 1.32 2001/02/26 22:20:58 djm Exp $"); 43RCSID("$Id: entropy.c,v 1.33 2001/02/26 22:47:16 djm Exp $");
44 44
45#ifndef offsetof 45#ifndef offsetof
46# define offsetof(type, member) ((size_t) &((type *)0)->member) 46# define offsetof(type, member) ((size_t) &((type *)0)->member)
@@ -850,8 +850,8 @@ void init_rng(void)
850 * Propagate the privileged uid to all of our uids. 850 * Propagate the privileged uid to all of our uids.
851 * Set the effective uid to the given (unprivileged) uid. 851 * Set the effective uid to the given (unprivileged) uid.
852 */ 852 */
853 if (original_uid != original_euid && setuid(original_euid) == -1 || 853 if (original_uid != original_euid && (setuid(original_euid) == -1 ||
854 seteuid(original_uid) == -1) 854 seteuid(original_uid) == -1))
855 fatal("Couldn't give up privileges"); 855 fatal("Couldn't give up privileges");
856#endif /* SAVED_IDS_WORK_WITH_SETEUID */ 856#endif /* SAVED_IDS_WORK_WITH_SETEUID */
857 857
@@ -866,8 +866,8 @@ void init_rng(void)
866 * Propagate the real uid (usually more privileged) to effective uid 866 * Propagate the real uid (usually more privileged) to effective uid
867 * as well. 867 * as well.
868 */ 868 */
869 if (original_uid != original_euid && seteuid(original_euid) == -1 || 869 if (original_uid != original_euid && (seteuid(original_euid) == -1 ||
870 setuid(original_uid) == -1) 870 setuid(original_uid) == -1))
871 fatal("Couldn't restore privileges"); 871 fatal("Couldn't restore privileges");
872#endif /* SAVED_IDS_WORK_WITH_SETEUID */ 872#endif /* SAVED_IDS_WORK_WITH_SETEUID */
873 873