From 0802526e7cb653700e5ea22777cac297b8233c33 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 2 May 2005 02:29:28 +0000 Subject: more setres[ug]id; ok deraadt@ --- usr.sbin/dhcrelay/dhcrelay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/dhcrelay/dhcrelay.c') 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 @@ -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(); -- cgit v1.2.3