[SCM] Samba Shared Repository - branch master updated - c0240d78351e489c5aca7e729aac045157080088

Andrew Bartlett abartlet at samba.org
Mon Oct 6 21:19:57 GMT 2008


The branch, master has been updated
       via  c0240d78351e489c5aca7e729aac045157080088 (commit)
       via  7d9f18609b25463d306c0c150fe0da7f065860fd (commit)
       via  c412a930ad19da866503e6d8ccb71fb3191fc6d2 (commit)
      from  2a35985283be45adbba63b5d7ced8499bcb64f59 (commit)

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


- Log -----------------------------------------------------------------
commit c0240d78351e489c5aca7e729aac045157080088
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Sat Oct 4 10:25:46 2008 -0700

    Remove compleatly bogus rename test in partitions module.

commit 7d9f18609b25463d306c0c150fe0da7f065860fd
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Oct 3 16:36:04 2008 -0700

    Remove DESCRIPTION from generated schema lines.
    
    This is not permitted in the AD aggregate schema, and more trouble
    than it is worth in the OpenLDAP schema due to escaping issues.
    
    Andrew Bartlett

commit c412a930ad19da866503e6d8ccb71fb3191fc6d2
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Oct 3 16:25:59 2008 -0700

    Fix Domain Trust creation with Windows 2008 (and many other tools)
    
    A dITConentRules attribute (unlike objectClasses) must not contain a
    'SUP'.
    
    The ADSI layer in Windows would download the whole schema, and
    validate it.  Thanks to the team at Microsoft for very long debugging
    session to find this.
    
    Andrew Bartlett

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/partition.c |   17 -----------------
 source4/dsdb/schema/schema_description.c   |   27 ++++++---------------------
 source4/utils/ad2oLschema.c                |   14 ++++++++++----
 3 files changed, 16 insertions(+), 42 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 8e4483a..b452b66 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -589,7 +589,6 @@ static int partition_delete(struct ldb_module *module, struct ldb_request *req)
 /* rename */
 static int partition_rename(struct ldb_module *module, struct ldb_request *req)
 {
-	int i, matched = -1;
 	/* Find backend */
 	struct dsdb_control_current_partition *backend, *backend2;
 	
@@ -619,22 +618,6 @@ static int partition_rename(struct ldb_module *module, struct ldb_request *req)
 		return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
 	}
 
-	for (i=0; data && data->partitions && data->partitions[i]; i++) {
-		if (ldb_dn_compare_base(data->partitions[i]->dn, req->op.rename.olddn) == 0) {
-			matched = i;
-		}
-	}
-
-	if (matched > 0) {
-		ldb_asprintf_errstring(module->ldb, 
-				       "Cannot rename from %s to %s, subtree rename would cross partition %s: %s",
-				       ldb_dn_get_linearized(req->op.rename.olddn),
-				       ldb_dn_get_linearized(req->op.rename.newdn),
-				       ldb_dn_get_linearized(data->partitions[matched]->dn),
-				       ldb_strerror(LDB_ERR_AFFECTS_MULTIPLE_DSAS));
-		return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
-	}
-
 	return partition_replicate(module, req, req->op.rename.olddn);
 }
 
diff --git a/source4/dsdb/schema/schema_description.c b/source4/dsdb/schema/schema_description.c
index 6884c52..c3c37b4 100644
--- a/source4/dsdb/schema/schema_description.c
+++ b/source4/dsdb/schema/schema_description.c
@@ -33,7 +33,6 @@ char *schema_attribute_description(TALLOC_CTX *mem_ctx,
 					  const char *seperator,
 					  const char *oid, 
 					  const char *name,
-					  const char *description,
 					  const char *equality, 
 					  const char *substring, 
 					  const char *syntax,
@@ -46,15 +45,6 @@ char *schema_attribute_description(TALLOC_CTX *mem_ctx,
 					      "NAME '%s'%s", name, seperator);
 	IF_NULL_FAIL_RET(schema_entry);
 	
-	if (description) {
-#if 0		
-		/* Need a way to escape ' characters from the description */
-		schema_entry = talloc_asprintf_append(schema_entry, 
-						      "DESC '%s'%s", description, seperator);
-		IF_NULL_FAIL_RET(schema_entry);
-#endif
-	}
-
 	if (equality) {
 		schema_entry = talloc_asprintf_append(schema_entry, 
 						      "EQUALITY %s%s", equality, seperator);
@@ -104,7 +94,7 @@ char *schema_attribute_to_description(TALLOC_CTX *mem_ctx, const struct dsdb_att
 					       " ",
 					       attribute->attributeID_oid,
 					       attribute->lDAPDisplayName,
-					       NULL, NULL, NULL, talloc_asprintf(tmp_ctx, "'%s'", syntax),
+					       NULL, NULL, talloc_asprintf(tmp_ctx, "'%s'", syntax),
 					       attribute->isSingleValued,
 					       attribute->systemOnly);
 	talloc_free(tmp_ctx);
@@ -149,7 +139,6 @@ char *schema_class_description(TALLOC_CTX *mem_ctx,
 			       const char *oid, 
 			       const char *name,
 			       const char **auxillary_classes,
-			       const char *description,
 			       const char *subClassOf,
 			       int objectClassCategory,
 			       char **must,
@@ -164,12 +153,6 @@ char *schema_class_description(TALLOC_CTX *mem_ctx,
 					      "NAME '%s'%s", name, seperator);
 	IF_NULL_FAIL_RET(schema_entry);
 	
-	if (description) {
-		schema_entry = talloc_asprintf_append(schema_entry, 
-						      "DESC '%s'%s", description, seperator);
-		IF_NULL_FAIL_RET(schema_entry);
-	}
-
 	if (auxillary_classes) {
 		schema_entry = talloc_asprintf_append(schema_entry, 
 						      "AUX ( ");
@@ -262,7 +245,6 @@ char *schema_class_to_description(TALLOC_CTX *mem_ctx, const struct dsdb_class *
 					   " ",
 					   class->governsID_oid,
 					   class->lDAPDisplayName,
-					   NULL,
 					   NULL, 
 					   class->subClassOf,
 					   class->objectClassCategory,
@@ -308,8 +290,11 @@ char *schema_class_to_dITContentRule(TALLOC_CTX *mem_ctx, const struct dsdb_clas
 					   class->governsID_oid,
 					   class->lDAPDisplayName,
 					   (const char **)aux_class_list,
-					   NULL, 
-					   class->subClassOf,
+					   NULL, /* Must not specify a
+						  * SUP (subclass) in
+						  * ditContentRules
+						  * per MS-ADTS
+						  * 3.1.1.3.1.1.1 */
 					   -1, must_attr_list, may_attr_list);
 	talloc_free(tmp_ctx);
 	return schema_description;
diff --git a/source4/utils/ad2oLschema.c b/source4/utils/ad2oLschema.c
index 3c2ffe7..c579112 100644
--- a/source4/utils/ad2oLschema.c
+++ b/source4/utils/ad2oLschema.c
@@ -221,7 +221,6 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum dsdb_sch
 
 	for (attribute=schema->attributes; attribute; attribute = attribute->next) {
 		const char *name = attribute->lDAPDisplayName;
-		const char *description = attribute->adminDescription;
 		const char *oid = attribute->attributeID_oid;
 		const char *syntax = attribute->attributeSyntax_oid;
 		const char *equality = NULL, *substring = NULL;
@@ -270,7 +269,16 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum dsdb_sch
 			}
 		}
 		
-		schema_entry = schema_attribute_description(mem_ctx, target, seperator, oid, name, description, equality, substring, syntax, single_value, false);
+		schema_entry = schema_attribute_description(mem_ctx, 
+							    target, 
+							    seperator, 
+							    oid, 
+							    name, 
+							    equality, 
+							    substring, 
+							    syntax, 
+							    single_value, 
+							    false);
 
 		if (schema_entry == NULL) {
 			ret.failures++;
@@ -291,7 +299,6 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum dsdb_sch
 	/* This is already sorted to have 'top' and similar classes first */
 	for (objectclass=schema->classes; objectclass; objectclass = objectclass->next) {
 		const char *name = objectclass->lDAPDisplayName;
-		const char *description = objectclass->adminDescription;
 		const char *oid = objectclass->governsID_oid;
 		const char *subClassOf = objectclass->subClassOf;
 		int objectClassCategory = objectclass->objectClassCategory;
@@ -356,7 +363,6 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum dsdb_sch
 							oid, 
 							name,
 							NULL, 
-							description,
 							subClassOf,
 							objectClassCategory,
 							must,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list