[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] race condition when creating ldap entries



as i understand it we have no protection against race conditions
in the ldap code.

Imagine several teachers at the beginning of the school year,
mass creating users att the same time. several webmin instances
will connect to the ldap server at once, requesting both unique
logins and numerical uids. ldap will not protect against this,
since it is only concerned about the uniqueness of the dn, not
components of it.

we have several options to solve this problem:

use a database with transaction support (postgresql is my
favourit) and rollback doing the user management. This is the way
*real* systems like sourceforge and alioth are doing it. (c:
ldap is just used as a fast lookup, not as the real backend.

have one "uid-daemon" doing all the (sequential) ldap write
queries (and also uid and login creation), which he receives from
the webmin instances, nicely queued through a pipe.

any more, better solutions?