diff options
author | 2017-08-21 16:45:13 +0000 | |
---|---|---|
committer | 2017-08-21 16:45:13 +0000 | |
commit | e5dd404e1941d0097f108bb8b6035ff55237b7d1 (patch) | |
tree | d9b554a391e7e68062223c3d916e890a2b238f32 /gnu/usr.bin/cvs/src | |
parent | sync (diff) | |
download | wireguard-openbsd-e5dd404e1941d0097f108bb8b6035ff55237b7d1.tar.xz wireguard-openbsd-e5dd404e1941d0097f108bb8b6035ff55237b7d1.zip |
When executing ssh, use "--" to indicate end of arguments before the
host name. Adapted from a MirBSD diff by Thorsten Glaser.
Diffstat (limited to 'gnu/usr.bin/cvs/src')
-rw-r--r-- | gnu/usr.bin/cvs/src/client.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c index f7abc83391f..afd2453f72b 100644 --- a/gnu/usr.bin/cvs/src/client.c +++ b/gnu/usr.bin/cvs/src/client.c @@ -4833,7 +4833,7 @@ start_rsh_server (tofdp, fromfdp) char *cvs_rsh = getenv ("CVS_RSH"); char *cvs_server = getenv ("CVS_SERVER"); int i = 0; - /* This needs to fit "rsh", "-b", "-l", "USER", "host", + /* This needs to fit "rsh", "-b", "-l", "USER", "--", "host", "cmd (w/ args)", and NULL. We leave some room to grow. */ char *rsh_argv[10]; @@ -4880,6 +4880,7 @@ start_rsh_server (tofdp, fromfdp) rsh_argv[i++] = current_parsed_root->username; } + rsh_argv[i++] = "--"; rsh_argv[i++] = current_parsed_root->hostname; rsh_argv[i++] = cvs_server; rsh_argv[i++] = "server"; @@ -4943,7 +4944,6 @@ start_rsh_server (tofdp, fromfdp) char **p = argv; *p++ = cvs_rsh; - *p++ = current_parsed_root->hostname; /* If the login names differ between client and server * pass it on to rsh. @@ -4954,6 +4954,8 @@ start_rsh_server (tofdp, fromfdp) *p++ = current_parsed_root->username; } + *p++ = "--"; + *p++ = current_parsed_root->hostname; *p++ = command; *p++ = NULL; |