summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-02-02 18:30:33 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-02-02 18:30:33 +1100
commit9dc6c7dbec0716157e561036c480bca1bc3c7e47 (patch)
tree017d1b7ecebcdf6b72fc69fdb866c0194c9dc415 /session.c
parent42d9dc75ed2eefa6eeffc892f02eb164c1860603 (diff)
- (dtucker) [session.c sshd.c] Bug #445: Propogate KRB5CCNAME if set to child
the process. Since we also unset KRB5CCNAME at startup, if it's set after authentication it must have been set by the platform's native auth system. This was already done for AIX; this enables it for the general case.
Diffstat (limited to 'session.c')
-rw-r--r--session.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/session.c b/session.c
index 7f10abf7c..4d7ac9de7 100644
--- a/session.c
+++ b/session.c
@@ -1090,14 +1090,24 @@ do_setup_env(Session *s, const char *shell)
1090 child_set_env(&env, &envsize, "TMPDIR", cray_tmpdir); 1090 child_set_env(&env, &envsize, "TMPDIR", cray_tmpdir);
1091#endif /* _UNICOS */ 1091#endif /* _UNICOS */
1092 1092
1093 /*
1094 * Since we clear KRB5CCNAME at startup, if it's set now then it
1095 * must have been set by a native authentication method (eg AIX or
1096 * SIA), so copy it to the child.
1097 */
1098 {
1099 char *cp;
1100
1101 if ((cp = getenv("KRB5CCNAME")) != NULL)
1102 child_set_env(&env, &envsize, "KRB5CCNAME", cp);
1103 }
1104
1093#ifdef _AIX 1105#ifdef _AIX
1094 { 1106 {
1095 char *cp; 1107 char *cp;
1096 1108
1097 if ((cp = getenv("AUTHSTATE")) != NULL) 1109 if ((cp = getenv("AUTHSTATE")) != NULL)
1098 child_set_env(&env, &envsize, "AUTHSTATE", cp); 1110 child_set_env(&env, &envsize, "AUTHSTATE", cp);
1099 if ((cp = getenv("KRB5CCNAME")) != NULL)
1100 child_set_env(&env, &envsize, "KRB5CCNAME", cp);
1101 read_environment_file(&env, &envsize, "/etc/environment"); 1111 read_environment_file(&env, &envsize, "/etc/environment");
1102 } 1112 }
1103#endif 1113#endif