summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcrelay/dhcrelay.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2005-05-02 02:29:28 +0000
committerDamien Miller <djm@cvs.openbsd.org>2005-05-02 02:29:28 +0000
commit0802526e7cb653700e5ea22777cac297b8233c33 (patch)
tree516a849b63b24efcf14df386cbb2a56838f5a1c1 /usr.sbin/dhcrelay/dhcrelay.c
parent2da213a15d6db3d71af4f7378f5a2f92854d3b02 (diff)
more setres[ug]id; ok deraadt@
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();