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/rpc_server | |
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/rpc_server')
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 4 | ||||
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/samr/samr_password.c | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index ed984f981e..53526ce15c 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -2632,7 +2632,7 @@ static NTSTATUS dcesrv_lsa_SetSecret(struct dcesrv_call_state *dce_call, TALLOC_ } /* modify the samdb record */ - ret = samdb_replace(secret_state->sam_ldb, mem_ctx, msg); + ret = dsdb_replace(secret_state->sam_ldb, msg, 0); if (ret != LDB_SUCCESS) { /* we really need samdb.c to return NTSTATUS */ return NT_STATUS_UNSUCCESSFUL; diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index fb2601ab2f..f47f608527 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -1200,7 +1200,7 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal samdb_msg_add_delete(sam_ctx, mem_ctx, new_msg, "operatingSystemVersion"); - if (samdb_replace(sam_ctx, mem_ctx, new_msg) != LDB_SUCCESS) { + if (dsdb_replace(sam_ctx, new_msg, 0) != LDB_SUCCESS) { DEBUG(3,("Impossible to update samdb: %s\n", ldb_errstring(sam_ctx))); } @@ -1262,7 +1262,7 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal ); } - if (samdb_replace(sam_ctx, mem_ctx, new_msg) != LDB_SUCCESS) { + if (dsdb_replace(sam_ctx, new_msg, 0) != LDB_SUCCESS) { DEBUG(3,("Impossible to update samdb: %s\n", ldb_errstring(sam_ctx))); } 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; |