[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-945-g7a2ff3e

Jelmer Vernooij jelmer at samba.org
Wed Feb 20 09:55:50 GMT 2008


The branch, v4-0-test has been updated
       via  7a2ff3ee26bce49a3eeeb270f4a5e4df2adbefbb (commit)
       via  7bbe48af5568ffc4e4873692316673fd974ef4ef (commit)
       via  ce332130ea77159832da23bab760fa26921719e2 (commit)
       via  92c1c0e9137f0845cac6cc96bf78711b6aaffe21 (commit)
       via  e464a344bc11587abc5c663bc8d6471eeb314959 (commit)
       via  b1a7810f3e70f9a831d9b8e85d531e448072adaf (commit)
       via  46e5027f56722fbe19af36aad1ab03ea1c862f43 (commit)
       via  85c96a325867f7bcdb412ebc53f8a47dbf7cd89b (commit)
       via  141ee91272fb4dafca0149f679e17721b6a3011e (commit)
       via  2548c2a1e7dab8abc00f8f49374a08cc0b427552 (commit)
       via  89590d7dfe0735093a4a5b66eeed9276df043ac9 (commit)
       via  5ad9bc7dd9b8a3b37e0acd77eaecc5ee71d7b422 (commit)
       via  9b0dcac0bd805c3e1741448167b461c3fa0e33fd (commit)
      from  e8f3653414c12fb752c096d848dc962008d90439 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 7a2ff3ee26bce49a3eeeb270f4a5e4df2adbefbb
Merge: 7bbe48af5568ffc4e4873692316673fd974ef4ef e8f3653414c12fb752c096d848dc962008d90439
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 10:55:20 2008 +0100

    Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-nodeclare

commit 7bbe48af5568ffc4e4873692316673fd974ef4ef
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 10:51:26 2008 +0100

    Fix nbt tests.

commit ce332130ea77159832da23bab760fa26921719e2
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 04:33:43 2008 +0100

    Fix use of some modules (needed _PUBLIC_).

commit 92c1c0e9137f0845cac6cc96bf78711b6aaffe21
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 03:40:44 2008 +0100

    Fix static module list generation for ldb.

commit e464a344bc11587abc5c663bc8d6471eeb314959
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 03:21:38 2008 +0100

    Require at least talloc 1.2.0.

commit b1a7810f3e70f9a831d9b8e85d531e448072adaf
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 02:57:07 2008 +0100

    Remove more function-based inits.

commit 46e5027f56722fbe19af36aad1ab03ea1c862f43
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 01:56:55 2008 +0100

    Use function-based initialization for ildap backend.

commit 85c96a325867f7bcdb412ebc53f8a47dbf7cd89b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 01:54:32 2008 +0100

    Use struct-based rather than function-based initialization for ldb modules everywhere.

commit 141ee91272fb4dafca0149f679e17721b6a3011e
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 20 01:37:53 2008 +0100

    Allow ldb backends without init function, use init function-less ldb modules.

commit 2548c2a1e7dab8abc00f8f49374a08cc0b427552
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Feb 19 23:53:04 2008 +0100

    Factor out IP marshalling into separate function.

commit 89590d7dfe0735093a4a5b66eeed9276df043ac9
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Feb 19 23:00:43 2008 +0100

    Add configure test for vdeplug library.

commit 5ad9bc7dd9b8a3b37e0acd77eaecc5ee71d7b422
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Feb 19 22:04:26 2008 +0100

    Add VDE switch management functions.

commit 9b0dcac0bd805c3e1741448167b461c3fa0e33fd
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Feb 19 21:51:09 2008 +0100

    Initial work on vde support.

-----------------------------------------------------------------------

Summary of changes:
 source/build/smb_build/header.pm                  |   10 ++-
 source/build/smb_build/makefile.pm                |    3 +-
 source/build/smb_build/summary.pm                 |    3 +
 source/configure.ac                               |    2 +-
 source/dsdb/samdb/ldb_modules/anr.c               |    8 +--
 source/dsdb/samdb/ldb_modules/config.mk           |   57 +++++++--------
 source/dsdb/samdb/ldb_modules/dsdb_cache.c        |    7 +--
 source/dsdb/samdb/ldb_modules/extended_dn.c       |    7 +--
 source/dsdb/samdb/ldb_modules/instancetype.c      |    8 +--
 source/dsdb/samdb/ldb_modules/kludge_acl.c        |    7 +--
 source/dsdb/samdb/ldb_modules/linked_attributes.c |    7 +--
 source/dsdb/samdb/ldb_modules/local_password.c    |    8 +--
 source/dsdb/samdb/ldb_modules/naming_fsmo.c       |    7 +--
 source/dsdb/samdb/ldb_modules/normalise.c         |    7 +--
 source/dsdb/samdb/ldb_modules/objectclass.c       |    8 +--
 source/dsdb/samdb/ldb_modules/objectguid.c        |    8 +--
 source/dsdb/samdb/ldb_modules/partition.c         |    9 +--
 source/dsdb/samdb/ldb_modules/password_hash.c     |    8 +--
 source/dsdb/samdb/ldb_modules/pdc_fsmo.c          |    7 +--
 source/dsdb/samdb/ldb_modules/proxy.c             |    7 +--
 source/dsdb/samdb/ldb_modules/ranged_results.c    |    7 +--
 source/dsdb/samdb/ldb_modules/repl_meta_data.c    |    7 +--
 source/dsdb/samdb/ldb_modules/rootdse.c           |    8 +--
 source/dsdb/samdb/ldb_modules/samba3sam.c         |   17 +----
 source/dsdb/samdb/ldb_modules/samldb.c            |    8 +--
 source/dsdb/samdb/ldb_modules/schema.c            |    7 +--
 source/dsdb/samdb/ldb_modules/schema_fsmo.c       |    7 +--
 source/dsdb/samdb/ldb_modules/show_deleted.c      |    7 +--
 source/dsdb/samdb/ldb_modules/simple_ldap_map.c   |   38 ++--------
 source/dsdb/samdb/ldb_modules/subtree_delete.c    |    7 +--
 source/dsdb/samdb/ldb_modules/subtree_rename.c    |    7 +--
 source/dsdb/samdb/ldb_modules/update_keytab.c     |    7 +--
 source/lib/ldb/Makefile.in                        |    2 +-
 source/lib/ldb/common/ldb.c                       |   65 ++++++++++++++---
 source/lib/ldb/common/ldb_modules.c               |   75 +++++++------------
 source/lib/ldb/config.mk                          |   19 +++---
 source/lib/ldb/include/ldb_private.h              |   37 +++++++---
 source/lib/ldb/ldb.mk                             |    2 +-
 source/lib/ldb/ldb_ildap/config.mk                |    1 -
 source/lib/ldb/ldb_ildap/ldb_ildap.c              |   21 ++++--
 source/lib/ldb/ldb_ldap/ldb_ldap.c                |   20 ++++--
 source/lib/ldb/ldb_map/ldb_map.c                  |   38 +----------
 source/lib/ldb/ldb_map/ldb_map.h                  |   17 ++++-
 source/lib/ldb/ldb_map/ldb_map_private.h          |    7 --
 source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c          |    8 +-
 source/lib/ldb/ldb_tdb/ldb_tdb.c                  |    8 +-
 source/lib/ldb/modules/asq.c                      |    8 +--
 source/lib/ldb/modules/operational.c              |    7 +--
 source/lib/ldb/modules/paged_results.c            |    8 +--
 source/lib/ldb/modules/paged_searches.c           |    8 +--
 source/lib/ldb/modules/rdn_name.c                 |    8 +--
 source/lib/ldb/modules/skel.c                     |    7 +--
 source/lib/ldb/modules/sort.c                     |    7 +--
 source/lib/ldb/nssldb/ldb-nss.c                   |    5 --
 source/lib/ldb/tests/sample_module.c              |    9 +--
 source/lib/ldb/tools/ad2oLschema.c                |    2 -
 source/lib/ldb/tools/cmdline.c                    |    2 -
 source/lib/ldb/tools/ldbadd.c                     |    2 -
 source/lib/ldb/tools/ldbdel.c                     |    2 -
 source/lib/ldb/tools/ldbedit.c                    |    2 -
 source/lib/ldb/tools/ldbmodify.c                  |    2 -
 source/lib/ldb/tools/ldbrename.c                  |    2 -
 source/lib/ldb/tools/ldbsearch.c                  |    2 -
 source/lib/ldb/tools/ldbtest.c                    |    2 -
 source/lib/ldb/tools/oLschema2ldif.c              |    2 -
 source/lib/socket_wrapper/config.m4               |    7 ++
 source/lib/socket_wrapper/socket_wrapper.c        |   79 +++++++++++---------
 source/lib/util/attr.h                            |    2 -
 source/lib/util/util.h                            |    3 +-
 source/nbt_server/config.mk                       |    2 +-
 source/nbt_server/wins/wins_ldb.c                 |    9 +--
 source/scripting/ejs/smbscript.c                  |    2 -
 source/selftest/samba4_tests.sh                   |    2 +-
 source/selftest/selftest.pl                       |   29 +++++++-
 source/selftest/target/Kvm.pm                     |   26 +++++--
 source/smbd/server.c                              |    2 -
 source/torture/smbtorture.c                       |    2 -
 source/utils/net/net.c                            |    2 -
 78 files changed, 358 insertions(+), 531 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/build/smb_build/header.pm b/source/build/smb_build/header.pm
index 93240f1..c2bdbaf 100644
--- a/source/build/smb_build/header.pm
+++ b/source/build/smb_build/header.pm
@@ -44,8 +44,14 @@ sub _prepare_build_h($)
 			$DEFINE->{VAL} .= "\t$_, \\\n";
 			unless (/{/) {
 				my $fn = $key->{INIT_FUNCTION_TYPE};
-				$fn =~ s/\(\*\)/$_/;
-				$output .= "$fn;\n";
+				my $n = $_;
+				if ($fn =~ /\(\*\)/) {
+					$fn =~ s/\(\*\)/$n/;
+					$output .= "$fn;\n";
+				} else {
+					$n =~ s/\&//;
+					$output .= "$fn $n;\n";
+				}
 			}
 		}
 
diff --git a/source/build/smb_build/makefile.pm b/source/build/smb_build/makefile.pm
index 498b619..17474db 100644
--- a/source/build/smb_build/makefile.pm
+++ b/source/build/smb_build/makefile.pm
@@ -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};
diff --git a/source/build/smb_build/summary.pm b/source/build/smb_build/summary.pm
index 4ea1ad5..a6557fb 100644
--- a/source/build/smb_build/summary.pm
+++ b/source/build/smb_build/summary.pm
@@ -53,6 +53,9 @@ sub show($$)
 	showitem($output, "using libblkid", ["BLKID"]);
 	showitem($output, "using iconv", ["ICONV"]);
 	showitem($output, "using pam", ["PAM"]);
+	if (enabled($config->{developer})) {
+		showitem($output, "using VDE", ["VDEPLUG"]);
+	}
 	showitem($output, "python bindings", ["LIBPYTHON"]);
 	showisexternal($output, "popt", "LIBPOPT");
 	showisexternal($output, "talloc", "LIBTALLOC");
diff --git a/source/configure.ac b/source/configure.ac
index 1c17126..b609b4f 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -35,7 +35,7 @@ AC_CONFIG_FILES(auth/gensec/gensec.pc)
 AC_CONFIG_FILES(param/samba-config.pc)
 AC_CONFIG_FILES(librpc/dcerpc_samr.pc)
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.2.0,
 	[],
 	[
 		m4_include(lib/talloc/libtalloc.m4)
diff --git a/source/dsdb/samdb/ldb_modules/anr.c b/source/dsdb/samdb/ldb_modules/anr.c
index 908d9b0..1252c9e 100644
--- a/source/dsdb/samdb/ldb_modules/anr.c
+++ b/source/dsdb/samdb/ldb_modules/anr.c
@@ -295,13 +295,7 @@ static int anr_search(struct ldb_module *module, struct ldb_request *req)
 	return ldb_next_request(module, req);
 }
 
-static const struct ldb_module_ops anr_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_anr_module_ops = {
 	.name		   = "anr",
 	.search = anr_search
 };
-
-int ldb_anr_init(void)
-{
-	return ldb_register_module(&anr_ops);
-}
-
diff --git a/source/dsdb/samdb/ldb_modules/config.mk b/source/dsdb/samdb/ldb_modules/config.mk
index dc407fb..de93b56 100644
--- a/source/dsdb/samdb/ldb_modules/config.mk
+++ b/source/dsdb/samdb/ldb_modules/config.mk
@@ -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
diff --git a/source/dsdb/samdb/ldb_modules/dsdb_cache.c b/source/dsdb/samdb/ldb_modules/dsdb_cache.c
index 4ca8bbf..e60605d 100644
--- a/source/dsdb/samdb/ldb_modules/dsdb_cache.c
+++ b/source/dsdb/samdb/ldb_modules/dsdb_cache.c
@@ -36,12 +36,7 @@ static int dsdb_cache_init(struct ldb_module *module)
 	return ldb_next_init(module);
 }
 
-static const struct ldb_module_ops dsdb_cache_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_dsdb_cache_module_ops = {
 	.name		= "dsdb_cache",
 	.init_context	= dsdb_cache_init
 };
-
-int dsdb_cache_module_init(void)
-{
-	return ldb_register_module(&dsdb_cache_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/extended_dn.c b/source/dsdb/samdb/ldb_modules/extended_dn.c
index 802f865..84bf5e4 100644
--- a/source/dsdb/samdb/ldb_modules/extended_dn.c
+++ b/source/dsdb/samdb/ldb_modules/extended_dn.c
@@ -362,13 +362,8 @@ static int extended_init(struct ldb_module *module)
 	return ldb_next_init(module);
 }
 
-static const struct ldb_module_ops extended_dn_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_module_ops = {
 	.name		   = "extended_dn",
 	.search            = extended_search,
 	.init_context	   = extended_init
 };
-
-int ldb_extended_dn_init(void)
-{
-	return ldb_register_module(&extended_dn_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/instancetype.c b/source/dsdb/samdb/ldb_modules/instancetype.c
index 65df294..fd5aa5e 100644
--- a/source/dsdb/samdb/ldb_modules/instancetype.c
+++ b/source/dsdb/samdb/ldb_modules/instancetype.c
@@ -118,13 +118,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
 	return ret;
 }
 
-static const struct ldb_module_ops instancetype_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_instancetype_module_ops = {
 	.name          = "instancetype",
 	.add           = instancetype_add,
 };
-
-
-int ldb_instancetype_init(void)
-{
-	return ldb_register_module(&instancetype_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/kludge_acl.c b/source/dsdb/samdb/ldb_modules/kludge_acl.c
index ea33548..e3e1f7a 100644
--- a/source/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -471,7 +471,7 @@ done:
 	return ldb_next_init(module);
 }
 
-static const struct ldb_module_ops kludge_acl_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_kludge_acl_module_ops = {
 	.name		   = "kludge_acl",
 	.search            = kludge_acl_search,
 	.add               = kludge_acl_change,
@@ -481,8 +481,3 @@ static const struct ldb_module_ops kludge_acl_ops = {
 	.extended          = kludge_acl_change,
 	.init_context	   = kludge_acl_init
 };
-
-int ldb_kludge_acl_init(void)
-{
-	return ldb_register_module(&kludge_acl_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/linked_attributes.c b/source/dsdb/samdb/ldb_modules/linked_attributes.c
index b3fdffe..8685c72 100644
--- a/source/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -915,7 +915,7 @@ static int linked_attributes_wait(struct ldb_handle *handle, enum ldb_wait_type
 	}
 }
 
-static const struct ldb_module_ops linked_attributes_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_linked_attributes_module_ops = {
 	.name		   = "linked_attributes",
 	.add               = linked_attributes_add,
 	.modify            = linked_attributes_modify,
@@ -923,8 +923,3 @@ static const struct ldb_module_ops linked_attributes_ops = {
 	.rename            = linked_attributes_rename,
 	.wait              = linked_attributes_wait,
 };
-
-int ldb_linked_attributes_init(void)
-{
-	return ldb_register_module(&linked_attributes_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/local_password.c b/source/dsdb/samdb/ldb_modules/local_password.c
index 350434d..dfa98ef 100644
--- a/source/dsdb/samdb/ldb_modules/local_password.c
+++ b/source/dsdb/samdb/ldb_modules/local_password.c
@@ -843,16 +843,10 @@ static int local_password_wait(struct ldb_handle *handle, enum ldb_wait_type typ
 	}
 }
 
-static const struct ldb_module_ops local_password_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_local_password_module_ops = {
 	.name          = "local_password",
 	.add           = local_password_add,
 	.modify        = local_password_modify,
 	.search        = local_password_search,
 	.wait          = local_password_wait
 };
-
-
-int local_password_module_init(void)
-{
-	return ldb_register_module(&local_password_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/naming_fsmo.c b/source/dsdb/samdb/ldb_modules/naming_fsmo.c
index d6b6a24..084540f 100644
--- a/source/dsdb/samdb/ldb_modules/naming_fsmo.c
+++ b/source/dsdb/samdb/ldb_modules/naming_fsmo.c
@@ -117,12 +117,7 @@ static int naming_fsmo_init(struct ldb_module *module)
 	return ldb_next_init(module);
 }
 
-static const struct ldb_module_ops naming_fsmo_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_naming_fsmo_module_ops = {
 	.name		= "naming_fsmo",
 	.init_context	= naming_fsmo_init
 };
-
-int naming_fsmo_module_init(void)
-{
-	return ldb_register_module(&naming_fsmo_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/normalise.c b/source/dsdb/samdb/ldb_modules/normalise.c
index 7e3b63a..695393d 100644
--- a/source/dsdb/samdb/ldb_modules/normalise.c
+++ b/source/dsdb/samdb/ldb_modules/normalise.c
@@ -156,12 +156,7 @@ static int normalise_search(struct ldb_module *module, struct ldb_request *req)
 }
 
 
-static const struct ldb_module_ops normalise_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_normalise_module_ops = {
 	.name		   = "normalise",
 	.search            = normalise_search,
 };
-
-int ldb_normalise_init(void)
-{
-	return ldb_register_module(&normalise_ops);
-}
diff --git a/source/dsdb/samdb/ldb_modules/objectclass.c b/source/dsdb/samdb/ldb_modules/objectclass.c
index 737475c..e63ad4d 100644
--- a/source/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source/dsdb/samdb/ldb_modules/objectclass.c
@@ -1153,16 +1153,10 @@ static int objectclass_wait(struct ldb_handle *handle, enum ldb_wait_type type)
 	}
 }
 
-static const struct ldb_module_ops objectclass_ops = {
+_PUBLIC_ const struct ldb_module_ops ldb_objectclass_module_ops = {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list