diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-10-25 10:30:14 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-10-28 13:10:28 +0200 |
commit | b256799eaf829fcb7d6e1d88de4478f77df8ff73 (patch) | |
tree | b0366498e602f56a999f08244deb41081e453b5a | |
parent | 0ce09fcf7ae971a2dc4131fd137c925f0b9a57a4 (diff) | |
download | samba-b256799eaf829fcb7d6e1d88de4478f77df8ff73.tar.gz samba-b256799eaf829fcb7d6e1d88de4478f77df8ff73.tar.bz2 samba-b256799eaf829fcb7d6e1d88de4478f77df8ff73.zip |
lib/util Rename samba_init_module -> samba_module_init
This is to provide a cleaner namespace in the public samba plugin
functions.
Andrew Bartlett
-rw-r--r-- | buildtools/wafsamba/wafsamba.py | 2 | ||||
-rw-r--r-- | lib/util/internal_module.c | 4 | ||||
-rw-r--r-- | lib/util/samba_module.h | 4 | ||||
-rw-r--r-- | source3/exports/modules-darwin.syms | 2 | ||||
-rw-r--r-- | source3/m4/aclocal.m4 | 2 | ||||
-rw-r--r-- | source3/modules/perfcount_test.c | 2 | ||||
-rw-r--r-- | source3/winbindd/idmap_ad.c | 2 | ||||
-rw-r--r-- | source3/winbindd/idmap_adex/idmap_adex.c | 2 | ||||
-rw-r--r-- | source3/winbindd/idmap_autorid.c | 2 | ||||
-rw-r--r-- | source3/winbindd/idmap_hash/idmap_hash.c | 2 | ||||
-rw-r--r-- | source3/winbindd/idmap_rid.c | 2 | ||||
-rw-r--r-- | source3/winbindd/idmap_tdb2.c | 2 | ||||
-rw-r--r-- | source3/wscript | 2 |
13 files changed, 15 insertions, 15 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 338bc3d48b..876cec5287 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -391,7 +391,7 @@ def SAMBA_MODULE(bld, modname, source, includes='', subsystem=None, init_function=None, - module_init_name='samba_init_module', + module_init_name='samba_module_init', autoproto=None, autoproto_extra_source='', cflags='', diff --git a/lib/util/internal_module.c b/lib/util/internal_module.c index b5156fd9e2..a10d1f3a3b 100644 --- a/lib/util/internal_module.c +++ b/lib/util/internal_module.c @@ -57,7 +57,7 @@ samba_module_init_fn load_module(const char *path, bool is_probe, void **handle_ return NULL; } - init_fn = (samba_module_init_fn)dlsym(handle, SAMBA_INIT_MODULE); + init_fn = (samba_module_init_fn)dlsym(handle, SAMBA_MODULE_INIT); /* we could check dlerror() to determine if it worked, because dlsym() can validly return NULL, but what would we do with @@ -65,7 +65,7 @@ samba_module_init_fn load_module(const char *path, bool is_probe, void **handle_ if (init_fn == NULL) { DEBUG(0, ("Unable to find %s() in %s: %s\n", - SAMBA_INIT_MODULE, path, dlerror())); + SAMBA_MODULE_INIT, path, dlerror())); DEBUG(1, ("Loading module '%s' failed\n", path)); dlclose(handle); return NULL; diff --git a/lib/util/samba_module.h b/lib/util/samba_module.h index 0bdf35fa10..6d32fce48e 100644 --- a/lib/util/samba_module.h +++ b/lib/util/samba_module.h @@ -24,13 +24,13 @@ /* Module support */ typedef NTSTATUS (*samba_module_init_fn) (void); -NTSTATUS samba_init_module(void); +NTSTATUS samba_module_init(void); /* this needs to be a string which is not in the C library. We previously used "init_module", but that meant that modules which did not define this function ended up calling the C library function init_module() which makes a system call */ -#define SAMBA_INIT_MODULE "samba_init_module" +#define SAMBA_MODULE_INIT "samba_module_init" /** * Run the specified init functions. diff --git a/source3/exports/modules-darwin.syms b/source3/exports/modules-darwin.syms index 276543b8de..b4bd6f3e8b 100644 --- a/source3/exports/modules-darwin.syms +++ b/source3/exports/modules-darwin.syms @@ -1 +1 @@ -_samba_init_module +_samba_module_init diff --git a/source3/m4/aclocal.m4 b/source3/m4/aclocal.m4 index a4db42e5ca..8eef69d704 100644 --- a/source3/m4/aclocal.m4 +++ b/source3/m4/aclocal.m4 @@ -25,7 +25,7 @@ AC_DEFUN(SMB_MODULE, fi if test x"$DEST" = xSHARED; then - AC_DEFINE([$1][_init], [samba_init_module], [Whether to build $1 as shared module]) + AC_DEFINE([$1][_init], [samba_module_init], [Whether to build $1 as shared module]) $4_MODULES="$$4_MODULES $3" AC_MSG_RESULT([shared]) [$6] diff --git a/source3/modules/perfcount_test.c b/source3/modules/perfcount_test.c index 8d17ee513f..5365362783 100644 --- a/source3/modules/perfcount_test.c +++ b/source3/modules/perfcount_test.c @@ -381,7 +381,7 @@ static struct smb_perfcount_handlers perfcount_test_handlers = { perfcount_test_end }; -NTSTATUS samba_init_module(void) +NTSTATUS samba_module_init(void) { return smb_register_perfcounter(SMB_PERFCOUNTER_INTERFACE_VERSION, "pc_test", &perfcount_test_handlers); diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index a3ecc476e6..ab44f89355 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -1096,7 +1096,7 @@ static struct nss_info_methods nss_sfu20_methods = { Initialize the plugins ***********************************************************************/ -NTSTATUS samba_init_module(void) +NTSTATUS samba_module_init(void) { static NTSTATUS status_idmap_ad = NT_STATUS_UNSUCCESSFUL; static NTSTATUS status_nss_rfc2307 = NT_STATUS_UNSUCCESSFUL; diff --git a/source3/winbindd/idmap_adex/idmap_adex.c b/source3/winbindd/idmap_adex/idmap_adex.c index 56e025d801..3ddd71624a 100644 --- a/source3/winbindd/idmap_adex/idmap_adex.c +++ b/source3/winbindd/idmap_adex/idmap_adex.c @@ -385,7 +385,7 @@ static struct nss_info_methods adex_nss_methods = { against the idmap and nss_info interfaces being in a half-registered state. **********************************************************************/ -NTSTATUS samba_init_module(void) +NTSTATUS samba_module_init(void) { static NTSTATUS idmap_status = NT_STATUS_UNSUCCESSFUL; static NTSTATUS nss_status = NT_STATUS_UNSUCCESSFUL; diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 1a88fd4cb8..8d32f0e349 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -668,7 +668,7 @@ static struct idmap_methods autorid_methods = { .allocate_id = idmap_autorid_allocate_id }; -NTSTATUS samba_init_module(void) +NTSTATUS samba_module_init(void) { return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "autorid", &autorid_methods); diff --git a/source3/winbindd/idmap_hash/idmap_hash.c b/source3/winbindd/idmap_hash/idmap_hash.c index 1f36b217ef..4a61f4e7b3 100644 --- a/source3/winbindd/idmap_hash/idmap_hash.c +++ b/source3/winbindd/idmap_hash/idmap_hash.c @@ -366,7 +366,7 @@ static struct nss_info_methods hash_nss_methods = { state. **********************************************************************/ -NTSTATUS samba_init_module(void) +NTSTATUS samba_module_init(void) { static NTSTATUS idmap_status = NT_STATUS_UNSUCCESSFUL; static NTSTATUS nss_status = NT_STATUS_UNSUCCESSFUL; diff --git a/source3/winbindd/idmap_rid.c b/source3/winbindd/idmap_rid.c index 4112fb860a..c01b45b1b4 100644 --- a/source3/winbindd/idmap_rid.c +++ b/source3/winbindd/idmap_rid.c @@ -187,7 +187,7 @@ static struct idmap_methods rid_methods = { .sids_to_unixids = idmap_rid_sids_to_unixids, }; -NTSTATUS samba_init_module(void) +NTSTATUS samba_module_init(void) { return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "rid", &rid_methods); } diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c index ac3743e523..4ffb60a2c8 100644 --- a/source3/winbindd/idmap_tdb2.c +++ b/source3/winbindd/idmap_tdb2.c @@ -874,7 +874,7 @@ static struct idmap_methods db_methods = { .allocate_id = idmap_tdb2_get_new_id }; -NTSTATUS samba_init_module(void) +NTSTATUS samba_module_init(void) { return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "tdb2", &db_methods); } diff --git a/source3/wscript b/source3/wscript index 5746533eff..26152f5169 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1722,7 +1722,7 @@ main() { conf.DEFINE('static_init_%s' % p, '{}') if p in shared_list: for entry in shared_list[p]: - conf.DEFINE('%s_init' % entry, 'samba_init_module') + conf.DEFINE('%s_init' % entry, 'samba_module_init') conf.env[shared_env].append('%s' % entry) conf.SAMBA_CONFIG_H('include/config.h') |