summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/rcmd.c4
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)