summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd
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/dhcpd
parent2da213a15d6db3d71af4f7378f5a2f92854d3b02 (diff)
more setres[ug]id; ok deraadt@
Diffstat (limited to 'usr.sbin/dhcpd')
-rw-r--r--usr.sbin/dhcpd/dhcpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/dhcpd/dhcpd.c b/usr.sbin/dhcpd/dhcpd.c
index 93371992098..6afd37972f8 100644
--- a/usr.sbin/dhcpd/dhcpd.c
+++ b/usr.sbin/dhcpd/dhcpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.c,v 1.22 2004/10/31 10:43:38 canacar Exp $ */
+/* $OpenBSD: dhcpd.c,v 1.23 2005/05/02 02:29:27 djm Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
@@ -135,8 +135,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();