summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-08-10 01:36:01 +0400
committerMatthieu Patou <mat@matws.net>2011-08-10 01:44:44 +0400
commit4659b07eb9608acaf5b49d8919c98e224d2b805c (patch)
tree97f089f05feabb910dc69fd75b8a5287122e8de4 /source4
parentdd902164d270be60ccafb296105f4c1d5edd87df (diff)
downloadsamba-4659b07eb9608acaf5b49d8919c98e224d2b805c.tar.gz
samba-4659b07eb9608acaf5b49d8919c98e224d2b805c.tar.bz2
samba-4659b07eb9608acaf5b49d8919c98e224d2b805c.zip
s4-drs: In dcesrv_drsuapi_DsRemoveDSServer use the subtree control to delete the NTDS entry
This entry has most of the time subelements (connections between DCs) that will forbid a simple (non recursive) delete
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index 5dbb238f02..b170ec3e23 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -25,6 +25,7 @@
#include "rpc_server/dcerpc_server.h"
#include "rpc_server/common/common.h"
#include "dsdb/samdb/samdb.h"
+#include "dsdb/common/util.h"
#include "libcli/security/security.h"
#include "libcli/security/session.h"
#include "rpc_server/drsuapi/dcesrv_drsuapi.h"
@@ -502,7 +503,7 @@ static WERROR dcesrv_drsuapi_DsRemoveDSServer(struct dcesrv_call_state *dce_call
}
if (r->in.req->req1.commit) {
- ret = ldb_delete(b_state->sam_ctx, ntds_dn);
+ ret = dsdb_delete(b_state->sam_ctx, ntds_dn, DSDB_TREE_DELETE);
if (ret != LDB_SUCCESS) {
return WERR_FOOBAR;
}