]> andersk Git - openssh.git/blobdiff - session.c
- stevesk@cvs.openbsd.org 2002/06/10 21:21:10
[openssh.git] / session.c
index 6be7f99296fdc93c4c1d307d92746724e2538360..dcecf1ae34c115d1ba3036450ccdbe692970c349 100644 (file)
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.134 2002/03/29 18:59:31 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.135 2002/05/16 22:09:59 stevesk Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -871,7 +871,12 @@ do_setup_env(Session *s, const char *shell)
                 * needed for loading shared libraries. So the path better
                 * remains intact here.
                 */
+#  ifdef SUPERUSER_PATH
+               child_set_env(&env, &envsize, "PATH", 
+                   s->pw->pw_uid == 0 ? SUPERUSER_PATH : _PATH_STDPATH);
+#  else 
                child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
+#  endif /* SUPERUSER_PATH */
 # endif /* HAVE_CYGWIN */
 #endif /* HAVE_LOGIN_CAP */
 
@@ -1009,7 +1014,7 @@ do_rc_files(Session *s, const char *shell)
                /* Add authority data to .Xauthority if appropriate. */
                if (debug_flag) {
                        fprintf(stderr,
-                           "Running %.100s add "
+                           "Running %.500s add "
                            "%.100s %.100s %.100s\n",
                            options.xauth_location, s->auth_display,
                            s->auth_proto, s->auth_data);
@@ -1113,11 +1118,15 @@ launch_login(struct passwd *pw, const char *hostname)
 {
        /* Launch login(1). */
 
-       execl("/usr/bin/login", "login", "-h", hostname,
+       execl(LOGIN_PROGRAM, "login", "-h", hostname,
 #ifdef xxxLOGIN_NEEDS_TERM
-                    (s->term ? s->term : "unknown"),
+                   (s->term ? s->term : "unknown"),
 #endif /* LOGIN_NEEDS_TERM */
+#ifdef LOGIN_NO_ENDOPT
+           "-p", "-f", pw->pw_name, (char *)NULL);
+#else
            "-p", "-f", "--", pw->pw_name, (char *)NULL);
+#endif
 
        /* Login couldn't be executed, die. */
 
This page took 0.036287 seconds and 4 git commands to generate.