]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dsdb: Do not search the sam.ldb file when trying to search all partitions
authorAndrew Bartlett <abartlet@samba.org>
Thu, 4 May 2017 08:12:46 +0000 (10:12 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 May 2017 03:18:04 +0000 (05:18 +0200)
The sam.ldb file does not contain the same kind of data as the partitions, we do not wish to
mix these results.  This also avoids taking out locks on the sam.ldb file.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 23 05:18:04 CEST 2017 on sn-devel-144

source4/dsdb/samdb/ldb_modules/partition.c

index f37b7513af644a1a5ce464562f9e6692c08bb9e0..08a959cabb5b751cf53f1774b8a22ae47418af37 100644 (file)
@@ -372,7 +372,7 @@ static int partition_call_first(struct partition_context *ac)
 }
 
 /**
- * Send a request down to all the partitions
+ * Send a request down to all the partitions (but not the sam.ldb file)
  */
 static int partition_send_all(struct ldb_module *module, 
                              struct partition_context *ac, 
@@ -381,10 +381,8 @@ static int partition_send_all(struct ldb_module *module,
        unsigned int i;
        struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
                                                              struct partition_private_data);
-       int ret = partition_prep_request(ac, NULL);
-       if (ret != LDB_SUCCESS) {
-               return ret;
-       }
+       int ret;
+
        for (i=0; data && data->partitions && data->partitions[i]; i++) {
                ret = partition_prep_request(ac, data->partitions[i]);
                if (ret != LDB_SUCCESS) {