diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-05-03 01:01:16 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-05-03 01:01:16 +0000 |
commit | 6e3d4669e24109b707ee132715b0e72c4f4049ab (patch) | |
tree | 35cdb910d7fd60d0b1c36c4322665398cb0ea552 /usr.sbin/rbootd | |
parent | d7a12bc06a5691c87253eb610bad11c519521e3a (diff) |
more setres[ug]id; ok deraadt@
Diffstat (limited to 'usr.sbin/rbootd')
-rw-r--r-- | usr.sbin/rbootd/rbootd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/rbootd/rbootd.c b/usr.sbin/rbootd/rbootd.c index b4a6e63db38..7089658af7f 100644 --- a/usr.sbin/rbootd/rbootd.c +++ b/usr.sbin/rbootd/rbootd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbootd.c,v 1.20 2004/05/01 00:39:22 deraadt Exp $ */ +/* $OpenBSD: rbootd.c,v 1.21 2005/05/03 01:01:14 djm Exp $ */ /* $NetBSD: rbootd.c,v 1.5 1995/10/06 05:12:17 thorpej Exp $ */ /* @@ -51,7 +51,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)rbootd.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$OpenBSD: rbootd.c,v 1.20 2004/05/01 00:39:22 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rbootd.c,v 1.21 2005/05/03 01:01:14 djm Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -202,8 +202,8 @@ main(int argc, char *argv[]) exit(1); } 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)) { syslog(LOG_CRIT, "can't drop privileges: %m"); exit(1); } |