diff options
author | Damien Miller <djm@mindrot.org> | 2004-04-16 22:47:55 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2004-04-16 22:47:55 +1000 |
commit | 9c870f966a747fc04c69f5203261ee8b936fabd5 (patch) | |
tree | c64202484b280a04e5106d208ff20fd0133cb7b1 | |
parent | c99a19b44539df51837f125f0607dda9f2876094 (diff) |
- (djm) [auth-krb5.c auth.h session.c] Explicitly refer to Kerberos ccache
file using FILE: method, fixes problems on Mac OSX.
Patch from simon@sxw.org.uk; ok dtucker@
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | auth-krb5.c | 6 | ||||
-rw-r--r-- | auth.h | 1 | ||||
-rw-r--r-- | session.c | 4 |
4 files changed, 13 insertions, 3 deletions
@@ -1,6 +1,9 @@ | |||
1 | 20040416 | 1 | 20040416 |
2 | - (dtucker) [regress/sftp-cmds.sh] Skip quoting test on Cygwin, since | 2 | - (dtucker) [regress/sftp-cmds.sh] Skip quoting test on Cygwin, since |
3 | FAT/NTFS does not permit quotes in filenames. From vinschen at redhat.com | 3 | FAT/NTFS does not permit quotes in filenames. From vinschen at redhat.com |
4 | - (djm) [auth-krb5.c auth.h session.c] Explicitly refer to Kerberos ccache | ||
5 | file using FILE: method, fixes problems on Mac OSX. | ||
6 | Patch from simon@sxw.org.uk; ok dtucker@ | ||
4 | 7 | ||
5 | 20040412 | 8 | 20040412 |
6 | - (dtucker) [sshd_config.5] Add PermitRootLogin without-password warning | 9 | - (dtucker) [sshd_config.5] Add PermitRootLogin without-password warning |
@@ -970,4 +973,4 @@ | |||
970 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 973 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
971 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 974 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
972 | 975 | ||
973 | $Id: ChangeLog,v 1.3312 2004/04/16 07:58:28 dtucker Exp $ | 976 | $Id: ChangeLog,v 1.3313 2004/04/16 12:47:55 djm Exp $ |
diff --git a/auth-krb5.c b/auth-krb5.c index baa1a6317..a728ebac1 100644 --- a/auth-krb5.c +++ b/auth-krb5.c | |||
@@ -72,6 +72,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password) | |||
72 | #endif | 72 | #endif |
73 | krb5_error_code problem; | 73 | krb5_error_code problem; |
74 | krb5_ccache ccache = NULL; | 74 | krb5_ccache ccache = NULL; |
75 | int len; | ||
75 | 76 | ||
76 | if (!authctxt->valid) | 77 | if (!authctxt->valid) |
77 | return (0); | 78 | return (0); |
@@ -177,6 +178,11 @@ auth_krb5_password(Authctxt *authctxt, const char *password) | |||
177 | 178 | ||
178 | authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache); | 179 | authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache); |
179 | 180 | ||
181 | len = strlen(authctxt->krb5_ticket_file) + 6; | ||
182 | authctxt->krb5_ccname = xmalloc(len); | ||
183 | snprintf(authctxt->krb5_ccname, len, "FILE:%s", | ||
184 | authctxt->krb5_ticket_file); | ||
185 | |||
180 | out: | 186 | out: |
181 | restore_uid(); | 187 | restore_uid(); |
182 | 188 | ||
@@ -66,6 +66,7 @@ struct Authctxt { | |||
66 | krb5_ccache krb5_fwd_ccache; | 66 | krb5_ccache krb5_fwd_ccache; |
67 | krb5_principal krb5_user; | 67 | krb5_principal krb5_user; |
68 | char *krb5_ticket_file; | 68 | char *krb5_ticket_file; |
69 | char *krb5_ccname; | ||
69 | #endif | 70 | #endif |
70 | void *methoddata; | 71 | void *methoddata; |
71 | }; | 72 | }; |
@@ -1093,9 +1093,9 @@ do_setup_env(Session *s, const char *shell) | |||
1093 | } | 1093 | } |
1094 | #endif | 1094 | #endif |
1095 | #ifdef KRB5 | 1095 | #ifdef KRB5 |
1096 | if (s->authctxt->krb5_ticket_file) | 1096 | if (s->authctxt->krb5_ccname) |
1097 | child_set_env(&env, &envsize, "KRB5CCNAME", | 1097 | child_set_env(&env, &envsize, "KRB5CCNAME", |
1098 | s->authctxt->krb5_ticket_file); | 1098 | s->authctxt->krb5_ccname); |
1099 | #endif | 1099 | #endif |
1100 | #ifdef USE_PAM | 1100 | #ifdef USE_PAM |
1101 | /* | 1101 | /* |