summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-05-03 15:45:16 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-05-03 15:45:16 +0000
commitda970855f00492cb421ce9120df4ff09617219d0 (patch)
tree06db79015bc22c97228d7a9a802f15aebd2673dd /usr.bin
parent57511b700a438b67a1883409fb81810a6d53bb47 (diff)
exec shell -c /bin/sh .ssh/sshrc, from abartlet@pcug.org.au
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/session.c9
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,