samdb/schema_load: do schema loading with one search
authorBob Campbell <bobcampbell@catalyst.net.nz>
Tue, 11 Jul 2017 04:40:14 +0000 (16:40 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 5 Mar 2018 19:50:15 +0000 (20:50 +0100)
commit8ac1646e92d707705c94bc286c17f1cd0d5505fb
treef9bcb8ca1b0d82c6e090d37588e0767a6a267199
parent313b0c60f482c8fef45dcafba5d8dc6c2e29b461
samdb/schema_load: do schema loading with one search

It appears that there was a race condition between searching for the
attribute & class definitions, and searching for the schema object, if
the schema was changed in-between the two searches.

This is likely the cause of ldap_schema being flapping.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12889

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/schema_load.c
source4/dsdb/schema/schema_init.c