From 05bc4de083b993e3db06fdb2a3e1198021526a71 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 3 Dec 2011 07:03:35 +0100 Subject: 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 Autobuild-Date: Sat Dec 3 08:36:33 CET 2011 on sn-devel-104 --- source4/ntvfs/ntvfs_base.c | 12 ++++++------ source4/ntvfs/posix/pvfs_acl.c | 12 ++++++------ source4/ntvfs/posix/wscript_build | 2 +- source4/ntvfs/sysdep/sys_lease.c | 6 +++--- source4/ntvfs/sysdep/sys_notify.c | 6 +++--- source4/ntvfs/wscript_build | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) (limited to 'source4/ntvfs') 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 #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 ) -- cgit