diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-04-25 15:43:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2016-04-25 15:43:35 +0000 |
commit | 7cd27a5c571f5d757dda9208176cf08095de1fe3 (patch) | |
tree | f1bf6ec054d21e23d7e635ec97c13961d6824eaf /libexec/rpc.rwalld | |
parent | 9afd754fc2d79efa2930090cb0995cd7d8aeb1e2 (diff) |
prefer setres{u,g}id() rather than manipulating both real and effective
ids, it clarifies these are full revocation situations.
ok millert
Diffstat (limited to 'libexec/rpc.rwalld')
-rw-r--r-- | libexec/rpc.rwalld/rwalld.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libexec/rpc.rwalld/rwalld.c b/libexec/rpc.rwalld/rwalld.c index 0c799733f2f..d049aaa18fb 100644 --- a/libexec/rpc.rwalld/rwalld.c +++ b/libexec/rpc.rwalld/rwalld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rwalld.c,v 1.14 2009/10/27 23:59:31 deraadt Exp $ */ +/* $OpenBSD: rwalld.c,v 1.15 2016/04/25 15:43:34 deraadt Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou @@ -75,10 +75,8 @@ main(int argc, char *argv[]) } 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); /* * See if inetd started us |