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/libnet | |
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/libnet')
-rw-r--r-- | source4/libnet/libnet_join.c | 2 | ||||
-rw-r--r-- | source4/libnet/libnet_samsync_ldb.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index e60d45e316..5abe88bb89 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -331,7 +331,7 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J return NT_STATUS_NO_MEMORY; } - rtn = samdb_replace(remote_ldb, tmp_ctx, msg); + rtn = dsdb_replace(remote_ldb, msg, 0); if (rtn != 0) { r->out.error_string = talloc_asprintf(r, diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c index e7066ecfd2..e9db4a909c 100644 --- a/source4/libnet/libnet_samsync_ldb.c +++ b/source4/libnet/libnet_samsync_ldb.c @@ -222,7 +222,7 @@ static NTSTATUS samsync_ldb_handle_domain(TALLOC_CTX *mem_ctx, /* TODO: Account lockout, password properties */ - ret = samdb_replace(state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(state->sam_ldb, msg, 0); if (ret) { return NT_STATUS_INTERNAL_ERROR; @@ -454,7 +454,7 @@ static NTSTATUS samsync_ldb_handle_user(TALLOC_CTX *mem_ctx, } } } else { - ret = samdb_replace(state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(state->sam_ldb, msg, 0); if (ret != 0) { *error_string = talloc_asprintf(mem_ctx, "Failed to modify user record %s: %s", ldb_dn_get_linearized(msg->dn), @@ -593,7 +593,7 @@ static NTSTATUS samsync_ldb_handle_group(TALLOC_CTX *mem_ctx, return NT_STATUS_INTERNAL_DB_CORRUPTION; } } else { - ret = samdb_replace(state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(state->sam_ldb, msg, 0); if (ret != 0) { *error_string = talloc_asprintf(mem_ctx, "Failed to modify group record %s: %s", ldb_dn_get_linearized(msg->dn), @@ -708,7 +708,7 @@ static NTSTATUS samsync_ldb_handle_group_member(TALLOC_CTX *mem_ctx, talloc_free(msgs); } - ret = samdb_replace(state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(state->sam_ldb, msg, 0); if (ret != 0) { *error_string = talloc_asprintf(mem_ctx, "Failed to modify group record %s: %s", ldb_dn_get_linearized(msg->dn), @@ -807,7 +807,7 @@ static NTSTATUS samsync_ldb_handle_alias(TALLOC_CTX *mem_ctx, return NT_STATUS_INTERNAL_DB_CORRUPTION; } } else { - ret = samdb_replace(state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(state->sam_ldb, msg, 0); if (ret != 0) { *error_string = talloc_asprintf(mem_ctx, "Failed to modify alias record %s: %s", ldb_dn_get_linearized(msg->dn), @@ -926,7 +926,7 @@ static NTSTATUS samsync_ldb_handle_alias_member(TALLOC_CTX *mem_ctx, talloc_free(msgs); } - ret = samdb_replace(state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(state->sam_ldb, msg, 0); if (ret != 0) { *error_string = talloc_asprintf(mem_ctx, "Failed to modify group record %s: %s", ldb_dn_get_linearized(msg->dn), @@ -970,7 +970,7 @@ static NTSTATUS samsync_ldb_handle_account(TALLOC_CTX *mem_ctx, account->privilege_name[i].string); } - ret = samdb_replace(state->pdb, mem_ctx, msg); + ret = dsdb_replace(state->pdb, msg, 0); if (ret == LDB_ERR_NO_SUCH_OBJECT) { if (samdb_msg_add_dom_sid(state->pdb, msg, msg, "objectSid", sid) != LDB_SUCCESS) { talloc_free(msg); @@ -1028,7 +1028,7 @@ static NTSTATUS samsync_ldb_delete_account(TALLOC_CTX *mem_ctx, samdb_msg_add_delete(state->sam_ldb, mem_ctx, msg, "privilege"); - ret = samdb_replace(state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(state->sam_ldb, msg, 0); if (ret != 0) { *error_string = talloc_asprintf(mem_ctx, "Failed to modify privilege record %s", ldb_dn_get_linearized(msg->dn)); |