diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-05-03 07:01:24 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-05-03 07:01:24 +0000 |
commit | a25768b3e9daaa9aa29ecf239fc7f20f8406a85c (patch) | |
tree | 15a8544efd3fa4e137a68c9127d56afb2f1c0d3f /usr.sbin/bgpd/rde.c | |
parent | 3cfd5c82fb4a8cd553756bb8354ce3b91327726d (diff) |
setres[ug]id; ok claudio@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 28f83a64509..15a740cddfb 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.158 2005/04/28 13:54:45 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.159 2005/05/03 07:01:23 djm Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -148,10 +148,9 @@ rde_main(struct bgpd_config *config, struct peer *peer_l, bgpd_process = PROC_RDE; 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(); |