diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-02-10 21:55:08 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-02-10 21:55:08 +0000 |
commit | 5d497d9d39069c3635528c04eaf23557a862eb40 (patch) | |
tree | 411774f1155ef01b5c053700a5c1d8a6f5c3fba1 | |
parent | f0a995cf30b3402c426716460af3103fe33b13e1 (diff) |
Make sure $RSH is not the empty string.
-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) |