]> andersk Git - gssapi-openssh.git/commitdiff
in addition to passing LD_LIBRARY_PATH to child's environment to
authorjbasney <jbasney>
Tue, 29 Jun 2004 01:08:51 +0000 (01:08 +0000)
committerjbasney <jbasney>
Tue, 29 Jun 2004 01:08:51 +0000 (01:08 +0000)
local GSI shared libraries, also pass LIBPATH, SHLIB_PATH,
LD_LIBRARYN32_PATH, and LD_LIBRARY64_PATH for odd platforms

openssh/session.c

index 1b9ddcf2ac9e9810b0f93c283c2956181d88fcef..d0d6991b8b3c68f1c261e32fe183ec257e3eab6d 100644 (file)
@@ -1166,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");
@@ -1191,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) {
This page took 0.037128 seconds and 5 git commands to generate.