From 5ab1e3bdd58a6acf87a66491d7af9709bcf3e2d8 Mon Sep 17 00:00:00 2001 From: jbasney Date: Fri, 13 Jun 2003 18:50:12 +0000 Subject: [PATCH] patch from Olle Mulmo, https://bugzilla.ncsa.uiuc.edu/show_bug.cgi?id=127 execve() with environ instead of local env in do_child as the optional hooks may make modifications to environ that we want to pass to the child --- openssh/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openssh/session.c b/openssh/session.c index 97c0c0a..c85821d 100644 --- a/openssh/session.c +++ b/openssh/session.c @@ -1670,7 +1670,7 @@ do_child(Session *s, const char *command) /* Execute the shell. */ argv[0] = argv0; argv[1] = NULL; - execve(shell, argv, env); + execve(shell, argv, environ); /* Executing the shell failed. */ perror(shell); @@ -1684,7 +1684,7 @@ do_child(Session *s, const char *command) argv[1] = "-c"; argv[2] = (char *) command; argv[3] = NULL; - execve(shell, argv, env); + execve(shell, argv, environ); perror(shell); exit(1); } -- 2.45.1