dsdb: Improve code clarity for ldb_extended_dn_in_openldap mode
authorAndrew Bartlett <abartlet@samba.org>
Fri, 19 Dec 2014 02:39:59 +0000 (15:39 +1300)
committerGarming Sam <garming@samba.org>
Sun, 21 Dec 2014 23:18:08 +0000 (00:18 +0100)
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/extended_dn_in.c

index bf0da81a246cbe4aa0fbbac9071535d68d2dcb6d..41270361e72949985c8bb2b9e95127a15dca0852 100644 (file)
@@ -395,9 +395,13 @@ static int extended_dn_filter_callback(struct ldb_parse_tree *tree, void *privat
         * pointer and a boolean to tell us the exact same thing.
         */
        if (!has_extended_component) {
-               if (!attribute->one_way_link ||
-                   ldb_module_get_ops(filter_ctx->module) == &ldb_extended_dn_in_openldap_module_ops)
-               return LDB_SUCCESS;
+               if (!attribute->one_way_link) {
+                       return LDB_SUCCESS;
+               }
+
+               if (ldb_module_get_ops(filter_ctx->module) == &ldb_extended_dn_in_openldap_module_ops) {
+                       return LDB_SUCCESS;
+               }
        }
 
        if (tree->operation == LDB_OP_EQUALITY) {