svn commit: samba r19043 - in branches/SAMBA_3_0/source/libsmb: .

vlendec at samba.org vlendec at samba.org
Mon Oct 2 13:30:06 GMT 2006


Author: vlendec
Date: 2006-10-02 13:30:05 +0000 (Mon, 02 Oct 2006)
New Revision: 19043

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

Log:
There's no point in #ifdef'ing the detection whether we were offered KRB5 in
SPNEGO, as long as we don't make use of it without krb libs. Makes the code a
bit simpler.

Volker

Modified:
   branches/SAMBA_3_0/source/libsmb/cliconnect.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/cliconnect.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/cliconnect.c	2006-10-02 13:09:42 UTC (rev 19042)
+++ branches/SAMBA_3_0/source/libsmb/cliconnect.c	2006-10-02 13:30:05 UTC (rev 19043)
@@ -723,9 +723,7 @@
 	char *principal;
 	char *OIDs[ASN1_MAX_OIDS];
 	int i;
-#ifdef HAVE_KRB5
 	BOOL got_kerberos_mechanism = False;
-#endif
 	DATA_BLOB blob;
 
 	DEBUG(3,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)cli->secblob.length));
@@ -754,18 +752,15 @@
 	/* make sure the server understands kerberos */
 	for (i=0;OIDs[i];i++) {
 		DEBUG(3,("got OID=%s\n", OIDs[i]));
-#ifdef HAVE_KRB5
 		if (strcmp(OIDs[i], OID_KERBEROS5_OLD) == 0 ||
 		    strcmp(OIDs[i], OID_KERBEROS5) == 0) {
 			got_kerberos_mechanism = True;
 		}
-#endif
 		free(OIDs[i]);
 	}
 
 	DEBUG(3,("got principal=%s\n", principal ? principal : "<null>"));
 
-#ifdef HAVE_KRB5
 	if (got_kerberos_mechanism && (principal == NULL)) {
 		/*
 		 * It is WRONG to depend on the principal sent in the negprot
@@ -773,11 +768,10 @@
 		 * segfault later) disable Kerberos when no principal was
 		 * sent. -- VL
 		 */
-		DEBUG(1, ("Kerberos mech was offered, but no principal was sent\n"));
-		DEBUGADD(1, ("Disabling Kerberos\n"));
+		DEBUG(1, ("Kerberos mech was offered, but no principal was "
+			  "sent, disabling Kerberos\n"));
 		cli->use_kerberos = False;
 	}
-#endif
 
 	fstrcpy(cli->user_name, user);
 



More information about the samba-cvs mailing list