mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Minor strlen cleanup
This commit is contained in:
parent
ab6f9bd352
commit
d0b1ca692a
@ -99,9 +99,9 @@ int slap_sasl_getdn( Connection *conn, char *id, char **dnptr, int flags )
|
|||||||
|
|
||||||
|
|
||||||
/* Blatantly anonymous ID */
|
/* Blatantly anonymous ID */
|
||||||
len = strlen( "anonymous" );
|
len = sizeof( "anonymous" ) - 1;
|
||||||
if( id && !strncasecmp( id, "anonymous", len) &&
|
if( id && ( id[len] == '\0' || id[len] == '@' ) &&
|
||||||
( id[len] == '\0' || id[len] == '@' ) ) {
|
!strncasecmp( id, "anonymous", len) ) {
|
||||||
*dnptr = NULL;
|
*dnptr = NULL;
|
||||||
return( LDAP_SUCCESS );
|
return( LDAP_SUCCESS );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user