diff options
author | 2001-02-10 21:55:07 +0000 | |
---|---|---|
committer | 2001-02-10 21:55:07 +0000 | |
commit | 865ae75bb2d939d9d14ee6b40e5d538f890a4348 (patch) | |
tree | c0976efc67fe7cebb96c36e70935a2b6617841f8 /lib/libc/net/rcmd.c | |
parent | Don't make the string table pointers into absolute addresses since (diff) | |
download | wireguard-openbsd-865ae75bb2d939d9d14ee6b40e5d538f890a4348.tar.xz wireguard-openbsd-865ae75bb2d939d9d14ee6b40e5d538f890a4348.zip |
Make sure $RSH is not the empty string.
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 697c6d0c6f8..2ad3530c873 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.36 2000/02/25 04:39:08 itojun Exp $"; +static char *rcsid = "$OpenBSD: rcmd.c,v 1.37 2001/02/10 21:55:07 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -94,7 +94,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af) int refused; /* call rcmdsh() with specified remote shell if appropriate. */ - if (!issetugid() && (p = getenv("RSH"))) { + if (!issetugid() && (p = getenv("RSH")) && *p) { struct servent *sp = getservbyname("shell", "tcp"); if (sp && sp->s_port == rport) |