svn commit: samba r25748 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

abartlet at samba.org abartlet at samba.org
Mon Oct 29 10:58:30 GMT 2007


Author: abartlet
Date: 2007-10-29 10:58:29 +0000 (Mon, 29 Oct 2007)
New Revision: 25748

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25748

Log:
Don't segfault if we don't have a schema yet.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c	2007-10-29 10:54:06 UTC (rev 25747)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c	2007-10-29 10:58:29 UTC (rev 25748)
@@ -122,6 +122,12 @@
 	const struct dsdb_schema *schema = dsdb_get_schema(ldb);
 	const struct dsdb_class *class;
 	int i, j, ret;
+
+ 	/* If we don't have a schema yet, we can't do anything... */
+	if (schema == NULL) {
+		return LDB_SUCCESS;
+	}
+
 	/* Must remove any existing attribute, or else confusion reins */
 	ldb_msg_remove_attr(msg, attrName);
 	ret = ldb_msg_add_empty(msg, attrName, 0, &allowedAttributes);
@@ -184,6 +190,12 @@
 	const struct dsdb_schema *schema = dsdb_get_schema(ldb);
 	const struct dsdb_class *class;
 	int i, j, ret;
+
+ 	/* If we don't have a schema yet, we can't do anything... */
+	if (schema == NULL) {
+		return LDB_SUCCESS;
+	}
+
 	/* Must remove any existing attribute, or else confusion reins */
 	ldb_msg_remove_attr(msg, attrName);
 	ret = ldb_msg_add_empty(msg, attrName, 0, &allowedClasses);



More information about the samba-cvs mailing list