[Date Prev][Date Next]
RE: how to check uniqueness of uidNumber ?
> -----Original Message-----
> From: Jim C [mailto:email@example.com]
> The problem does not occur at the db level. It occurs at the script
> level because one must first retrieve the uidNumber and then do the
> modify. Between the two lines of code a race condition can possibly
> occur between scripts. Here is an example function written in php:
No. You aren't reading carefully enough, and your script does not implement
the method that has been discussed in the original threads. There's a
difference between LDAPModify/Replace and LDAPModify/Delete. The correct
update, already described in detail in the previous threads, uses
LDAPModify/Delete and /Add. Your script uses Replace, which provides no
locking assurances. Read RFC2251 and don't come back until you've fully read
and understand the description of the LDAP Modify operation.
> Howard Chu wrote:
> There's more than one approach to solve a generic problem, you just have to
> understand the approach that LDAP supports.
> > http://www.openldap.org/lists/openldap-software/200208/msg00358.html
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
Symas: Premier OpenSource Development and Support