svn commit: samba r2432 - in branches/SAMBA_4_0/source/libcli: auth ldap

tridge at samba.org tridge at samba.org
Mon Sep 20 07:24:00 GMT 2004


Author: tridge
Date: 2004-09-20 07:24:00 +0000 (Mon, 20 Sep 2004)
New Revision: 2432

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/libcli&rev=2432&nolog=1

Log:
more string function updates.

btw, the reason I want to use strncasecmp() instead of StrnCaseCmp()
is that the Samba internal functions are built to deal with
multi-byte, whereas in the cases I am converting we know we are
dealing with solely ascii string constants, so going via the slow
conversion libraries is pointless.


Modified:
   branches/SAMBA_4_0/source/libcli/auth/kerberos_verify.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/auth/kerberos_verify.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/auth/kerberos_verify.c	2004-09-20 07:22:00 UTC (rev 2431)
+++ branches/SAMBA_4_0/source/libcli/auth/kerberos_verify.c	2004-09-20 07:24:00 UTC (rev 2432)
@@ -98,7 +98,7 @@
 			goto out;
 		}
 		/* Look for a CIFS ticket */
-		if (!StrnCaseCmp(princ_name, "cifs/", 5) || (!StrnCaseCmp(princ_name, "host/", 5))) {
+		if (!strncasecmp(princ_name, "cifs/", 5) || (!strncasecmp(princ_name, "host/", 5))) {
 #ifdef HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK
 			krb5_auth_con_setuseruserkey(context, auth_context, &kt_entry.keyblock);
 #else

Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap.c	2004-09-20 07:22:00 UTC (rev 2431)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap.c	2004-09-20 07:24:00 UTC (rev 2432)
@@ -1121,7 +1121,7 @@
 	const char *p = url;
 
 	/* skip leading "URL:" (if any) */
-	if ( strnequal( p, "URL:", 4 ) ) {
+	if (strncasecmp( p, "URL:", 4) == 0) {
 		p += 4;
 	}
 



More information about the samba-cvs mailing list