| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- Index: ldapmisc.c
- --- ldapmisc.c.orig 2005-11-18 22:17:27.000000000 +0100
- +++ ldapmisc.c 2006-03-11 09:28:02.345677747 +0100
- @@ -29,6 +29,27 @@
-
- #include "ldapdiff.h"
-
- +static char *
- +my_strcasestr(s, find)
- + const char *s, *find;
- +{
- + char c, sc;
- + size_t len;
- +
- + if ((c = *find++) != 0) {
- + c = tolower((unsigned char)c);
- + len = strlen(find);
- + do {
- + do {
- + if ((sc = *s++) == 0)
- + return (NULL);
- + } while ((char)tolower((unsigned char)sc) != c);
- + } while (strncasecmp(s, find, len) != 0);
- + s--;
- + }
- + return ((char *)s);
- +}
- +
- int ldifcheckbase(char *attrbase)
- {
- char *confbase;
- @@ -36,7 +57,7 @@
-
- confbase = ldifgetpconf(CONFBASEDN);
-
- - if((pos = strcasestr(attrbase,confbase)) == NULL){
- + if((pos = my_strcasestr(attrbase,confbase)) == NULL){
- return -1;
- }
-
|