Bugzilla – Attachment 2734 Details for
Bug 2471
"match exec" prepends "exec" to its command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
remove "exec" from match exec handling
ssh-match-exec.patch (text/plain), 1.30 KB, created by
Darren Tucker
on 2015-10-23 13:22:39 AEDT
(
hide
)
Description:
remove "exec" from match exec handling
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2015-10-23 13:22:39 AEDT
Size:
1.30 KB
patch
obsolete
>Index: readconf.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/readconf.c,v >retrieving revision 1.242 >diff -u -p -r1.242 readconf.c >--- readconf.c 7 Oct 2015 15:59:12 -0000 1.242 >+++ readconf.c 23 Oct 2015 02:10:56 -0000 >@@ -430,7 +430,7 @@ default_ssh_port(void) > static int > execute_in_shell(const char *cmd) > { >- char *shell, *command_string; >+ char *shell; > pid_t pid; > int devnull, status; > extern uid_t original_real_uid; >@@ -438,12 +438,6 @@ execute_in_shell(const char *cmd) > if ((shell = getenv("SHELL")) == NULL) > shell = _PATH_BSHELL; > >- /* >- * Use "exec" to avoid "sh -c" processes on some platforms >- * (e.g. Solaris) >- */ >- xasprintf(&command_string, "exec %s", cmd); >- > /* Need this to redirect subprocess stdin/out */ > if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) > fatal("open(/dev/null): %s", strerror(errno)); >@@ -468,7 +462,7 @@ execute_in_shell(const char *cmd) > > argv[0] = shell; > argv[1] = "-c"; >- argv[2] = command_string; >+ argv[2] = cmd; > argv[3] = NULL; > > execv(argv[0], argv); >@@ -483,7 +477,6 @@ execute_in_shell(const char *cmd) > fatal("%s: fork: %.100s", __func__, strerror(errno)); > > close(devnull); >- free(command_string); > > while (waitpid(pid, &status, 0) == -1) { > if (errno != EINTR && errno != EAGAIN)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2471
: 2734