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.rusersd/rusersd.c | |
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.rusersd/rusersd.c')
-rw-r--r-- | libexec/rpc.rusersd/rusersd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index 00c52731c7c..47b67caa53b 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rusersd.c,v 1.17 2015/12/01 20:23:46 tim Exp $ */ +/* $OpenBSD: rusersd.c,v 1.18 2016/04/25 15:43:34 deraadt Exp $ */ /*- * Copyright (c) 1993 John Brezak @@ -87,10 +87,8 @@ main(int argc, char *argv[]) if (pw) { 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); } /* |