diff options
author | Garming Sam <garming@catalyst.net.nz> | 2017-11-22 12:34:01 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-11-24 01:13:14 +0100 |
commit | 17f1c6f9f4c6d14c69d0d7030fcd919fbc0f6231 (patch) | |
tree | 5b57e63ba795358f2911835bbcde9d456dbdf9f8 /source4/torture/drs | |
parent | 84a7baeef30a41d51eff8e6486ed67ed3318b115 (diff) | |
download | samba-17f1c6f9f4c6d14c69d0d7030fcd919fbc0f6231.tar.gz |
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>
Diffstat (limited to 'source4/torture/drs')
-rw-r--r-- | source4/torture/drs/drs_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/torture/drs/drs_util.c b/source4/torture/drs/drs_util.c index 7c073c9f6e7..4795bd90fe3 100644 --- a/source4/torture/drs/drs_util.c +++ b/source4/torture/drs/drs_util.c @@ -158,7 +158,7 @@ bool drs_util_dsdb_schema_load_ldb(struct torture_context *tctx, talloc_free(res); - ret = dsdb_set_schema(ldb, ldap_schema, true); + ret = dsdb_set_schema(ldb, ldap_schema, SCHEMA_WRITE); if (ret != LDB_SUCCESS) { torture_fail(tctx, talloc_asprintf(tctx, "dsdb_set_schema() failed: %s", ldb_strerror(ret))); |