schema: Make writing indices flag an enum for a new state
authorGarming Sam <garming@catalyst.net.nz>
Tue, 21 Nov 2017 23:34:01 +0000 (12:34 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 24 Nov 2017 00:13:14 +0000 (01:13 +0100)
commit17f1c6f9f4c6d14c69d0d7030fcd919fbc0f6231
tree5b57e63ba795358f2911835bbcde9d456dbdf9f8
parent84a7baeef30a41d51eff8e6486ed67ed3318b115
schema: Make writing indices flag an enum for a new state

In schema_load_init, we find that the writing of indices is not locked
in any way. This leads to race conditions. To resolve this, we need to
have a new state (SCHEMA_COMPARE) which can report to the caller that we
need to open a transaction to write the indices.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/pydsdb.c
source4/dsdb/repl/replicated_objects.c
source4/dsdb/samdb/ldb_modules/schema_load.c
source4/dsdb/schema/schema.h
source4/dsdb/schema/schema_set.c
source4/dsdb/schema/tests/schema_syntax.c
source4/libnet/libnet_vampire.c
source4/torture/drs/drs_util.c