summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-15 23:47:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-15 23:47:58 +0000
commit26e2b293859a559593aded9335120e9e0c1d295e (patch)
tree69bebbc1453e9c103b7fb106a25b4ed884a6ade0 /libexec
parenta3d64f962304319a84d74cb206a3d8bf6373f4f8 (diff)
5 new uid/gid sets; millert ok
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rpc.rstatd/rstatd.c8
-rw-r--r--libexec/rpc.rusersd/rusersd.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c
index fe52c06664d..86a35afd986 100644
--- a/libexec/rpc.rstatd/rstatd.c
+++ b/libexec/rpc.rstatd/rstatd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rstatd.c,v 1.11 2002/06/28 22:59:20 deraadt Exp $ */
+/* $OpenBSD: rstatd.c,v 1.12 2002/07/15 23:47:57 deraadt Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -34,7 +34,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rstatd.c,v 1.11 2002/06/28 22:59:20 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rstatd.c,v 1.12 2002/07/15 23:47:57 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -87,7 +87,9 @@ main(int argc, char *argv[])
struct sockaddr_in from;
SVCXPRT *transp;
- pw = getpwnam("nobody");
+ pw = getpwnam("_rstatd");
+ if (!pw)
+ pw = getpwnam("nobody");
if (chroot("/var/empty") == -1) {
syslog(LOG_ERR, "cannot chdir to /var/empty.");
exit(1);
diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c
index 520a351863a..a9913eded31 100644
--- a/libexec/rpc.rusersd/rusersd.c
+++ b/libexec/rpc.rusersd/rusersd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rusersd.c,v 1.9 2002/06/28 23:22:21 deraadt Exp $ */
+/* $OpenBSD: rusersd.c,v 1.10 2002/07/15 23:47:57 deraadt Exp $ */
/*-
* Copyright (c) 1993 John Brezak
@@ -29,7 +29,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rusersd.c,v 1.9 2002/06/28 23:22:21 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rusersd.c,v 1.10 2002/07/15 23:47:57 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -74,7 +74,9 @@ main(int argc, char *argv[])
exit(1);
}
- pw = getpwnam("nobody");
+ pw = getpwnam("_rusersd");
+ if (!pw)
+ pw = getpwnam("nobody");
if (chroot("/var/empty") == -1) {
syslog(LOG_ERR, "cannot chdir to /var/empty.");
exit(1);