summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-12 07:13:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:50:55 -0500
commitadab8d3968ce2bf18eab6b89375050ebf6630f08 (patch)
tree088f31dda14e99f490ee454bcb8d65d5cf621b4d /source4/auth
parent3f8ee534bafa149c00f050abea8ae111fea61287 (diff)
downloadsamba-adab8d3968ce2bf18eab6b89375050ebf6630f08.tar.gz
samba-adab8d3968ce2bf18eab6b89375050ebf6630f08.tar.bz2
samba-adab8d3968ce2bf18eab6b89375050ebf6630f08.zip
r12863: As lha suggested to me a while back, it appears that the
gsskrb5_get_initiator_subkey() routine is bougs. We can indeed use gss_krb5_get_subkey(). This is fortunate, as there was a segfault bug in 'initiator' version. Andrew Bartlett (This used to be commit ec11870ca1f9231dd3eeae792fc3268b31477e11)
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/gensec/gensec_gssapi.c15
-rw-r--r--source4/auth/kerberos/kerberos-notes.txt4
2 files changed, 7 insertions, 12 deletions
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index b71bee03ea..4eb7b95d6d 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -734,22 +734,21 @@ static NTSTATUS gensec_gssapi_session_key(struct gensec_security *gensec_securit
if ((gensec_gssapi_state->gss_oid->length == gss_mech_krb5->length)
&& (memcmp(gensec_gssapi_state->gss_oid->elements, gss_mech_krb5->elements,
gensec_gssapi_state->gss_oid->length) == 0)) {
- OM_uint32 maj_stat, min_stat;
- gss_buffer_desc skey;
+ OM_uint32 maj_stat;
+ krb5_keyblock *skey;
- maj_stat = gsskrb5_get_initiator_subkey(&min_stat,
- gensec_gssapi_state->gssapi_context,
- &skey);
+ maj_stat = gss_krb5_get_subkey(gensec_gssapi_state->gssapi_context,
+ &skey);
if (maj_stat == 0) {
DEBUG(10, ("Got KRB5 session key of length %d\n",
- (int)skey.length));
+ (int)KRB5_KEY_LENGTH(skey)));
gensec_gssapi_state->session_key = data_blob_talloc(gensec_gssapi_state,
- skey.value, skey.length);
+ KRB5_KEY_DATA(skey), KRB5_KEY_LENGTH(skey));
*session_key = gensec_gssapi_state->session_key;
dump_data_pw("KRB5 Session Key:\n", session_key->data, session_key->length);
- gss_release_buffer(&min_stat, &skey);
+ krb5_free_keyblock(gensec_gssapi_state->smb_krb5_context->krb5_context, skey);
return NT_STATUS_OK;
}
return NT_STATUS_NO_USER_SESSION_KEY;
diff --git a/source4/auth/kerberos/kerberos-notes.txt b/source4/auth/kerberos/kerberos-notes.txt
index 43881a20d3..26cfa4dfba 100644
--- a/source4/auth/kerberos/kerberos-notes.txt
+++ b/source4/auth/kerberos/kerberos-notes.txt
@@ -247,10 +247,6 @@ the kerberos libraries
- DCE_STYLE
- - gsskrb5_get_initiator_subkey() (return the exact key that Samba3
- has always asked for. gsskrb5_get_subkey() might do what we need
- anyway)
-
- gsskrb5_acquire_creds() (takes keytab and/or ccache as input
parameters, see keytab and state machine discussion)