summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-07-19 00:59:20 +0400
committerMatthieu Patou <mat@samba.org>2011-07-27 00:46:56 +0200
commita5ba41881c393d075238a537aeca273df446389b (patch)
tree458f8d22dec1c44d9c10e4c8bfc0da77dfe26a5b /source4
parent326e2dd681c7210375a9b6e3b3e512dbab94bf7e (diff)
downloadsamba-a5ba41881c393d075238a537aeca273df446389b.tar.gz
samba-a5ba41881c393d075238a537aeca273df446389b.tar.bz2
samba-a5ba41881c393d075238a537aeca273df446389b.zip
s4-dcerpc: Do not return linked attribute on deleted objects it makes W2k8R2 loops when joining s4 domains
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Wed Jul 27 00:46:56 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index dc50fc0c0c..2abab787bc 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -362,7 +362,21 @@ static WERROR get_nc_changes_add_la(TALLOC_CTX *mem_ctx,
struct GUID guid;
struct ldb_dn *tdn;
int ret;
-
+ const char *v;
+
+ v = ldb_msg_find_attr_as_string(msg, "isDeleted", "false");
+ if (strncasecmp(v, "true", 4) == 0) {
+ v = ldb_msg_find_attr_as_string(msg, "isRecycled", "false");
+ /*
+ * Do not skip link when the object is just deleted (isRecycled not present)
+ * Do it for tomstones or recycled ones
+ */
+ if (strncasecmp(v, "true", 4) == 0) {
+ DEBUG(2, (" object %s is deleted, not returning linked attribute !\n",
+ ldb_dn_get_linearized(msg->dn)));
+ return WERR_OK;
+ }
+ }
status = dsdb_get_extended_dn_guid(dsdb_dn->dn, &guid, "GUID");
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,(__location__ " Unable to extract GUID in linked attribute '%s' in '%s'\n",