From f9b416ea7ca20ca21e4bb667b8f07a3a9a3642c2 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 20 Jan 1999 03:05:35 +0000 Subject: [PATCH] ndn & strcasecmp cleanup --- servers/slapd/acl.c | 2 +- servers/slapd/back-ldbm/cache.c | 3 ++- servers/slapd/backend.c | 6 +++--- servers/slapd/dn.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index dc42491289..255cf89545 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -267,7 +267,7 @@ acl_access_allowed( if ( strcasecmp( b->a_dnpat, "self" ) == 0 && op->o_ndn != NULL && *(op->o_ndn) && e->e_dn != NULL ) { - if ( strcasecmp( edn, op->o_ndn ) == 0 ) { + if ( strcmp( edn, op->o_ndn ) == 0 ) { Debug( LDAP_DEBUG_ACL, "<= acl_access_allowed: matched by clause #%d access %s\n", i, (b->a_access & ~ACL_SELF) >= diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index f83ea50c54..a9c31cc3eb 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -3,9 +3,10 @@ #include "portable.h" #include -int strcasecmp( const char *, const char *); +#include #include + #include "slap.h" #include "back-ldbm.h" diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index cf485cd0e7..7d715fe40d 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -161,7 +161,7 @@ select_backend( char * dn ) continue; } - if ( strcasecmp( backends[i].be_suffix[j], + if ( strcmp( backends[i].be_suffix[j], dn + (dnlen - len) ) == 0 ) { return( &backends[i] ); } @@ -181,7 +181,7 @@ select_backend( char * dn ) continue; } - if ( strcasecmp( backends[i].be_suffixAlias[j], + if ( strcmp( backends[i].be_suffixAlias[j], dn + (dnlen - len) ) == 0 ) { return( &backends[i] ); } @@ -214,7 +214,7 @@ be_issuffix( int i; for ( i = 0; be->be_suffix != NULL && be->be_suffix[i] != NULL; i++ ) { - if ( strcasecmp( be->be_suffix[i], suffix ) == 0 ) { + if ( strcmp( be->be_suffix[i], suffix ) == 0 ) { return( 1 ); } } diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index 52ea2fecd9..ec57f75ec7 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -229,7 +229,7 @@ dn_issuffix( return( 0 ); } - return( strcasecmp( dn + dnlen - suffixlen, suffix ) == 0 ); + return( strcmp( dn + dnlen - suffixlen, suffix ) == 0 ); } /* -- 2.39.5