diff options
Diffstat (limited to 'lib/libc/net')
-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) |