diff options
author | 2001-05-03 15:45:15 +0000 | |
---|---|---|
committer | 2001-05-03 15:45:15 +0000 | |
commit | a75cf708c8037a32e42d19c2f9f77f3372461d0a (patch) | |
tree | 55277a3cc3fefb6f54447e44ad2e61bfa691a45f | |
parent | typo in debug() string (diff) | |
download | wireguard-openbsd-a75cf708c8037a32e42d19c2f9f77f3372461d0a.tar.xz wireguard-openbsd-a75cf708c8037a32e42d19c2f9f77f3372461d0a.zip |
exec shell -c /bin/sh .ssh/sshrc, from abartlet@pcug.org.au
-rw-r--r-- | usr.bin/ssh/session.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index ee513067f21..4505c7031af 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.74 2001/04/17 19:34:25 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.75 2001/05/03 15:45:15 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -1053,10 +1053,11 @@ do_child(Session *s, const char *command) if (!options.use_login) { /* ignore _PATH_SSH_USER_RC for subsystems */ if (!s->is_subsystem && (stat(_PATH_SSH_USER_RC, &st) >= 0)) { + snprintf(cmd, sizeof cmd, "%s -c '%s %s'", + shell, _PATH_BSHELL, _PATH_SSH_USER_RC); if (debug_flag) - fprintf(stderr, "Running %s %s\n", _PATH_BSHELL, - _PATH_SSH_USER_RC); - f = popen(_PATH_BSHELL " " _PATH_SSH_USER_RC, "w"); + fprintf(stderr, "Running %s\n", cmd); + f = popen(cmd, "w"); if (f) { if (do_xauth) fprintf(f, "%s %s\n", s->auth_proto, |