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

idra at samba.org idra at samba.org
Sun May 21 23:58:10 GMT 2006


Author: idra
Date: 2006-05-21 23:58:09 +0000 (Sun, 21 May 2006)
New Revision: 15789

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

Log:

hmm, damn, testing uncovcer all your bugs :-)


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


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c	2006-05-21 23:57:19 UTC (rev 15788)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c	2006-05-21 23:58:09 UTC (rev 15789)
@@ -625,20 +625,6 @@
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
-	/* make sure we also add person, organizationalPerson and top */
-	if ( ! samldb_find_or_add_attribute(module, msg2, "objectclass", "person", "person")) {
-		talloc_free(mem_ctx);
-		return LDB_ERR_OPERATIONS_ERROR;
-	}
-	if ( ! samldb_find_or_add_attribute(module, msg2, "objectclass", "organizationalPerson", "organizationalPerson")) {
-		talloc_free(mem_ctx);
-		return LDB_ERR_OPERATIONS_ERROR;
-	}
-	if ( ! samldb_find_or_add_attribute(module, msg2, "objectclass", "top", "top")) {
-		talloc_free(mem_ctx);
-		return LDB_ERR_OPERATIONS_ERROR;
-	}
-
 	/* meddle with objectclass */
 
 	if (ldb_msg_find_element(msg2, "samAccountName") == NULL) {
@@ -841,8 +827,8 @@
 	}
 
 	/* is user or computer? */
-	if ((samldb_find_attribute(msg, "objectclass", "user") == NULL) &&
-	    (samldb_find_attribute(msg, "objectclass", "computer") == NULL)) {
+	if ((samldb_find_attribute(msg, "objectclass", "user") != NULL) ||
+	    (samldb_find_attribute(msg, "objectclass", "computer") != NULL)) {
 		/*  add all relevant missing objects */
 		ret = samldb_fill_user_or_computer_object(module, msg, &msg2);
 		if (ret) {



More information about the samba-cvs mailing list