Re: LDAP: bugfix and deprecated OpenLDAP API

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: LDAP: bugfix and deprecated OpenLDAP API
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17C4FDC7@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: LDAP: bugfix and deprecated OpenLDAP API  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: LDAP: bugfix and deprecated OpenLDAP API
Re: LDAP: bugfix and deprecated OpenLDAP API
Список pgsql-hackers
Peter Eisentraut wrote:
>> --- 3511,3534 ----
>>       }
>>
>>       /*
>> !      * Perform an explicit anonymous bind.
>> !      * This is not necessary in principle, but we want to set a timeout
>> !      * of PGLDAP_TIMEOUT seconds and return 2 if the connection fails.
>> !      * Unfortunately there is no standard conforming way to do that.
>>        */
> 
> This comment has become a bit confusing.  What exactly is nonstandard?
> Setting a timeout, or returning 2?  The code below actually returns 3.

I have improved the comment.

>> + #ifdef HAVE_LIBLDAP
>> +     /* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
> 
> We don't use HAVE_LIBLDAP anywhere else to mean OpenLDAP.  Existing
> LDAP-related code uses #ifdef WIN32.

Changed.

> > + #else
> 
> There should be a comment here indicating what this #else belongs to
> (#else /* HAVE_LIBLDAP */, or whatever we end up using).

Changed.
 
>> +     /* the nonstandard ldap_connect function performs an anonymous bind */
>> +     if (ldap_connect(ld, &time) != LDAP_SUCCESS)
>> +     {
>> +         /* error or timeout in ldap_connect */
>> +         free(url);
>> +         ldap_unbind(ld);
>> +         return 2;
>> +     }
>> + #endif
> 
> here too

Changed.

> Bonus: Write a commit message for your patch.  (Consider using git
> format-patch.)

Suggested commit message is included in the patch.

Yours,
Laurenz Albe

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Commitfest II CLosed
Следующее
От: Robert Haas
Дата:
Сообщение: Re: logical changeset generation v6.2