diff options
author | 1996-09-05 02:37:27 +0000 | |
---|---|---|
committer | 1996-09-05 02:37:27 +0000 | |
commit | 7005e6aa8544eadc1e8aeba7771e13bdd05a93cf (patch) | |
tree | a541e12a1ba5f1f77a0258176ce283a8ee0bcade /lib/libc/net/rcmd.c | |
parent | get 12am & 12pm correct; netbsd pr#2734, khym@bga.com [this was hell to test] (diff) | |
download | wireguard-openbsd-7005e6aa8544eadc1e8aeba7771e13bdd05a93cf.tar.xz wireguard-openbsd-7005e6aa8544eadc1e8aeba7771e13bdd05a93cf.zip |
ignore $RSH if we are setuid
Diffstat (limited to 'lib/libc/net/rcmd.c')
-rw-r--r-- | lib/libc/net/rcmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index 01554868d64..16ea9bc95ba 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -34,7 +34,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rcmd.c,v 1.17 1996/09/03 10:53:37 deraadt Exp $"; +static char *rcsid = "$OpenBSD: rcmd.c,v 1.18 1996/09/05 02:37:27 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -76,7 +76,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) char c, *p; /* call rcmdsh() with specified remote shell if appropriate. */ - if ((p = getenv("RSH"))) { + if (!issetugid() && (p = getenv("RSH"))) { struct servent *sp = getservbyname("shell", "tcp"); if (sp && sp->s_port == rport) |