]> andersk Git - gssapi-openssh.git/blobdiff - openssh/session.c
remove prototype for ssh_gssapi_mechanisms() function that no longer exists
[gssapi-openssh.git] / openssh / session.c
index 1fe3a2508f6cb296b285e9bdb3156df3d2e54b6d..d0d6991b8b3c68f1c261e32fe183ec257e3eab6d 100644 (file)
@@ -206,6 +206,7 @@ display_loginmsg(void)
                printf("%s\n", (char *)buffer_ptr(&loginmsg));
                buffer_clear(&loginmsg);
        }
+       fflush(stdout);
 }
 
 void
@@ -511,6 +512,13 @@ do_exec_no_pty(Session *s, const char *command)
        close(inout[0]);
        close(err[0]);
 
+       /*
+        * Clear loginmsg, since it's the child's responsibility to display
+        * it to the user, otherwise multiple sessions may accumulate
+        * multiple copies of the login messages.
+        */
+       buffer_clear(&loginmsg);
+
        /*
         * Enter the interactive session.  Note: server_loop must be able to
         * handle the case that fdin and fdout are the same.
@@ -1158,9 +1166,6 @@ do_setup_env(Session *s, const char *shell)
                 * needed for loading shared libraries. So the path better
                 * remains intact here.
                 */
-               if (getenv("LD_LIBRARY_PATH"))
-                       child_set_env(&env, &envsize, "LD_LIBRARY_PATH",
-                                     getenv("LD_LIBRARY_PATH"));
 #  ifdef HAVE_ETC_DEFAULT_LOGIN
                read_etc_default_login(&env, &envsize, pw->pw_uid);
                path = child_get_env(env, "PATH");
@@ -1183,6 +1188,23 @@ do_setup_env(Session *s, const char *shell)
        if (getenv("TZ"))
                child_set_env(&env, &envsize, "TZ", getenv("TZ"));
 
+#ifdef GSI /* GSI shared libs typically installed in non-system locations. */
+       {
+               char *cp;
+
+               if ((cp = getenv("LD_LIBRARY_PATH")) != NULL)
+                       child_set_env(&env, &envsize, "LD_LIBRARY_PATH", cp);
+               if ((cp = getenv("LIBPATH")) != NULL)
+                       child_set_env(&env, &envsize, "LIBPATH", cp);
+               if ((cp = getenv("SHLIB_PATH")) != NULL)
+                       child_set_env(&env, &envsize, "SHLIB_PATH", cp);
+               if ((cp = getenv("LD_LIBRARYN32_PATH")) != NULL)
+                       child_set_env(&env, &envsize, "LD_LIBRARYN32_PATH",cp);
+               if ((cp = getenv("LD_LIBRARY64_PATH")) != NULL)
+                       child_set_env(&env, &envsize, "LD_LIBRARY64_PATH",cp);
+       }
+#endif
+
        /* Set custom environment options from RSA authentication. */
        if (!options.use_login) {
                while (custom_environment) {
@@ -1239,9 +1261,9 @@ do_setup_env(Session *s, const char *shell)
        }
 #endif
 #ifdef KRB5
-       if (s->authctxt->krb5_ticket_file)
+       if (s->authctxt->krb5_ccname)
                child_set_env(&env, &envsize, "KRB5CCNAME",
-                   s->authctxt->krb5_ticket_file);
+                   s->authctxt->krb5_ccname);
 #endif
 #ifdef USE_PAM
        /*
This page took 0.034931 seconds and 4 git commands to generate.