commit 128eb33f82ad7ace19a853536158faf5c193599a
parent 440beccd288317cf49d049f0deb57cb2597e6dcc
Author: Jordan Ritter <jpr5@darkridge.com>
Date: Mon, 11 Sep 2006 11:57:41 +0000
eh, why even bother compiling/linking the drop_privs code if it was disabled at compile-time in configure
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ngrep.c b/ngrep.c
@@ -1157,12 +1157,13 @@ void update_windowsize(int32_t e) {
}
}
+#if USE_DROPPRIVS
void drop_privs(void) {
struct passwd *pw;
uid_t newuid;
gid_t newgid;
- if ((getuid() || geteuid()) || dont_dropprivs || !USE_DROPPRIVS)
+ if ((getuid() || geteuid()) || dont_dropprivs)
return;
pw = getpwnam(DROPPRIVS_USER);
@@ -1189,6 +1190,8 @@ void drop_privs(void) {
clean_exit(-1);
}
}
+
+#endif
#endif
void usage(int8_t e) {