we can't use the unique index code for samAccountName
authorAndrew Tridgell <tridge@samba.org>
Thu, 2 Jul 2009 05:57:30 +0000 (15:57 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 2 Jul 2009 05:57:30 +0000 (15:57 +1000)
commitd47bb0a96c8205511e622eacc88de3ec31ddeeab
treef4a0d1b65d04dfb3a924ca13c886d60f81bf2048
parent0aec87454b0b2e14b8fa32607d2173caa168d4de
we can't use the unique index code for samAccountName

Using ldb unique indexes for samAccountName doesn't work with DRS as
the other DC may send us a deleted record (tombstone record), which
has the same samAccountName as an existing record. That would then
create two records in the same partition with the same samAccountName.

So we needed to put back the logic in samldb.c which explicitly
checked whether a samAccountName already exists on add
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/schema/schema_init.c