summaryrefslogtreecommitdiff
path: root/source4/auth/credentials/credentials_krb5.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-07-27 19:57:27 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-07-27 19:57:27 +0200
commit72d2bea916c19405f4fa996b7f781d73e3ee87c8 (patch)
tree3814912a6d73a09163152e56a0bc05288302dea2 /source4/auth/credentials/credentials_krb5.c
parent8d8ccc57e986d758a285a6af256ab945ccdac4dc (diff)
parent55ea54ec640e4a76df397becc211a81aaec6f09d (diff)
downloadsamba-72d2bea916c19405f4fa996b7f781d73e3ee87c8.tar.gz
samba-72d2bea916c19405f4fa996b7f781d73e3ee87c8.tar.bz2
samba-72d2bea916c19405f4fa996b7f781d73e3ee87c8.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into manpage
(This used to be commit 7e90cc197c4fb2884f368cd72f391d0d8016fb96)
Diffstat (limited to 'source4/auth/credentials/credentials_krb5.c')
-rw-r--r--source4/auth/credentials/credentials_krb5.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index a880486f0f..c4c58398c3 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -360,6 +360,7 @@ _PUBLIC_ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
struct gssapi_creds_container *gcc;
struct ccache_container *ccache;
gss_buffer_desc empty_buffer = GSS_C_EMPTY_BUFFER;
+ krb5_enctype *etypes = NULL;
if (cred->client_gss_creds_obtained >= cred->client_gss_creds_threshold &&
cred->client_gss_creds_obtained > CRED_UNINITIALISED) {
@@ -391,6 +392,28 @@ _PUBLIC_ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
return ret;
}
+ /* transfer the enctypes from the smb_krb5_context to the gssapi layer */
+ min_stat = krb5_get_default_in_tkt_etypes(ccache->smb_krb5_context->krb5_context,
+ &etypes);
+ if (min_stat == 0) {
+ OM_uint32 num_ktypes;
+
+ for (num_ktypes = 0; etypes[num_ktypes]; num_ktypes++);
+
+ maj_stat = gss_krb5_set_allowable_enctypes(&min_stat, gcc->creds,
+ num_ktypes, etypes);
+ krb5_xfree (etypes);
+ if (maj_stat) {
+ talloc_free(gcc);
+ if (min_stat) {
+ ret = min_stat;
+ } else {
+ ret = EINVAL;
+ }
+ return ret;
+ }
+ }
+
/* don't force GSS_C_CONF_FLAG and GSS_C_INTEG_FLAG */
maj_stat = gss_set_cred_option(&min_stat, &gcc->creds,
GSS_KRB5_CRED_NO_CI_FLAGS_X,