[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Tue Jan 10 12:45:03 UTC 2017


The branch, master has been updated
       via  207fa23 python/schema: fix tests flapping due to oid collision
       via  dde30ab s3:winbindd: talloc_steal the extra_data in winbindd_list_users_recv()
      from  28cc347 smbd/ioctl: match WS2016 ReFS set compression behaviour

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


- Log -----------------------------------------------------------------
commit 207fa2331831f570eb4855e98b676782d2008f34
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Jan 10 10:00:43 2017 +1300

    python/schema: fix tests flapping due to oid collision
    
    These tests would sometimes fail because the randomly generated OIDs
    would collide. This fixes that by giving a unique OID to each attribute
    and class.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12507
    
    Pair-Programmed-With: Bob Campbell <bobcampbell at catalyst.net.nz>
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue Jan 10 13:44:02 CET 2017 on sn-devel-144

commit dde30ab89c276474d19b584c6def6f25ed5cc678
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jan 10 09:48:33 2017 +0100

    s3:winbindd: talloc_steal the extra_data in winbindd_list_users_recv()
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12501
    
    Pair-Programmed-With: Andreas Schneider <asn at samba.org>
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Signed-off-by: Andreas Schneider <asn at samba.org>

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

Summary of changes:
 source3/winbindd/winbindd_list_users.c        |  2 +-
 source4/dsdb/tests/python/dsdb_schema_info.py | 12 +++---
 source4/dsdb/tests/python/ldap_schema.py      | 54 +++++++++++++--------------
 source4/setup/schema_samba4.ldif              |  4 ++
 4 files changed, 38 insertions(+), 34 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_list_users.c b/source3/winbindd/winbindd_list_users.c
index 4a4343e..9a751a7 100644
--- a/source3/winbindd/winbindd_list_users.c
+++ b/source3/winbindd/winbindd_list_users.c
@@ -174,7 +174,7 @@ NTSTATUS winbindd_list_users_recv(struct tevent_req *req,
 
 	len = talloc_get_size(result);
 
-	response->extra_data.data = result;
+	response->extra_data.data = talloc_steal(response, result);
 	response->length += len;
 	response->data.num_entries = 0;
 
diff --git a/source4/dsdb/tests/python/dsdb_schema_info.py b/source4/dsdb/tests/python/dsdb_schema_info.py
index e7933f4..0ae95b3 100755
--- a/source4/dsdb/tests/python/dsdb_schema_info.py
+++ b/source4/dsdb/tests/python/dsdb_schema_info.py
@@ -104,7 +104,7 @@ schemaUpdateNow: 1
         obj_dn = "CN=%s,%s" % (obj_name, self.schema_dn)
         return (obj_name, obj_ldap_name, obj_dn)
 
-    def _make_attr_ldif(self, attr_name, attr_dn):
+    def _make_attr_ldif(self, attr_name, attr_dn, sub_oid):
         ldif = """
 dn: """ + attr_dn + """
 objectClass: top
@@ -112,7 +112,7 @@ objectClass: attributeSchema
 adminDescription: """ + attr_name + """
 adminDisplayName: """ + attr_name + """
 cn: """ + attr_name + """
-attributeId: 1.2.840.""" + str(random.randint(1,100000)) + """.1.5.9940
+attributeId: 1.3.6.1.4.1.7165.4.6.1.7.%d.""" % sub_oid + str(random.randint(1,100000)) + """
 attributeSyntax: 2.5.5.12
 omSyntax: 64
 instanceType: 4
@@ -127,7 +127,7 @@ systemOnly: FALSE
 
         # create names for an attribute to add
         (attr_name, attr_ldap_name, attr_dn) = self._make_obj_names("schemaInfo-Attr-")
-        ldif = self._make_attr_ldif(attr_name, attr_dn)
+        ldif = self._make_attr_ldif(attr_name, attr_dn, 1)
 
         # add the new attribute
         self.sam_db.add_ldif(ldif)
@@ -149,7 +149,7 @@ systemOnly: FALSE
         pass
 
 
-    def _make_class_ldif(self, class_name, class_dn):
+    def _make_class_ldif(self, class_name, class_dn, sub_oid):
         ldif = """
 dn: """ + class_dn + """
 objectClass: top
@@ -157,7 +157,7 @@ objectClass: classSchema
 adminDescription: """ + class_name + """
 adminDisplayName: """ + class_name + """
 cn: """ + class_name + """
-governsId: 1.3.6.1.4.1.7165.4.6.2.""" + str(random.randint(1,100000)) + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.7.%d.""" % sub_oid + str(random.randint(1,100000)) + """
 instanceType: 4
 objectClassCategory: 1
 subClassOf: organizationalPerson
@@ -173,7 +173,7 @@ systemOnly: FALSE
 
         # create names for a Class to add
         (class_name, class_ldap_name, class_dn) = self._make_obj_names("schemaInfo-Class-")
-        ldif = self._make_class_ldif(class_name, class_dn)
+        ldif = self._make_class_ldif(class_name, class_dn, 1)
 
         # add the new Class
         self.sam_db.add_ldif(ldif)
diff --git a/source4/dsdb/tests/python/ldap_schema.py b/source4/dsdb/tests/python/ldap_schema.py
index 1c5aeeb..c920296 100755
--- a/source4/dsdb/tests/python/ldap_schema.py
+++ b/source4/dsdb/tests/python/ldap_schema.py
@@ -108,7 +108,7 @@ objectClass: attributeSchema
 adminDescription: """ + attr_name + """
 adminDisplayName: """ + attr_name + """
 cn: """ + attr_name + """
-attributeId: 1.3.6.1.4.1.7165.4.6.1.""" + rand + """
+attributeId: 1.3.6.1.4.1.7165.4.6.1.6.1.""" + rand + """
 attributeSyntax: 2.5.5.12
 omSyntax: 64
 instanceType: 4
@@ -152,7 +152,7 @@ defaultObjectCategory: CN=_
 adminDescription: """ + class_name + """
 adminDisplayName: """ + class_name + """
 cn: """ + class_name + """
-governsId: 1.3.6.1.4.1.7165.4.6.2.""" + str(random.randint(1,100000)) + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.6.1.""" + str(random.randint(1,100000)) + """
 instanceType: 4
 objectClassCategory: 1
 subClassOf: organizationalPerson
@@ -175,7 +175,7 @@ objectClass: classSchema
 adminDescription: """ + class_name + """
 adminDisplayName: """ + class_name + """
 cn: """ + class_name + """
-governsId: 1.3.6.1.4.1.7165.4.6.2.""" + str(random.randint(1,100000)) + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.6.2.""" + str(random.randint(1,100000)) + """
 instanceType: 4
 objectClassCategory: 1
 subClassOf: organizationalPerson
@@ -257,7 +257,7 @@ objectClass: classSchema
 adminDescription: """ + class_name + """
 adminDisplayName: """ + class_name + """
 cn: """ + class_name + """
-governsId: 1.3.6.1.4.1.7165.4.6.2.""" + str(random.randint(1,100000)) + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.6.3.""" + str(random.randint(1,100000)) + """
 instanceType: 4
 objectClassCategory: 1
 subClassOf: organizationalUnit
@@ -307,7 +307,7 @@ instanceType: 4
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.2." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -350,7 +350,7 @@ systemOnly: FALSE
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.3." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -394,7 +394,7 @@ systemOnly: FALSE
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.4." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -436,7 +436,7 @@ systemOnly: FALSE
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.5." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -480,7 +480,7 @@ systemOnly: FALSE
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.6." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -526,8 +526,8 @@ systemOnly: FALSE
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
-        governsID = "1.3.6.1.4.1.7165.4.6.2." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.7." + rand
+        governsID   = "1.3.6.1.4.1.7165.4.6.2.6.4." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -573,7 +573,7 @@ systemOnly: FALSE
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.8." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -627,7 +627,7 @@ ldapDisplayName: """ + attr_ldap_display_name + """
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.9." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -680,7 +680,7 @@ attributeId: """ + attributeID + """
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.10." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -715,7 +715,7 @@ replace: ldapDisplayName
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.11." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -748,7 +748,7 @@ ldapDisplayName: """ + attr_ldap_display_name + """2
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.12." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -785,7 +785,7 @@ attributeId: """ + attributeID + """.1
         rand = str(random.randint(1,100000))
         attr_name = "test-Attr" + time.strftime("%s", time.gmtime()) + "-" + rand
         attr_ldap_display_name = attr_name.replace("-", "")
-        attributeID = "1.3.6.1.4.1.7165.4.6.1." + rand
+        attributeID = "1.3.6.1.4.1.7165.4.6.1.6.13." + rand
         ldif = """
 dn: CN=%s,%s""" % (attr_name, self.schema_dn) + """
 objectClass: top
@@ -822,7 +822,7 @@ attributeId: """ + attributeID + """
         rand = str(random.randint(1,100000))
         class_name = "test-Class" + time.strftime("%s", time.gmtime()) + "-" + rand
         class_ldap_display_name = class_name.replace("-", "")
-        governsID = "1.3.6.1.4.1.7165.4.6.2." + rand
+        governsID = "1.3.6.1.4.1.7165.4.6.2.6.5." + rand
         ldif = """
 dn: CN=%s,%s""" % (class_name, self.schema_dn) + """
 objectClass: top
@@ -860,7 +860,7 @@ governsId: """ + governsID + """.1
         rand = str(random.randint(1,100000))
         class_name = "test-Class" + time.strftime("%s", time.gmtime()) + "-" + rand
         class_ldap_display_name = class_name.replace("-", "")
-        governsID = "1.3.6.1.4.1.7165.4.6.2." + rand
+        governsID = "1.3.6.1.4.1.7165.4.6.2.6.6." + rand
         ldif = """
 dn: CN=%s,%s""" % (class_name, self.schema_dn) + """
 objectClass: top
@@ -907,7 +907,7 @@ objectClass: classSchema
 adminDescription: """ + class_name + """
 adminDisplayName: """ + class_name + """
 cn: """ + class_name + """
-governsId: 1.3.6.1.4.1.7165.4.6.2.""" + str(random.randint(1,100000)) + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.6.7.""" + str(random.randint(1,100000)) + """
 instanceType: 4
 objectClassCategory: 1
 subClassOf: organizationalUnit
@@ -996,7 +996,7 @@ objectClass: attributeSchema
 adminDescription: """ + attr_name + """
 adminDisplayName: """ + attr_name + """
 cn: """ + attr_name + """
-attributeId: 1.3.6.1.4.1.7165.4.6.1.""" + str(random.randint(1,100000)) + """
+attributeId: 1.3.6.1.4.1.7165.4.6.1.6.14.""" + str(random.randint(1,100000)) + """
 attributeSyntax: 2.5.5.12
 omSyntax: 64
 instanceType: 4
@@ -1104,7 +1104,7 @@ systemOnly: FALSE
             self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
 
 
-    def _make_class_ldif(self, class_dn, class_name):
+    def _make_class_ldif(self, class_dn, class_name, sub_oid):
         ldif = """
 dn: """ + class_dn + """
 objectClass: top
@@ -1112,7 +1112,7 @@ objectClass: classSchema
 adminDescription: """ + class_name + """
 adminDisplayName: """ + class_name + """
 cn: """ + class_name + """
-governsId: 1.3.6.1.4.1.7165.4.6.2.""" + str(random.randint(1,100000)) + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.6.%d.""" % sub_oid + str(random.randint(1,100000)) + """
 instanceType: 4
 objectClassCategory: 1
 subClassOf: organizationalPerson
@@ -1131,7 +1131,7 @@ systemOnly: FALSE
         # level is >= DS_DOMAIN_FUNCTION_2003
         # and missing otherwise
         (class_name, class_ldap_name, class_dn) = self._make_obj_names("msDS-IntId-Class-1-")
-        ldif = self._make_class_ldif(class_dn, class_name)
+        ldif = self._make_class_ldif(class_dn, class_name, 8)
 
         # try to add msDS-IntId during Class creation
         ldif_add = ldif + "msDS-IntId: -1993108831\n"
@@ -1144,7 +1144,7 @@ systemOnly: FALSE
 
         # add a new Class and update schema
         (class_name, class_ldap_name, class_dn) = self._make_obj_names("msDS-IntId-Class-2-")
-        ldif = self._make_class_ldif(class_dn, class_name)
+        ldif = self._make_class_ldif(class_dn, class_name, 9)
 
         self.ldb.add_ldif(ldif)
         self._ldap_schemaUpdateNow()
@@ -1168,7 +1168,7 @@ systemOnly: FALSE
         # level is >= DS_DOMAIN_FUNCTION_2003
         # and missing otherwise
         (class_name, class_ldap_name, class_dn) = self._make_obj_names("msDS-IntId-Class-3-")
-        ldif = self._make_class_ldif(class_dn, class_name)
+        ldif = self._make_class_ldif(class_dn, class_name, 10)
         ldif += "systemFlags: 16\n"
 
         # try to add msDS-IntId during Class creation
@@ -1181,7 +1181,7 @@ systemOnly: FALSE
 
         # add the new Class and update schema
         (class_name, class_ldap_name, class_dn) = self._make_obj_names("msDS-IntId-Class-4-")
-        ldif = self._make_class_ldif(class_dn, class_name)
+        ldif = self._make_class_ldif(class_dn, class_name, 11)
         ldif += "systemFlags: 16\n"
 
         self.ldb.add_ldif(ldif)
diff --git a/source4/setup/schema_samba4.ldif b/source4/setup/schema_samba4.ldif
index b63bd30..0189fb5 100644
--- a/source4/setup/schema_samba4.ldif
+++ b/source4/setup/schema_samba4.ldif
@@ -19,6 +19,8 @@
 ## 1.3.6.1.4.1.7165.4.6.1.2.x - ldap_syntaxes.py
 ## 1.3.6.1.4.1.7165.4.6.1.4.x - urgent_replication.py
 ## 1.3.6.1.4.1.7165.4.6.1.5.x - repl_schema.py
+## 1.3.6.1.4.1.7165.4.6.1.6.x - ldap_schema.py
+## 1.3.6.1.4.1.7165.4.6.1.7.x - dsdb_schema_info.py
 
 ## 1.3.6.1.4.1.7165.4.6.2.x - SELFTEST random classes
 ## 1.3.6.1.4.1.7165.4.6.2.1.x - ldap_syntaxes.py
@@ -26,6 +28,8 @@
 ## 1.3.6.1.4.1.7165.4.6.2.3.x - sec_descriptor.py
 ## 1.3.6.1.4.1.7165.4.6.2.4.x - urgent_replication.py
 ## 1.3.6.1.4.1.7165.4.6.2.5.x - repl_schema.py
+## 1.3.6.1.4.1.7165.4.6.2.6.x - ldap_schema.py
+## 1.3.6.1.4.1.7165.4.6.2.7.x - dsdb_schema_info.py
 
 ## 1.3.6.1.4.1.7165.4.255.x - mapped OIDs due to conflicts between AD and standards-track
 #


-- 
Samba Shared Repository



More information about the samba-cvs mailing list