[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: commit: ldap/servers/slapd proto-slap.h
Howard Chu writes:
> Ando and I tripped over this before, the solution was to compare the
> be->be_private pointer.
>
> I suppose it's possible that a backend (like back-null?) may have no
> private data, so perhaps be_nsuffix is a better choice.
Back-null has private data. OTOH, back-passwd's be_private is only set
if it is configured with an alternate passwd file, otherwise it's NULL.
be->be_private need not be constant for the lifetime of a database:
back-ldap/chain.c and overlays/translucent.c modify it.
back-monitor/monitor_back_db_open() reads be->be_private and stores
it back, even though it never changes it. I don't know why.
>lukeh@OpenLDAP.org wrote:
>> Add be_match() macro: one cannot always compare BackendDB pointer
>> values in order to test equivalence, because the overlay engine
>> may have reset the backend pointer to a temporary copy on the stack.
>>
>> So, we test pointer equivalence of the BackendDB itself, then of
>> be_nsuffix -- this macro can be updated if necessary.
--
Hallvard