Merge branch 'v4-0-stable' of ssh://git.samba.org/data/git/samba into 4-0-local
authorAndrew Bartlett <abartlet@samba.org>
Tue, 3 Jun 2008 05:13:28 +0000 (15:13 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 3 Jun 2008 05:13:28 +0000 (15:13 +1000)
(This used to be commit 7e24ec1430cc14c732ad78f3ce8869931996f6b7)

source4/heimdal/lib/gssapi/krb5/init_sec_context.c

index d4482a54b275243ca8414d4c069c001c42544b4a..ab7624eef0e4bbd63d204b070804e6b09f3c998f 100644 (file)
@@ -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)