[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Wed Jan 13 08:05:10 MST 2010
The branch, master has been updated
via f715414... s4:dsdb/schema_load: add a TODO about schema reloading
via 7d41afe... s4:ldb/tests: do a "schemaUpdateNow" after creating a new attribute in ldap_schema.py
from 92b87eb... s4:dsdb/repl: reorder dreplsrv_op_notify* functions
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f715414afa7cb06af07bfd362bf340f6b13f7acb
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 13 12:00:27 2010 +0100
s4:dsdb/schema_load: add a TODO about schema reloading
metze
commit 7d41afece70093e2debf2b57731c85ecc5009765
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jan 13 11:45:05 2010 +0100
s4:ldb/tests: do a "schemaUpdateNow" after creating a new attribute in ldap_schema.py
It seems that windows doesn't need that.
And we should think about a check for reloading the schema
at the start of each "write" operation.
metze
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/samdb/ldb_modules/schema_load.c | 12 +++++++++++-
source4/lib/ldb/tests/python/ldap_schema.py | 10 ++++++++++
2 files changed, 21 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/samdb/ldb_modules/schema_load.c b/source4/dsdb/samdb/ldb_modules/schema_load.c
index 6c11df2..3442e82 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_load.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_load.c
@@ -204,7 +204,17 @@ static int schema_load_extended(struct ldb_module *module, struct ldb_request *r
if (strcmp(req->op.extended.oid, DSDB_EXTENDED_SCHEMA_UPDATE_NOW_OID) != 0) {
return ldb_next_request(module, req);
}
-
+
+ /*
+ * TODO:
+ *
+ * We should check "schemaInfo" if we really need to reload the schema!
+ *
+ * We should also for a new schema version at the start of each
+ * "write" (add/modify/rename/delete) operation. And have tests
+ * to prove that windows does the same.
+ */
+
schema_dn = samdb_schema_dn(ldb);
if (!schema_dn) {
ldb_reset_err_string(ldb);
diff --git a/source4/lib/ldb/tests/python/ldap_schema.py b/source4/lib/ldb/tests/python/ldap_schema.py
index 9e54732..69b48cb 100755
--- a/source4/lib/ldb/tests/python/ldap_schema.py
+++ b/source4/lib/ldb/tests/python/ldap_schema.py
@@ -139,6 +139,16 @@ systemOnly: FALSE
self.assertEquals(res[0]["lDAPDisplayName"][0], attr_ldap_display_name)
self.assertTrue("schemaIDGUID" in res[0])
+ # Samba requires a "schemaUpdateNow" here.
+ # TODO: remove this when Samba is fixed
+ ldif = """
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+"""
+ self.ldb.modify_ldif(ldif)
+
class_name = "test-Class" + time.strftime("%s", time.gmtime())
class_ldap_display_name = class_name.replace("-", "")
--
Samba Shared Repository
More information about the samba-cvs
mailing list