[Devel] Re: Re: in openser-1.2.0-tls/modules/dbtext/dbtext_lib.c:dbt_cache_del_db(), misssing '!' before strncasecmp()!

yanlin yanlin at fortinet.com
Mon Apr 2 07:41:23 CEST 2007


Hi, Henning Westerholt,

yes, dbt_cache_del_db() in dbtext module was not used currently. 
recently i want to do ldap + auth_db authentication in openser, which is a bit like dbtext + auth_db,
so i read throught dbtext module code.

i think the right way to get to the right list elements should do like this:
	if (_dcache->dbp->name.len == _s->len && !strncasecmp(_dcache->dbp->name.s, _s->s, _s->len)) 
not like this:
	if (_dcache->dbp->name.len == _s->len && strncasecmp(_dcache->dbp->name.s, _s->s, _s->len)) 
where miss a '!' before strncasecmp().

also i found there was a second place that miss '!' before strncasecmp(), it was in function
dbt_cache_check_db(), the same problem as above, just in the same file.

regards,

yan lin











More information about the Devel mailing list