The branch, master has been updated
       via  a5ba418 s4-dcerpc: Do not return linked attribute on deleted 
objects it makes W2k8R2 loops when joining s4 domains
       via  326e2dd s4-dsdb: Improve the calculation of system flags according 
to 3.1.1.5.2.4
       via  5f1f153 s4-upgradeprovision: Detect recent provision in a more 
reliable way
      from  c79e08f s3 swat: Create random nonce in CGI mode

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a5ba41881c393d075238a537aeca273df446389b
Author: Matthieu Patou <[email protected]>
Date:   Tue Jul 19 00:59:20 2011 +0400

    s4-dcerpc: Do not return linked attribute on deleted objects it makes 
W2k8R2 loops when joining s4 domains
    
    Autobuild-User: Matthieu Patou <[email protected]>
    Autobuild-Date: Wed Jul 27 00:46:56 CEST 2011 on sn-devel-104

commit 326e2dd681c7210375a9b6e3b3e512dbab94bf7e
Author: Matthieu Patou <[email protected]>
Date:   Mon Jul 25 17:31:03 2011 +0400

    s4-dsdb: Improve the calculation of system flags according to 3.1.1.5.2.4

commit 5f1f15399843760d3c3cf98022c76017a3a415c8
Author: Matthieu Patou <[email protected]>
Date:   Thu Jul 21 00:50:38 2011 +0400

    s4-upgradeprovision: Detect recent provision in a more reliable way

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass.c |    5 +++--
 source4/rpc_server/drsuapi/getncchanges.c    |   16 +++++++++++++++-
 source4/scripting/bin/upgradeprovision       |   13 ++++++++++++-
 3 files changed, 30 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c 
b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 7ae90d3..ab1766f 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -734,14 +734,15 @@ static int objectclass_do_add(struct oc_context *ac)
                } else if (ldb_attr_cmp(objectclass->lDAPDisplayName, "site") 
== 0
                                || ldb_attr_cmp(objectclass->lDAPDisplayName, 
"serversContainer") == 0
                                || ldb_attr_cmp(objectclass->lDAPDisplayName, 
"nTDSDSA") == 0) {
+                       if (ldb_attr_cmp(objectclass->lDAPDisplayName, "site") 
== 0)
+                               systemFlags |= 
(int32_t)(SYSTEM_FLAG_CONFIG_ALLOW_RENAME);
                        systemFlags |= 
(int32_t)(SYSTEM_FLAG_DISALLOW_MOVE_ON_DELETE);
-
                } else if (ldb_attr_cmp(objectclass->lDAPDisplayName, 
"siteLink") == 0
+                               || ldb_attr_cmp(objectclass->lDAPDisplayName, 
"subnet") == 0
                                || ldb_attr_cmp(objectclass->lDAPDisplayName, 
"siteLinkBridge") == 0
                                || ldb_attr_cmp(objectclass->lDAPDisplayName, 
"nTDSConnection") == 0) {
                        systemFlags |= 
(int32_t)(SYSTEM_FLAG_CONFIG_ALLOW_RENAME);
                }
-
                /* TODO: If parent object is site or subnet, also add 
(SYSTEM_FLAG_CONFIG_ALLOW_RENAME) */
 
                if (el || systemFlags != 0) {
diff --git a/source4/rpc_server/drsuapi/getncchanges.c 
b/source4/rpc_server/drsuapi/getncchanges.c
index dc50fc0..2abab78 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",
diff --git a/source4/scripting/bin/upgradeprovision 
b/source4/scripting/bin/upgradeprovision
index 54f3cf1..af97964 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -1346,6 +1346,16 @@ def rebuild_sd(samdb, names):
             message(ERROR, "On %s bad stuff %s" % 
(str(delta.dn),badsd.as_sddl(names.domainsid)))
             return
 
+def hasATProvision(samdb):
+        entry = samdb.search(expression="dn=@PROVISION", base = "",
+                                scope=SCOPE_SUBTREE,
+                                attrs=["dn"])
+
+        if entry != None and len(entry) == 1:
+            return True
+        else:
+            return False
+
 def removeProvisionUSN(samdb):
         attrs = [samba.provision.LAST_PROVISION_USN_ATTRIBUTE, "dn"]
         entry = samdb.search(expression="dn=@PROVISION", base = "",
@@ -1793,7 +1803,8 @@ if __name__ == '__main__':
             new_ldbs.groupedCommit()
             deltaattr = None
         # 11)
-            if re.match(".*alpha((9)|(\d\d+)).*", str(oem)):
+            message(GUESS, oem)
+            if hasATProvision(ldbs.sam) or re.match(".*alpha((9)|(\d\d+)).*", 
str(oem)):
                 # 11) A
                 # Starting from alpha9 we can consider that the structure is 
quite ok
                 # and that we should do only dela


-- 
Samba Shared Repository

Reply via email to