The branch, master has been updated
       via  f890dba084062b1fc52f4eae249b5fb6c16e69eb (commit)
       via  341477347db9477e0bc34cadce31088108866772 (commit)
      from  ca526fbb3ee4131f1dae2b68f5f0f6b8c49ff711 (commit)

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


- Log -----------------------------------------------------------------
commit f890dba084062b1fc52f4eae249b5fb6c16e69eb
Author: Andrew Tridgell <tri...@samba.org>
Date:   Mon Aug 17 11:13:23 2009 +1000

    make sure we update the current schema->prefixes when we add a new prefix
    
    This triggered a failure in the updateNow schema test, as the current
    global schema was not being updated when a new schema element was
    added

commit 341477347db9477e0bc34cadce31088108866772
Author: Andrew Tridgell <tri...@samba.org>
Date:   Mon Aug 17 11:12:10 2009 +1000

    fixed the updateNow schema test to use a canonical OID
    
    The expression time.strftime("%s", time.gmtime())[3:] leads to a
    string with a leading 0. When added then read back from the prefix map
    this leads to a different string, so it is never found.
    
    Use the simpler str(random.randint(a,b)) expression instead

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

Summary of changes:
 source4/dsdb/schema/schema_init.c    |    9 +++++++++
 source4/lib/ldb/tests/python/ldap.py |    3 ++-
 2 files changed, 11 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/schema/schema_init.c 
b/source4/dsdb/schema/schema_init.c
index dfa745e..170d5a1 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -349,6 +349,13 @@ WERROR dsdb_create_prefix_mapping(struct ldb_context *ldb, 
struct dsdb_schema *s
                return status;
        }
 
+       talloc_free(schema->prefixes);
+       schema->prefixes = talloc_steal(schema, prefixes);
+       schema->num_prefixes = num_prefixes;
+
+       DEBUG(2,(__location__ " Added prefixMap %s - now have %u prefixes\n",
+                full_oid, num_prefixes));
+
        talloc_free(mem_ctx);
        return status;
 }
@@ -443,6 +450,8 @@ WERROR dsdb_find_prefix_for_oid(uint32_t num_prefixes, 
const struct dsdb_schema_
                return WERR_OK;
        }
 
+       DEBUG(5,(__location__ " Failed to find oid %s - have %u prefixes\n", 
in, num_prefixes));
+
        return WERR_DS_NO_MSDS_INTID;
 }
 
diff --git a/source4/lib/ldb/tests/python/ldap.py 
b/source4/lib/ldb/tests/python/ldap.py
index 24c6226..af3ad1c 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -6,6 +6,7 @@ import getopt
 import optparse
 import sys
 import time
+import random
 
 sys.path.append("bin/python")
 sys.path.append("../lib/subunit/python")
@@ -1167,7 +1168,7 @@ cn: """ + class_name + """
 objectCategory: CN=Class-Schema,""" + self.schema_dn + """
 defaultObjectCategory: CN=%s,%s""" % (class_name, self.schema_dn) + """
 distinguishedName: CN=%s,%s""" % (class_name, self.schema_dn) + """
-governsID: 1.2.840.""" + time.strftime("%s", time.gmtime())[3:] + """.1.5.9939
+governsID: 1.2.840.""" + str(random.randint(1,100000)) + """.1.5.9939
 instanceType: 4
 name: """ + class_name + """
 objectClassCategory: 1


-- 
Samba Shared Repository

Reply via email to