summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-16 14:45:16 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-16 21:10:50 +1100
commit90203f87e7da3346ae9236e4d30c93b95a2ddad9 (patch)
tree5eb2caa2f160e9a9f69c6d9eb673ff128fa66352 /source4/rpc_server/samr
parentc6d85d67f9b52e4071c84749a1f55de646a5451c (diff)
downloadsamba-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/rpc_server/samr')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c2
-rw-r--r--source4/rpc_server/samr/samr_password.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 76f35ddefb..61a9f1350b 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -1415,7 +1415,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL
}
/* modify the samdb record */
- ret = samdb_replace(a_state->sam_ctx, mem_ctx, msg);
+ ret = dsdb_replace(a_state->sam_ctx, msg, 0);
if (ret != LDB_SUCCESS) {
DEBUG(0,("Failed to modify account record %s to set userAccountControl: %s\n",
ldb_dn_get_linearized(msg->dn),
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index 1ed1dd1b69..1a09283ea6 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -153,7 +153,7 @@ NTSTATUS dcesrv_samr_ChangePasswordUser(struct dcesrv_call_state *dce_call,
/* The above call only setup the modifications, this actually
* makes the write to the database. */
- ret = samdb_replace(sam_ctx, mem_ctx, msg);
+ ret = dsdb_replace(sam_ctx, msg, 0);
if (ret != LDB_SUCCESS) {
DEBUG(2,("Failed to modify record to change password on %s: %s\n",
ldb_dn_get_linearized(a_state->account_dn),
@@ -310,7 +310,7 @@ NTSTATUS dcesrv_samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call,
/* The above call only setup the modifications, this actually
* makes the write to the database. */
- ret = samdb_replace(sam_ctx, mem_ctx, mod);
+ ret = dsdb_replace(sam_ctx, mod, 0);
if (ret != LDB_SUCCESS) {
DEBUG(2,("Failed to modify record to change password on %s: %s\n",
ldb_dn_get_linearized(user_dn),
@@ -473,9 +473,9 @@ NTSTATUS dcesrv_samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
/* The above call only setup the modifications, this actually
* makes the write to the database. */
- ret = samdb_replace(sam_ctx, mem_ctx, mod);
+ ret = dsdb_replace(sam_ctx, mod, 0);
if (ret != LDB_SUCCESS) {
- DEBUG(2,("samdb_replace failed to change password for %s: %s\n",
+ DEBUG(2,("dsdb_replace failed to change password for %s: %s\n",
ldb_dn_get_linearized(user_dn),
ldb_errstring(sam_ctx)));
status = NT_STATUS_UNSUCCESSFUL;