diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-05-04 08:29:08 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-05-04 08:29:08 +0000 |
commit | 4bff412b12ecb4e31a765b0ac1719dcf156cc4bc (patch) | |
tree | 4fc17cf37e1b04f7e5dee78cc284d463bce73881 /usr.sbin/bind/lib | |
parent | bba52a931b41c86fe77dc64a4497d45386d2734b (diff) |
setres[ug]id; ok jakob@
Diffstat (limited to 'usr.sbin/bind/lib')
-rw-r--r-- | usr.sbin/bind/lib/isc/unix/privsep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/privsep.c b/usr.sbin/bind/lib/isc/unix/privsep.c index 8b76b4bd24f..4a770d11679 100644 --- a/usr.sbin/bind/lib/isc/unix/privsep.c +++ b/usr.sbin/bind/lib/isc/unix/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.5 2004/11/19 15:37:37 markus Exp $ */ +/* $OpenBSD: privsep.c,v 1.6 2005/05/04 08:29:07 djm Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -138,8 +138,8 @@ isc_drop_privs(const char *username, const char *dir) fatal("chdir failed"); 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)) fatal("can't drop privileges"); endpwent(); |