diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-16 14:45:16 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-16 21:10:50 +1100 |
commit | 90203f87e7da3346ae9236e4d30c93b95a2ddad9 (patch) | |
tree | 5eb2caa2f160e9a9f69c6d9eb673ff128fa66352 /source4/dsdb/schema | |
parent | c6d85d67f9b52e4071c84749a1f55de646a5451c (diff) | |
download | samba-90203f87e7da3346ae9236e4d30c93b95a2ddad9.tar.gz samba-90203f87e7da3346ae9236e4d30c93b95a2ddad9.tar.bz2 samba-90203f87e7da3346ae9236e4d30c93b95a2ddad9.zip |
s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flags
This allows for controls to be added easily where they are needed.
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r-- | source4/dsdb/schema/schema_init.c | 5 | ||||
-rw-r--r-- | source4/dsdb/schema/schema_set.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 77b4e2a473..c369d57fa9 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -22,6 +22,7 @@ #include "includes.h" #include "dsdb/samdb/samdb.h" +#include "dsdb/common/util.h" #include "lib/ldb/include/ldb_errors.h" #include "../lib/util/dlinklist.h" #include "librpc/gen_ndr/ndr_misc.h" @@ -310,12 +311,12 @@ WERROR dsdb_write_prefixes_from_schema_to_ldb(TALLOC_CTX *mem_ctx, struct ldb_co return WERR_NOMEM; } - ldb_ret = samdb_replace_as_system(ldb, temp_ctx, msg); + ldb_ret = dsdb_replace(ldb, msg, DSDB_FLAG_AS_SYSTEM); talloc_free(temp_ctx); if (ldb_ret != 0) { - DEBUG(0,("dsdb_write_prefixes_from_schema_to_ldb: samdb_replace failed\n")); + DEBUG(0,("dsdb_write_prefixes_from_schema_to_ldb: dsdb_replace failed\n")); return WERR_FOOBAR; } diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 99b26f6b9d..3dace04304 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -138,7 +138,7 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem mod_msg = ldb_msg_diff(ldb, res->msgs[0], msg); if (mod_msg->num_elements > 0) { - ret = samdb_replace(ldb, mem_ctx, mod_msg); + ret = dsdb_replace(ldb, mod_msg, 0); } } @@ -166,7 +166,7 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem mod_msg = ldb_msg_diff(ldb, res_idx->msgs[0], msg_idx); if (mod_msg->num_elements > 0) { - ret = samdb_replace(ldb, mem_ctx, mod_msg); + ret = dsdb_replace(ldb, mod_msg, 0); } } if (ret == LDB_ERR_OPERATIONS_ERROR || ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS || ret == LDB_ERR_INVALID_DN_SYNTAX) { |