diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2011-12-03 07:03:35 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-12-03 08:36:30 +0100 |
commit | 05bc4de083b993e3db06fdb2a3e1198021526a71 (patch) | |
tree | 48c86581142760ca89e6c851d271367d77ae0d05 /source4 | |
parent | d74b3f941f5e28bf4a98dab6d4be25fbaab200b7 (diff) | |
download | samba-05bc4de083b993e3db06fdb2a3e1198021526a71.tar.gz samba-05bc4de083b993e3db06fdb2a3e1198021526a71.tar.bz2 samba-05bc4de083b993e3db06fdb2a3e1198021526a71.zip |
Revert making public of the samba-module library.
This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.
Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 3 08:36:33 CET 2011 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/ntlm/auth.c | 6 | ||||
-rw-r--r-- | source4/auth/ntlm/wscript_build | 2 | ||||
-rw-r--r-- | source4/ntptr/ntptr_base.c | 10 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_base.c | 12 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 12 | ||||
-rw-r--r-- | source4/ntvfs/posix/wscript_build | 2 | ||||
-rw-r--r-- | source4/ntvfs/sysdep/sys_lease.c | 6 | ||||
-rw-r--r-- | source4/ntvfs/sysdep/sys_notify.c | 6 | ||||
-rw-r--r-- | source4/ntvfs/wscript_build | 2 | ||||
-rw-r--r-- | source4/param/share.c | 6 | ||||
-rw-r--r-- | source4/param/wscript_build | 2 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 12 | ||||
-rw-r--r-- | source4/smbd/process_model.c | 12 | ||||
-rw-r--r-- | source4/smbd/server.c | 12 | ||||
-rw-r--r-- | source4/smbd/wscript_build | 2 | ||||
-rw-r--r-- | source4/torture/smbtorture.c | 4 | ||||
-rw-r--r-- | source4/torture/torture.c | 10 |
17 files changed, 59 insertions, 59 deletions
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c index 65abeae50b..802bc1b40f 100644 --- a/source4/auth/ntlm/auth.c +++ b/source4/auth/ntlm/auth.c @@ -27,7 +27,7 @@ #include "param/param.h" #include "dsdb/samdb/samdb.h" #include "libcli/wbclient/wbclient.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /*************************************************************************** Set a fixed challenge @@ -660,12 +660,12 @@ _PUBLIC_ NTSTATUS auth4_init(void) static bool initialized = false; #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_auth4_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_auth4_MODULES }; + init_module_fn static_init[] = { STATIC_auth4_MODULES }; if (initialized) return NT_STATUS_OK; initialized = true; - samba_module_init_fns_run(static_init); + run_init_functions(static_init); return NT_STATUS_OK; } diff --git a/source4/auth/ntlm/wscript_build b/source4/auth/ntlm/wscript_build index bb687d9600..6447bf2ea0 100644 --- a/source4/auth/ntlm/wscript_build +++ b/source4/auth/ntlm/wscript_build @@ -51,7 +51,7 @@ bld.SAMBA_MODULE('auth4_unix', bld.SAMBA_LIBRARY('auth4', source='auth.c auth_util.c auth_simple.c', autoproto='auth_proto.h', - deps='samba-util security samdb samba-credentials tevent-util LIBWBCLIENT_OLD auth_unix_token samba-module', + deps='samba-util security samdb samba-credentials tevent-util LIBWBCLIENT_OLD auth_unix_token samba-modules', private_library=True ) diff --git a/source4/ntptr/ntptr_base.c b/source4/ntptr/ntptr_base.c index 9b89f8a6fc..3fe8960602 100644 --- a/source4/ntptr/ntptr_base.c +++ b/source4/ntptr/ntptr_base.c @@ -25,7 +25,7 @@ #include "includes.h" #include "ntptr/ntptr.h" #include "param/param.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* the list of currently registered NTPTR backends */ static struct ntptr_backend { @@ -73,11 +73,11 @@ NTSTATUS ntptr_init(void) { #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_ntptr_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_ntptr_MODULES }; - samba_module_init_fn *shared_init = samba_module_init_fns_for_subsystem(NULL, "ntptr"); + init_module_fn static_init[] = { STATIC_ntptr_MODULES }; + init_module_fn *shared_init = load_samba_modules(NULL, "ntptr"); - samba_module_init_fns_run(static_init); - samba_module_init_fns_run(shared_init); + run_init_functions(static_init); + run_init_functions(shared_init); talloc_free(shared_init); diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c index fbf7d12ec3..8058181f89 100644 --- a/source4/ntvfs/ntvfs_base.c +++ b/source4/ntvfs/ntvfs_base.c @@ -26,7 +26,7 @@ #include "../lib/util/dlinklist.h" #include "ntvfs/ntvfs.h" #include "param/param.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* the list of currently registered NTVFS backends, note that there * can be more than one backend with the same name, as long as they @@ -230,16 +230,16 @@ NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx) static bool initialized = false; #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_ntvfs_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_ntvfs_MODULES }; - samba_module_init_fn *shared_init; + init_module_fn static_init[] = { STATIC_ntvfs_MODULES }; + init_module_fn *shared_init; if (initialized) return NT_STATUS_OK; initialized = true; - shared_init = samba_module_init_fns_for_subsystem(NULL, "ntvfs"); + shared_init = load_samba_modules(NULL, "ntvfs"); - samba_module_init_fns_run(static_init); - samba_module_init_fns_run(shared_init); + run_init_functions(static_init); + run_init_functions(shared_init); talloc_free(shared_init); diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 810dcddbd3..1519631769 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -27,7 +27,7 @@ #include "libcli/security/security.h" #include "param/param.h" #include "../lib/util/unix_privs.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* the list of currently registered ACL backends */ static struct pvfs_acl_backend { @@ -87,16 +87,16 @@ NTSTATUS pvfs_acl_init(void) static bool initialized = false; #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_pvfs_acl_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_pvfs_acl_MODULES }; - samba_module_init_fn *shared_init; + init_module_fn static_init[] = { STATIC_pvfs_acl_MODULES }; + init_module_fn *shared_init; if (initialized) return NT_STATUS_OK; initialized = true; - shared_init = samba_module_init_fns_for_subsystem(NULL, "pvfs_acl"); + shared_init = load_samba_modules(NULL, "pvfs_acl"); - samba_module_init_fns_run(static_init); - samba_module_init_fns_run(shared_init); + run_init_functions(static_init); + run_init_functions(shared_init); talloc_free(shared_init); diff --git a/source4/ntvfs/posix/wscript_build b/source4/ntvfs/posix/wscript_build index eea506fdb2..acceefadf6 100644 --- a/source4/ntvfs/posix/wscript_build +++ b/source4/ntvfs/posix/wscript_build @@ -3,7 +3,7 @@ bld.SAMBA_SUBSYSTEM('pvfs_acl', source='pvfs_acl.c', autoproto='vfs_acl_proto.h', - deps='events samba-module', + deps='events samba-modules', ) diff --git a/source4/ntvfs/sysdep/sys_lease.c b/source4/ntvfs/sysdep/sys_lease.c index 9098610468..9adb898274 100644 --- a/source4/ntvfs/sysdep/sys_lease.c +++ b/source4/ntvfs/sysdep/sys_lease.c @@ -27,7 +27,7 @@ #include "ntvfs/sysdep/sys_lease.h" #include "../lib/util/dlinklist.h" #include "param/param.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* list of registered backends */ static struct sys_lease_ops *backends; @@ -113,12 +113,12 @@ _PUBLIC_ NTSTATUS sys_lease_init(void) static bool initialized = false; #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_sys_lease_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_sys_lease_MODULES }; + init_module_fn static_init[] = { STATIC_sys_lease_MODULES }; if (initialized) return NT_STATUS_OK; initialized = true; - samba_module_init_fns_run(static_init); + run_init_functions(static_init); return NT_STATUS_OK; } diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 76dab63da4..00300cd25a 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -28,7 +28,7 @@ #include <tevent.h> #include "../lib/util/dlinklist.h" #include "param/param.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* list of registered backends */ static struct sys_notify_backend *backends; @@ -137,12 +137,12 @@ _PUBLIC_ NTSTATUS sys_notify_init(void) static bool initialized = false; #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_sys_notify_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_sys_notify_MODULES }; + init_module_fn static_init[] = { STATIC_sys_notify_MODULES }; if (initialized) return NT_STATUS_OK; initialized = true; - samba_module_init_fns_run(static_init); + run_init_functions(static_init); return NT_STATUS_OK; } diff --git a/source4/ntvfs/wscript_build b/source4/ntvfs/wscript_build index 738b7e0fa1..455e7f0b8b 100644 --- a/source4/ntvfs/wscript_build +++ b/source4/ntvfs/wscript_build @@ -67,7 +67,7 @@ bld.SAMBA_MODULE('ntvfs_nbench', bld.SAMBA_LIBRARY('ntvfs', source='ntvfs_base.c ntvfs_generic.c ntvfs_interface.c ntvfs_util.c', autoproto='ntvfs_proto.h', - deps='tevent samba-module', + deps='tevent samba-modules', private_library=True ) diff --git a/source4/param/share.c b/source4/param/share.c index 4d2b5d3ba6..da0470d560 100644 --- a/source4/param/share.c +++ b/source4/param/share.c @@ -22,7 +22,7 @@ #include "includes.h" #include "param/share.h" #include "param/param.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" const char *share_string_option(struct share_config *scfg, const char *opt_name, const char *defval) { @@ -149,9 +149,9 @@ NTSTATUS share_init(void) { #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_share_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_share_MODULES }; + init_module_fn static_init[] = { STATIC_share_MODULES }; - samba_module_init_fns_run(static_init); + run_init_functions(static_init); return NT_STATUS_OK; } diff --git a/source4/param/wscript_build b/source4/param/wscript_build index faeeae6e71..80b2758766 100644 --- a/source4/param/wscript_build +++ b/source4/param/wscript_build @@ -10,7 +10,7 @@ bld.SAMBA_SUBSYSTEM('PROVISION', bld.SAMBA_SUBSYSTEM('share', source='share.c', public_headers='share.h', - deps='samba-util samba-module' + deps='samba-util samba-modules' ) diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 9dff4e4bb1..a16e6ac9d5 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -39,7 +39,7 @@ #include "smbd/process_model.h" #include "lib/messaging/irpc.h" #include "librpc/rpc/rpc_common.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* this is only used when the client asks for an unknown interface */ #define DUMMY_ASSOC_GROUP 0x0FFFFFFF @@ -1228,18 +1228,18 @@ void dcerpc_server_init(struct loadparm_context *lp_ctx) static bool initialized; #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_dcerpc_server_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_dcerpc_server_MODULES }; - samba_module_init_fn *shared_init; + init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES }; + init_module_fn *shared_init; if (initialized) { return; } initialized = true; - shared_init = samba_module_init_fns_for_subsystem(NULL, "dcerpc_server"); + shared_init = load_samba_modules(NULL, "dcerpc_server"); - samba_module_init_fns_run(static_init); - samba_module_init_fns_run(shared_init); + run_init_functions(static_init); + run_init_functions(shared_init); talloc_free(shared_init); } diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c index b3ac07e4a6..bbcbe3b6ac 100644 --- a/source4/smbd/process_model.c +++ b/source4/smbd/process_model.c @@ -21,7 +21,7 @@ #include "includes.h" #include "smbd/process_model.h" #include "param/param.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* the list of currently registered process models */ static struct process_model { @@ -103,8 +103,8 @@ _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx) { #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_process_model_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_process_model_MODULES }; - samba_module_init_fn *shared_init; + init_module_fn static_init[] = { STATIC_process_model_MODULES }; + init_module_fn *shared_init; static bool initialised; if (initialised) { @@ -112,10 +112,10 @@ _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx) } initialised = true; - shared_init = samba_module_init_fns_for_subsystem(NULL, "process_model"); + shared_init = load_samba_modules(NULL, "process_model"); - samba_module_init_fns_run(static_init); - samba_module_init_fns_run(shared_init); + run_init_functions(static_init); + run_init_functions(shared_init); talloc_free(shared_init); diff --git a/source4/smbd/server.c b/source4/smbd/server.c index a2f4a785ad..86622c8be9 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -42,7 +42,7 @@ #include "librpc/gen_ndr/ndr_irpc.h" #include "cluster/cluster.h" #include "dynconfig/dynconfig.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" /* recursively delete a directory tree @@ -292,8 +292,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ poptContext pc; #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_service_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_service_MODULES }; - samba_module_init_fn *shared_init; + init_module_fn static_init[] = { STATIC_service_MODULES }; + init_module_fn *shared_init; struct tevent_context *event_ctx; uint16_t stdin_event_flags; NTSTATUS status; @@ -409,10 +409,10 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ process_model_init(cmdline_lp_ctx); - shared_init = samba_module_init_fns_for_subsystem(NULL, "service"); + shared_init = load_samba_modules(NULL, "service"); - samba_module_init_fns_run(static_init); - samba_module_init_fns_run(shared_init); + run_init_functions(static_init); + run_init_functions(shared_init); talloc_free(shared_init); diff --git a/source4/smbd/wscript_build b/source4/smbd/wscript_build index 20fabe1a27..ab92e3c920 100644 --- a/source4/smbd/wscript_build +++ b/source4/smbd/wscript_build @@ -76,7 +76,7 @@ bld.SAMBA_MODULE('process_model_onefork', bld.SAMBA_LIBRARY('process_model', source='process_model.c', autoproto='process_model_proto.h', - deps='samba-util samba-hostconfig samba-module', + deps='samba-util samba-hostconfig samba-modules', private_library=True ) diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 8122c14964..934e0a7b2f 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -32,7 +32,7 @@ #include "librpc/rpc/dcerpc.h" #include "auth/gensec/gensec.h" #include "param/param.h" -#include "lib/util/internal_module.h" +#include "lib/util/samba_modules.h" #if HAVE_READLINE_HISTORY_H #include <readline/history.h> @@ -602,7 +602,7 @@ int main(int argc,char *argv[]) } if (extra_module != NULL) { - samba_module_init_fn fn = load_module(poptGetOptArg(pc), false, NULL); + init_module_fn fn = load_module(poptGetOptArg(pc), false, NULL); if (fn == NULL) d_printf("Unable to load module from %s\n", poptGetOptArg(pc)); diff --git a/source4/torture/torture.c b/source4/torture/torture.c index dc35073eba..b066d3e1ac 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -23,7 +23,7 @@ #include "param/param.h" #include "lib/cmdline/popt_common.h" #include "torture/smbtorture.h" -#include "lib/util/samba_module.h" +#include "lib/util/samba_modules.h" _PUBLIC_ int torture_numops=10; _PUBLIC_ int torture_entries=1000; @@ -48,11 +48,11 @@ _PUBLIC_ int torture_init(void) { #define _MODULE_PROTO(init) extern NTSTATUS init(void); STATIC_smbtorture_MODULES_PROTO; - samba_module_init_fn static_init[] = { STATIC_smbtorture_MODULES }; - samba_module_init_fn *shared_init = samba_module_init_fns_for_subsystem(NULL, "smbtorture"); + init_module_fn static_init[] = { STATIC_smbtorture_MODULES }; + init_module_fn *shared_init = load_samba_modules(NULL, "smbtorture"); - samba_module_init_fns_run(static_init); - samba_module_init_fns_run(shared_init); + run_init_functions(static_init); + run_init_functions(shared_init); talloc_free(shared_init); |