r12998: A big update to samldb.c
authorAndrew Bartlett <abartlet@samba.org>
Wed, 18 Jan 2006 12:06:36 +0000 (12:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:51:15 +0000 (13:51 -0500)
commit7dad66d8e38e206dd83b88a4e37c0f413b4b69df
tree630d03be0f072caa02370fc4794471b3e46ba25e
parentba8406fd3fb753deba9c3d5f8179dc70a200375d
r12998: A big update to samldb.c

This updates the module to handle both SID allocation and nextRid
updating while importing users.  (As imported users already have a
SID, so don't go via the allocation step).  We also ensure that SIDs
in the database are unquie at create time.

Furthermore, at allocation time, we double-check the SID isn't already
in use, and that we don't create a foriegnSecurityPrincipal for a
'local' sid.

Also create random samAccountName entries for users without one (we
were setting $000000-000000000000).

We may want to seperate the uniqueness code from the rest of samldb,
and into a module with the objectguid code, which needs similar
checks.  These checks also need to apply to modification, or those
modifications denied outright.

Also update part of the testsuite to validate this.

Andrew Bartlett
(This used to be commit 7a9c8eee4bea88f5f0bb7c62f701476384b7dc84)
source4/dsdb/samdb/ldb_modules/samldb.c
testprogs/ejs/ldap.js