apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <BNICHO...@novell.com>
Subject Re: svn commit: r411890 - /apr/apr-util/trunk/include/apr_ldap_init.h
Date Mon, 05 Jun 2006 22:44:02 GMT
>>> On 6/5/2006 at 4:21 PM, in message <4484AE7B.40105@rowe-clan.net>,
"William A.
Rowe, Jr." <wrowe@rowe-clan.net> wrote:
> Roy T. Fielding wrote:
>> On Jun 5, 2006, at 11:54 AM, bnicholes@apache.org wrote:
>> 
>>> +/**
>>> + * Macro to detect security related return values.
>>> + */
>>> +#if defined(LDAP_INSUFFICIENT_ACCESS)
>>> +#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS
>>> +#elif defined(LDAP_INSUFFICIENT_RIGHTS)
>>> +#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
>>> +#endif
>> 
>> Shouldn't that end with
>> 
>>   #else
>>   #define APU_LDAP_INSUFFICIENT_ACCESS (some reasonable default)
>>   #endif
>> 
>> It seems odd just to leave it undefined.
> 
> Actually, aren't we leaving out the possiblity that both symbols
exist
> with slightly different meanings?
> 
> #if defined(LDAP_INSUFFICIENT_RIGHTS) and
defined(LDAP_INSUFFICIENT_RIGHTS)
> #define APU_LDAP_INSUFFICIENT_ACCESS(rc) ((rc ==
LDAP_INSUFFICIENT_ACCESS) \
>                                         || (rc ==
LDAP_INSUFFICIENT_RIGHTS)
> 
> 
> We made these mistakes before in httpd which is why apr_errno.h is
now
> the way it is.
> 
> Bil

Yes, that is a possibility but in this case with the small number of
LDAP SDKs that we support, I haven't found any evidence that it is
nothing more that a remote possibility.  But I have found evidence that
they are two distinct #defines that share the same meaning.

Brad 

Mime
View raw message