Search the path for the (R)SH commands. - sam - An updated version of the sam t… | |
git clone git://vernunftzentrum.de/sam.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit edf98760edc54f65d220af07e4b96c9599948fc8 | |
parent d05b248c568786c19cfeccd87487ec21d5a88b81 | |
Author: Rob King <[email protected]> | |
Date: Thu, 11 Aug 2016 13:38:40 -0500 | |
Search the path for the (R)SH commands. | |
Diffstat: | |
config.h | 2 +- | |
sam/io.c | 2 +- | |
sam/shell.c | 2 +- | |
3 files changed, 3 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/config.h b/config.h | |
@@ -29,7 +29,7 @@ | |
#define HOMEENV "HOME" | |
/* The remote shell to use for remote connections. */ | |
-#define RXPATH "ssh" | |
+#define RXPATH "/usr/bin/ssh" | |
/* The system shell to use. Must be Bourne-compatible. */ | |
#define SHPATH "/bin/sh" | |
diff --git a/sam/io.c b/sam/io.c | |
@@ -233,7 +233,7 @@ connectto(char *machine) | |
close(p1[1]); | |
close(p2[0]); | |
close(p2[1]); | |
- execl(getenv("RSH") ? getenv("RSH") : RXPATH, getenv("RSH") ? … | |
+ execlp(getenv("RSH") ? getenv("RSH") : RXPATH, getenv("RSH") ?… | |
dprint("can't exec %s\n", RXPATH); | |
exits("exec"); | |
diff --git a/sam/shell.c b/sam/shell.c | |
@@ -93,7 +93,7 @@ plan9(File *f, int type, String *s, int nest) | |
close(0); /* so it won't read from terminal */ | |
open("/dev/null", 0); | |
} | |
- execl(SHPATH, SHPATH, "-c", Strtoc(&plan9cmd), (char *)0); | |
+ execlp(SHPATH, SHPATH, "-c", Strtoc(&plan9cmd), (char *)0); | |
exits("exec"); | |
} | |
if(pid == -1) |