summaryrefslogtreecommitdiff
path: root/entropy.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-27 09:47:16 +1100
committerDamien Miller <djm@mindrot.org>2001-02-27 09:47:16 +1100
commit248131ae9905cb3e45e8bee9246bd1b0cc96fb62 (patch)
tree318e62c7f9e311343080b80eaf8bc7c05ebd2ea5 /entropy.c
parent5a7613186bb74394912b179689190f439bfbba27 (diff)
- (djm) Warning fix on entropy.c saved uid stuff. Patch from Mark Miller
<markm@swoon.net>
Diffstat (limited to 'entropy.c')
-rw-r--r--entropy.c10
1 files changed, 5 insertions, 5 deletions
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