r25960: Enable checks on the validity of the search base on sam.ldb in Samba4.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 15 Nov 2007 01:45:31 +0000 (02:45 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:45:19 +0000 (05:45 +0100)
Remove bogus check to return NO_SUCH_ENTRY in ldap_backend.c, as this
error is now correctly emited from ldb.

Andrew Bartlett
(This used to be commit ed57862b90812e5a38ca81935b131338112fb19f)

source4/ldap_server/ldap_backend.c
source4/setup/provision_init.ldif
source4/setup/provision_partitions.ldif

index 25d19a5a588f6df70fb33455e5b6c18811c12801..62fe6270dcb33d4ff0041b3d7b95ab4a60569570 100644 (file)
@@ -300,10 +300,6 @@ reply:
                        DEBUG(10,("SearchRequest: results: [%d]\n", res->count));
                        result = LDAP_SUCCESS;
                        errstr = NULL;
-               } else if (res->count == 0) {
-                       DEBUG(10,("SearchRequest: no results\n"));
-                       result = LDAP_NO_SUCH_OBJECT;
-                       errstr = ldb_errstring(samdb);
                }
                if (res->controls) {
                        done_r->msg->controls = res->controls;
index a69399c3e679374c0a66304bd0ebfda4ee652e18..c922fa0bd2adf3c6834627c53168fce6601c212b 100644 (file)
@@ -23,6 +23,9 @@ sAMAccountType: INTEGER
 systemFlags: INTEGER
 userAccountControl: INTEGER
 
+dn: @OPTIONS
+checkBaseOnSearch: TRUE
+
 dn: @KLUDGEACL
 passwordAttribute: sambaPassword
 passwordAttribute: ntPwdHash
index f07ec680e0328cd81fa814be0f3b52318fc8e40d..674e16713d501df766e2f10a1d3e89448f40080a 100644 (file)
@@ -4,6 +4,7 @@ partition: ${CONFIGDN}:${CONFIGDN_LDB}
 partition: ${DOMAINDN}:${DOMAINDN_LDB}
 replicateEntries: @ATTRIBUTES
 replicateEntries: @INDEXLIST
+replicateEntries: @OPTIONS
 modules:${SCHEMADN}:${SCHEMADN_MOD}${SCHEMADN_MOD2}
 modules:${CONFIGDN}:${CONFIGDN_MOD}${CONFIGDN_MOD2}
 modules:${DOMAINDN}:${DOMAINDN_MOD}${DOMAINDN_MOD2}