r2432: more string function updates.
authorAndrew Tridgell <tridge@samba.org>
Mon, 20 Sep 2004 07:24:00 +0000 (07:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:58:52 +0000 (12:58 -0500)
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.

source/libcli/auth/kerberos_verify.c
source/libcli/ldap/ldap.c

index 843189c884fe0df1a16b269f39115092f6db23f4..9afc4caacce33bb115a5e1966e4411c138f6b3dd 100644 (file)
@@ -98,7 +98,7 @@ static BOOL ads_keytab_verify_ticket(krb5_context context, krb5_auth_context aut
                        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
index 7af9ca42c54aad71bb2de151963cd12aafe8925c..72e8f605dc182e0c9508649b65e0c7231947f72e 100644 (file)
@@ -1121,7 +1121,7 @@ BOOL ldap_parse_basic_url(TALLOC_CTX *mem_ctx, const char *url,
        const char *p = url;
 
        /* skip leading "URL:" (if any) */
-       if ( strnequal( p, "URL:", 4 ) ) {
+       if (strncasecmp( p, "URL:", 4) == 0) {
                p += 4;
        }