summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcrelay/dhcrelay.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/dhcrelay/dhcrelay.c')
-rw-r--r--usr.sbin/dhcrelay/dhcrelay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/dhcrelay/dhcrelay.c b/usr.sbin/dhcrelay/dhcrelay.c
index e2408e59929..f349ca46e1e 100644
--- a/usr.sbin/dhcrelay/dhcrelay.c
+++ b/usr.sbin/dhcrelay/dhcrelay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcrelay.c,v 1.23 2005/01/25 16:55:04 norby Exp $ */
+/* $OpenBSD: dhcrelay.c,v 1.24 2005/05/02 02:29:27 djm Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
@@ -179,8 +179,8 @@ main(int argc, char *argv[])
if (chdir("/") == -1)
error("chdir(\"/\"): %m");
if (setgroups(1, &pw->pw_gid) ||
- setegid(pw->pw_gid) || setgid(pw->pw_gid) ||
- seteuid(pw->pw_uid) || setuid(pw->pw_uid))
+ setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) ||
+ setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid))
error("can't drop privileges: %m");
endpwent();