Fix use of some modules (needed _PUBLIC_).
authorJelmer Vernooij <jelmer@samba.org>
Wed, 20 Feb 2008 03:33:43 +0000 (04:33 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 20 Feb 2008 03:33:43 +0000 (04:33 +0100)
(This used to be commit ce332130ea77159832da23bab760fa26921719e2)

35 files changed:
source4/build/smb_build/makefile.pm
source4/dsdb/samdb/ldb_modules/anr.c
source4/dsdb/samdb/ldb_modules/config.mk
source4/dsdb/samdb/ldb_modules/dsdb_cache.c
source4/dsdb/samdb/ldb_modules/extended_dn.c
source4/dsdb/samdb/ldb_modules/instancetype.c
source4/dsdb/samdb/ldb_modules/kludge_acl.c
source4/dsdb/samdb/ldb_modules/linked_attributes.c
source4/dsdb/samdb/ldb_modules/local_password.c
source4/dsdb/samdb/ldb_modules/naming_fsmo.c
source4/dsdb/samdb/ldb_modules/normalise.c
source4/dsdb/samdb/ldb_modules/objectclass.c
source4/dsdb/samdb/ldb_modules/objectguid.c
source4/dsdb/samdb/ldb_modules/partition.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/samdb/ldb_modules/pdc_fsmo.c
source4/dsdb/samdb/ldb_modules/proxy.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/rootdse.c
source4/dsdb/samdb/ldb_modules/samba3sam.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/ldb_modules/schema.c
source4/dsdb/samdb/ldb_modules/schema_fsmo.c
source4/dsdb/samdb/ldb_modules/show_deleted.c
source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
source4/dsdb/samdb/ldb_modules/update_keytab.c
source4/lib/ldb/ldb_ildap/ldb_ildap.c
source4/lib/ldb/ldb_ldap/ldb_ldap.c
source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
source4/lib/ldb/modules/paged_searches.c
source4/lib/ldb/tests/sample_module.c
source4/lib/util/attr.h
source4/lib/util/util.h
source4/nbt_server/config.mk
source4/nbt_server/wins/wins_ldb.c

index d11e761ce14f6094423c3e62677b72796674d545..22b813b94641a8276b719e8fb1b7e7073dfd4c0b 100644 (file)
@@ -160,7 +160,8 @@ sub SharedModule($$)
        $self->_prepare_list($ctx, "DEPEND_LIST");
        $self->_prepare_list($ctx, "LINK_FLAGS");
 
-       if (defined($ctx->{INIT_FUNCTION}) and $ctx->{TYPE} ne "PYTHON") {
+       if (defined($ctx->{INIT_FUNCTION}) and $ctx->{TYPE} ne "PYTHON" and 
+               $ctx->{INIT_FUNCTION_TYPE} =~ /\(\*\)/) {
                my $init_fn = $ctx->{INIT_FUNCTION_TYPE};
                $init_fn =~ s/\(\*\)/init_module/;
                my $proto_fn = $ctx->{INIT_FUNCTION_TYPE};
index dd730c9b01834064d3c926f4f21b0dd635912a5e..1252c9ee42f1ae2c65fbb82dd875baae34101850 100644 (file)
@@ -295,7 +295,7 @@ static int anr_search(struct ldb_module *module, struct ldb_request *req)
        return ldb_next_request(module, req);
 }
 
-const struct ldb_module_ops ldb_anr_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_anr_module_ops = {
        .name              = "anr",
        .search = anr_search
 };
index dc407fbd8a9a049b0c8618dc86941d6ff7547852..de93b5638df22801b951edb15967c7510a6895b5 100644 (file)
@@ -4,7 +4,7 @@
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
-INIT_FUNCTION = objectguid_module_init
+INIT_FUNCTION = objectguid_module_module_ops
 OBJ_FILES = \
                objectguid.o
 # End MODULE ldb_objectguid
@@ -17,7 +17,7 @@ SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC LIBNDR NDR_MISC NDR_DRSUAPI \
                                           NDR_DRSBLOBS LIBNDR
-INIT_FUNCTION = repl_meta_data_module_init
+INIT_FUNCTION = repl_meta_data_module_module_ops
 OBJ_FILES = \
                repl_meta_data.o
 # End MODULE ldb_repl_meta_data
@@ -29,7 +29,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = dsdb_cache_module_init
+INIT_FUNCTION = dsdb_cache_module_module_ops
 OBJ_FILES = \
                dsdb_cache.o
 # End MODULE ldb_dsdb_cache
@@ -41,7 +41,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = schema_fsmo_module_init
+INIT_FUNCTION = schema_fsmo_module_module_ops
 OBJ_FILES = \
                schema_fsmo.o
 # End MODULE ldb_schema_fsmo
@@ -53,7 +53,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = naming_fsmo_module_init
+INIT_FUNCTION = naming_fsmo_module_module_ops
 OBJ_FILES = \
                naming_fsmo.o
 # End MODULE ldb_naming_fsmo
@@ -65,7 +65,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = pdc_fsmo_module_init
+INIT_FUNCTION = pdc_fsmo_module_module_ops
 OBJ_FILES = \
                pdc_fsmo.o
 # End MODULE ldb_pdc_fsmo
@@ -77,7 +77,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LDAP_ENCODE NDR_MISC SAMDB
-INIT_FUNCTION = samldb_module_init
+INIT_FUNCTION = samldb_module_module_ops
 OBJ_FILES = \
                samldb.o
 #
@@ -89,7 +89,7 @@ OBJ_FILES = \
 [MODULE::ldb_samba3sam]
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = ldb_samba3sam_module_init
+INIT_FUNCTION = &ldb_samba3sam_module_module_ops
 PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER LIBSECURITY \
                                           NDR_SECURITY
 OBJ_FILES = \
@@ -103,7 +103,7 @@ OBJ_FILES = \
 [MODULE::ldb_simple_ldap_map]
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = ldb_simple_ldap_map_module_init
+INIT_FUNCTION = &ldb_simple_ldap_map_module_module_ops
 PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map LIBNDR NDR_MISC
 ENABLE = YES
 ALIASES = entryuuid nsuniqueid
@@ -117,7 +117,7 @@ OBJ_FILES = \
 # # Start MODULE ldb_proxy
 # [MODULE::ldb_proxy]
 # SUBSYSTEM = LIBLDB
-# INIT_FUNCTION = proxy_module_init
+# INIT_FUNCTION = proxy_module_module_ops
 # OBJ_FILES = \
 #              proxy.o
 # 
@@ -131,7 +131,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
 OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = rootdse_module_init
+INIT_FUNCTION = rootdse_module_module_ops
 OBJ_FILES = \
                rootdse.o
 #
@@ -143,7 +143,7 @@ OBJ_FILES = \
 [MODULE::ldb_password_hash]
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = password_hash_module_init
+INIT_FUNCTION = password_hash_module_module_ops
 OBJ_FILES = password_hash.o
 PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
                                           LIBCLI_AUTH NDR_DRSBLOBS KERBEROS SAMDB
@@ -157,7 +157,7 @@ PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR SAMDB
 OUTPUT_TYPE = SHARED_LIBRARY
 SUBSYSTEM = LIBLDB
-INIT_FUNCTION = local_password_module_init
+INIT_FUNCTION = local_password_module_module_ops
 OBJ_FILES = local_password.o
 #
 # End MODULE ldb_local_password
@@ -169,7 +169,7 @@ OBJ_FILES = local_password.o
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY SAMDB
 OUTPUT_TYPE = SHARED_LIBRARY
 SUBSYSTEM = LIBLDB
-INIT_FUNCTION = ldb_kludge_acl_init
+INIT_FUNCTION = &ldb_kludge_acl_module_ops
 OBJ_FILES = \
                kludge_acl.o
 #
@@ -182,7 +182,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR LIBSECURITY SAMDB
-INIT_FUNCTION = ldb_extended_dn_init
+INIT_FUNCTION = &ldb_extended_dn_module_ops
 OBJ_FILES = \
                extended_dn.o
 #
@@ -195,7 +195,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = ldb_show_deleted_init
+INIT_FUNCTION = &ldb_show_deleted_module_ops
 OBJ_FILES = \
                show_deleted.o
 #
@@ -208,7 +208,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
-INIT_FUNCTION = ldb_partition_init
+INIT_FUNCTION = &ldb_partition_module_ops
 OBJ_FILES = \
                partition.o
 #
@@ -221,7 +221,7 @@ OBJ_FILES = \
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBLDB
-INIT_FUNCTION = ldb_schema_init
+INIT_FUNCTION = &ldb_schema_module_ops
 OBJ_FILES = \
                schema.o schema_syntax.o
 #
@@ -235,7 +235,7 @@ SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC CREDENTIALS
 #Also depends on credentials, but that would loop
-INIT_FUNCTION = ldb_update_kt_init
+INIT_FUNCTION = &ldb_update_kt_module_ops
 OBJ_FILES = \
                update_keytab.o 
 #
@@ -245,7 +245,7 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_objectclass
 [MODULE::ldb_objectclass]
-INIT_FUNCTION = ldb_objectclass_init
+INIT_FUNCTION = &ldb_objectclass_module_ops
 OUTPUT_TYPE = SHARED_LIBRARY
 CFLAGS = -Ilib/ldb/include
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY NDR_SECURITY SAMDB
@@ -258,8 +258,7 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_subtree_rename
 [MODULE::ldb_subtree_rename]
-INIT_FUNCTION = ldb_subtree_rename_init
-OUTPUT_TYPE = SHARED_LIBRARY
+INIT_FUNCTION = &ldb_subtree_rename_module_ops
 CFLAGS = -Ilib/ldb/include
 PRIVATE_DEPENDENCIES = LIBTALLOC
 SUBSYSTEM = LIBLDB
@@ -271,8 +270,7 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_subtree_rename
 [MODULE::ldb_subtree_delete]
-INIT_FUNCTION = ldb_subtree_delete_init
-OUTPUT_TYPE = SHARED_LIBRARY
+INIT_FUNCTION = &ldb_subtree_delete_module_ops
 CFLAGS = -Ilib/ldb/include
 PRIVATE_DEPENDENCIES = LIBTALLOC
 SUBSYSTEM = LIBLDB
@@ -284,7 +282,7 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_linked_attributes
 [MODULE::ldb_linked_attributes]
-INIT_FUNCTION = ldb_linked_attributes_init
+INIT_FUNCTION = &ldb_linked_attributes_module_ops
 CFLAGS = -Ilib/ldb/include
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
@@ -297,9 +295,8 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_ranged_results
 [MODULE::ldb_ranged_results]
-INIT_FUNCTION = ldb_ranged_results_init
+INIT_FUNCTION = &ldb_ranged_results_module_ops
 CFLAGS = -Ilib/ldb/include
-OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
 SUBSYSTEM = LIBLDB
 OBJ_FILES = \
@@ -310,7 +307,7 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_anr
 [MODULE::ldb_anr]
-INIT_FUNCTION = ldb_anr_init
+INIT_FUNCTION = &ldb_anr_module_ops
 CFLAGS = -Ilib/ldb/include
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -323,7 +320,7 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_normalise
 [MODULE::ldb_normalise]
-INIT_FUNCTION = ldb_normalise_init
+INIT_FUNCTION = &ldb_normalise_module_ops
 CFLAGS = -Ilib/ldb/include
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -336,7 +333,7 @@ OBJ_FILES = \
 ################################################
 # Start MODULE ldb_instancetype
 [MODULE::ldb_instancetype]
-INIT_FUNCTION = ldb_instancetype_init
+INIT_FUNCTION = &ldb_instancetype_module_ops
 CFLAGS = -Ilib/ldb/include
 OUTPUT_TYPE = SHARED_LIBRARY
 PRIVATE_DEPENDENCIES = LIBTALLOC
index e73803ab38a1b40539c3c54dea0c9bfc31d60103..e60605dce1060bbad19ad41a6e0f5cbacb9aa976 100644 (file)
@@ -36,7 +36,7 @@ static int dsdb_cache_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_dsdb_cache_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_dsdb_cache_module_ops = {
        .name           = "dsdb_cache",
        .init_context   = dsdb_cache_init
 };
index 85b99800e95cb9e1ee4ac026a095a0088359440f..84bf5e484352c635b9dd1791638e255128969eb6 100644 (file)
@@ -362,7 +362,7 @@ static int extended_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_extended_dn_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_module_ops = {
        .name              = "extended_dn",
        .search            = extended_search,
        .init_context      = extended_init
index c0f88525038b57effba2e3e30d7992023f409d83..fd5aa5e18aea56291ee9163c3b23de9fb9bb083d 100644 (file)
@@ -118,7 +118,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
        return ret;
 }
 
-const struct ldb_module_ops ldb_instancetype_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_instancetype_module_ops = {
        .name          = "instancetype",
        .add           = instancetype_add,
 };
index 6395ebe2ed7866912a6144c8e164b30c1f1a2ee7..e3e1f7ac88b6e49e102698646983826a5560fe90 100644 (file)
@@ -471,7 +471,7 @@ done:
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_kludge_acl_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_kludge_acl_module_ops = {
        .name              = "kludge_acl",
        .search            = kludge_acl_search,
        .add               = kludge_acl_change,
index d6e9d3da4fd935ae049bd26a77cd88b11743dd2e..8685c722aad2b8b7b23b6d6e64d0a74c4325d5ef 100644 (file)
@@ -915,7 +915,7 @@ static int linked_attributes_wait(struct ldb_handle *handle, enum ldb_wait_type
        }
 }
 
-const struct ldb_module_ops ldb_linked_attributes_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_linked_attributes_module_ops = {
        .name              = "linked_attributes",
        .add               = linked_attributes_add,
        .modify            = linked_attributes_modify,
index f34acd534950796e7baf2f34810ff9768c57db4f..dfa98ef0af957bdb5ced6404ce6688d857846120 100644 (file)
@@ -843,7 +843,7 @@ static int local_password_wait(struct ldb_handle *handle, enum ldb_wait_type typ
        }
 }
 
-const struct ldb_module_ops ldb_local_password_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_local_password_module_ops = {
        .name          = "local_password",
        .add           = local_password_add,
        .modify        = local_password_modify,
index 94bef197e9ffd6f2035c28484f593d6c25069122..084540f68d0af060a0a0885a187de2ea4b7f6dd2 100644 (file)
@@ -117,7 +117,7 @@ static int naming_fsmo_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_naming_fsmo_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_naming_fsmo_module_ops = {
        .name           = "naming_fsmo",
        .init_context   = naming_fsmo_init
 };
index 2a713a52ffc740aa4b568f3402563ba0f1064b94..695393d4e8a7f18f5f1f076203b38aa9dd9b5355 100644 (file)
@@ -156,7 +156,7 @@ static int normalise_search(struct ldb_module *module, struct ldb_request *req)
 }
 
 
-const struct ldb_module_ops ldb_normalise_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_normalise_module_ops = {
        .name              = "normalise",
        .search            = normalise_search,
 };
index 98eeed7cdee5a662678b189908fbb86195d4afd8..e63ad4de56b8e392a1bd9e5f1f88fc2d20f7d40a 100644 (file)
@@ -1153,7 +1153,7 @@ static int objectclass_wait(struct ldb_handle *handle, enum ldb_wait_type type)
        }
 }
 
-const struct ldb_module_ops ldb_objectclass_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_objectclass_module_ops = {
        .name              = "objectclass",
        .add           = objectclass_add,
        .modify        = objectclass_modify,
index 99dc46bc1fab58e448420ea26c1716bc52c24494..f62839389d2c6b70274da08e281dfb3af9ada880 100644 (file)
@@ -247,7 +247,7 @@ static int objectguid_modify(struct ldb_module *module, struct ldb_request *req)
        return ret;
 }
 
-const struct ldb_module_ops ldb_objectguid_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_objectguid_module_ops = {
        .name          = "objectguid",
        .add           = objectguid_add,
        .modify        = objectguid_modify,
index 62dd0da8a1c2bb96e8dd99a9d55f95dcf2a07539..78b5a09f78bc245c964bdeab44ab54e65e05e69a 100644 (file)
@@ -87,7 +87,7 @@ static struct ldb_module *make_module_for_next_request(TALLOC_CTX *mem_ctx,
                                                       struct ldb_module *module)
 {
        struct ldb_module *current;
-       static const struct ldb_module_ops ops; /* zero */
+_PUBLIC_       static const struct ldb_module_ops ops; /* zero */
        current = talloc_zero(mem_ctx, struct ldb_module);
        if (current == NULL) {
                return module;
@@ -1030,7 +1030,7 @@ static int partition_wait(struct ldb_handle *handle, enum ldb_wait_type type)
        }
 }
 
-const struct ldb_module_ops ldb_partition_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_partition_module_ops = {
        .name              = "partition",
        .init_context      = partition_init,
        .search            = partition_search,
index 380045c1cf04a11f31789bc6002a5c7513c797ed..aa64700f2f8d297be2f1f9280ec9f6ba76854573 100644 (file)
@@ -2044,7 +2044,7 @@ static int password_hash_wait(struct ldb_handle *handle, enum ldb_wait_type type
        }
 }
 
-const struct ldb_module_ops ldb_password_hash_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_password_hash_module_ops = {
        .name          = "password_hash",
        .add           = password_hash_add,
        .modify        = password_hash_modify,
index 270e79ecd8eb2a1f39ac4c54d28efb4a1ea76179..09d56d77c93890f5bca149d6c2e0ad0ad9676390 100644 (file)
@@ -115,7 +115,7 @@ static int pdc_fsmo_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_pdc_fsmo_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_pdc_fsmo_module_ops = {
        .name           = "pdc_fsmo",
        .init_context   = pdc_fsmo_init
 };
index a7704ef41378bcee6485ffcc242689174d27c926..0d065425ca7efdb4610d8e0e448b477fae44067c 100644 (file)
@@ -331,7 +331,7 @@ static int proxy_request(struct ldb_module *module, struct ldb_request *req)
        }
 }
 
-const struct ldb_module_ops ldb_proxy_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_proxy_module_ops = {
        .name           = "proxy",
        .request        = proxy_request
 };
index 9184a8c0b2b858d00843c93e5817ee519c608344..dd5faf837aba3b01db50879c9b7636d5b5aad177 100644 (file)
@@ -1579,7 +1579,7 @@ static int replmd_wait(struct ldb_handle *handle, enum ldb_wait_type type)
        }
 }
 
-const struct ldb_module_ops ldb_repl_meta_data_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_repl_meta_data_module_ops = {
        .name          = "repl_meta_data",
        .add           = replmd_add,
        .modify        = replmd_modify,
index 80173084ecb71acae05935697df075a63c4c304f..3235b24ef90a4ce71dc4f0de67b1f1c0f2dc14c5 100644 (file)
@@ -386,7 +386,7 @@ static int rootdse_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_rootdse_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_rootdse_module_ops = {
        .name                   = "rootdse",
        .init_context           = rootdse_init,
        .search                 = rootdse_search,
index 4b1d4329329e5e835de3e0501293256a5456d48c..88b04b1bb6e63de6eefc1df604cb8e844e4b4694 100644 (file)
@@ -925,7 +925,7 @@ static int samba3sam_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_samba3sam_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_samba3sam_module_ops = {
        LDB_MAP_OPS
        .name              = "samba3sam",
        .init_context      = samba3sam_init,
index 44776f595641d04b65847e41d549890c2e63f0f8..178149a8865d335db6252c9f2344519e73590ca8 100644 (file)
@@ -750,7 +750,7 @@ static int samldb_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_samldb_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_samldb_module_ops = {
        .name          = "samldb",
        .init_context  = samldb_init,
        .add           = samldb_add,
index b6eb5ffb84eccced1f50ec788da91caa0d7edf7a..ff9530ca92b0bfd69390f32c2b1919f937c3a7c8 100644 (file)
@@ -1221,7 +1221,7 @@ static int schema_init(struct ldb_module *module)
        return LDB_SUCCESS;
 }
 
-const struct ldb_module_ops ldb_schema_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_schema_module_ops = {
        .name          = "schema",
        .init_context  = schema_init,
        .add           = schema_add,
index 9c877475273ed79b21ed83b8fb04335ec6e40bb2..729fd15202ccea5ef9c9d306f68b77d302730c0a 100644 (file)
@@ -255,7 +255,7 @@ static int schema_fsmo_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_schema_fsmo_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_schema_fsmo_module_ops = {
        .name           = "schema_fsmo",
        .init_context   = schema_fsmo_init
 };
index 5e6b967b477fb56432e5f50089429a91c7079c91..361cf226dc331b1a8a46059213c512552983fb81 100644 (file)
@@ -194,7 +194,7 @@ static int show_deleted_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_show_deleted_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_show_deleted_module_ops = {
        .name              = "show_deleted",
        .search            = show_deleted_search,
        .init_context      = show_deleted_init
index dbb58856a02da30a2120d2baf368eaff5b2ee032..3f4c19d28521f6bf2c462842ab524afdbd0c84ee 100644 (file)
@@ -793,14 +793,14 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
        return LDB_SUCCESS;
 }
 
-const struct ldb_module_ops ldb_entryuuid_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_entryuuid_module_ops = {
        .name              = "entryuuid",
        .init_context      = entryuuid_init,
        .sequence_number   = entryuuid_sequence_number,
        LDB_MAP_OPS
 };
 
-const struct ldb_module_ops ldb_nsuniqueid_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_nsuniqueid_module_ops = {
        .name              = "nsuniqueid",
        .init_context      = nsuniqueid_init,
        .sequence_number   = entryuuid_sequence_number,
index 614f05f752de473509f2798ee4c791daf8b01058..54362dcfd47157b4fac33f57cddd4de6969e5cf1 100644 (file)
@@ -199,7 +199,7 @@ static int update_kt_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_update_keytab_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_update_keytab_module_ops = {
        .name              = "update_keytab",
        .init_context      = update_kt_init,
        .add               = update_kt_add,
index fb7100e3c10bf0ce07dea4d18c3a095ccd06fbe2..995b584f51f97b8a0e5fd093db1731f926922b61 100644 (file)
@@ -811,17 +811,17 @@ failed:
        return -1;
 }
 
-const struct ldb_backend_ops ldb_ldap_backend_ops {
+_PUBLIC_ const struct ldb_backend_ops ldb_ldap_backend_ops = {
        .name = "ldap",
        .connect_fn = ildb_connect
 };
 
-const struct ldb_backend_ops ldb_ildap_backend_ops {
+_PUBLIC_ const struct ldb_backend_ops ldb_ildap_backend_ops = {
        .name = "ildap",
        .connect_fn = ildb_connect
 };
 
-const struct ldb_backend_ops ldb_ldaps_backend_ops {
+_PUBLIC_ const struct ldb_backend_ops ldb_ldaps_backend_ops = {
        .name = "ldaps",
        .connect_fn = ildb_connect
 };
index d897350c2f02e25f4be18f94566adbb92b1067bf..3f6ff3fd5b8edadec611adb65f8119e6d0a674c3 100644 (file)
@@ -826,9 +826,17 @@ failed:
        return -1;
 }
 
-int ldb_ldap_init(void)
-{
-       return ldb_register_backend("ldap", lldb_connect) +
-                  ldb_register_backend("ldapi", lldb_connect) + 
-                  ldb_register_backend("ldaps", lldb_connect);
-}
+_PUBLIC_ struct ldb_backend_ops ldb_ldap_backend_ops = {
+       .name = "ldap",
+       .connect_fn = lldb_connect
+};
+
+_PUBLIC_ struct ldb_backend_ops ldb_ldapi_backend_ops = {
+       .name = "ldapi",
+       .connect_fn = lldb_connect
+};
+
+_PUBLIC_ struct ldb_backend_ops ldb_ldaps_backend_ops = {
+       .name = "ldaps",
+       .connect_fn = lldb_connect
+};
index 8742e257f3058abb96a321b81f90e7a93d5c0f70..214e7eec5fd3d16af1499072d783cf90db4dd501 100644 (file)
@@ -1903,7 +1903,7 @@ failed:
        return -1;
 }
 
-const struct ldb_backend_ops ldb_sqlite3_backend_ops = {
+_PUBLIC_ const struct ldb_backend_ops ldb_sqlite3_backend_ops = {
        .name = "sqlite3",
        .connect_fn = lsqlite3_connect
 };
index 7406e91c9de3ef8921e24a109e672d66ca10e166..40e87f70d60c83e124a5e7ae0877d941c6102c67 100644 (file)
@@ -455,7 +455,7 @@ static int ps_init(struct ldb_module *module)
        return ldb_next_init(module);
 }
 
-const struct ldb_module_ops ldb_paged_searches_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_paged_searches_module_ops = {
        .name           = "paged_searches",
        .search         = ps_search,
        .wait           = ps_wait,
index 1a9e72c907b23976a7cac2aa8de6bc5075012b06..98d8e865dd07813eb0d3b6c4be194a710d023c63 100644 (file)
@@ -32,7 +32,7 @@ int sample_add(struct ldb_module *mod, struct ldb_request *req)
        return ldb_next_request(mod, req);
 }
 
-const struct ldb_module_ops ldb_sample_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_sample_module_ops = {
        .name              = "sample",
        .add               = sample_add,
 };
index 8f6c4f5d8acce1f0537647129c7696dcc1177602..f64b272a674e12b44916b5eda69df06238cd5a99 100644 (file)
 /** Feel free to add definitions for other compilers here. */
 #endif
 
-#ifndef _PUBLIC_
 #ifdef HAVE_VISIBILITY_ATTR
 #  define _PUBLIC_ __attribute__((visibility("default")))
 #else
 #  define _PUBLIC_
 #endif
-#endif
 
 #ifndef _DEPRECATED_
 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
index 9e106052f24f3b8eb493f094dd20c0c214945920..550b60c625c35f8adc9d2d0c22ace91b4f060115 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef _SAMBA_UTIL_H_
 #define _SAMBA_UTIL_H_
 
+#include "util/attr.h"
+
 #include "charset/charset.h"
 
 /* for TALLOC_CTX */
@@ -36,7 +38,6 @@ struct smbsrv_tcon;
 extern const char *logfile;
 extern const char *panic_action;
 
-#include "util/attr.h"
 #include "util/time.h"
 #include "util/data_blob.h"
 #include "util/xfile.h"
index 68ef56c11ec0f4a9578aa1605fe4fc68408db4cb..928504476885999bce7e9b6c60c1ffcdc364aa24 100644 (file)
@@ -17,7 +17,7 @@ PUBLIC_DEPENDENCIES = \
 [MODULE::ldb_wins_ldb]
 SUBSYSTEM = LIBLDB
 OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = wins_ldb_module_init
+INIT_FUNCTION = &ldb_wins_ldb_module_ops
 OBJ_FILES = \
                wins/wins_ldb.o
 PRIVATE_DEPENDENCIES = \
index 04468556ef3218b79ecc35ecac9261b1e044540a..02ea30624309bd3f848d5922d3e1675cd793a37b 100644 (file)
@@ -112,7 +112,7 @@ failed:
        return LDB_ERR_OTHER;
 }
 
-const struct ldb_module_ops ldb_wins_ldb_module_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_wins_ldb_module_ops = {
        .name          = "wins_ldb",
        .add           = wins_ldb_verify,
        .modify        = wins_ldb_verify,