lib/util Rename samba_init_module -> samba_module_init
authorAndrew Bartlett <abartlet@samba.org>
Mon, 24 Oct 2011 23:30:14 +0000 (10:30 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 28 Oct 2011 11:10:28 +0000 (13:10 +0200)
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett

13 files changed:
buildtools/wafsamba/wafsamba.py
lib/util/internal_module.c
lib/util/samba_module.h
source3/exports/modules-darwin.syms
source3/m4/aclocal.m4
source3/modules/perfcount_test.c
source3/winbindd/idmap_ad.c
source3/winbindd/idmap_adex/idmap_adex.c
source3/winbindd/idmap_autorid.c
source3/winbindd/idmap_hash/idmap_hash.c
source3/winbindd/idmap_rid.c
source3/winbindd/idmap_tdb2.c
source3/wscript

index 338bc3d48b35375c38fb2eb3751bb50062e155fa..876cec52878e639cdcf4c302fee49e6b9d172816 100644 (file)
@@ -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='',
index b5156fd9e2d14457741327850d8f5301be421168..a10d1f3a3b965296ef48980130921e0e00ae7b6b 100644 (file)
@@ -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;
index 0bdf35fa10c3ef2e5823145047ea02ce12b0e3c1..6d32fce48ef4dd040790fcfb3eeb919223e925ed 100644 (file)
 /* 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.
index 276543b8de01186bd1d76ca5396637de4dd1f67b..b4bd6f3e8bffa14e51218bac3a712ce30ab58f66 100644 (file)
@@ -1 +1 @@
-_samba_init_module
+_samba_module_init
index a4db42e5ca94eb7c6ee949bd6066e990b36d1dbb..8eef69d7049e285f149026d95eac41442582c3bf 100644 (file)
@@ -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]
index 8d17ee513f4fdd875ca64c510ce88b5bc637b7c0..5365362783c8ddaf0d0b324cdf50955dbc2e2a5d 100644 (file)
@@ -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);
index a3ecc476e62591d25799d20032d4f71580931c24..ab44f89355344100d0a772f904655bd509399ca2 100644 (file)
@@ -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;
index 56e025d8014ae301c3d4ae9b5e317b7e573bee8b..3ddd71624a076214a7d25020d8d433a85decd01a 100644 (file)
@@ -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;
index 1a88fd4cb84685d50c19d6f9636e04def969a67c..8d32f0e3493bacde590b5bdf7e359e4db14438a8 100644 (file)
@@ -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);
index 1f36b217ef1ebbb19ffee8e5ba8557a30954ca13..4a61f4e7b354d34ca35f324ed7dfa7ef9f7b62a5 100644 (file)
@@ -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;
index 4112fb860aee9cb5abcb3978dc01ce2f330024cc..c01b45b1b424a6f0a6979bb42ba7dd70e49619aa 100644 (file)
@@ -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);
 }
index ac3743e523ed19fab4723d6dc285eab6927f6cb1..4ffb60a2c8cff2a7eee2eb1531c7b9090ee7c8dc 100644 (file)
@@ -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);
 }
index 5746533effc08429a026ce37765e4a963841583b..26152f51690771d5ad809e1d4cad8d83ecefefbd 100644 (file)
@@ -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')