summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-08-21 16:23:32 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-08-21 16:23:32 +0000
commit81bef01ce289d38383ef84048015aba31c7158ad (patch)
treea0fe28e9b902aba89292365b88c1e589536df43b /usr.bin/ssh
parent74b0c7585af10db0fb809596151f98a816d92227 (diff)
Fix incorrect PATH setting; noted by Markus.
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);