diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-12-29 21:31:56 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-12-29 21:31:56 +0000 |
commit | e01d3d758274457cf731a84bb4afd00b8433d262 (patch) | |
tree | 9fb59edd4b48739ecd78e9655e843f0ad2e8d50f /usr.bin/rdist | |
parent | d7fedd11be789abac2ac31721dea98dc3e4b2cdf (diff) |
Don't use the contents of the RSH environment variable if it is empty.
Diffstat (limited to 'usr.bin/rdist')
-rw-r--r-- | usr.bin/rdist/rdist.c | 7 |
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 |