[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Mon Nov 1 03:42:02 MDT 2010
The branch, master has been updated
via e59a8a5 s4-ldb: fixed build of paged searches
via 952ce15 s4-ldb: fixed build of oLschema2ldif
via 6f2c4ab s4-ldb: convert existing ldb tools to use new command line hooks
via f924a02 s4-ldb: added ldb command line hook support
via fd88153 s4-ldb: added samba_extensions ldb module
via cdf19ec s4-ldb: moved the ldb_ildap backend into lib/ldb-samba
via d103f2d s4-ldb: added support for general ldb hooks in modules
via c74601e s4-ldb: added an override flag to ldb_register_backend()
via 05b3738 s4-ldb: it is not an error for the modules directory to not exist
via 28c1e4d s4-modules: get rid of the remaining static prototypes for modules
via 4404b4c waf: removed the module aliases code
via 7eb2eed s4-dsdb: convert the rest of the ldb modules to the new module type
via 43f7c9c s4-test: we don't need to set LDB_MODULES_PATH any more
via 6db5765 s4-ldb: removed the old ldb module loading style
via be8e91d s4-ldb: convert the rest of the ldb modules to the new style
via b887b69 s4-process_model: use the static module prototyping
via 0a703c7 waf: added automatic prototyping of static module init functions
via 014a90f s4-dsdb: convert the simple_ldap_map module to the new module style
via cea4bdb s4-dsdb: convert the extended_dn_out module to the new ldb module style
via e8f0e3a s4-ldb: convert the openldap ldb backend to the new style of module
via efdcedb s4-ldb: convert the ildap module to the new type of ldb module
via 8b63ff5 s4-ldb: support a new type of ldb module loading
via fd6d29b waf: added module_init_name parameter to SAMBA_MODULE()
from 1aa8308 tdb: Use waf by default.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e59a8a563b684c04ca4d7dbdb13d5a9008ed2c3f
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 18:46:02 2010 +1100
s4-ldb: fixed build of paged searches
Autobuild-User: Andrew Tridgell <tridge at samba.org>
Autobuild-Date: Mon Nov 1 09:41:27 UTC 2010 on sn-devel-104
commit 952ce1521c319e7427c12fa82f22ca5cb15018f6
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 18:45:44 2010 +1100
s4-ldb: fixed build of oLschema2ldif
commit 6f2c4abadd6097d949b388cc4d9c4ebd77f0df10
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 18:45:25 2010 +1100
s4-ldb: convert existing ldb tools to use new command line hooks
the usage() function needs to take a ldb context, as the popt_options
is specific to the ldb context
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
commit f924a022cbc973ae646bff5119a1784e979a052f
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 15:41:07 2010 +1100
s4-ldb: added ldb command line hook support
ldb modules can now add hooks to the command line processing for ldb
tools
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
commit fd8815335d1295d3d0b9f5e7870f4ed364b1dd3b
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 18:43:46 2010 +1100
s4-ldb: added samba_extensions ldb module
this module hooks into the ldb command line processing, to add extra
command line options and initialisation of samba4 internal subsystems
such as gensec
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
commit cdf19ec5e2310a2f41e73fbb4655da288b88edfc
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 18:42:39 2010 +1100
s4-ldb: moved the ldb_ildap backend into lib/ldb-samba
this backend is samba4 specific
commit d103f2d346d721de6975f32649a8c75d5230dc5b
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 18:41:32 2010 +1100
s4-ldb: added support for general ldb hooks in modules
this allows a ldb module to register a hook function called at various
stages of processing. It will be initially used for ldb command line
hooks, but should work generally.
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
commit c74601e0b333f81570dfca6959e047d83e6ab32c
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 16:42:21 2010 +1100
s4-ldb: added an override flag to ldb_register_backend()
this will be used to allow a system ldb build with an ldb backend to
have its ldap handler overridden by the s4 one
commit 05b37385fcfc67f4203b2a4822f94813d11511ca
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 16:07:35 2010 +1100
s4-ldb: it is not an error for the modules directory to not exist
commit 28c1e4d3eb3162c0177085bae753102994a35846
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 15:38:37 2010 +1100
s4-modules: get rid of the remaining static prototypes for modules
the waf build now generates the prototype declarations for us
commit 4404b4c700270c7607d7b8d792ab23ce1d080463
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 15:28:29 2010 +1100
waf: removed the module aliases code
This is not needed with the new ldb modules approacg
commit 7eb2eed156c8358b5a857444651841a17651229c
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 15:28:02 2010 +1100
s4-dsdb: convert the rest of the ldb modules to the new module type
commit 43f7c9ca26f72141c87babe428e46e9a293c4b9c
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 15:27:30 2010 +1100
s4-test: we don't need to set LDB_MODULES_PATH any more
commit 6db57658a9746df7177f1824752aa43395f1419f
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 15:00:11 2010 +1100
s4-ldb: removed the old ldb module loading style
this gets rid of some particularly obscure cpp macros for module lists
commit be8e91d9cadf0886bf5ce4816dff4073d903965d
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 14:59:28 2010 +1100
s4-ldb: convert the rest of the ldb modules to the new style
commit b887b69151808455ae19ce2e690f6fe336c44bb9
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 14:58:32 2010 +1100
s4-process_model: use the static module prototyping
remove the manual prototyping of static init functions
commit 0a703c7fd10d8adc57f5703c697eb80a7a7202bc
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 14:57:57 2010 +1100
waf: added automatic prototyping of static module init functions
this avoids the need to manually list all our static init functions in
the code
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
commit 014a90f6eff99ab84ad916391e40d63b51196036
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 12:39:49 2010 +1100
s4-dsdb: convert the simple_ldap_map module to the new module style
commit cea4bdb46747887cf82ed6a6330e1070b4e9f8ba
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 12:39:06 2010 +1100
s4-dsdb: convert the extended_dn_out module to the new ldb module style
commit e8f0e3aca9f834c53933dd31316c0b928944b400
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 12:37:35 2010 +1100
s4-ldb: convert the openldap ldb backend to the new style of module
commit efdcedb6b16316450739a3a7da7de503ea5e0d04
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 12:33:11 2010 +1100
s4-ldb: convert the ildap module to the new type of ldb module
this gets rid of the module aliases, which caused issues on some
systems (eg. gentoo).
commit 8b63ff52e2442d457b5221f51cb9e85e4b94e298
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 12:32:18 2010 +1100
s4-ldb: support a new type of ldb module loading
this supports module loading in ldb which uses the approach of "load
all modules in a directory". This is much more flexible than the
current module loading, as it will allow us to load modules for
command line parsing and authentication.
Modules are loaded from a colon separated path, in the environment
variable LDB_MODULES_PATH. If unset, it defaults to LDB_MODULESDIR.
Within each directory modules are loaded recursively (traversing down
the directory tree). The device/inode number of each module is
remembered to prevent us loading a module twice.
Each module is checked for a ldb_init_module() function with
dlsym(). If found, it is called with the ldb module version as an
argument.
commit fd6d29bc08cacbd5270599aab52e0006bea2002f
Author: Andrew Tridgell <tridge at samba.org>
Date: Mon Nov 1 12:29:04 2010 +1100
waf: added module_init_name parameter to SAMBA_MODULE()
this will be used for ldb module loading
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_deps.py | 8 +
buildtools/wafsamba/wafsamba.py | 35 +--
selftest/selftest.pl | 1 -
source4/auth/gensec/gensec.c | 13 +-
source4/auth/ntlm/auth.c | 9 +-
source4/dsdb/samdb/ldb_modules/acl.c | 7 +-
source4/dsdb/samdb/ldb_modules/acl_read.c | 7 +-
source4/dsdb/samdb/ldb_modules/anr.c | 7 +-
source4/dsdb/samdb/ldb_modules/descriptor.c | 7 +-
source4/dsdb/samdb/ldb_modules/dsdb_cache.c | 7 +-
source4/dsdb/samdb/ldb_modules/extended_dn_in.c | 7 +-
source4/dsdb/samdb/ldb_modules/extended_dn_out.c | 27 +-
source4/dsdb/samdb/ldb_modules/extended_dn_store.c | 7 +-
source4/dsdb/samdb/ldb_modules/instancetype.c | 7 +-
source4/dsdb/samdb/ldb_modules/lazy_commit.c | 7 +-
source4/dsdb/samdb/ldb_modules/linked_attributes.c | 7 +-
source4/dsdb/samdb/ldb_modules/local_password.c | 7 +-
source4/dsdb/samdb/ldb_modules/naming_fsmo.c | 7 +-
source4/dsdb/samdb/ldb_modules/new_partition.c | 7 +-
source4/dsdb/samdb/ldb_modules/objectclass.c | 7 +-
source4/dsdb/samdb/ldb_modules/objectclass_attrs.c | 7 +-
source4/dsdb/samdb/ldb_modules/objectguid.c | 7 +-
source4/dsdb/samdb/ldb_modules/operational.c | 7 +-
source4/dsdb/samdb/ldb_modules/partition.c | 7 +-
source4/dsdb/samdb/ldb_modules/password_hash.c | 7 +-
source4/dsdb/samdb/ldb_modules/pdc_fsmo.c | 7 +-
source4/dsdb/samdb/ldb_modules/proxy.c | 7 +-
source4/dsdb/samdb/ldb_modules/ranged_results.c | 7 +-
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 7 +-
source4/dsdb/samdb/ldb_modules/resolve_oids.c | 7 +-
source4/dsdb/samdb/ldb_modules/rootdse.c | 7 +-
source4/dsdb/samdb/ldb_modules/samba3sam.c | 7 +-
source4/dsdb/samdb/ldb_modules/samba3sid.c | 7 +-
source4/dsdb/samdb/ldb_modules/samba_dsdb.c | 7 +-
source4/dsdb/samdb/ldb_modules/samba_secrets.c | 7 +-
source4/dsdb/samdb/ldb_modules/samldb.c | 7 +-
source4/dsdb/samdb/ldb_modules/schema_data.c | 7 +-
source4/dsdb/samdb/ldb_modules/schema_load.c | 7 +-
source4/dsdb/samdb/ldb_modules/show_deleted.c | 7 +-
source4/dsdb/samdb/ldb_modules/simple_dn.c | 7 +-
source4/dsdb/samdb/ldb_modules/simple_ldap_map.c | 21 +-
source4/dsdb/samdb/ldb_modules/subtree_delete.c | 7 +-
source4/dsdb/samdb/ldb_modules/subtree_rename.c | 7 +-
source4/dsdb/samdb/ldb_modules/update_keytab.c | 7 +-
source4/dsdb/samdb/ldb_modules/wscript_build | 136 ++++---
.../lib/{ldb/ldb_ildap => ldb-samba}/ldb_ildap.c | 32 +-
source4/lib/ldb-samba/samba_extensions.c | 119 +++++
source4/lib/ldb-samba/wscript_build | 18 +
.../ldb/ABI/{ldb-0.9.17.sigs => ldb-0.9.18.sigs} | 13 +-
source4/lib/ldb/common/ldb.c | 10 +
source4/lib/ldb/common/ldb_modules.c | 454 ++++++++++++--------
source4/lib/ldb/include/ldb_includes.h | 7 -
source4/lib/ldb/include/ldb_module.h | 27 ++-
source4/lib/ldb/include/ldb_private.h | 2 +
source4/lib/ldb/ldb_ldap/ldb_ldap.c | 29 +-
source4/lib/ldb/ldb_tdb/ldb_tdb.c | 8 +-
source4/lib/ldb/modules/asq.c | 7 +-
source4/lib/ldb/modules/paged_results.c | 7 +-
source4/lib/ldb/modules/paged_searches.c | 9 +-
source4/lib/ldb/modules/rdn_name.c | 7 +-
source4/lib/ldb/modules/skel.c | 7 +-
source4/lib/ldb/modules/sort.c | 7 +-
source4/lib/ldb/tests/sample_module.c | 7 +-
source4/lib/ldb/tests/test-controls.sh | 2 -
source4/lib/ldb/tools/cmdline.c | 87 ++---
source4/lib/ldb/tools/cmdline.h | 4 +-
source4/lib/ldb/tools/ldbadd.c | 4 +-
source4/lib/ldb/tools/ldbdel.c | 6 +-
source4/lib/ldb/tools/ldbedit.c | 11 +-
source4/lib/ldb/tools/ldbmodify.c | 4 +-
source4/lib/ldb/tools/ldbrename.c | 6 +-
source4/lib/ldb/tools/ldbsearch.c | 10 +-
source4/lib/ldb/tools/ldbtest.c | 5 -
source4/lib/ldb/wscript | 89 ++---
source4/nbt_server/wins/wins_ldb.c | 7 +-
source4/nbt_server/wscript_build | 3 +-
source4/ntptr/ntptr_base.c | 3 +-
source4/ntvfs/ntvfs_base.c | 11 +-
source4/ntvfs/posix/pvfs_acl.c | 4 +-
source4/ntvfs/sysdep/sys_lease.c | 8 +-
source4/ntvfs/sysdep/sys_notify.c | 4 +-
source4/param/share.c | 4 +-
source4/rpc_server/dcerpc_server.c | 16 +-
source4/scripting/devel/selftest-vars.sh | 1 -
source4/smbd/process_model.c | 29 +-
source4/smbd/server.c | 19 +-
source4/torture/torture.c | 19 +-
source4/utils/wscript_build | 2 +-
88 files changed, 1028 insertions(+), 609 deletions(-)
rename source4/lib/{ldb/ldb_ildap => ldb-samba}/ldb_ildap.c (98%)
create mode 100644 source4/lib/ldb-samba/samba_extensions.c
copy source4/lib/ldb/ABI/{ldb-0.9.17.sigs => ldb-0.9.18.sigs} (97%)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 7471118..bf19656 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -210,6 +210,8 @@ def add_init_functions(self):
if modules == []:
cflags.append('-DSTATIC_%s_MODULES=%s' % (sname.replace('-','_'), sentinal))
+ if sentinal == 'NULL':
+ cflags.append('-DSTATIC_%s_MODULES_PROTO' % sname.replace('-','_'))
self.ccflags = cflags
return
@@ -222,8 +224,14 @@ def add_init_functions(self):
init_fn_list.append(d['INIT_FUNCTION'])
if init_fn_list == []:
cflags.append('-DSTATIC_%s_MODULES=%s' % (m, sentinal))
+ if sentinal == 'NULL':
+ cflags.append('-DSTATIC_%s_MODULES_PROTO' % m)
else:
cflags.append('-DSTATIC_%s_MODULES=%s' % (m, ','.join(init_fn_list) + ',' + sentinal))
+ proto=''
+ for f in init_fn_list:
+ proto = proto + '_MODULE_PROTO(%s)' % f
+ cflags.append('-DSTATIC_%s_MODULES_PROTO=%s' % (m, proto))
self.ccflags = cflags
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 35b39d3..6d09aed 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -336,9 +336,9 @@ def SAMBA_MODULE(bld, modname, source,
includes='',
subsystem=None,
init_function=None,
+ module_init_name='samba_init_module',
autoproto=None,
autoproto_extra_source='',
- aliases=None,
cflags='',
internal_module=True,
local_include=True,
@@ -367,37 +367,6 @@ def SAMBA_MODULE(bld, modname, source,
SET_TARGET_TYPE(bld, modname, 'DISABLED')
return
- if aliases is not None:
- # if we have aliases, then create a private base library, and a set
- # of modules on top of that library
- if init_function:
- cflags += " -D%s=samba_init_module" % init_function
-
- basename = modname + '-base'
- bld.SAMBA_LIBRARY(basename,
- source,
- deps=deps,
- cflags=cflags,
- autoproto = autoproto,
- local_include=local_include,
- vars=vars,
- pyembed=pyembed,
- private_library=True
- )
-
- aliases = TO_LIST(aliases)
- aliases.append(modname)
-
- for alias in aliases:
- bld.SAMBA_MODULE(alias,
- source=[],
- internal_module=False,
- subsystem=subsystem,
- init_function=init_function,
- deps=basename)
- return
-
-
obj_target = modname + '.objlist'
realname = modname
@@ -415,7 +384,7 @@ def SAMBA_MODULE(bld, modname, source,
build_link_name = "modules/%s/%s" % (subsystem, realname)
if init_function:
- cflags += " -D%s=samba_init_module" % init_function
+ cflags += " -D%s=%s" % (init_function, module_init_name)
bld.SAMBA_LIBRARY(modname,
source,
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 96ca3b1..0087ec1 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -420,7 +420,6 @@ $ENV{EXEEXT} = $exeext;
my $tls_enabled = not $opt_quick;
$ENV{TLS_ENABLED} = ($tls_enabled?"yes":"no");
-$ENV{LDB_MODULES_PATH} = "$bindir_abs/modules/ldb";
sub prefix_pathvar($$)
{
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 606e4f1..0cb0d3d 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -1394,23 +1394,14 @@ bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism
return lpcfg_parm_bool(settings->lp_ctx, NULL, mechanism, name, default_value);
}
-#ifndef STATIC_gensec_MODULES
-#define STATIC_gensec_MODULES NULL
-#endif
-
/*
initialise the GENSEC subsystem
*/
_PUBLIC_ NTSTATUS gensec_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
- extern NTSTATUS gensec_sasl_init(void);
- extern NTSTATUS gensec_krb5_init(void);
- extern NTSTATUS gensec_schannel_init(void);
- extern NTSTATUS gensec_spnego_init(void);
- extern NTSTATUS gensec_gssapi_init(void);
- extern NTSTATUS gensec_ntlmssp_init(void);
-
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_gensec_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_gensec_MODULES };
init_module_fn *shared_init;
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index 46fd887..f7de020 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -632,13 +632,8 @@ const struct auth_critical_sizes *auth_interface_version(void)
_PUBLIC_ NTSTATUS auth_init(void)
{
static bool initialized = false;
- extern NTSTATUS auth_developer_init(void);
- extern NTSTATUS auth_winbind_init(void);
- extern NTSTATUS auth_anonymous_init(void);
- extern NTSTATUS auth_unix_init(void);
- extern NTSTATUS auth_sam_init(void);
- extern NTSTATUS auth_server_init(void);
-
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+ STATIC_auth_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_auth_MODULES };
if (initialized) return NT_STATUS_OK;
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 3e302ef..63e3f65 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -1171,7 +1171,7 @@ static int acl_extended(struct ldb_module *module, struct ldb_request *req)
}
}
-_PUBLIC_ const struct ldb_module_ops ldb_acl_module_ops = {
+static const struct ldb_module_ops ldb_acl_module_ops = {
.name = "acl",
.search = acl_search,
.add = acl_add,
@@ -1181,3 +1181,8 @@ _PUBLIC_ const struct ldb_module_ops ldb_acl_module_ops = {
.extended = acl_extended,
.init_context = acl_module_init
};
+
+int ldb_acl_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_acl_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c
index bd9e128..1bd9c5e 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_read.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_read.c
@@ -300,8 +300,13 @@ static int aclread_init(struct ldb_module *module)
return ldb_next_init(module);
}
-_PUBLIC_ const struct ldb_module_ops ldb_aclread_module_ops = {
+static const struct ldb_module_ops ldb_aclread_module_ops = {
.name = "aclread",
.search = aclread_search,
.init_context = aclread_init
};
+
+int ldb_aclread_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_aclread_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c
index ebe9d66..9291dd5 100644
--- a/source4/dsdb/samdb/ldb_modules/anr.c
+++ b/source4/dsdb/samdb/ldb_modules/anr.c
@@ -365,7 +365,12 @@ static int anr_search(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, down_req);
}
-_PUBLIC_ const struct ldb_module_ops ldb_anr_module_ops = {
+static const struct ldb_module_ops ldb_anr_module_ops = {
.name = "anr",
.search = anr_search
};
+
+int ldb_anr_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_anr_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index c94d6bd..7aee406 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -894,7 +894,7 @@ static int descriptor_init(struct ldb_module *module)
}
-_PUBLIC_ const struct ldb_module_ops ldb_descriptor_module_ops = {
+static const struct ldb_module_ops ldb_descriptor_module_ops = {
.name = "descriptor",
.search = descriptor_search,
.add = descriptor_change,
@@ -902,3 +902,8 @@ _PUBLIC_ const struct ldb_module_ops ldb_descriptor_module_ops = {
.rename = descriptor_rename,
.init_context = descriptor_init
};
+
+int ldb_descriptor_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_descriptor_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/dsdb_cache.c b/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
index b7e4fca..2a1b29d 100644
--- a/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
+++ b/source4/dsdb/samdb/ldb_modules/dsdb_cache.c
@@ -36,7 +36,12 @@ static int dsdb_cache_init(struct ldb_module *module)
return ldb_next_init(module);
}
-_PUBLIC_ const struct ldb_module_ops ldb_dsdb_cache_module_ops = {
+static const struct ldb_module_ops ldb_dsdb_cache_module_ops = {
.name = "dsdb_cache",
.init_context = dsdb_cache_init
};
+
+int ldb_dsdb_cache_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_dsdb_cache_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
index 400c37f..60f6ec4 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
@@ -404,10 +404,15 @@ static int extended_dn_in_rename(struct ldb_module *module, struct ldb_request *
return extended_dn_in_fix(module, req, req->op.rename.olddn);
}
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_in_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_in_module_ops = {
.name = "extended_dn_in",
.search = extended_dn_in_search,
.modify = extended_dn_in_modify,
.del = extended_dn_in_del,
.rename = extended_dn_in_rename,
};
+
+int ldb_extended_dn_in_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_extended_dn_in_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index 7d1826e..eab14ed 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -859,20 +859,41 @@ static int extended_dn_out_fds_init(struct ldb_module *module)
return extended_dn_out_dereference_init(module, attrs);
}
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_out_ldb_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_out_ldb_module_ops = {
.name = "extended_dn_out_ldb",
.search = extended_dn_out_ldb_search,
.init_context = extended_dn_out_ldb_init,
};
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_out_openldap_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_out_openldap_module_ops = {
.name = "extended_dn_out_openldap",
.search = extended_dn_out_openldap_search,
.init_context = extended_dn_out_openldap_init,
};
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_out_fds_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_out_fds_module_ops = {
.name = "extended_dn_out_fds",
.search = extended_dn_out_fds_search,
.init_context = extended_dn_out_fds_init,
};
+
+/*
+ initialise the module
+ */
+_PUBLIC_ int ldb_extended_dn_out_module_init(const char *ldb_version)
+{
+ int ret;
+ ret = ldb_register_module(&ldb_extended_dn_out_ldb_module_ops);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ ret = ldb_register_module(&ldb_extended_dn_out_openldap_module_ops);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ ret = ldb_register_module(&ldb_extended_dn_out_fds_module_ops);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ return LDB_SUCCESS;
+}
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
index 7338944..471020d 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c
@@ -448,8 +448,13 @@ static int extended_dn_modify(struct ldb_module *module, struct ldb_request *req
return ldb_next_request(module, ac->ops->search_req);
}
-_PUBLIC_ const struct ldb_module_ops ldb_extended_dn_store_module_ops = {
+static const struct ldb_module_ops ldb_extended_dn_store_module_ops = {
.name = "extended_dn_store",
.add = extended_dn_add,
.modify = extended_dn_modify,
};
+
+int ldb_extended_dn_store_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_extended_dn_store_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/instancetype.c b/source4/dsdb/samdb/ldb_modules/instancetype.c
index a728502..7374103 100644
--- a/source4/dsdb/samdb/ldb_modules/instancetype.c
+++ b/source4/dsdb/samdb/ldb_modules/instancetype.c
@@ -196,8 +196,13 @@ static int instancetype_mod(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, req);
}
-_PUBLIC_ const struct ldb_module_ops ldb_instancetype_module_ops = {
+static const struct ldb_module_ops ldb_instancetype_module_ops = {
.name = "instancetype",
.add = instancetype_add,
.modify = instancetype_mod
};
+
+int ldb_instancetype_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_instancetype_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/lazy_commit.c b/source4/dsdb/samdb/ldb_modules/lazy_commit.c
index b46f88a..d0efea2 100644
--- a/source4/dsdb/samdb/ldb_modules/lazy_commit.c
+++ b/source4/dsdb/samdb/ldb_modules/lazy_commit.c
@@ -109,7 +109,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, new_req);
}
-const struct ldb_module_ops ldb_lazy_commit_module_ops = {
+static const struct ldb_module_ops ldb_lazy_commit_module_ops = {
.name = "lazy_commit",
.search = unlazy_op,
.add = unlazy_op,
@@ -119,3 +119,8 @@ const struct ldb_module_ops ldb_lazy_commit_module_ops = {
.request = unlazy_op,
.extended = unlazy_op,
};
+
+int ldb_lazy_commit_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_lazy_commit_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 25596f0..18faa73 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -1078,7 +1078,7 @@ static int linked_attributes_del_transaction(struct ldb_module *module)
}
-_PUBLIC_ const struct ldb_module_ops ldb_linked_attributes_module_ops = {
+static const struct ldb_module_ops ldb_linked_attributes_module_ops = {
.name = "linked_attributes",
.add = linked_attributes_add,
.modify = linked_attributes_modify,
@@ -1087,3 +1087,8 @@ _PUBLIC_ const struct ldb_module_ops ldb_linked_attributes_module_ops = {
.prepare_commit = linked_attributes_prepare_commit,
.del_transaction = linked_attributes_del_transaction,
};
+
+int ldb_linked_attributes_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_linked_attributes_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c
index 1a7b19d..ed267e5 100644
--- a/source4/dsdb/samdb/ldb_modules/local_password.c
+++ b/source4/dsdb/samdb/ldb_modules/local_password.c
@@ -1098,10 +1098,15 @@ static int local_password_search(struct ldb_module *module, struct ldb_request *
return ldb_next_request(module, remote_req);
}
-_PUBLIC_ const struct ldb_module_ops ldb_local_password_module_ops = {
+static const struct ldb_module_ops ldb_local_password_module_ops = {
.name = "local_password",
.add = local_password_add,
.modify = local_password_modify,
.del = local_password_delete,
.search = local_password_search
};
+
+int ldb_local_password_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_local_password_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
index 3e45c2e..4b30cfe 100644
--- a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c
@@ -96,7 +96,12 @@ static int naming_fsmo_init(struct ldb_module *module)
return ldb_next_init(module);
}
-_PUBLIC_ const struct ldb_module_ops ldb_naming_fsmo_module_ops = {
+static const struct ldb_module_ops ldb_naming_fsmo_module_ops = {
.name = "naming_fsmo",
.init_context = naming_fsmo_init
};
+
+int ldb_naming_fsmo_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_naming_fsmo_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/new_partition.c b/source4/dsdb/samdb/ldb_modules/new_partition.c
index 8e63eac..0c5082b 100644
--- a/source4/dsdb/samdb/ldb_modules/new_partition.c
+++ b/source4/dsdb/samdb/ldb_modules/new_partition.c
@@ -195,7 +195,12 @@ static int new_partition_add(struct ldb_module *module, struct ldb_request *req)
return ldb_next_request(module, req);
}
-_PUBLIC_ const struct ldb_module_ops ldb_new_partition_module_ops = {
+static const struct ldb_module_ops ldb_new_partition_module_ops = {
.name = "new_partition",
.add = new_partition_add,
};
+
+int ldb_new_partition_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_new_partition_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index c389965..d58cf53 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -1508,7 +1508,7 @@ static int objectclass_init(struct ldb_module *module)
return ret;
}
-_PUBLIC_ const struct ldb_module_ops ldb_objectclass_module_ops = {
+static const struct ldb_module_ops ldb_objectclass_module_ops = {
.name = "objectclass",
.add = objectclass_add,
.modify = objectclass_modify,
@@ -1516,3 +1516,8 @@ _PUBLIC_ const struct ldb_module_ops ldb_objectclass_module_ops = {
.del = objectclass_delete,
.init_context = objectclass_init
};
+
+int ldb_objectclass_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_objectclass_module_ops);
+}
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
index 5d3f51f..abc64be 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
@@ -466,8 +466,13 @@ static int objectclass_attrs_modify(struct ldb_module *module,
return attr_handler(ac);
}
-_PUBLIC_ const struct ldb_module_ops ldb_objectclass_attrs_module_ops = {
+static const struct ldb_module_ops ldb_objectclass_attrs_module_ops = {
.name = "objectclass_attrs",
.add = objectclass_attrs_add,
.modify = objectclass_attrs_modify
};
+
+int ldb_objectclass_attrs_module_init(const char *version)
+{
+ return ldb_register_module(&ldb_objectclass_attrs_module_ops);
--
Samba Shared Repository
More information about the samba-cvs
mailing list