diff options
author | Colin Watson <cjwatson@debian.org> | 2013-09-14 23:42:11 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-09-14 23:42:11 +0100 |
commit | 327155e6824b3ee13837bdde04e4eb47e147ff46 (patch) | |
tree | 8f8743122403c7a2e6ed919156711fb1520c657f /auth-krb5.c | |
parent | 0334ce32304e9ba2a10ee5ca49ca6e8ff3ba6cf4 (diff) | |
parent | 74e339b8f8936bc0d985e053a076d0c9b5e9ea51 (diff) |
* New upstream release (http://www.openssh.com/txt/release-6.3).
- sftp(1): add support for resuming partial downloads using the "reget"
command and on the sftp commandline or on the "get" commandline using
the "-a" (append) option (closes: #158590).
- ssh(1): add an "IgnoreUnknown" configuration option to selectively
suppress errors arising from unknown configuration directives (closes:
#436052).
- sftp(1): update progressmeter when data is acknowledged, not when it's
sent (partially addresses #708372).
- ssh(1): do not fatally exit when attempting to cleanup multiplexing-
created channels that are incompletely opened (closes: #651357).
Diffstat (limited to 'auth-krb5.c')
-rw-r--r-- | auth-krb5.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/auth-krb5.c b/auth-krb5.c index 4c2375462..5613b5772 100644 --- a/auth-krb5.c +++ b/auth-krb5.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth-krb5.c,v 1.19 2006/08/03 03:34:41 deraadt Exp $ */ | 1 | /* $OpenBSD: auth-krb5.c,v 1.20 2013/07/20 01:55:13 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Kerberos v5 authentication and ticket-passing routines. | 3 | * Kerberos v5 authentication and ticket-passing routines. |
4 | * | 4 | * |
@@ -79,6 +79,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password) | |||
79 | krb5_ccache ccache = NULL; | 79 | krb5_ccache ccache = NULL; |
80 | int len; | 80 | int len; |
81 | char *client, *platform_client; | 81 | char *client, *platform_client; |
82 | const char *errmsg; | ||
82 | 83 | ||
83 | /* get platform-specific kerberos client principal name (if it exists) */ | 84 | /* get platform-specific kerberos client principal name (if it exists) */ |
84 | platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name); | 85 | platform_client = platform_krb5_get_principal_name(authctxt->pw->pw_name); |
@@ -96,7 +97,12 @@ auth_krb5_password(Authctxt *authctxt, const char *password) | |||
96 | goto out; | 97 | goto out; |
97 | 98 | ||
98 | #ifdef HEIMDAL | 99 | #ifdef HEIMDAL |
100 | # ifdef HAVE_KRB5_CC_NEW_UNIQUE | ||
101 | problem = krb5_cc_new_unique(authctxt->krb5_ctx, | ||
102 | krb5_mcc_ops.prefix, NULL, &ccache); | ||
103 | # else | ||
99 | problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache); | 104 | problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache); |
105 | # endif | ||
100 | if (problem) | 106 | if (problem) |
101 | goto out; | 107 | goto out; |
102 | 108 | ||
@@ -115,8 +121,13 @@ auth_krb5_password(Authctxt *authctxt, const char *password) | |||
115 | if (problem) | 121 | if (problem) |
116 | goto out; | 122 | goto out; |
117 | 123 | ||
124 | # ifdef HAVE_KRB5_CC_NEW_UNIQUE | ||
125 | problem = krb5_cc_new_unique(authctxt->krb5_ctx, | ||
126 | krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache); | ||
127 | # else | ||
118 | problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, | 128 | problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops, |
119 | &authctxt->krb5_fwd_ccache); | 129 | &authctxt->krb5_fwd_ccache); |
130 | # endif | ||
120 | if (problem) | 131 | if (problem) |
121 | goto out; | 132 | goto out; |
122 | 133 | ||
@@ -186,17 +197,19 @@ auth_krb5_password(Authctxt *authctxt, const char *password) | |||
186 | out: | 197 | out: |
187 | restore_uid(); | 198 | restore_uid(); |
188 | 199 | ||
189 | if (platform_client != NULL) | 200 | free(platform_client); |
190 | xfree(platform_client); | ||
191 | 201 | ||
192 | if (problem) { | 202 | if (problem) { |
193 | if (ccache) | 203 | if (ccache) |
194 | krb5_cc_destroy(authctxt->krb5_ctx, ccache); | 204 | krb5_cc_destroy(authctxt->krb5_ctx, ccache); |
195 | 205 | ||
196 | if (authctxt->krb5_ctx != NULL && problem!=-1) | 206 | if (authctxt->krb5_ctx != NULL && problem!=-1) { |
197 | debug("Kerberos password authentication failed: %s", | 207 | errmsg = krb5_get_error_message(authctxt->krb5_ctx, |
198 | krb5_get_err_text(authctxt->krb5_ctx, problem)); | 208 | problem); |
199 | else | 209 | debug("Kerberos password authentication failed: %s", |
210 | errmsg); | ||
211 | krb5_free_error_message(authctxt->krb5_ctx, errmsg); | ||
212 | } else | ||
200 | debug("Kerberos password authentication failed: %d", | 213 | debug("Kerberos password authentication failed: %d", |
201 | problem); | 214 | problem); |
202 | 215 | ||