summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/session.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c
index 3b8c6a43b67..1dd36fe3b6c 100644
--- a/usr.bin/ssh/session.c
+++ b/usr.bin/ssh/session.c
@@ -8,7 +8,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.28 2000/08/20 18:42:40 millert Exp $");
+RCSID("$OpenBSD: session.c,v 1.29 2000/08/21 16:23:31 millert Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -845,12 +845,11 @@ do_child(const char *command, struct passwd * pw, const char *term,
child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
child_set_env(&env, &envsize, "HOME", pw->pw_dir);
#ifdef HAVE_LOGIN_CAP
- cp = login_getcapstr(lc, "path", _PATH_STDPATH, _PATH_STDPATH);
+ (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH);
+ child_set_env(&env, &envsize, "PATH", getenv("PATH"));
#else
- cp = _PATH_STDPATH;
+ child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
#endif
- child_set_env(&env, &envsize, "PATH", cp);
- cp = NULL;
snprintf(buf, sizeof buf, "%.200s/%.50s",
_PATH_MAILDIR, pw->pw_name);