summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2001-12-29 21:31:55 +0000
committermillert <millert@openbsd.org>2001-12-29 21:31:55 +0000
commite3b9830dae61ce1edfdca4475472292c938f0d56 (patch)
tree5deb613293966426c3c933d0476ba0ef7cd061e3
parentAdd options for slient operation and for specifying a count of rounds (diff)
downloadwireguard-openbsd-e3b9830dae61ce1edfdca4475472292c938f0d56.tar.xz
wireguard-openbsd-e3b9830dae61ce1edfdca4475472292c938f0d56.zip
Don't use the contents of the RSH environment variable if it is empty.
-rw-r--r--usr.bin/rdist/rdist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/rdist/rdist.c b/usr.bin/rdist/rdist.c
index 1f7666cd4c7..855ff5a1ade 100644
--- a/usr.bin/rdist/rdist.c
+++ b/usr.bin/rdist/rdist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rdist.c,v 1.9 2001/11/19 19:02:15 mpech Exp $ */
+/* $OpenBSD: rdist.c,v 1.10 2001/12/29 21:31:55 millert Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -39,7 +39,7 @@ static char RCSid[] =
"$From: rdist.c,v 6.65 1995/12/12 00:20:39 mcooper Exp $";
#else
static char RCSid[] =
-"$OpenBSD: rdist.c,v 1.9 2001/11/19 19:02:15 mpech Exp $";
+"$OpenBSD: rdist.c,v 1.10 2001/12/29 21:31:55 millert Exp $";
#endif
static char sccsid[] = "@(#)main.c 5.1 (Berkeley) 6/6/85";
@@ -296,7 +296,8 @@ main(argc, argv, envp)
"The -n flag and \"verify\" mode may not both be used.");
if (path_remsh == NULL)
- path_remsh = getenv("RSH");
+ if ((cp = getenv("RSH")) != NULL && *cp != '\0')
+ path_remsh = cp;
/*
* Don't fork children for nflag