summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-06-02 16:27:44 +0200
committerStefan Metzmacher <metze@samba.org>2008-06-02 16:58:04 +0200
commitb3ec55b98494f9953b1d819166840e61b75b65dd (patch)
treebb5c984b724483584a9e649638cf1cd9a97e454d /source4/heimdal/lib
parent9b913d602b0799fc749aaaf59588e1a8ecc9a17d (diff)
downloadsamba-b3ec55b98494f9953b1d819166840e61b75b65dd.tar.gz
samba-b3ec55b98494f9953b1d819166840e61b75b65dd.tar.bz2
samba-b3ec55b98494f9953b1d819166840e61b75b65dd.zip
krb5_init_sec_context: skip the token header when GSS_C_DCE_STYLE is specified
Windows (and heimdal) accepts packets with token header in the server, but it doesn't match the windows client. We now match the windows client and that fixes also the display in wireshark. metze (This used to be commit 58f66184f0f732a78e86bbb0f3c29e920f086d08)
Diffstat (limited to 'source4/heimdal/lib')
-rw-r--r--source4/heimdal/lib/gssapi/krb5/init_sec_context.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/heimdal/lib/gssapi/krb5/init_sec_context.c b/source4/heimdal/lib/gssapi/krb5/init_sec_context.c
index d4482a54b2..ab7624eef0 100644
--- a/source4/heimdal/lib/gssapi/krb5/init_sec_context.c
+++ b/source4/heimdal/lib/gssapi/krb5/init_sec_context.c
@@ -540,12 +540,18 @@ init_auth
goto failure;
}
- ret = _gsskrb5_encapsulate (minor_status, &outbuf, output_token,
- (u_char *)"\x01\x00", GSS_KRB5_MECHANISM);
- if (ret)
- goto failure;
+ if (flags & GSS_C_DCE_STYLE) {
+ output_token->value = outbuf.data;
+ output_token->length = outbuf.length;
+ } else {
+ ret = _gsskrb5_encapsulate (minor_status, &outbuf, output_token,
+ (u_char *)"\x01\x00", GSS_KRB5_MECHANISM);
+ if (ret)
+ goto failure;
+
+ krb5_data_free (&outbuf);
+ }
- krb5_data_free (&outbuf);
krb5_free_creds(context, kcred);
free_Checksum(&cksum);
if (cred == NULL)