dsdb: Move attr_in_list to SAMDB_COMMON to avoid circular dependency between SAMDB_CO...
authorJelmer Vernooij <jelmer@samba.org>
Sun, 10 Oct 2010 15:02:10 +0000 (17:02 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 10 Oct 2010 21:39:47 +0000 (23:39 +0200)
source4/dsdb/common/util.c
source4/dsdb/common/util.h
source4/dsdb/samdb/ldb_modules/util.c
source4/dsdb/wscript_build

index 71215212fc0fcaf807fa99fabc72c4d2c7c914c9..0a002197f5b7a6c90724e005a0b178cad86cc5fc 100644 (file)
@@ -42,7 +42,6 @@
 #include "lib/util/tsort.h"
 #include "dsdb/common/util.h"
 #include "lib/socket/socket.h"
-#include "dsdb/samdb/ldb_modules/util.h"
 #include "librpc/gen_ndr/irpc.h"
 
 /*
@@ -4253,3 +4252,15 @@ bool dsdb_attr_in_parse_tree(struct ldb_parse_tree *tree,
        return false;
 }
 
+bool is_attr_in_list(const char * const * attrs, const char *attr)
+{
+       unsigned int i;
+
+       for (i = 0; attrs[i]; i++) {
+               if (ldb_attr_cmp(attrs[i], attr) == 0)
+                       return true;
+       }
+
+       return false;
+}
+
index 7ae46ae887c9a1b1ee6220b276f960d21a1521b3..7dabef8d870354537033e2d07c9175254f684990 100644 (file)
@@ -34,3 +34,5 @@
 #define DSDB_TREE_DELETE                     0x0100
 #define DSDB_SEARCH_ONE_ONLY                 0x0200 /* give an error unless 1 record */
 #define DSDB_SEARCH_SHOW_RECYCLED            0x0400
+
+bool is_attr_in_list(const char * const * attrs, const char *attr);
index 74825a5a4b107ac16b422b001f36cb5670a235f0..569c967e9526550acfb594c5c000529d2aa3f7e1 100644 (file)
@@ -954,18 +954,6 @@ int dsdb_recyclebin_enabled(struct ldb_module *module, bool *enabled)
        return LDB_SUCCESS;
 }
 
-bool is_attr_in_list(const char * const * attrs, const char *attr)
-{
-       unsigned int i;
-
-       for (i = 0; attrs[i]; i++) {
-               if (ldb_attr_cmp(attrs[i], attr) == 0)
-                       return true;
-       }
-
-       return false;
-}
-
 int dsdb_msg_constrainted_update_int32(struct ldb_module *module,
                                       struct ldb_message *msg,
                                       const char *attr,
index 784d93bcd40e29c4e479f8c1be7318fa3f2d6272..6a521fb2aa60ef518776985c13e5032181ea5291 100644 (file)
@@ -13,7 +13,7 @@ bld.SAMBA_SUBSYSTEM('SAMDB',
 bld.SAMBA_SUBSYSTEM('SAMDB_COMMON',
        source='common/util.c common/util_samr.c common/dsdb_dn.c common/dsdb_access.c ../../libds/common/flag_mapping.c',
        autoproto='common/proto.h',
-       deps='ldb NDR_DRSBLOBS LIBCLI_LDAP_NDR UTIL_LDB LIBCLI_AUTH DSDB_MODULE_HELPERS'
+       deps='ldb NDR_DRSBLOBS LIBCLI_LDAP_NDR UTIL_LDB LIBCLI_AUTH'
        )