summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormillert <>2001-02-10 21:55:07 +0000
committermillert <>2001-02-10 21:55:07 +0000
commit254a64c0e1fe96bf0dec47bc379e7979de2e9d39 (patch)
treef6281f9308a929faad6c0a9b9b70fa1e97bf79d4
parent5a2338aca84a5e10571ab88706bc1e7eb6a1adf6 (diff)
downloadopenbsd-254a64c0e1fe96bf0dec47bc379e7979de2e9d39.tar.gz
openbsd-254a64c0e1fe96bf0dec47bc379e7979de2e9d39.tar.bz2
openbsd-254a64c0e1fe96bf0dec47bc379e7979de2e9d39.zip
Make sure $RSH is not the empty string.
-rw-r--r--src/lib/libc/net/rcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/net/rcmd.c b/src/lib/libc/net/rcmd.c
index 697c6d0c6f..2ad3530c87 100644
--- a/src/lib/libc/net/rcmd.c
+++ b/src/lib/libc/net/rcmd.c
@@ -34,7 +34,7 @@
34 */ 34 */
35 35
36#if defined(LIBC_SCCS) && !defined(lint) 36#if defined(LIBC_SCCS) && !defined(lint)
37static char *rcsid = "$OpenBSD: rcmd.c,v 1.36 2000/02/25 04:39:08 itojun Exp $"; 37static char *rcsid = "$OpenBSD: rcmd.c,v 1.37 2001/02/10 21:55:07 millert Exp $";
38#endif /* LIBC_SCCS and not lint */ 38#endif /* LIBC_SCCS and not lint */
39 39
40#include <sys/param.h> 40#include <sys/param.h>
@@ -94,7 +94,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
94 int refused; 94 int refused;
95 95
96 /* call rcmdsh() with specified remote shell if appropriate. */ 96 /* call rcmdsh() with specified remote shell if appropriate. */
97 if (!issetugid() && (p = getenv("RSH"))) { 97 if (!issetugid() && (p = getenv("RSH")) && *p) {
98 struct servent *sp = getservbyname("shell", "tcp"); 98 struct servent *sp = getservbyname("shell", "tcp");
99 99
100 if (sp && sp->s_port == rport) 100 if (sp && sp->s_port == rport)