svn commit: lorikeet r664 - in trunk/heimdal/lib/gssapi/mech: .

abartlet at samba.org abartlet at samba.org
Fri Nov 10 02:47:42 GMT 2006


Author: abartlet
Date: 2006-11-10 02:47:40 +0000 (Fri, 10 Nov 2006)
New Revision: 664

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=664

Log:
Allow Samba to use Heimdal's SPNEGO, and treat a NULL input buffer to
accept_sec_context as an SPNEGO call.  It should fall though to a call
for a mechanism list in the SPNEGO module.

Andrew Bartlett

Modified:
   trunk/heimdal/lib/gssapi/mech/gss_accept_sec_context.c
   trunk/heimdal/lib/gssapi/mech/gss_mech_switch.c


Changeset:
Modified: trunk/heimdal/lib/gssapi/mech/gss_accept_sec_context.c
===================================================================
--- trunk/heimdal/lib/gssapi/mech/gss_accept_sec_context.c	2006-11-09 00:32:45 UTC (rev 663)
+++ trunk/heimdal/lib/gssapi/mech/gss_accept_sec_context.c	2006-11-10 02:47:40 UTC (rev 664)
@@ -72,10 +72,11 @@
 		/*
 		 * Token must start with [APPLICATION 0] SEQUENCE.
 		 * But if it doesn't assume its DCE-STYLE Kerberos!
+		 * And if it's not there at all, then we are requesting a mech list from SPNEGO
 		 */
-		if (len == 0)
-			return (GSS_S_DEFECTIVE_TOKEN);
-		if  (*p != 0x60) {
+		if (len == 0) {
+			mech_oid = *GSS_SPNEGO_MECHANISM;
+		} else if  (*p != 0x60) {
 			mech_oid = *GSS_KRB5_MECHANISM;
 		} else {
 			p++;

Modified: trunk/heimdal/lib/gssapi/mech/gss_mech_switch.c
===================================================================
--- trunk/heimdal/lib/gssapi/mech/gss_mech_switch.c	2006-11-09 00:32:45 UTC (rev 663)
+++ trunk/heimdal/lib/gssapi/mech/gss_mech_switch.c	2006-11-10 02:47:40 UTC (rev 664)
@@ -213,9 +213,7 @@
 	}
 
 	add_builtin(__gss_krb5_initialize());
-#ifndef _SAMBA_BUILD_
 	add_builtin(__gss_spnego_initialize());
-#endif
 
 	fp = fopen(_PATH_GSS_MECH, "r");
 	if (!fp) {



More information about the samba-cvs mailing list