diff options
author | Tim van der Molen <tim@cvs.openbsd.org> | 2015-12-01 20:23:47 +0000 |
---|---|---|
committer | Tim van der Molen <tim@cvs.openbsd.org> | 2015-12-01 20:23:47 +0000 |
commit | ab323e14eaaf7bed76ea5586e2edb0e0e2d41bd4 (patch) | |
tree | 398f6c0216cc35f010a7076843260304226ce27a /libexec/rpc.rusersd/rusersd.c | |
parent | f9007220229e6b601a1457ddc898cc34837a9090 (diff) |
Don't fall back to user nobody if _rusersd doesn't exist; "Of course!" deraadt@
Diffstat (limited to 'libexec/rpc.rusersd/rusersd.c')
-rw-r--r-- | libexec/rpc.rusersd/rusersd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index 36cbbbe79ca..00c52731c7c 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rusersd.c,v 1.16 2009/10/27 23:59:31 deraadt Exp $ */ +/* $OpenBSD: rusersd.c,v 1.17 2015/12/01 20:23:46 tim Exp $ */ /*- * Copyright (c) 1993 John Brezak @@ -75,8 +75,10 @@ main(int argc, char *argv[]) openlog("rpc.rusersd", LOG_NDELAY|LOG_CONS|LOG_PID, LOG_DAEMON); pw = getpwnam("_rusersd"); - if (!pw) - pw = getpwnam("nobody"); + if (!pw) { + syslog(LOG_ERR, "no such user _rusersd"); + exit(1); + } if (chroot("/var/empty") == -1) { syslog(LOG_ERR, "cannot chdir to /var/empty."); exit(1); |