summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-04-20 12:24:43 -0700
committerJeremy Allison <jra@samba.org>2017-04-22 01:17:00 +0200
commit306783d6f5d577a0b8bd31d659d8c802f22f0333 (patch)
tree20e1c5a45b027d061d3dc0cab9028bbccaef7ab7
parent9342b3ebf7fe7b7565406bd9a606b6676c08b029 (diff)
downloadsamba-306783d6f5d577a0b8bd31d659d8c802f22f0333.tar.gz
lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
-rw-r--r--WHATSNEW.txt19
-rw-r--r--auth/gensec/external.c4
-rw-r--r--auth/gensec/gensec.h3
-rw-r--r--auth/gensec/gensec_start.c6
-rw-r--r--auth/gensec/ncalrpc.c4
-rw-r--r--auth/gensec/schannel.c4
-rw-r--r--auth/gensec/spnego.c4
-rw-r--r--auth/ntlmssp/ntlmssp.c2
-rw-r--r--auth/ntlmssp/ntlmssp.h2
-rw-r--r--buildtools/wafsamba/samba_patterns.py3
-rw-r--r--docs-xml/Samba3-Developers-Guide/modules.xml14
-rw-r--r--examples/VFS/shadow_copy_test.c2
-rw-r--r--examples/VFS/skel_opaque.c2
-rw-r--r--examples/VFS/skel_transparent.c2
-rw-r--r--examples/auth/auth_skel.c4
-rw-r--r--examples/pdb/test.c2
-rw-r--r--file_server/file_server.c4
-rw-r--r--lib/util/modules.c6
-rw-r--r--lib/util/samba_modules.h6
-rw-r--r--libcli/echo/tests/echo.c4
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm4
-rw-r--r--source3/auth/auth.c2
-rw-r--r--source3/auth/auth_builtin.c2
-rw-r--r--source3/auth/auth_domain.c2
-rw-r--r--source3/auth/auth_sam.c2
-rw-r--r--source3/auth/auth_samba4.c4
-rw-r--r--source3/auth/auth_script.c4
-rw-r--r--source3/auth/auth_unix.c2
-rw-r--r--source3/auth/auth_winbind.c2
-rw-r--r--source3/auth/proto.h12
-rw-r--r--source3/include/auth.h3
-rw-r--r--source3/include/idmap.h3
-rw-r--r--source3/include/nss_info.h2
-rw-r--r--source3/include/passdb.h3
-rw-r--r--source3/include/smb_perfcount.h3
-rw-r--r--source3/include/vfs.h3
-rw-r--r--source3/modules/perfcount_test.c2
-rw-r--r--source3/modules/vfs_acl_tdb.c2
-rw-r--r--source3/modules/vfs_acl_xattr.c2
-rw-r--r--source3/modules/vfs_afsacl.c4
-rw-r--r--source3/modules/vfs_aio_fork.c4
-rw-r--r--source3/modules/vfs_aio_linux.c2
-rw-r--r--source3/modules/vfs_aio_pthread.c4
-rw-r--r--source3/modules/vfs_aixacl.c4
-rw-r--r--source3/modules/vfs_aixacl2.c4
-rw-r--r--source3/modules/vfs_audit.c2
-rw-r--r--source3/modules/vfs_btrfs.c4
-rw-r--r--source3/modules/vfs_cacheprime.c4
-rw-r--r--source3/modules/vfs_cap.c4
-rw-r--r--source3/modules/vfs_catia.c2
-rw-r--r--source3/modules/vfs_ceph.c4
-rw-r--r--source3/modules/vfs_commit.c4
-rw-r--r--source3/modules/vfs_crossrename.c4
-rw-r--r--source3/modules/vfs_default.c4
-rw-r--r--source3/modules/vfs_default_quota.c4
-rw-r--r--source3/modules/vfs_dfs_samba4.c4
-rw-r--r--source3/modules/vfs_dirsort.c2
-rw-r--r--source3/modules/vfs_expand_msdfs.c4
-rw-r--r--source3/modules/vfs_extd_audit.c2
-rw-r--r--source3/modules/vfs_fake_acls.c4
-rw-r--r--source3/modules/vfs_fake_dfq.c2
-rw-r--r--source3/modules/vfs_fake_perms.c4
-rw-r--r--source3/modules/vfs_fileid.c4
-rw-r--r--source3/modules/vfs_fruit.c4
-rw-r--r--source3/modules/vfs_full_audit.c2
-rw-r--r--source3/modules/vfs_glusterfs.c4
-rw-r--r--source3/modules/vfs_gpfs.c4
-rw-r--r--source3/modules/vfs_hpuxacl.c2
-rw-r--r--source3/modules/vfs_linux_xfs_sgid.c4
-rw-r--r--source3/modules/vfs_media_harmony.c4
-rw-r--r--source3/modules/vfs_netatalk.c4
-rw-r--r--source3/modules/vfs_nfs4acl_xattr.c4
-rw-r--r--source3/modules/vfs_offline.c4
-rw-r--r--source3/modules/vfs_posix_eadb.c2
-rw-r--r--source3/modules/vfs_posixacl.c4
-rw-r--r--source3/modules/vfs_posixacl.h2
-rw-r--r--source3/modules/vfs_prealloc.c4
-rw-r--r--source3/modules/vfs_preopen.c4
-rw-r--r--source3/modules/vfs_readahead.c4
-rw-r--r--source3/modules/vfs_readonly.c4
-rw-r--r--source3/modules/vfs_recycle.c4
-rw-r--r--source3/modules/vfs_shadow_copy.c4
-rw-r--r--source3/modules/vfs_shadow_copy2.c4
-rw-r--r--source3/modules/vfs_shell_snap.c4
-rw-r--r--source3/modules/vfs_snapper.c4
-rw-r--r--source3/modules/vfs_solarisacl.c4
-rw-r--r--source3/modules/vfs_streams_depot.c4
-rw-r--r--source3/modules/vfs_streams_xattr.c4
-rw-r--r--source3/modules/vfs_syncops.c2
-rw-r--r--source3/modules/vfs_time_audit.c4
-rw-r--r--source3/modules/vfs_tru64acl.c4
-rw-r--r--source3/modules/vfs_tsmsm.c4
-rw-r--r--source3/modules/vfs_unityed_media.c4
-rw-r--r--source3/modules/vfs_vxfs.c4
-rw-r--r--source3/modules/vfs_worm.c4
-rw-r--r--source3/modules/vfs_xattr_tdb.c4
-rw-r--r--source3/modules/vfs_zfsacl.c4
-rw-r--r--source3/passdb/pdb_interface.c2
-rw-r--r--source3/passdb/pdb_ldap.c4
-rw-r--r--source3/passdb/pdb_ldap.h2
-rw-r--r--source3/passdb/pdb_nds.c2
-rw-r--r--source3/passdb/pdb_nds.h2
-rw-r--r--source3/passdb/pdb_samba_dsdb.c4
-rw-r--r--source3/passdb/pdb_smbpasswd.c2
-rw-r--r--source3/passdb/pdb_smbpasswd.h2
-rw-r--r--source3/passdb/pdb_tdb.c2
-rw-r--r--source3/passdb/pdb_tdb.h2
-rw-r--r--source3/rpc_server/mdssvc/srv_mdssvc_nt.c2
-rw-r--r--source3/rpc_server/rpc_service_setup.c4
-rw-r--r--source3/smbd/vfs.c2
-rw-r--r--source3/winbindd/idmap.c2
-rw-r--r--source3/winbindd/idmap_ad.c4
-rw-r--r--source3/winbindd/idmap_ad_nss.c2
-rw-r--r--source3/winbindd/idmap_autorid.c2
-rw-r--r--source3/winbindd/idmap_hash/idmap_hash.c2
-rw-r--r--source3/winbindd/idmap_ldap.c4
-rw-r--r--source3/winbindd/idmap_nss.c2
-rw-r--r--source3/winbindd/idmap_passdb.c2
-rw-r--r--source3/winbindd/idmap_proto.h8
-rw-r--r--source3/winbindd/idmap_rfc2307.c2
-rw-r--r--source3/winbindd/idmap_rid.c2
-rw-r--r--source3/winbindd/idmap_script.c2
-rw-r--r--source3/winbindd/idmap_tdb.c2
-rw-r--r--source3/winbindd/idmap_tdb2.c2
-rw-r--r--source3/winbindd/nss_info.c2
-rw-r--r--source3/winbindd/nss_info_template.c2
-rw-r--r--source3/wscript6
-rw-r--r--source4/auth/auth.h2
-rw-r--r--source4/auth/gensec/gensec_gssapi.c4
-rw-r--r--source4/auth/gensec/gensec_krb5.c4
-rw-r--r--source4/auth/ntlm/auth.c4
-rw-r--r--source4/auth/ntlm/auth_anonymous.c4
-rw-r--r--source4/auth/ntlm/auth_developer.c4
-rw-r--r--source4/auth/ntlm/auth_sam.c4
-rw-r--r--source4/auth/ntlm/auth_server_service.c2
-rw-r--r--source4/auth/ntlm/auth_unix.c4
-rw-r--r--source4/auth/ntlm/auth_winbind.c4
-rw-r--r--source4/cldap_server/cldap_server.c4
-rw-r--r--source4/dns_server/dns_server.c4
-rw-r--r--source4/dsdb/dns/dns_update.c4
-rw-r--r--source4/dsdb/kcc/kcc_service.c2
-rw-r--r--source4/dsdb/repl/drepl_service.c2
-rw-r--r--source4/echo_server/echo_server.c4
-rw-r--r--source4/kdc/kdc-heimdal.c4
-rw-r--r--source4/ldap_server/ldap_server.c2
-rw-r--r--source4/lib/com/classes/simple.c4
-rw-r--r--source4/lib/http/gensec/basic.c4
-rw-r--r--source4/lib/http/gensec/ntlm.c4
-rw-r--r--source4/nbt_server/nbt_server.c4
-rw-r--r--source4/ntp_signd/ntp_signd.c4
-rw-r--r--source4/ntvfs/cifs/vfs_cifs.c4
-rw-r--r--source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c2
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c2
-rw-r--r--source4/ntvfs/nbench/vfs_nbench.c4
-rw-r--r--source4/ntvfs/ntvfs_base.c6
-rw-r--r--source4/ntvfs/posix/pvfs_acl.c6
-rw-r--r--source4/ntvfs/posix/pvfs_acl_nfs4.c4
-rw-r--r--source4/ntvfs/posix/pvfs_acl_xattr.c4
-rw-r--r--source4/ntvfs/posix/vfs_posix.c2
-rw-r--r--source4/ntvfs/print/vfs_print.c4
-rw-r--r--source4/ntvfs/simple/vfs_simple.c2
-rw-r--r--source4/ntvfs/smb2/vfs_smb2.c4
-rw-r--r--source4/ntvfs/sysdep/inotify.c4
-rw-r--r--source4/ntvfs/sysdep/sys_lease.c4
-rw-r--r--source4/ntvfs/sysdep/sys_lease_linux.c4
-rw-r--r--source4/ntvfs/sysdep/sys_notify.c4
-rw-r--r--source4/ntvfs/unixuid/vfs_unixuid.c4
-rw-r--r--source4/param/share.c4
-rw-r--r--source4/param/share_classic.c4
-rw-r--r--source4/param/share_ldb.c4
-rw-r--r--source4/rpc_server/dcerpc_server.c6
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c6
-rw-r--r--source4/rpc_server/service_rpc.c4
-rw-r--r--source4/smb_server/service_smb.c2
-rw-r--r--source4/smbd/process_model.c6
-rw-r--r--source4/smbd/process_single.c4
-rw-r--r--source4/smbd/process_standard.c4
-rw-r--r--source4/smbd/server.c6
-rw-r--r--source4/torture/basic/base.c2
-rw-r--r--source4/torture/dfs/domaindfs.c2
-rw-r--r--source4/torture/dns/dlz_bind9.c4
-rw-r--r--source4/torture/dns/internal_dns.c4
-rw-r--r--source4/torture/drs/drs_init.c2
-rw-r--r--source4/torture/krb5/kdc-heimdal.c2
-rw-r--r--source4/torture/krb5/kdc-mit.c2
-rw-r--r--source4/torture/ldap/common.c2
-rw-r--r--source4/torture/libnet/libnet.c2
-rw-r--r--source4/torture/libnetapi/libnetapi.c2
-rw-r--r--source4/torture/libsmbclient/libsmbclient.c2
-rw-r--r--source4/torture/local/local.c2
-rw-r--r--source4/torture/nbench/nbench.c2
-rw-r--r--source4/torture/nbt/nbt.c2
-rw-r--r--source4/torture/ntp/ntp_signd.c2
-rw-r--r--source4/torture/rap/rap.c2
-rw-r--r--source4/torture/raw/raw.c2
-rw-r--r--source4/torture/rpc/rpc.c2
-rw-r--r--source4/torture/smb2/smb2.c2
-rw-r--r--source4/torture/smbtorture.c2
-rw-r--r--source4/torture/torture.c6
-rw-r--r--source4/torture/unix/unix.c2
-rw-r--r--source4/torture/vfs/vfs.c2
-rw-r--r--source4/torture/winbind/winbind.c2
-rw-r--r--source4/web_server/web_server.c4
-rw-r--r--source4/winbind/winbindd.c4
-rw-r--r--source4/wrepl_server/wrepl_server.c2
205 files changed, 373 insertions, 335 deletions
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 5e6d15947c9..d9324e7dbdd 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -60,6 +60,25 @@ was using this call please raise the issue on
samba-technical@lists.samba.org in order to design a supported
way of obtaining the same functionality.
+Change of loadable module interface
+-----------------------------------
+
+The _init function of all loadable modules in Samba has changed
+from:
+
+NTSTATUS _init(void);
+
+to:
+
+NTSTATUS _init(TALLOC_CTX *);
+
+This allows a program loading a module to pass in a long-lived
+talloc context (which must be guaranteed to be alive for the
+lifetime of the module). This allows modules to avoid use of
+the talloc_autofree_context() (which is inherently thread-unsafe)
+and still be valgrind-clean on exit. Modules that don't need to
+free long-lived data on exist should use the NULL talloc context.
+
KNOWN ISSUES
============
diff --git a/auth/gensec/external.c b/auth/gensec/external.c
index 9c17888a31e..92295bcf03f 100644
--- a/auth/gensec/external.c
+++ b/auth/gensec/external.c
@@ -32,7 +32,7 @@
* layer is already mutually authenticated.
*/
-NTSTATUS gensec_external_init(void);
+NTSTATUS gensec_external_init(TALLOC_CTX *ctx);
static NTSTATUS gensec_external_start(struct gensec_security *gensec_security)
{
@@ -111,7 +111,7 @@ static const struct gensec_security_ops gensec_external_ops = {
};
-NTSTATUS gensec_external_init(void)
+NTSTATUS gensec_external_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/auth/gensec/gensec.h b/auth/gensec/gensec.h
index 6764ee5e461..3924a7ce987 100644
--- a/auth/gensec/gensec.h
+++ b/auth/gensec/gensec.h
@@ -107,7 +107,8 @@ struct gensec_settings {
struct gensec_security_ops;
struct gensec_security_ops_wrapper;
-#define GENSEC_INTERFACE_VERSION 0
+/* Change to 1, loadable modules now take a TALLOC_CTX * init() parameter. */
+#define GENSEC_INTERFACE_VERSION 1
/* this structure is used by backends to determine the size of some critical types */
struct gensec_critical_sizes;
diff --git a/auth/gensec/gensec_start.c b/auth/gensec/gensec_start.c
index 31a555957cc..83a86cfd654 100644
--- a/auth/gensec/gensec_start.c
+++ b/auth/gensec/gensec_start.c
@@ -956,7 +956,7 @@ bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism
_PUBLIC_ NTSTATUS gensec_init(void)
{
static bool initialized = false;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
#ifdef STATIC_gensec_MODULES
STATIC_gensec_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_gensec_MODULES };
@@ -970,8 +970,8 @@ _PUBLIC_ NTSTATUS gensec_init(void)
shared_init = load_samba_modules(NULL, "gensec");
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ run_init_functions(NULL, static_init);
+ run_init_functions(NULL, shared_init);
talloc_free(shared_init);
diff --git a/auth/gensec/ncalrpc.c b/auth/gensec/ncalrpc.c
index e6f33f3d9de..8916ef5d88a 100644
--- a/auth/gensec/ncalrpc.c
+++ b/auth/gensec/ncalrpc.c
@@ -30,7 +30,7 @@
#include "lib/param/param.h"
#include "tsocket.h"
-_PUBLIC_ NTSTATUS gensec_ncalrpc_as_system_init(void);
+_PUBLIC_ NTSTATUS gensec_ncalrpc_as_system_init(TALLOC_CTX *ctx);
struct gensec_ncalrpc_state {
enum {
@@ -338,7 +338,7 @@ static const struct gensec_security_ops gensec_ncalrpc_security_ops = {
.priority = GENSEC_EXTERNAL,
};
-_PUBLIC_ NTSTATUS gensec_ncalrpc_as_system_init(void)
+_PUBLIC_ NTSTATUS gensec_ncalrpc_as_system_init(TALLOC_CTX *ctx)
{
NTSTATUS status;
diff --git a/auth/gensec/schannel.c b/auth/gensec/schannel.c
index 1b99bb747aa..bf169d4acf1 100644
--- a/auth/gensec/schannel.c
+++ b/auth/gensec/schannel.c
@@ -441,7 +441,7 @@ static NTSTATUS netsec_outgoing_packet(struct schannel_state *state,
return NT_STATUS_OK;
}
-_PUBLIC_ NTSTATUS gensec_schannel_init(void);
+_PUBLIC_ NTSTATUS gensec_schannel_init(TALLOC_CTX *ctx);
static size_t schannel_sig_size(struct gensec_security *gensec_security, size_t data_size)
{
@@ -849,7 +849,7 @@ static const struct gensec_security_ops gensec_schannel_security_ops = {
.priority = GENSEC_SCHANNEL
};
-_PUBLIC_ NTSTATUS gensec_schannel_init(void)
+_PUBLIC_ NTSTATUS gensec_schannel_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
ret = gensec_register(&gensec_schannel_security_ops);
diff --git a/auth/gensec/spnego.c b/auth/gensec/spnego.c
index 017181a3622..4b3edc686cc 100644
--- a/auth/gensec/spnego.c
+++ b/auth/gensec/spnego.c
@@ -34,7 +34,7 @@
#undef strcasecmp
-_PUBLIC_ NTSTATUS gensec_spnego_init(void);
+_PUBLIC_ NTSTATUS gensec_spnego_init(TALLOC_CTX *ctx);
enum spnego_state_position {
SPNEGO_SERVER_START,
@@ -1694,7 +1694,7 @@ static const struct gensec_security_ops gensec_spnego_security_ops = {
.priority = GENSEC_SPNEGO
};
-_PUBLIC_ NTSTATUS gensec_spnego_init(void)
+_PUBLIC_ NTSTATUS gensec_spnego_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
ret = gensec_register(&gensec_spnego_security_ops);
diff --git a/auth/ntlmssp/ntlmssp.c b/auth/ntlmssp/ntlmssp.c
index 6f7c089467f..ec2f6d93172 100644
--- a/auth/ntlmssp/ntlmssp.c
+++ b/auth/ntlmssp/ntlmssp.c
@@ -252,7 +252,7 @@ static const struct gensec_security_ops gensec_ntlmssp_resume_ccache_ops = {
.priority = GENSEC_NTLMSSP
};
-_PUBLIC_ NTSTATUS gensec_ntlmssp_init(void)
+_PUBLIC_ NTSTATUS gensec_ntlmssp_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/auth/ntlmssp/ntlmssp.h b/auth/ntlmssp/ntlmssp.h
index 24127686312..658d3fa86af 100644
--- a/auth/ntlmssp/ntlmssp.h
+++ b/auth/ntlmssp/ntlmssp.h
@@ -145,7 +145,7 @@ bool ntlmssp_blob_matches_magic(const DATA_BLOB *blob);
/* The following definitions come from auth/ntlmssp/gensec_ntlmssp.c */
-NTSTATUS gensec_ntlmssp_init(void);
+NTSTATUS gensec_ntlmssp_init(TALLOC_CTX *ctx);
uint32_t gensec_ntlmssp_neg_flags(struct gensec_security *gensec_security);
const char *gensec_ntlmssp_server_domain(struct gensec_security *gensec_security);
diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py
index ceca2cce5f7..0481520c3b8 100644
--- a/buildtools/wafsamba/samba_patterns.py
+++ b/buildtools/wafsamba/samba_patterns.py
@@ -178,6 +178,9 @@ def write_build_options(task):
keys_header_other.append(key)
else:
keys_option_have.append(key)
+ elif key.startswith("static_init_"):
+ l = key.split("(")
+ keys_misc.append(l[0])
else:
keys_misc.append(key)
diff --git a/docs-xml/Samba3-Developers-Guide/modules.xml b/docs-xml/Samba3-Developers-Guide/modules.xml
index a74c1768443..f0d19f1b8e9 100644
--- a/docs-xml/Samba3-Developers-Guide/modules.xml
+++ b/docs-xml/Samba3-Developers-Guide/modules.xml
@@ -101,7 +101,7 @@ The prototype for these functions is:
</para>
<para><programlisting>
-NTSTATUS init_module(void);
+NTSTATUS init_module(TALLOC_CTX *);
</programlisting></para>
<para>This function should call one or more
@@ -111,7 +111,7 @@ NT_STATUS_UNSUCCESSFUL or a more useful nt error code on failure.</para>
<para>For example, pdb_ldap_init() contains: </para>
<para><programlisting>
-NTSTATUS pdb_ldap_init(void)
+NTSTATUS pdb_ldap_init(TALLOC_CTX *)
{
smb_register_passdb(PASSDB_INTERFACE_VERSION, "ldapsam", pdb_init_ldapsam);
smb_register_passdb(PASSDB_INTERFACE_VERSION, "ldapsam_nua", pdb_init_ldapsam_nua);
@@ -119,6 +119,16 @@ smb_register_passdb(PASSDB_INTERFACE_VERSION, "ldapsam_nua", pdb_init_ldapsam_nu
}
</programlisting></para>
+<para>
+The TALLOC_CTX pointer passed as a parameter must be a long-lived context,
+that will stay around for as long as the program that loads the module
+exists. It allows the caller to taloc_free any long lived data the
+module choses to place on this context on program exit (giving a cleaner
+valgrind trace). It should be used by modules in place of talloc_autofree_context(),
+use of which makes programs thread-unsafe. Modules that don't care about
+free on exist should use the NULL talloc context.
+</para>
+
<sect2>
<title>Static/Shared selection in configure.in</title>
diff --git a/examples/VFS/shadow_copy_test.c b/examples/VFS/shadow_copy_test.c
index 05d6e16042d..48bf9d580ff 100644
--- a/examples/VFS/shadow_copy_test.c
+++ b/examples/VFS/shadow_copy_test.c
@@ -84,7 +84,7 @@ static struct vfs_fn_pointers vfs_test_shadow_copy_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_shadow_copy_test_init(void)
+NTSTATUS vfs_shadow_copy_test_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"shadow_copy_test",
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 94795957fbd..ffd951c0e2d 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -994,7 +994,7 @@ struct vfs_fn_pointers skel_opaque_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_skel_opaque_init(void)
+NTSTATUS vfs_skel_opaque_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_opaque",
&skel_opaque_fns);
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f60131257ae..afadbc1a5cd 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -1119,7 +1119,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_skel_transparent_init(void)
+NTSTATUS vfs_skel_transparent_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "skel_transparent",
&skel_transparent_fns);
diff --git a/examples/auth/auth_skel.c b/examples/auth/auth_skel.c
index 3f3379f0e93..6abd5ad4f7a 100644
--- a/examples/auth/auth_skel.c
+++ b/examples/auth/auth_skel.c
@@ -67,8 +67,8 @@ static NTSTATUS auth_init_skel(struct auth_context *auth_context, const char *pa
return NT_STATUS_OK;
}
-NTSTATUS auth_skel_init(void);
-NTSTATUS auth_skel_init(void)
+NTSTATUS auth_skel_init(TALLOC_CTX *ctx);
+NTSTATUS auth_skel_init(TALLOC_CTX *ctx)
{
return smb_register_auth(AUTH_INTERFACE_VERSION, "skel", auth_init_skel);
}
diff --git a/examples/pdb/test.c b/examples/pdb/test.c
index 6d68d87a929..a5e7dac4933 100644
--- a/examples/pdb/test.c
+++ b/examples/pdb/test.c
@@ -108,7 +108,7 @@ static NTSTATUS testsam_init(struct pdb_methods **pdb_method, const char *locati
}
static_decl_pdb;
-NTSTATUS pdb_test_init(void)
+NTSTATUS pdb_test_init(TALLOC_CTX *ctx)
{
return smb_register_passdb(PASSDB_INTERFACE_VERSION, "testsam",
testsam_init);
diff --git a/file_server/file_server.c b/file_server/file_server.c
index aab5f39ac76..72d7de5e20f 100644
--- a/file_server/file_server.c
+++ b/file_server/file_server.c
@@ -93,9 +93,9 @@ static void s3fs_task_init(struct task_server *task)
}
/* called at smbd startup - register ourselves as a server service */
-NTSTATUS server_service_s3fs_init(void);
+NTSTATUS server_service_s3fs_init(TALLOC_CTX *);
-NTSTATUS server_service_s3fs_init(void)
+NTSTATUS server_service_s3fs_init(TALLOC_CTX *ctx)
{
return register_server_service("s3fs", s3fs_task_init);
}
diff --git a/lib/util/modules.c b/lib/util/modules.c
index c7e9f64f405..c3c05f21f33 100644
--- a/lib/util/modules.c
+++ b/lib/util/modules.c
@@ -116,7 +116,7 @@ static init_module_fn *load_modules(TALLOC_CTX *mem_ctx, const char *path)
*
* @return true if all functions ran successfully, false otherwise
*/
-bool run_init_functions(init_module_fn *fns)
+bool run_init_functions(TALLOC_CTX *ctx, init_module_fn *fns)
{
int i;
bool ret = true;
@@ -124,7 +124,7 @@ bool run_init_functions(init_module_fn *fns)
if (fns == NULL)
return true;
- for (i = 0; fns[i]; i++) { ret &= (bool)NT_STATUS_IS_OK(fns[i]()); }
+ for (i = 0; fns[i]; i++) { ret &= (bool)NT_STATUS_IS_OK(fns[i](ctx)); }
return ret;
}
@@ -195,7 +195,7 @@ static NTSTATUS do_smb_load_module(const char *subsystem,
DEBUG(2, ("Module '%s' loaded\n", module_name));
- status = init();
+ status = init(NULL);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Module '%s' initialization failed: %s\n",
module_name, get_friendly_nt_error_msg(status)));
diff --git a/lib/util/samba_modules.h b/lib/util/samba_modules.h
index 2f408119295..1ae9c6e0e90 100644
--- a/lib/util/samba_modules.h
+++ b/lib/util/samba_modules.h
@@ -22,9 +22,9 @@
#define _SAMBA_MODULES_H
/* Module support */
-typedef NTSTATUS (*init_module_fn) (void);
+typedef NTSTATUS (*init_module_fn) (TALLOC_CTX *ctx);
-NTSTATUS samba_init_module(void);
+NTSTATUS samba_init_module(TALLOC_CTX *ctx);
/* this needs to be a string which is not in the C library. We
previously used "init_module", but that meant that modules which
@@ -44,7 +44,7 @@ init_module_fn load_module(const char *path, bool is_probe, void **handle);
*
* @return true if all functions ran successfully, false otherwise
*/
-bool run_init_functions(init_module_fn *fns);
+bool run_init_functions(TALLOC_CTX *ctx, init_module_fn *fns);
/**
* Load the initialization functions from DSO files for a specific subsystem.
diff --git a/libcli/echo/tests/echo.c b/libcli/echo/tests/echo.c
index 6424c810016..8e5150403ee 100644
--- a/libcli/echo/tests/echo.c
+++ b/libcli/echo/tests/echo.c
@@ -26,7 +26,7 @@
#include "libcli/util/ntstatus.h"
#include "libcli/echo/libecho.h"
-NTSTATUS torture_libcli_echo_init(void);
+NTSTATUS torture_libcli_echo_init(TALLOC_CTX *);
/* Basic test function that sends an echo request and checks the reply */
static bool echo_udp_basic(struct torture_context *tctx, const char *address)
@@ -81,7 +81,7 @@ static bool torture_echo_udp(struct torture_context *tctx)
}
/* Test suite that bundles all the libecho tests */
-NTSTATUS torture_libcli_echo_init(void)
+NTSTATUS torture_libcli_echo_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite;
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
index 88c7705c3c2..ad36f000077 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
@@ -259,7 +259,7 @@ static bool $name\__op_interface_by_name(struct dcesrv_interface *iface, const c
return false;
}
-NTSTATUS dcerpc_server_$name\_init(void)
+NTSTATUS dcerpc_server_$name\_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
static const struct dcesrv_endpoint_server ep_server = {
@@ -296,7 +296,7 @@ sub ParseInterface($)
my($interface) = shift;
my $count = 0;
- $res .= "NTSTATUS dcerpc_server_$interface->{NAME}\_init(void);\n";
+ $res .= "NTSTATUS dcerpc_server_$interface->{NAME}\_init(TALLOC_CTX *);\n";
$res .= "\n";
if (!defined $interface->{PROPERTIES}->{uuid}) {
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index ba6245d6210..54e9433c2d3 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -392,7 +392,7 @@ bool load_auth_module(struct auth_context *auth_context,
/* Initialise static modules if not done so yet */
if(!initialised_static_modules) {
- static_init_auth;
+ static_init_auth(NULL);
initialised_static_modules = True;
}
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c
index 74807993cb7..0fa95d9f16d 100644
--- a/source3/auth/auth_builtin.c
+++ b/source3/auth/auth_builtin.c
@@ -167,7 +167,7 @@ static NTSTATUS auth_init_name_to_ntstatus(struct auth_context *auth_context, co
#endif /* DEVELOPER */
-NTSTATUS auth_builtin_init(void)
+NTSTATUS auth_builtin_init(TALLOC_CTX *mem_ctx)
{
smb_register_auth(AUTH_INTERFACE_VERSION, "guest", auth_init_guest);
#ifdef DEVELOPER
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index b3ff51806e3..40d717d91a9 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -406,7 +406,7 @@ static NTSTATUS auth_init_trustdomain(struct auth_context *auth_context, const c
return NT_STATUS_OK;
}
-NTSTATUS auth_domain_init(void)
+NTSTATUS auth_domain_init(TALLOC_CTX *mem_ctx)
{
smb_register_auth(AUTH_INTERFACE_VERSION, "trustdomain", auth_init_trustdomain);
smb_register_auth(AUTH_INTERFACE_VERSION, "ntdomain", auth_init_ntdomain);
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 634386f8d6d..4bcb7926c6e 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -188,7 +188,7 @@ static NTSTATUS auth_init_sam_netlogon3(struct auth_context *auth_context,
return NT_STATUS_OK;
}
-NTSTATUS auth_sam_init(void)
+NTSTATUS auth_sam_init(TALLOC_CTX *mem_ctx)
{
smb_register_auth(AUTH_INTERFACE_VERSION, "sam", auth_init_sam);
smb_register_auth(AUTH_INTERFACE_VERSION, "sam_ignoredomain", auth_init_sam_ignoredomain);
diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c
index 4c83c2aa823..46c8f9ffd62 100644
--- a/source3/auth/auth_samba4.c
+++ b/source3/auth/auth_samba4.c
@@ -391,8 +391,8 @@ static NTSTATUS auth_init_samba4(struct auth_context *auth_context,
return NT_STATUS_OK;
}
-NTSTATUS auth_samba4_init(void);
-NTSTATUS auth_samba4_init(void)
+NTSTATUS auth_samba4_init(TALLOC_CTX *mem_ctx);
+NTSTATUS auth_samba4_init(TALLOC_CTX *mem_ctx)
{
smb_register_auth(AUTH_INTERFACE_VERSION, "samba4",
auth_init_samba4);
diff --git a/source3/auth/auth_script.c b/source3/auth/auth_script.c
index dc8794bf169..fae55e98c24 100644
--- a/source3/auth/auth_script.c
+++ b/source3/auth/auth_script.c
@@ -180,8 +180,8 @@ static NTSTATUS auth_init_script(struct auth_context *auth_context, const char *
return NT_STATUS_OK;
}
-NTSTATUS auth_script_init(void);
-NTSTATUS auth_script_init(void)
+NTSTATUS auth_script_init(TALLOC_CTX *);
+NTSTATUS auth_script_init(TALLOC_CTX *ctx)
{
return smb_register_auth(AUTH_INTERFACE_VERSION, "script", auth_init_script);
}
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index a4e5b740bb7..08d4e002e3d 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -98,7 +98,7 @@ static NTSTATUS auth_init_unix(struct auth_context *auth_context, const char* pa
return NT_STATUS_OK;
}
-NTSTATUS auth_unix_init(void)
+NTSTATUS auth_unix_init(TALLOC_CTX *mem_ctx)
{
return smb_register_auth(AUTH_INTERFACE_VERSION, "unix", auth_init_unix);
}
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index e6a629658c0..6bf2118037d 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -178,7 +178,7 @@ static NTSTATUS auth_init_winbind(struct auth_context *auth_context, const char
return NT_STATUS_OK;
}
-NTSTATUS auth_winbind_init(void)
+NTSTATUS auth_winbind_init(TALLOC_CTX *mem_ctx)
{
return smb_register_auth(AUTH_INTERFACE_VERSION, "winbind", auth_init_winbind);
}
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index 348b882dc76..4a1aa24c53c 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -95,12 +95,12 @@ NTSTATUS auth_check_ntlm_password(TALLOC_CTX *mem_ctx,
/* The following definitions come from auth/auth_builtin.c */
-NTSTATUS auth_builtin_init(void);
+NTSTATUS auth_builtin_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from auth/auth_domain.c */
void attempt_machine_password_change(void);
-NTSTATUS auth_domain_init(void);
+NTSTATUS auth_domain_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from auth/auth_generic.c */
@@ -149,11 +149,11 @@ NTSTATUS check_sam_security_info3(const DATA_BLOB *challenge,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
struct netr_SamInfo3 **pinfo3);
-NTSTATUS auth_sam_init(void);
+NTSTATUS auth_sam_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from auth/auth_unix.c */
-NTSTATUS auth_unix_init(void);
+NTSTATUS auth_unix_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from auth/auth_util.c */
struct tsocket_address;
@@ -302,7 +302,7 @@ NTSTATUS do_map_to_guest_server_info(TALLOC_CTX *mem_ctx,
/* The following definitions come from auth/auth_winbind.c */
-NTSTATUS auth_winbind_init(void);
+NTSTATUS auth_winbind_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from auth/server_info.c */
@@ -409,6 +409,6 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
/* The following definitions come from auth/auth_samba4.c */
-NTSTATUS auth_samba4_init(void);
+NTSTATUS auth_samba4_init(TALLOC_CTX *mem_ctx);
#endif /* _AUTH_PROTO_H_ */
diff --git a/source3/include/auth.h b/source3/include/auth.h
index 406c2c5231e..b7223c15036 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -140,7 +140,8 @@ enum session_key_use_intent {
/* Changed from 1 -> 2 to add the logon_parameters field. */
/* Changed from 2 -> 3 when we reworked many auth structures to use IDL or be in common with Samba4 */
/* Changed from 3 -> 4 when we reworked added the flags */
-#define AUTH_INTERFACE_VERSION 4
+/* Changed from 4 -> 5 as module init functions now take a TALLOC_CTX * */
+#define AUTH_INTERFACE_VERSION 5
#include "auth/proto.h"
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
index c379eba3700..75d2e45b174 100644
--- a/source3/include/idmap.h
+++ b/source3/include/idmap.h
@@ -27,8 +27,9 @@
/* Updated to 4, completely new interface, SSS */
/* Updated to 5, simplified interface by Volker */
+/* Updated to 6, modules now take TALLOC_CTX * init parameter. */
-#define SMB_IDMAP_INTERFACE_VERSION 5
+#define SMB_IDMAP_INTERFACE_VERSION 6
#include "librpc/gen_ndr/idmap.h"
diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h
index 54b4399056a..448f8847be9 100644
--- a/source3/include/nss_info.h
+++ b/source3/include/nss_info.h
@@ -90,7 +90,7 @@ NTSTATUS nss_close( const char *parameters );
/* The following definitions come from winbindd/nss_info_template.c */
-NTSTATUS nss_info_template_init( void );
+NTSTATUS nss_info_template_init(TALLOC_CTX *mem_ctx);
#endif /* _IDMAP_NSS_H_ */
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 8175829b387..dcf806be8c0 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -418,9 +418,10 @@ enum pdb_policy_type {
* Changed to 23, new idmap control functions
* Changed to 24, removed uid_to_sid and gid_to_sid, replaced with id_to_sid
* Leave at 24, add optional get_trusteddom_creds()
+ * Change to 25, loadable modules now have a TALLOC_CTX * parameter in init.
*/
-#define PASSDB_INTERFACE_VERSION 24
+#define PASSDB_INTERFACE_VERSION 25
struct pdb_methods
{
diff --git a/source3/include/smb_perfcount.h b/source3/include/smb_perfcount.h
index 9c83147d042..efefb3c00b8 100644
--- a/source3/include/smb_perfcount.h
+++ b/source3/include/smb_perfcount.h
@@ -20,7 +20,8 @@
#ifndef _SMB_PERFCOUNT_H_
#define _SMB_PERFCOUNT_H_
-#define SMB_PERFCOUNTER_INTERFACE_VERSION 1
+/* Change to 2, loadable modules now take a TALLOC_CTX * parameter. */
+#define SMB_PERFCOUNTER_INTERFACE_VERSION 2
struct smb_perfcount_data{
struct smb_perfcount_handlers *handlers;
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 0810fc29fc8..f6df93a6acf 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -195,8 +195,9 @@
/* Version 35 - Add bool use_ofd_locks to struct files_struct */
/* Bump to version 36 - Samba 4.6 will ship with that */
/* Version 36 - Remove is_offline and set_offline */
+/* Version 37 - Module init functions now take a TALLOC_CTX * parameter. */
-#define SMB_VFS_INTERFACE_VERSION 36
+#define SMB_VFS_INTERFACE_VERSION 37
/*
All intercepted VFS operations must be declared as static functions inside module source
diff --git a/source3/modules/perfcount_test.c b/source3/modules/perfcount_test.c
index ccc74dde62e..1e006c34bad 100644
--- a/source3/modules/perfcount_test.c
+++ b/source3/modules/perfcount_test.c
@@ -386,7 +386,7 @@ static struct smb_perfcount_handlers perfcount_test_handlers = {
};
static_decl_perfcount;
-NTSTATUS perfcount_test_init(void)
+NTSTATUS perfcount_test_init(TALLOC_CTX *ctx)
{
return smb_register_perfcounter(SMB_PERFCOUNTER_INTERFACE_VERSION,
"pc_test", &perfcount_test_handlers);
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index a71bfdce5be..68abc33012c 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -455,7 +455,7 @@ static struct vfs_fn_pointers vfs_acl_tdb_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_acl_tdb_init(void)
+NTSTATUS vfs_acl_tdb_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "acl_tdb",
&vfs_acl_tdb_fns);
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index bb2e565a3e1..96bd0166655 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -295,7 +295,7 @@ static struct vfs_fn_pointers vfs_acl_xattr_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_acl_xattr_init(void)
+NTSTATUS vfs_acl_xattr_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "acl_xattr",
&vfs_acl_xattr_fns);
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index 5838fd01c2f..f34495b87bc 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -1107,8 +1107,8 @@ static struct vfs_fn_pointers vfs_afsacl_fns = {
.sys_acl_blob_get_fd_fn = afsacl_sys_acl_blob_get_fd
};
-NTSTATUS vfs_afsacl_init(void);
-NTSTATUS vfs_afsacl_init(void)
+NTSTATUS vfs_afsacl_init(TALLOC_CTX *);
+NTSTATUS vfs_afsacl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "afsacl",
&vfs_afsacl_fns);
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index e9ba4a3791d..8e47531ebd1 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -919,8 +919,8 @@ static struct vfs_fn_pointers vfs_aio_fork_fns = {
.fsync_recv_fn = aio_fork_fsync_recv,
};
-NTSTATUS vfs_aio_fork_init(void);
-NTSTATUS vfs_aio_fork_init(void)
+NTSTATUS vfs_aio_fork_init(TALLOC_CTX *);
+NTSTATUS vfs_aio_fork_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"aio_fork", &vfs_aio_fork_fns);
diff --git a/source3/modules/vfs_aio_linux.c b/source3/modules/vfs_aio_linux.c
index 55ef1df2c8c..e89c2905bad 100644
--- a/source3/modules/vfs_aio_linux.c
+++ b/source3/modules/vfs_aio_linux.c
@@ -339,7 +339,7 @@ static struct vfs_fn_pointers vfs_aio_linux_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_aio_linux_init(void)
+NTSTATUS vfs_aio_linux_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"aio_linux", &vfs_aio_linux_fns);
diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c
index 97ae86f999f..1d9346cfb65 100644
--- a/source3/modules/vfs_aio_pthread.c
+++ b/source3/modules/vfs_aio_pthread.c
@@ -496,8 +496,8 @@ static struct vfs_fn_pointers vfs_aio_pthread_fns = {
#endif
};
-NTSTATUS vfs_aio_pthread_init(void);
-NTSTATUS vfs_aio_pthread_init(void)
+NTSTATUS vfs_aio_pthread_init(TALLOC_CTX *);
+NTSTATUS vfs_aio_pthread_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"aio_pthread", &vfs_aio_pthread_fns);
diff --git a/source3/modules/vfs_aixacl.c b/source3/modules/vfs_aixacl.c
index 459ea6f2979..169058f2afc 100644
--- a/source3/modules/vfs_aixacl.c
+++ b/source3/modules/vfs_aixacl.c
@@ -189,8 +189,8 @@ static struct vfs_fn_pointers vfs_aixacl_fns = {
.sys_acl_delete_def_file_fn = aixacl_sys_acl_delete_def_file,
};
-NTSTATUS vfs_aixacl_init(void);
-NTSTATUS vfs_aixacl_init(void)
+NTSTATUS vfs_aixacl_init(TALLOC_CTX *);
+NTSTATUS vfs_aixacl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "aixacl",
&vfs_aixacl_fns);
diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c
index c4a026459f3..aaf6e293ec3 100644
--- a/source3/modules/vfs_aixacl2.c
+++ b/source3/modules/vfs_aixacl2.c
@@ -559,8 +559,8 @@ static struct vfs_fn_pointers vfs_aixacl2_fns = {
.sys_acl_delete_def_file_fn = aixjfs2_sys_acl_delete_def_file
};
-NTSTATUS vfs_aixacl2_init(void);
-NTSTATUS vfs_aixacl2_init(void)
+NTSTATUS vfs_aixacl2_init(TALLOC_CTX *);
+NTSTATUS vfs_aixacl2_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, AIXACL2_MODULE_NAME,
&vfs_aixacl2_fns);
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index cef3bb5ab4f..12477d5b01f 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -294,7 +294,7 @@ static struct vfs_fn_pointers vfs_audit_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_audit_init(void)
+NTSTATUS vfs_audit_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "audit",
&vfs_audit_fns);
diff --git a/source3/modules/vfs_btrfs.c b/source3/modules/vfs_btrfs.c
index 154fcc32ba9..ab4fd99ba2c 100644
--- a/source3/modules/vfs_btrfs.c
+++ b/source3/modules/vfs_btrfs.c
@@ -676,8 +676,8 @@ static struct vfs_fn_pointers btrfs_fns = {
.snap_delete_fn = btrfs_snap_delete,
};
-NTSTATUS vfs_btrfs_init(void);
-NTSTATUS vfs_btrfs_init(void)
+NTSTATUS vfs_btrfs_init(TALLOC_CTX *);
+NTSTATUS vfs_btrfs_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"btrfs", &btrfs_fns);
diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c
index cb8b3280582..526a0574c5f 100644
--- a/source3/modules/vfs_cacheprime.c
+++ b/source3/modules/vfs_cacheprime.c
@@ -189,8 +189,8 @@ static struct vfs_fn_pointers vfs_cacheprime_fns = {
* -------------------------------------------------------------------------
*/
-NTSTATUS vfs_cacheprime_init(void);
-NTSTATUS vfs_cacheprime_init(void)
+NTSTATUS vfs_cacheprime_init(TALLOC_CTX *);
+NTSTATUS vfs_cacheprime_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE,
&vfs_cacheprime_fns);
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index eece1986f90..03608301bf5 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -694,8 +694,8 @@ static struct vfs_fn_pointers vfs_cap_fns = {
.fsetxattr_fn = cap_fsetxattr
};
-NTSTATUS vfs_cap_init(void);
-NTSTATUS vfs_cap_init(void)
+NTSTATUS vfs_cap_init(TALLOC_CTX *);
+NTSTATUS vfs_cap_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "cap",
&vfs_cap_fns);
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 0ee7c36a361..9a283710fcb 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -2427,7 +2427,7 @@ static struct vfs_fn_pointers vfs_catia_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_catia_init(void)
+NTSTATUS vfs_catia_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index b74c2143e91..d819fe18dc3 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1433,8 +1433,8 @@ static struct vfs_fn_pointers ceph_fns = {
.aio_force_fn = cephwrap_aio_force,
};
-NTSTATUS vfs_ceph_init(void);
-NTSTATUS vfs_ceph_init(void)
+NTSTATUS vfs_ceph_init(TALLOC_CTX *);
+NTSTATUS vfs_ceph_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"ceph", &ceph_fns);
diff --git a/source3/modules/vfs_commit.c b/source3/modules/vfs_commit.c
index b870eb24fc6..340276a7900 100644
--- a/source3/modules/vfs_commit.c
+++ b/source3/modules/vfs_commit.c
@@ -403,8 +403,8 @@ static struct vfs_fn_pointers vfs_commit_fns = {
.ftruncate_fn = commit_ftruncate
};
-NTSTATUS vfs_commit_init(void);
-NTSTATUS vfs_commit_init(void)
+NTSTATUS vfs_commit_init(TALLOC_CTX *);
+NTSTATUS vfs_commit_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE,
&vfs_commit_fns);
diff --git a/source3/modules/vfs_crossrename.c b/source3/modules/vfs_crossrename.c
index c7534b43198..4daa82c5e98 100644
--- a/source3/modules/vfs_crossrename.c
+++ b/source3/modules/vfs_crossrename.c
@@ -198,8 +198,8 @@ static struct vfs_fn_pointers vfs_crossrename_fns = {
.rename_fn = crossrename_rename
};
-NTSTATUS vfs_crossrename_init(void);
-NTSTATUS vfs_crossrename_init(void)
+NTSTATUS vfs_crossrename_init(TALLOC_CTX *);
+NTSTATUS vfs_crossrename_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE,
&vfs_crossrename_fns);
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 73af4f74348..d6601205610 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2961,8 +2961,8 @@ static struct vfs_fn_pointers vfs_default_fns = {
.durable_reconnect_fn = vfswrap_durable_reconnect,
};
-NTSTATUS vfs_default_init(void);
-NTSTATUS vfs_default_init(void)
+NTSTATUS vfs_default_init(TALLOC_CTX *);
+NTSTATUS vfs_default_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
DEFAULT_VFS_MODULE_NAME, &vfs_default_fns);
diff --git a/source3/modules/vfs_default_quota.c b/source3/modules/vfs_default_quota.c
index c8d718cb5b9..6f1d2a7f619 100644
--- a/source3/modules/vfs_default_quota.c
+++ b/source3/modules/vfs_default_quota.c
@@ -225,8 +225,8 @@ static struct vfs_fn_pointers vfs_default_quota_fns = {
.set_quota_fn = default_quota_set_quota
};
-NTSTATUS vfs_default_quota_init(void);
-NTSTATUS vfs_default_quota_init(void)
+NTSTATUS vfs_default_quota_init(TALLOC_CTX *);
+NTSTATUS vfs_default_quota_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, DEFAULT_QUOTA_NAME,
&vfs_default_quota_fns);
diff --git a/source3/modules/vfs_dfs_samba4.c b/source3/modules/vfs_dfs_samba4.c
index e77a9933317..0bf1a29c8c6 100644
--- a/source3/modules/vfs_dfs_samba4.c
+++ b/source3/modules/vfs_dfs_samba4.c
@@ -135,8 +135,8 @@ static struct vfs_fn_pointers vfs_dfs_samba4_fns = {
.get_dfs_referrals_fn = dfs_samba4_get_referrals,
};
-NTSTATUS vfs_dfs_samba4_init(void);
-NTSTATUS vfs_dfs_samba4_init(void)
+NTSTATUS vfs_dfs_samba4_init(TALLOC_CTX *);
+NTSTATUS vfs_dfs_samba4_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c
index cd5597a3b40..fc35186a402 100644
--- a/source3/modules/vfs_dirsort.c
+++ b/source3/modules/vfs_dirsort.c
@@ -379,7 +379,7 @@ static struct vfs_fn_pointers vfs_dirsort_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_dirsort_init(void)
+NTSTATUS vfs_dirsort_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "dirsort",
&vfs_dirsort_fns);
diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c
index e42d0098b32..b0e51987523 100644
--- a/source3/modules/vfs_expand_msdfs.c
+++ b/source3/modules/vfs_expand_msdfs.c
@@ -226,8 +226,8 @@ static struct vfs_fn_pointers vfs_expand_msdfs_fns = {
.readlink_fn = expand_msdfs_readlink
};
-NTSTATUS vfs_expand_msdfs_init(void);
-NTSTATUS vfs_expand_msdfs_init(void)
+NTSTATUS vfs_expand_msdfs_init(TALLOC_CTX *);
+NTSTATUS vfs_expand_msdfs_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "expand_msdfs",
&vfs_expand_msdfs_fns);
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index 0d8ca59732d..7d1fe273978 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -371,7 +371,7 @@ static struct vfs_fn_pointers vfs_extd_audit_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_extd_audit_init(void)
+NTSTATUS vfs_extd_audit_init(TALLOC_CTX *ctx)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"extd_audit", &vfs_extd_audit_fns);
diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c
index 55ff7db37df..62b53b6dd61 100644
--- a/source3/modules/vfs_fake_acls.c
+++ b/source3/modules/vfs_fake_acls.c
@@ -508,8 +508,8 @@ static struct vfs_fn_pointers vfs_fake_acls_fns = {
};
-NTSTATUS vfs_fake_acls_init(void);
-NTSTATUS vfs_fake_acls_init(void)
+NTSTATUS vfs_fake_acls_init(TALLOC_CTX *);
+NTSTATUS vfs_fake_acls_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_acls",
&vfs_fake_acls_fns);
diff --git a/source3/modules/vfs_fake_dfq.c b/source3/modules/vfs_fake_dfq.c
index 51ab7bb46d9..f13ec7de40c 100644
--- a/source3/modules/vfs_fake_dfq.c
+++ b/source3/modules/vfs_fake_dfq.c
@@ -175,7 +175,7 @@ struct vfs_fn_pointers vfs_fake_dfq_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_fake_dfq_init(void)
+NTSTATUS vfs_fake_dfq_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_dfq",
&vfs_fake_dfq_fns);
diff --git a/source3/modules/vfs_fake_perms.c b/source3/modules/vfs_fake_perms.c
index 8eb6e3c7792..299bb48ae13 100644
--- a/source3/modules/vfs_fake_perms.c
+++ b/source3/modules/vfs_fake_perms.c
@@ -100,8 +100,8 @@ static struct vfs_fn_pointers vfs_fake_perms_fns = {
.fstat_fn = fake_perms_fstat
};
-NTSTATUS vfs_fake_perms_init(void);
-NTSTATUS vfs_fake_perms_init(void)
+NTSTATUS vfs_fake_perms_init(TALLOC_CTX *);
+NTSTATUS vfs_fake_perms_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fake_perms",
&vfs_fake_perms_fns);
diff --git a/source3/modules/vfs_fileid.c b/source3/modules/vfs_fileid.c
index f274059f93f..f751486535a 100644
--- a/source3/modules/vfs_fileid.c
+++ b/source3/modules/vfs_fileid.c
@@ -258,8 +258,8 @@ static struct vfs_fn_pointers vfs_fileid_fns = {
.file_id_create_fn = fileid_file_id_create
};
-NTSTATUS vfs_fileid_init(void);
-NTSTATUS vfs_fileid_init(void)
+NTSTATUS vfs_fileid_init(TALLOC_CTX *);
+NTSTATUS vfs_fileid_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index b74714586f6..1c1b7d76c14 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -5428,8 +5428,8 @@ static struct vfs_fn_pointers vfs_fruit_fns = {
.fset_nt_acl_fn = fruit_fset_nt_acl,
};
-NTSTATUS vfs_fruit_init(void);
-NTSTATUS vfs_fruit_init(void)
+NTSTATUS vfs_fruit_init(TALLOC_CTX *);
+NTSTATUS vfs_fruit_init(TALLOC_CTX *ctx)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "fruit",
&vfs_fruit_fns);
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 613ce6cc62a..6614fbba903 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -2560,7 +2560,7 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_full_audit_init(void)
+NTSTATUS vfs_full_audit_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 1c9be2d97f1..628dea79336 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -1488,8 +1488,8 @@ static struct vfs_fn_pointers glusterfs_fns = {
.durable_reconnect_fn = NULL,
};
-NTSTATUS vfs_glusterfs_init(void);
-NTSTATUS vfs_glusterfs_init(void)
+NTSTATUS vfs_glusterfs_init(TALLOC_CTX *);
+NTSTATUS vfs_glusterfs_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"glusterfs", &glusterfs_fns);
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index f7434c95d82..d1d59ce6321 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -2513,8 +2513,8 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
.ftruncate_fn = vfs_gpfs_ftruncate
};
-NTSTATUS vfs_gpfs_init(void);
-NTSTATUS vfs_gpfs_init(void)
+NTSTATUS vfs_gpfs_init(TALLOC_CTX *);
+NTSTATUS vfs_gpfs_init(TALLOC_CTX *ctx)
{
int ret;
diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c
index df27c89f948..d91657a00a6 100644
--- a/source3/modules/vfs_hpuxacl.c
+++ b/source3/modules/vfs_hpuxacl.c
@@ -1165,7 +1165,7 @@ static struct vfs_fn_pointers hpuxacl_fns = {
.sys_acl_delete_def_file_fn = hpuxacl_sys_acl_delete_def_file,
};
-NTSTATUS vfs_hpuxacl_init(void)
+NTSTATUS vfs_hpuxacl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "hpuxacl",
&hpuxacl_fns);
diff --git a/source3/modules/vfs_linux_xfs_sgid.c b/source3/modules/vfs_linux_xfs_sgid.c
index 0c0507b0c5a..841d7c3c4b1 100644
--- a/source3/modules/vfs_linux_xfs_sgid.c
+++ b/source3/modules/vfs_linux_xfs_sgid.c
@@ -108,8 +108,8 @@ static struct vfs_fn_pointers linux_xfs_sgid_fns = {
.chmod_acl_fn = linux_xfs_sgid_chmod_acl,
};
-NTSTATUS vfs_linux_xfs_sgid_init(void);
-NTSTATUS vfs_linux_xfs_sgid_init(void)
+NTSTATUS vfs_linux_xfs_sgid_init(TALLOC_CTX *);
+NTSTATUS vfs_linux_xfs_sgid_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"linux_xfs_sgid", &linux_xfs_sgid_fns);
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index d6a93f8445f..794644ed493 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -2431,8 +2431,8 @@ static struct vfs_fn_pointers vfs_mh_fns = {
/* aio operations */
};
-NTSTATUS vfs_media_harmony_init(void);
-NTSTATUS vfs_media_harmony_init(void)
+NTSTATUS vfs_media_harmony_init(TALLOC_CTX *);
+NTSTATUS vfs_media_harmony_init(TALLOC_CTX *ctx)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"media_harmony", &vfs_mh_fns);
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index 2b67b913246..5715c6dd6ac 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -480,8 +480,8 @@ static struct vfs_fn_pointers vfs_netatalk_fns = {
.lchown_fn = atalk_lchown,
};
-NTSTATUS vfs_netatalk_init(void);
-NTSTATUS vfs_netatalk_init(void)
+NTSTATUS vfs_netatalk_init(TALLOC_CTX *);
+NTSTATUS vfs_netatalk_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "netatalk",
&vfs_netatalk_fns);
diff --git a/source3/modules/vfs_nfs4acl_xattr.c b/source3/modules/vfs_nfs4acl_xattr.c
index 273c9265a35..a22ae7fc284 100644
--- a/source3/modules/vfs_nfs4acl_xattr.c
+++ b/source3/modules/vfs_nfs4acl_xattr.c
@@ -645,8 +645,8 @@ static struct vfs_fn_pointers nfs4acl_xattr_fns = {
.fset_nt_acl_fn = nfs4acl_xattr_fset_nt_acl,
};
-NTSTATUS vfs_nfs4acl_xattr_init(void);
-NTSTATUS vfs_nfs4acl_xattr_init(void)
+NTSTATUS vfs_nfs4acl_xattr_init(TALLOC_CTX *);
+NTSTATUS vfs_nfs4acl_xattr_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "nfs4acl_xattr",
&nfs4acl_xattr_fns);
diff --git a/source3/modules/vfs_offline.c b/source3/modules/vfs_offline.c
index e2d66fa930e..e8cb4394b3c 100644
--- a/source3/modules/vfs_offline.c
+++ b/source3/modules/vfs_offline.c
@@ -49,8 +49,8 @@ static struct vfs_fn_pointers offline_fns = {
.fget_dos_attributes_fn = offline_fget_dos_attributes,
};
-NTSTATUS vfs_offline_init(void);
-NTSTATUS vfs_offline_init(void)
+NTSTATUS vfs_offline_init(TALLOC_CTX *);
+NTSTATUS vfs_offline_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "offline",
&offline_fns);
diff --git a/source3/modules/vfs_posix_eadb.c b/source3/modules/vfs_posix_eadb.c
index 2c7717a508b..129f0720d55 100644
--- a/source3/modules/vfs_posix_eadb.c
+++ b/source3/modules/vfs_posix_eadb.c
@@ -434,7 +434,7 @@ static struct vfs_fn_pointers vfs_posix_eadb_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_posix_eadb_init(void)
+NTSTATUS vfs_posix_eadb_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "posix_eadb",
&vfs_posix_eadb_fns);
diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c
index aeadcbcf43d..85d84a578f5 100644
--- a/source3/modules/vfs_posixacl.c
+++ b/source3/modules/vfs_posixacl.c
@@ -380,8 +380,8 @@ static struct vfs_fn_pointers posixacl_fns = {
.sys_acl_delete_def_file_fn = posixacl_sys_acl_delete_def_file,
};
-NTSTATUS vfs_posixacl_init(void);
-NTSTATUS vfs_posixacl_init(void)
+NTSTATUS vfs_posixacl_init(TALLOC_CTX *);
+NTSTATUS vfs_posixacl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "posixacl",
&posixacl_fns);
diff --git a/source3/modules/vfs_posixacl.h b/source3/modules/vfs_posixacl.h
index b0fe841e1ba..59d3dc964bd 100644
--- a/source3/modules/vfs_posixacl.h
+++ b/source3/modules/vfs_posixacl.h
@@ -42,7 +42,7 @@ int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
int posixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
const char *path);
-NTSTATUS vfs_posixacl_init(void);
+NTSTATUS vfs_posixacl_init(TALLOC_CTX *);
#endif
diff --git a/source3/modules/vfs_prealloc.c b/source3/modules/vfs_prealloc.c
index 7b96d362a35..cec537c88ef 100644
--- a/source3/modules/vfs_prealloc.c
+++ b/source3/modules/vfs_prealloc.c
@@ -213,8 +213,8 @@ static struct vfs_fn_pointers prealloc_fns = {
.connect_fn = prealloc_connect,
};
-NTSTATUS vfs_prealloc_init(void);
-NTSTATUS vfs_prealloc_init(void)
+NTSTATUS vfs_prealloc_init(TALLOC_CTX *);
+NTSTATUS vfs_prealloc_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
MODULE, &prealloc_fns);
diff --git a/source3/modules/vfs_preopen.c b/source3/modules/vfs_preopen.c
index 8bf30b6745e..12ec4763a62 100644
--- a/source3/modules/vfs_preopen.c
+++ b/source3/modules/vfs_preopen.c
@@ -449,8 +449,8 @@ static struct vfs_fn_pointers vfs_preopen_fns = {
.open_fn = preopen_open
};
-NTSTATUS vfs_preopen_init(void);
-NTSTATUS vfs_preopen_init(void)
+NTSTATUS vfs_preopen_init(TALLOC_CTX *);
+NTSTATUS vfs_preopen_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"preopen", &vfs_preopen_fns);
diff --git a/source3/modules/vfs_readahead.c b/source3/modules/vfs_readahead.c
index 8cb85c75614..129ac1b3340 100644
--- a/source3/modules/vfs_readahead.c
+++ b/source3/modules/vfs_readahead.c
@@ -178,8 +178,8 @@ static struct vfs_fn_pointers vfs_readahead_fns = {
Module initialization boilerplate.
*******************************************************************/
-NTSTATUS vfs_readahead_init(void);
-NTSTATUS vfs_readahead_init(void)
+NTSTATUS vfs_readahead_init(TALLOC_CTX *);
+NTSTATUS vfs_readahead_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "readahead",
&vfs_readahead_fns);
diff --git a/source3/modules/vfs_readonly.c b/source3/modules/vfs_readonly.c
index 445f9478103..cde8ef973ca 100644
--- a/source3/modules/vfs_readonly.c
+++ b/source3/modules/vfs_readonly.c
@@ -105,8 +105,8 @@ static struct vfs_fn_pointers vfs_readonly_fns = {
.connect_fn = readonly_connect
};
-NTSTATUS vfs_readonly_init(void);
-NTSTATUS vfs_readonly_init(void)
+NTSTATUS vfs_readonly_init(TALLOC_CTX *);
+NTSTATUS vfs_readonly_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE_NAME,
&vfs_readonly_fns);
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index dfc3b9cc0f3..5032f269cc0 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -662,8 +662,8 @@ static struct vfs_fn_pointers vfs_recycle_fns = {
.unlink_fn = recycle_unlink
};
-NTSTATUS vfs_recycle_init(void);
-NTSTATUS vfs_recycle_init(void)
+NTSTATUS vfs_recycle_init(TALLOC_CTX *);
+NTSTATUS vfs_recycle_init(TALLOC_CTX *ctx)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "recycle",
&vfs_recycle_fns);
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c
index dae70f555e5..59f9e528f51 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -309,8 +309,8 @@ static struct vfs_fn_pointers vfs_shadow_copy_fns = {
.get_shadow_copy_data_fn = shadow_copy_get_shadow_copy_data,
};
-NTSTATUS vfs_shadow_copy_init(void);
-NTSTATUS vfs_shadow_copy_init(void)
+NTSTATUS vfs_shadow_copy_init(TALLOC_CTX *);
+NTSTATUS vfs_shadow_copy_init(TALLOC_CTX *ctx)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"shadow_copy", &vfs_shadow_copy_fns);
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 7cacac81c1c..6777d7a8208 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -3104,8 +3104,8 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = {
.connectpath_fn = shadow_copy2_connectpath,
};
-NTSTATUS vfs_shadow_copy2_init(void);
-NTSTATUS vfs_shadow_copy2_init(void)
+NTSTATUS vfs_shadow_copy2_init(TALLOC_CTX *);
+NTSTATUS vfs_shadow_copy2_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"shadow_copy2", &vfs_shadow_copy2_fns);
diff --git a/source3/modules/vfs_shell_snap.c b/source3/modules/vfs_shell_snap.c
index 2273652b360..97bcf643113 100644
--- a/source3/modules/vfs_shell_snap.c
+++ b/source3/modules/vfs_shell_snap.c
@@ -193,8 +193,8 @@ static struct vfs_fn_pointers shell_snap_fns = {
.snap_delete_fn = shell_snap_delete,
};
-NTSTATUS vfs_shell_snap_init(void);
-NTSTATUS vfs_shell_snap_init(void)
+NTSTATUS vfs_shell_snap_init(TALLOC_CTX *);
+NTSTATUS vfs_shell_snap_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"shell_snap", &shell_snap_fns);
diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c
index a0d3d91e306..69e2ab90a62 100644
--- a/source3/modules/vfs_snapper.c
+++ b/source3/modules/vfs_snapper.c
@@ -2974,8 +2974,8 @@ static struct vfs_fn_pointers snapper_fns = {
.get_real_filename_fn = snapper_gmt_get_real_filename,
};
-NTSTATUS vfs_snapper_init(void);
-NTSTATUS vfs_snapper_init(void)
+NTSTATUS vfs_snapper_init(TALLOC_CTX *);
+NTSTATUS vfs_snapper_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"snapper", &snapper_fns);
diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c
index 6367794d961..e5a581c05f8 100644
--- a/source3/modules/vfs_solarisacl.c
+++ b/source3/modules/vfs_solarisacl.c
@@ -766,8 +766,8 @@ static struct vfs_fn_pointers solarisacl_fns = {
.sys_acl_delete_def_file_fn = solarisacl_sys_acl_delete_def_file,
};
-NTSTATUS vfs_solarisacl_init(void);
-NTSTATUS vfs_solarisacl_init(void)
+NTSTATUS vfs_solarisacl_init(TALLOC_CTX *);
+NTSTATUS vfs_solarisacl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "solarisacl",
&solarisacl_fns);
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index aa54b8d9a21..58d3a06c310 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -1059,8 +1059,8 @@ static struct vfs_fn_pointers vfs_streams_depot_fns = {
.streaminfo_fn = streams_depot_streaminfo,
};
-NTSTATUS vfs_streams_depot_init(void);
-NTSTATUS vfs_streams_depot_init(void)
+NTSTATUS vfs_streams_depot_init(TALLOC_CTX *);
+NTSTATUS vfs_streams_depot_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "streams_depot",
&vfs_streams_depot_fns);
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 66926367823..2943e521264 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -1158,8 +1158,8 @@ static struct vfs_fn_pointers vfs_streams_xattr_fns = {
.streaminfo_fn = streams_xattr_streaminfo,
};
-NTSTATUS vfs_streams_xattr_init(void);
-NTSTATUS vfs_streams_xattr_init(void)
+NTSTATUS vfs_streams_xattr_init(TALLOC_CTX *);
+NTSTATUS vfs_streams_xattr_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "streams_xattr",
&vfs_streams_xattr_fns);
diff --git a/source3/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c
index 8b5d79c63d0..381b80bf87e 100644
--- a/source3/modules/vfs_syncops.c
+++ b/source3/modules/vfs_syncops.c
@@ -295,7 +295,7 @@ static struct vfs_fn_pointers vfs_syncops_fns = {
};
static_decl_vfs;
-NTSTATUS vfs_syncops_init(void)
+NTSTATUS vfs_syncops_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 986fe798d7f..2ac3d97a200 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -2680,8 +2680,8 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
};
-NTSTATUS vfs_time_audit_init(void);
-NTSTATUS vfs_time_audit_init(void)
+NTSTATUS vfs_time_audit_init(TALLOC_CTX *);
+NTSTATUS vfs_time_audit_init(TALLOC_CTX *ctx)
{
smb_vfs_assert_all_fns(&vfs_time_audit_fns, "time_audit");
diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c
index 97f4d5c30bc..83edc15205e 100644
--- a/source3/modules/vfs_tru64acl.c
+++ b/source3/modules/vfs_tru64acl.c
@@ -480,8 +480,8 @@ static struct vfs_fn_pointers tru64acl_fns = {
.sys_acl_delete_def_file_fn = tru64acl_sys_acl_delete_def_file,
};
-NTSTATUS vfs_tru64acl_init(void);
-NTSTATUS vfs_tru64acl_init(void)
+NTSTATUS vfs_tru64acl_init(TALLOC_CTX *);
+NTSTATUS vfs_tru64acl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "tru64acl",
&tru64acl_fns);
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index eba19ff71f5..b3493e7512d 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -608,8 +608,8 @@ static struct vfs_fn_pointers tsmsm_fns = {
.fget_dos_attributes_fn = tsmsm_fget_dos_attributes,
};
-NTSTATUS vfs_tsmsm_init(void);
-NTSTATUS vfs_tsmsm_init(void)
+NTSTATUS vfs_tsmsm_init(TALLOC_CTX *);
+NTSTATUS vfs_tsmsm_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"tsmsm", &tsmsm_fns);
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c
index d8191e11599..ccafb882df7 100644
--- a/source3/modules/vfs_unityed_media.c
+++ b/source3/modules/vfs_unityed_media.c
@@ -1905,8 +1905,8 @@ static struct vfs_fn_pointers vfs_um_fns = {
.setxattr_fn = um_setxattr,
};
-NTSTATUS vfs_unityed_media_init(void);
-NTSTATUS vfs_unityed_media_init(void)
+NTSTATUS vfs_unityed_media_init(TALLOC_CTX *);
+NTSTATUS vfs_unityed_media_init(TALLOC_CTX *ctx)
{
NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,
"unityed_media", &vfs_um_fns);
diff --git a/source3/modules/vfs_vxfs.c b/source3/modules/vfs_vxfs.c
index feb3d49a3e6..f8b0dfa82c5 100644
--- a/source3/modules/vfs_vxfs.c
+++ b/source3/modules/vfs_vxfs.c
@@ -826,8 +826,8 @@ static struct vfs_fn_pointers vfs_vxfs_fns = {
.fsetxattr_fn = vxfs_fset_xattr,
};
-NTSTATUS vfs_vxfs_init(void);
-NTSTATUS vfs_vxfs_init(void)
+NTSTATUS vfs_vxfs_init(TALLOC_CTX *);
+NTSTATUS vfs_vxfs_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "vxfs",
&vfs_vxfs_fns);
diff --git a/source3/modules/vfs_worm.c b/source3/modules/vfs_worm.c
index 9638d960534..f7dfe734b86 100644
--- a/source3/modules/vfs_worm.c
+++ b/source3/modules/vfs_worm.c
@@ -86,8 +86,8 @@ static struct vfs_fn_pointers vfs_worm_fns = {
.create_file_fn = vfs_worm_create_file,
};
-NTSTATUS vfs_worm_init(void);
-NTSTATUS vfs_worm_init(void)
+NTSTATUS vfs_worm_init(TALLOC_CTX *);
+NTSTATUS vfs_worm_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 58acf446d2e..12ccbca5920 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -608,8 +608,8 @@ static struct vfs_fn_pointers vfs_xattr_tdb_fns = {
.connect_fn = xattr_tdb_connect,
};
-NTSTATUS vfs_xattr_tdb_init(void);
-NTSTATUS vfs_xattr_tdb_init(void)
+NTSTATUS vfs_xattr_tdb_init(TALLOC_CTX *);
+NTSTATUS vfs_xattr_tdb_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "xattr_tdb",
&vfs_xattr_tdb_fns);
diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c
index a0993fff79c..6eadf42e600 100644
--- a/source3/modules/vfs_zfsacl.c
+++ b/source3/modules/vfs_zfsacl.c
@@ -344,8 +344,8 @@ static struct vfs_fn_pointers zfsacl_fns = {
.fset_nt_acl_fn = zfsacl_fset_nt_acl,
};
-NTSTATUS vfs_zfsacl_init(void);
-NTSTATUS vfs_zfsacl_init(void)
+NTSTATUS vfs_zfsacl_init(TALLOC_CTX *);
+NTSTATUS vfs_zfsacl_init(TALLOC_CTX *ctx)
{
return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "zfsacl",
&zfsacl_fns);
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 36ae576eb20..49752dde659 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -51,7 +51,7 @@ static void lazy_initialize_passdb(void)
if(initialized) {
return;
}
- static_init_pdb;
+ static_init_pdb(NULL);
initialized = True;
}
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 951417583bc..c495448dcc5 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -6726,7 +6726,7 @@ NTSTATUS pdb_ldapsam_init_common(struct pdb_methods **pdb_method,
return NT_STATUS_OK;
}
-NTSTATUS pdb_ldapsam_init(void)
+NTSTATUS pdb_ldapsam_init(TALLOC_CTX *ctx)
{
NTSTATUS nt_status;
@@ -6738,7 +6738,7 @@ NTSTATUS pdb_ldapsam_init(void)
}
/* Let pdb_nds register backends */
- pdb_nds_init();
+ pdb_nds_init(ctx);
return NT_STATUS_OK;
}
diff --git a/source3/passdb/pdb_ldap.h b/source3/passdb/pdb_ldap.h
index e55b0a461b5..d83c2afbbba 100644
--- a/source3/passdb/pdb_ldap.h
+++ b/source3/passdb/pdb_ldap.h
@@ -60,7 +60,7 @@ struct ldapsam_privates {
const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
NTSTATUS pdb_ldapsam_init_common(struct pdb_methods **pdb_method, const char *location);
-NTSTATUS pdb_ldapsam_init(void);
+NTSTATUS pdb_ldapsam_init(TALLOC_CTX *);
int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
const char *user,
LDAPMessage ** result,
diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c
index 6d1637376de..6245ecbae2d 100644
--- a/source3/passdb/pdb_nds.c
+++ b/source3/passdb/pdb_nds.c
@@ -893,7 +893,7 @@ static NTSTATUS pdb_init_NDS_ldapsam(struct pdb_methods **pdb_method, const char
return nt_status;
}
-NTSTATUS pdb_nds_init(void)
+NTSTATUS pdb_nds_init(TALLOC_CTX *ctx)
{
NTSTATUS nt_status;
if (!NT_STATUS_IS_OK(nt_status = smb_register_passdb(PASSDB_INTERFACE_VERSION, "NDS_ldapsam", pdb_init_NDS_ldapsam)))
diff --git a/source3/passdb/pdb_nds.h b/source3/passdb/pdb_nds.h
index e73a3ba42b6..66d8319afed 100644
--- a/source3/passdb/pdb_nds.h
+++ b/source3/passdb/pdb_nds.h
@@ -34,6 +34,6 @@ int pdb_nds_set_password(
struct smbldap_state *ldap_state,
char *object_dn,
const char *pwd );
-NTSTATUS pdb_nds_init(void);
+NTSTATUS pdb_nds_init(TALLOC_CTX *);
#endif /* _PASSDB_PDB_NDS_H_ */
diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c
index 97c05c6224e..cfa492b442a 100644
--- a/source3/passdb/pdb_samba_dsdb.c
+++ b/source3/passdb/pdb_samba_dsdb.c
@@ -3090,8 +3090,8 @@ fail:
return status;
}
-NTSTATUS pdb_samba_dsdb_init(void);
-NTSTATUS pdb_samba_dsdb_init(void)
+NTSTATUS pdb_samba_dsdb_init(TALLOC_CTX *);
+NTSTATUS pdb_samba_dsdb_init(TALLOC_CTX *ctx)
{
NTSTATUS status = smb_register_passdb(PASSDB_INTERFACE_VERSION, "samba_dsdb",
pdb_init_samba_dsdb);
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 8a75fde644e..9c381471dda 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1720,7 +1720,7 @@ static NTSTATUS pdb_init_smbpasswd( struct pdb_methods **pdb_method, const char
return NT_STATUS_OK;
}
-NTSTATUS pdb_smbpasswd_init(void)
+NTSTATUS pdb_smbpasswd_init(TALLOC_CTX *ctx)
{
return smb_register_passdb(PASSDB_INTERFACE_VERSION, "smbpasswd", pdb_init_smbpasswd);
}
diff --git a/source3/passdb/pdb_smbpasswd.h b/source3/passdb/pdb_smbpasswd.h
index ccabd38eda7..5dd7c8cc54b 100644
--- a/source3/passdb/pdb_smbpasswd.h
+++ b/source3/passdb/pdb_smbpasswd.h
@@ -25,6 +25,6 @@
/* The following definitions come from passdb/pdb_smbpasswd.c */
-NTSTATUS pdb_smbpasswd_init(void) ;
+NTSTATUS pdb_smbpasswd_init(TALLOC_CTX *) ;
#endif /* _PASSDB_PDB_SMBPASSWD_H_ */
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 6453c9f48b9..6f3dda6e229 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -1348,7 +1348,7 @@ static NTSTATUS pdb_init_tdbsam(struct pdb_methods **pdb_method, const char *loc
return NT_STATUS_OK;
}
-NTSTATUS pdb_tdbsam_init(void)
+NTSTATUS pdb_tdbsam_init(TALLOC_CTX *ctx)
{
return smb_register_passdb(PASSDB_INTERFACE_VERSION, "tdbsam", pdb_init_tdbsam);
}
diff --git a/source3/passdb/pdb_tdb.h b/source3/passdb/pdb_tdb.h
index e2ecfb20f77..b90beb7019f 100644
--- a/source3/passdb/pdb_tdb.h
+++ b/source3/passdb/pdb_tdb.h
@@ -27,6 +27,6 @@
#ifndef _PASSDB_PDB_TDB_H_
#define _PASSDB_PDB_TDB_H_
-NTSTATUS pdb_tdbsam_init(void);
+NTSTATUS pdb_tdbsam_init(TALLOC_CTX *);
#endif /* _PASSDB_PDB_TDB_H_ */
diff --git a/source3/rpc_server/mdssvc/srv_mdssvc_nt.c b/source3/rpc_server/mdssvc/srv_mdssvc_nt.c
index 37b13e79a0b..c2770a2ec6c 100644
--- a/source3/rpc_server/mdssvc/srv_mdssvc_nt.c
+++ b/source3/rpc_server/mdssvc/srv_mdssvc_nt.c
@@ -86,7 +86,7 @@ static struct rpc_module_fns rpc_module_mdssvc_fns = {
};
static_decl_rpc;
-NTSTATUS rpc_mdssvc_module_init(void)
+NTSTATUS rpc_mdssvc_module_init(TALLOC_CTX *mem_ctx)
{
DBG_DEBUG("Registering mdsvc RPC service\n");
diff --git a/source3/rpc_server/rpc_service_setup.c b/source3/rpc_server/rpc_service_setup.c
index 751a6387fb6..9c755e672c8 100644
--- a/source3/rpc_server/rpc_service_setup.c
+++ b/source3/rpc_server/rpc_service_setup.c
@@ -531,7 +531,7 @@ bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
}
/* Initialize static subsystems */
- static_init_rpc;
+ static_init_rpc(NULL);
/* Initialize shared modules */
mod_init_fns = load_samba_modules(tmp_ctx, "rpc");
@@ -547,7 +547,7 @@ bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
goto done;
}
- ok = run_init_functions(mod_init_fns);
+ ok = run_init_functions(NULL, mod_init_fns);
if (!ok) {
DBG_ERR("Initializing shared RPC modules failed\n");
goto done;
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index b7364b7c7bd..f75172a45cf 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -133,7 +133,7 @@ bool vfs_init_custom(connection_struct *conn, const char *vfs_object)
}
if(!backends) {
- static_init_vfs;
+ static_init_vfs(NULL);
}
DEBUG(3, ("Initialising custom vfs hooks from [%s]\n", vfs_object));
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index dda8d0a4ba1..70f35aeee07 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -143,7 +143,7 @@ static bool idmap_init(void)
DEBUG(10, ("idmap_init(): calling static_init_idmap\n"));
- static_init_idmap;
+ static_init_idmap(NULL);
initialized = true;
diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c
index 1dbc3e46784..8c9e97bffc4 100644
--- a/source3/winbindd/idmap_ad.c
+++ b/source3/winbindd/idmap_ad.c
@@ -931,7 +931,7 @@ static struct idmap_methods ad_methods = {
};
static_decl_idmap;
-NTSTATUS idmap_ad_init(void)
+NTSTATUS idmap_ad_init(TALLOC_CTX *ctx)
{
NTSTATUS status;
@@ -941,7 +941,7 @@ NTSTATUS idmap_ad_init(void)
return status;
}
- status = idmap_ad_nss_init();
+ status = idmap_ad_nss_init(ctx);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
diff --git a/source3/winbindd/idmap_ad_nss.c b/source3/winbindd/idmap_ad_nss.c
index 8b27b36b2ca..87c78149656 100644
--- a/source3/winbindd/idmap_ad_nss.c
+++ b/source3/winbindd/idmap_ad_nss.c
@@ -394,7 +394,7 @@ static struct nss_info_methods nss_sfu20_methods = {
Initialize the plugins
***********************************************************************/
-NTSTATUS idmap_ad_nss_init(void)
+NTSTATUS idmap_ad_nss_init(TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index 9793bfe5472..5748c8077c9 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -924,7 +924,7 @@ static struct idmap_methods autorid_methods = {
};
static_decl_idmap;
-NTSTATUS idmap_autorid_init(void)
+NTSTATUS idmap_autorid_init(TALLOC_CTX *ctx)
{
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 36cc0f1e354..589027154d4 100644
--- a/source3/winbindd/idmap_hash/idmap_hash.c
+++ b/source3/winbindd/idmap_hash/idmap_hash.c
@@ -350,7 +350,7 @@ static struct nss_info_methods hash_nss_methods = {
**********************************************************************/
static_decl_idmap;
-NTSTATUS idmap_hash_init(void)
+NTSTATUS idmap_hash_init(TALLOC_CTX *ctx)
{
static NTSTATUS idmap_status = NT_STATUS_UNSUCCESSFUL;
static NTSTATUS nss_status = NT_STATUS_UNSUCCESSFUL;
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 4b896c22190..39aa8330735 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -1074,8 +1074,8 @@ static struct idmap_methods idmap_ldap_methods = {
.allocate_id = idmap_ldap_allocate_id,
};
-NTSTATUS idmap_ldap_init(void);
-NTSTATUS idmap_ldap_init(void)
+NTSTATUS idmap_ldap_init(TALLOC_CTX *);
+NTSTATUS idmap_ldap_init(TALLOC_CTX *ctx)
{
return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "ldap",
&idmap_ldap_methods);
diff --git a/source3/winbindd/idmap_nss.c b/source3/winbindd/idmap_nss.c
index 24f82178608..3fe98cbc729 100644
--- a/source3/winbindd/idmap_nss.c
+++ b/source3/winbindd/idmap_nss.c
@@ -202,7 +202,7 @@ static struct idmap_methods nss_methods = {
.sids_to_unixids = idmap_nss_sids_to_unixids,
};
-NTSTATUS idmap_nss_init(void)
+NTSTATUS idmap_nss_init(TALLOC_CTX *mem_ctx)
{
return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "nss", &nss_methods);
}
diff --git a/source3/winbindd/idmap_passdb.c b/source3/winbindd/idmap_passdb.c
index cf8ad7446ce..75fc732cca0 100644
--- a/source3/winbindd/idmap_passdb.c
+++ b/source3/winbindd/idmap_passdb.c
@@ -86,7 +86,7 @@ static struct idmap_methods passdb_methods = {
.sids_to_unixids = idmap_pdb_sids_to_unixids,
};
-NTSTATUS idmap_passdb_init(void)
+NTSTATUS idmap_passdb_init(TALLOC_CTX *mem_ctx)
{
return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "passdb", &passdb_methods);
}
diff --git a/source3/winbindd/idmap_proto.h b/source3/winbindd/idmap_proto.h
index 0e25963f209..596c22f6060 100644
--- a/source3/winbindd/idmap_proto.h
+++ b/source3/winbindd/idmap_proto.h
@@ -40,15 +40,15 @@ struct idmap_domain *idmap_find_domain(const char *domname);
/* The following definitions come from winbindd/idmap_nss.c */
-NTSTATUS idmap_nss_init(void);
+NTSTATUS idmap_nss_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from winbindd/idmap_passdb.c */
-NTSTATUS idmap_passdb_init(void);
+NTSTATUS idmap_passdb_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from winbindd/idmap_tdb.c */
-NTSTATUS idmap_tdb_init(void);
+NTSTATUS idmap_tdb_init(TALLOC_CTX *mem_ctx);
/* The following definitions come from winbindd/idmap_util.c */
@@ -64,6 +64,6 @@ struct id_map **id_map_ptrs_init(TALLOC_CTX *mem_ctx, size_t num_ids);
/* max number of ids requested per LDAP batch query */
#define IDMAP_LDAP_MAX_IDS 30
-NTSTATUS idmap_ad_nss_init(void);
+NTSTATUS idmap_ad_nss_init(TALLOC_CTX *mem_ctx);
#endif /* _WINBINDD_IDMAP_PROTO_H_ */
diff --git a/source3/winbindd/idmap_rfc2307.c b/source3/winbindd/idmap_rfc2307.c
index ff8bf52ce81..deb25cc70c8 100644
--- a/source3/winbindd/idmap_rfc2307.c
+++ b/source3/winbindd/idmap_rfc2307.c
@@ -843,7 +843,7 @@ static struct idmap_methods rfc2307_methods = {
};
static_decl_idmap;
-NTSTATUS idmap_rfc2307_init(void)
+NTSTATUS idmap_rfc2307_init(TALLOC_CTX *ctx)
{
return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "rfc2307",
&rfc2307_methods);
diff --git a/source3/winbindd/idmap_rid.c b/source3/winbindd/idmap_rid.c
index 8cf1f033391..10088b5a27a 100644
--- a/source3/winbindd/idmap_rid.c
+++ b/source3/winbindd/idmap_rid.c
@@ -174,7 +174,7 @@ static struct idmap_methods rid_methods = {
};
static_decl_idmap;
-NTSTATUS idmap_rid_init(void)
+NTSTATUS idmap_rid_init(TALLOC_CTX *ctx)
{
return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "rid", &rid_methods);
}
diff --git a/source3/winbindd/idmap_script.c b/source3/winbindd/idmap_script.c
index 4faf2d593b6..7b7f8844c36 100644
--- a/source3/winbindd/idmap_script.c
+++ b/source3/winbindd/idmap_script.c
@@ -628,7 +628,7 @@ static struct idmap_methods db_methods = {
};
static_decl_idmap;
-NTSTATUS idmap_script_init(void)
+NTSTATUS idmap_script_init(TALLOC_CTX *ctx)
{
return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "script", &db_methods);
}
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index a04295f3abb..24ef11836e1 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -434,7 +434,7 @@ static struct idmap_methods db_methods = {
.allocate_id = idmap_tdb_common_get_new_id,
};
-NTSTATUS idmap_tdb_init(void)
+NTSTATUS idmap_tdb_init(TALLOC_CTX *mem_ctx)
{
DEBUG(10, ("calling idmap_tdb_init\n"));
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index 72c5b9e1ad8..4d423907ae3 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -606,7 +606,7 @@ static struct idmap_methods db_methods = {
};
static_decl_idmap;
-NTSTATUS idmap_tdb2_init(void)
+NTSTATUS idmap_tdb2_init(TALLOC_CTX *ctx)
{
return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "tdb2", &db_methods);
}
diff --git a/source3/winbindd/nss_info.c b/source3/winbindd/nss_info.c
index 2c6bb01aded..9ef7e20b987 100644
--- a/source3/winbindd/nss_info.c
+++ b/source3/winbindd/nss_info.c
@@ -173,7 +173,7 @@ static NTSTATUS nss_init(const char **nss_list)
nss_backend = nss_get_backend("template");
if (nss_backend == NULL) {
- static_init_nss_info;
+ static_init_nss_info(NULL);
}
/* Create the list of nss_domains (loading any shared plugins
diff --git a/source3/winbindd/nss_info_template.c b/source3/winbindd/nss_info_template.c
index 53159b6c02e..c58a7fcc8f8 100644
--- a/source3/winbindd/nss_info_template.c
+++ b/source3/winbindd/nss_info_template.c
@@ -71,7 +71,7 @@ static struct nss_info_methods nss_template_methods = {
.close_fn = nss_template_close
};
-NTSTATUS nss_info_template_init( void )
+NTSTATUS nss_info_template_init(TALLOC_CTX *mem_ctx)
{
return smb_register_idmap_nss(SMB_NSS_INFO_INTERFACE_VERSION,
"template",
diff --git a/source3/wscript b/source3/wscript
index c526fc56a36..e9705b9b831 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1857,14 +1857,14 @@ main() {
if p in static_list:
decl_list=""
for entry in static_list[p]:
- decl_list += "extern NTSTATUS %s_init(void); " % entry
+ decl_list += "extern NTSTATUS %s_init(TALLOC_CTX *mem_ctx); " % entry
conf.env[static_env].append('%s' % entry)
decl_list = decl_list.rstrip()
conf.DEFINE('static_decl_%s' % p, decl_list)
- conf.DEFINE('static_init_%s' % p, '{ %s_init(); }' % '_init(); '.join(static_list[p]))
+ conf.DEFINE('static_init_%s(mem_ctx)' % p, '{ %s_init((mem_ctx)); }' % '_init((mem_ctx)); '.join(static_list[p]))
else:
conf.DEFINE('static_decl_%s' % p, '')
- conf.DEFINE('static_init_%s' % p, '{}')
+ conf.DEFINE('static_init_%s(mem_ctx)' % p, '{}')
if p in shared_list:
for entry in shared_list[p]:
conf.DEFINE('%s_init' % entry, 'samba_init_module')
diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index a97cfb811d5..0a691cf57a2 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -157,7 +157,7 @@ NTSTATUS auth_check_password(struct auth4_context *auth_ctx,
uint8_t *pauthoritative);
NTSTATUS auth4_init(void);
NTSTATUS auth_register(const struct auth_operations *ops);
-NTSTATUS server_service_auth_init(void);
+NTSTATUS server_service_auth_init(TALLOC_CTX *ctx);
NTSTATUS authenticate_ldap_simple_bind(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct imessaging_context *msg,
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index e2755b3d228..73a08f1ab58 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -50,7 +50,7 @@ gss_OID_desc spnego_mech_oid_desc =
#define gss_mech_spnego (&spnego_mech_oid_desc)
#endif
-_PUBLIC_ NTSTATUS gensec_gssapi_init(void);
+_PUBLIC_ NTSTATUS gensec_gssapi_init(TALLOC_CTX *);
static size_t gensec_gssapi_max_input_size(struct gensec_security *gensec_security);
static size_t gensec_gssapi_max_wrapped_size(struct gensec_security *gensec_security);
@@ -1640,7 +1640,7 @@ static const struct gensec_security_ops gensec_gssapi_sasl_krb5_security_ops = {
.priority = GENSEC_GSSAPI
};
-_PUBLIC_ NTSTATUS gensec_gssapi_init(void)
+_PUBLIC_ NTSTATUS gensec_gssapi_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c
index 49469298964..4756c8482d2 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -43,7 +43,7 @@
#include "auth/kerberos/pac_utils.h"
#include "gensec_krb5.h"
-_PUBLIC_ NTSTATUS gensec_krb5_init(void);
+_PUBLIC_ NTSTATUS gensec_krb5_init(TALLOC_CTX *);
enum GENSEC_KRB5_STATE {
GENSEC_KRB5_SERVER_START,
@@ -1082,7 +1082,7 @@ static const struct gensec_security_ops gensec_krb5_security_ops = {
.priority = GENSEC_KRB5
};
-_PUBLIC_ NTSTATUS gensec_krb5_init(void)
+_PUBLIC_ NTSTATUS gensec_krb5_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index 56676bbcdac..2f2cdc1a4ff 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -832,14 +832,14 @@ const struct auth_critical_sizes *auth_interface_version(void)
_PUBLIC_ NTSTATUS auth4_init(void)
{
static bool initialized = false;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_auth4_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_auth4_MODULES };
if (initialized) return NT_STATUS_OK;
initialized = true;
- run_init_functions(static_init);
+ run_init_functions(NULL, static_init);
return NT_STATUS_OK;
}
diff --git a/source4/auth/ntlm/auth_anonymous.c b/source4/auth/ntlm/auth_anonymous.c
index ab1aac2693f..9bdcf0cbcb4 100644
--- a/source4/auth/ntlm/auth_anonymous.c
+++ b/source4/auth/ntlm/auth_anonymous.c
@@ -24,7 +24,7 @@
#include "auth/ntlm/auth_proto.h"
#include "param/param.h"
-_PUBLIC_ NTSTATUS auth4_anonymous_init(void);
+_PUBLIC_ NTSTATUS auth4_anonymous_init(TALLOC_CTX *);
/**
* Return a anonymous logon for anonymous users (username = "")
@@ -95,7 +95,7 @@ static const struct auth_operations anonymous_auth_ops = {
.check_password = anonymous_check_password
};
-_PUBLIC_ NTSTATUS auth4_anonymous_init(void)
+_PUBLIC_ NTSTATUS auth4_anonymous_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source4/auth/ntlm/auth_developer.c b/source4/auth/ntlm/auth_developer.c
index 58ccc2db289..93a073b125d 100644
--- a/source4/auth/ntlm/auth_developer.c
+++ b/source4/auth/ntlm/auth_developer.c
@@ -24,7 +24,7 @@
#include "auth/ntlm/auth_proto.h"
#include "libcli/security/security.h"
-_PUBLIC_ NTSTATUS auth4_developer_init(void);
+_PUBLIC_ NTSTATUS auth4_developer_init(TALLOC_CTX *);
static NTSTATUS name_to_ntstatus_want_check(struct auth_method_context *ctx,
TALLOC_CTX *mem_ctx,
@@ -137,7 +137,7 @@ static const struct auth_operations name_to_ntstatus_auth_ops = {
.check_password = name_to_ntstatus_check_password
};
-_PUBLIC_ NTSTATUS auth4_developer_init(void)
+_PUBLIC_ NTSTATUS auth4_developer_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c
index 1c7fd907147..305fdc5d281 100644
--- a/source4/auth/ntlm/auth_sam.c
+++ b/source4/auth/ntlm/auth_sam.c
@@ -923,8 +923,8 @@ static const struct auth_operations sam_failtrusts_ops = {
.check_password = authsam_failtrusts_check_password,
};
-_PUBLIC_ NTSTATUS auth4_sam_init(void);
-_PUBLIC_ NTSTATUS auth4_sam_init(void)
+_PUBLIC_ NTSTATUS auth4_sam_init(TALLOC_CTX *);
+_PUBLIC_ NTSTATUS auth4_sam_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source4/auth/ntlm/auth_server_service.c b/source4/auth/ntlm/auth_server_service.c
index 65b9dc2e450..9ac080a4817 100644
--- a/source4/auth/ntlm/auth_server_service.c
+++ b/source4/auth/ntlm/auth_server_service.c
@@ -20,7 +20,7 @@
#include "includes.h"
#include "auth/auth.h"
-NTSTATUS server_service_auth_init(void)
+NTSTATUS server_service_auth_init(TALLOC_CTX *ctx)
{
return auth4_init();
}
diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index 46e82f46112..5fb8b4f5dde 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -28,7 +28,7 @@
#include "../libcli/auth/pam_errors.h"
#include "param/param.h"
-_PUBLIC_ NTSTATUS auth4_unix_init(void);
+_PUBLIC_ NTSTATUS auth4_unix_init(TALLOC_CTX *);
/* TODO: look at how to best fill in parms retrieveing a struct passwd info
* except in case USER_INFO_DONT_CHECK_UNIX_ACCOUNT is set
@@ -751,7 +751,7 @@ static const struct auth_operations unix_ops = {
.check_password = authunix_check_password
};
-_PUBLIC_ NTSTATUS auth4_unix_init(void)
+_PUBLIC_ NTSTATUS auth4_unix_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c
index 82a71f3bd13..d5bf5ad2685 100644
--- a/source4/auth/ntlm/auth_winbind.c
+++ b/source4/auth/ntlm/auth_winbind.c
@@ -32,7 +32,7 @@
#include "libcli/security/security.h"
#include "dsdb/samdb/samdb.h"
-_PUBLIC_ NTSTATUS auth4_winbind_init(void);
+_PUBLIC_ NTSTATUS auth4_winbind_init(TALLOC_CTX *);
static NTSTATUS winbind_want_check(struct auth_method_context *ctx,
TALLOC_CTX *mem_ctx,
@@ -313,7 +313,7 @@ static const struct auth_operations winbind_wbclient_ops = {
.check_password = winbind_check_password_wbclient
};
-_PUBLIC_ NTSTATUS auth4_winbind_init(void)
+_PUBLIC_ NTSTATUS auth4_winbind_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c
index ced2a2088f2..de8bc4eeef0 100644
--- a/source4/cldap_server/cldap_server.c
+++ b/source4/cldap_server/cldap_server.c
@@ -36,7 +36,7 @@
#include "../lib/tsocket/tsocket.h"
#include "libds/common/roles.h"
-NTSTATUS server_service_cldapd_init(void);
+NTSTATUS server_service_cldapd_init(TALLOC_CTX *);
/*
handle incoming cldap requests
@@ -241,7 +241,7 @@ static void cldapd_task_init(struct task_server *task)
/*
register ourselves as a available server
*/
-NTSTATUS server_service_cldapd_init(void)
+NTSTATUS server_service_cldapd_init(TALLOC_CTX *ctx)
{
return register_server_service("cldap", cldapd_task_init);
}
diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c
index 86776b06335..d467cca3e43 100644
--- a/source4/dns_server/dns_server.c
+++ b/source4/dns_server/dns_server.c
@@ -52,7 +52,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_DNS
-NTSTATUS server_service_dns_init(void);
+NTSTATUS server_service_dns_init(TALLOC_CTX *);
/* hold information about one dns socket */
struct dns_socket {
@@ -927,7 +927,7 @@ static void dns_task_init(struct task_server *task)
}
}
-NTSTATUS server_service_dns_init(void)
+NTSTATUS server_service_dns_init(TALLOC_CTX *ctx)
{
return register_server_service("dns", dns_task_init);
}
diff --git a/source4/dsdb/dns/dns_update.c b/source4/dsdb/dns/dns_update.c
index 8962b085f61..d2e34669aea 100644
--- a/source4/dsdb/dns/dns_update.c
+++ b/source4/dsdb/dns/dns_update.c
@@ -41,7 +41,7 @@
#include "librpc/gen_ndr/ndr_irpc.h"
#include "libds/common/roles.h"
-NTSTATUS server_service_dnsupdate_init(void);
+NTSTATUS server_service_dnsupdate_init(TALLOC_CTX *);
struct dnsupdate_service {
struct task_server *task;
@@ -665,7 +665,7 @@ static void dnsupdate_task_init(struct task_server *task)
/*
register ourselves as a available server
*/
-NTSTATUS server_service_dnsupdate_init(void)
+NTSTATUS server_service_dnsupdate_init(TALLOC_CTX *ctx)
{
return register_server_service("dnsupdate", dnsupdate_task_init);
}
diff --git a/source4/dsdb/kcc/kcc_service.c b/source4/dsdb/kcc/kcc_service.c
index 9266e75d2cd..000206f98b7 100644
--- a/source4/dsdb/kcc/kcc_service.c
+++ b/source4/dsdb/kcc/kcc_service.c
@@ -345,7 +345,7 @@ static void kccsrv_task_init(struct task_server *task)
/*
register ourselves as a available server
*/
-NTSTATUS server_service_kcc_init(void)
+NTSTATUS server_service_kcc_init(TALLOC_CTX *ctx)
{
return register_server_service("kcc", kccsrv_task_init);
}
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c
index c0ea1f2ba23..787f2d79138 100644
--- a/source4/dsdb/repl/drepl_service.c
+++ b/source4/dsdb/repl/drepl_service.c
@@ -514,7 +514,7 @@ static void dreplsrv_task_init(struct task_server *task)
/*
register ourselves as a available server
*/
-NTSTATUS server_service_drepl_init(void)
+NTSTATUS server_service_drepl_init(TALLOC_CTX *ctx)
{
return register_server_service("drepl", dreplsrv_task_init);
}
diff --git a/source4/echo_server/echo_server.c b/source4/echo_server/echo_server.c
index a3e69741b77..a934b5b431c 100644
--- a/source4/echo_server/echo_server.c
+++ b/source4/echo_server/echo_server.c
@@ -33,7 +33,7 @@
#include "lib/tsocket/tsocket.h"
#include "libds/common/roles.h"
-NTSTATUS server_service_echo_init(void);
+NTSTATUS server_service_echo_init(TALLOC_CTX *);
/* Structure to hold an echo server socket */
struct echo_socket {
@@ -341,7 +341,7 @@ static void echo_task_init(struct task_server *task)
* This is the function you need to put into the wscript_build file as
* init_function. All the real work happens in "echo_task_init" above.
*/
-NTSTATUS server_service_echo_init(void)
+NTSTATUS server_service_echo_init(TALLOC_CTX *ctx)
{
return register_server_service("echo", echo_task_init);
}
diff --git a/source4/kdc/kdc-heimdal.c b/source4/kdc/kdc-heimdal.c
index 25bb3916038..fd48114edf8 100644
--- a/source4/kdc/kdc-heimdal.c
+++ b/source4/kdc/kdc-heimdal.c
@@ -40,7 +40,7 @@
#include <kdc.h>
#include <hdb.h>
-NTSTATUS server_service_kdc_init(void);
+NTSTATUS server_service_kdc_init(TALLOC_CTX *);
extern struct krb5plugin_windc_ftable windc_plugin_table;
@@ -466,7 +466,7 @@ static void kdc_task_init(struct task_server *task)
/* called at smbd startup - register ourselves as a server service */
-NTSTATUS server_service_kdc_init(void)
+NTSTATUS server_service_kdc_init(TALLOC_CTX *ctx)
{
return register_server_service("kdc", kdc_task_init);
}
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 96df39c5313..747e25dde22 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -1182,7 +1182,7 @@ failed:
}
-NTSTATUS server_service_ldap_init(void)
+NTSTATUS server_service_ldap_init(TALLOC_CTX *ctx)
{
return register_server_service("ldap", ldapsrv_task_init);
}
diff --git a/source4/lib/com/classes/simple.c b/source4/lib/com/classes/simple.c
index 367ce9d6319..28f5d848de5 100644
--- a/source4/lib/com/classes/simple.c
+++ b/source4/lib/com/classes/simple.c
@@ -22,7 +22,7 @@
#include "lib/com/com.h"
#include "librpc/gen_ndr/com_dcom.h"
-NTSTATUS com_simple_init(void);
+NTSTATUS com_simple_init(TALLOC_CTX *);
static struct IClassFactory_vtable simple_classobject_vtable;
static struct IStream_vtable simple_IStream_vtable;
@@ -107,7 +107,7 @@ static struct IStream_vtable simple_IStream_vtable = {
simple_IStream_Write
};
-NTSTATUS com_simple_init(void)
+NTSTATUS com_simple_init(TALLOC_CTX *ctx)
{
struct GUID clsid;
struct IUnknown *class_object = talloc(talloc_autofree_context(), struct IUnknown);
diff --git a/source4/lib/http/gensec/basic.c b/source4/lib/http/gensec/basic.c
index 4a488a34bfa..64778638b66 100644
--- a/source4/lib/http/gensec/basic.c
+++ b/source4/lib/http/gensec/basic.c
@@ -26,7 +26,7 @@
#include "auth/credentials/credentials.h"
#include "lib/util/base64.h"
-_PUBLIC_ NTSTATUS gensec_http_basic_init(void);
+_PUBLIC_ NTSTATUS gensec_http_basic_init(TALLOC_CTX *);
struct gensec_http_basic_state {
enum {
@@ -123,7 +123,7 @@ static const struct gensec_security_ops gensec_http_basic_security_ops = {
.priority = GENSEC_EXTERNAL,
};
-_PUBLIC_ NTSTATUS gensec_http_basic_init(void)
+_PUBLIC_ NTSTATUS gensec_http_basic_init(TALLOC_CTX *ctx)
{
NTSTATUS status;
diff --git a/source4/lib/http/gensec/ntlm.c b/source4/lib/http/gensec/ntlm.c
index 8afb275dafe..391f99fef0f 100644
--- a/source4/lib/http/gensec/ntlm.c
+++ b/source4/lib/http/gensec/ntlm.c
@@ -25,7 +25,7 @@
#include "auth/gensec/gensec_internal.h"
#include "lib/util/base64.h"
-_PUBLIC_ NTSTATUS gensec_http_ntlm_init(void);
+_PUBLIC_ NTSTATUS gensec_http_ntlm_init(TALLOC_CTX *);
struct gensec_http_ntlm_state {
struct gensec_security *sub;
@@ -106,7 +106,7 @@ static const struct gensec_security_ops gensec_http_ntlm_security_ops = {
.priority = GENSEC_EXTERNAL,
};
-_PUBLIC_ NTSTATUS gensec_http_ntlm_init(void)
+_PUBLIC_ NTSTATUS gensec_http_ntlm_init(TALLOC_CTX *ctx)
{
NTSTATUS status;
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c
index 232fb9de13a..2c20c10c18e 100644
--- a/source4/nbt_server/nbt_server.c
+++ b/source4/nbt_server/nbt_server.c
@@ -30,7 +30,7 @@
#include "dsdb/samdb/samdb.h"
#include "param/param.h"
-NTSTATUS server_service_nbtd_init(void);
+NTSTATUS server_service_nbtd_init(TALLOC_CTX *);
/*
startup the nbtd task
@@ -98,7 +98,7 @@ static void nbtd_task_init(struct task_server *task)
/*
register ourselves as a available server
*/
-NTSTATUS server_service_nbtd_init(void)
+NTSTATUS server_service_nbtd_init(TALLOC_CTX *ctx)
{
return register_server_service("nbt", nbtd_task_init);
}
diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c
index 53c34edab7e..ddd38c1e303 100644
--- a/source4/ntp_signd/ntp_signd.c
+++ b/source4/ntp_signd/ntp_signd.c
@@ -41,7 +41,7 @@
#include "system/network.h"
#include "system/passwd.h"
-NTSTATUS server_service_ntp_signd_init(void);
+NTSTATUS server_service_ntp_signd_init(TALLOC_CTX *);
/*
top level context structure for the ntp_signd server
@@ -552,7 +552,7 @@ static void ntp_signd_task_init(struct task_server *task)
/* called at smbd startup - register ourselves as a server service */
-NTSTATUS server_service_ntp_signd_init(void)
+NTSTATUS server_service_ntp_signd_init(TALLOC_CTX *ctx)
{
return register_server_service("ntp_signd", ntp_signd_task_init);
}
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c
index 355b0bd58d1..478428e3246 100644
--- a/source4/ntvfs/cifs/vfs_cifs.c
+++ b/source4/ntvfs/cifs/vfs_cifs.c
@@ -64,7 +64,7 @@ struct async_info {
void *parms;
};
-NTSTATUS ntvfs_cifs_init(void);
+NTSTATUS ntvfs_cifs_init(TALLOC_CTX *);
#define CHECK_UPSTREAM_OPEN do { \
if (!smbXcli_conn_is_connected(p->transport->conn)) { \
@@ -1201,7 +1201,7 @@ static NTSTATUS cvfs_notify(struct ntvfs_module_context *ntvfs,
/*
initialise the CIFS->CIFS backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_cifs_init(void)
+NTSTATUS ntvfs_cifs_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c b/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
index 9c1e6f6ab23..83f02c0e877 100644
--- a/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
+++ b/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
@@ -1055,7 +1055,7 @@ static NTSTATUS cifspsx_trans(struct ntvfs_module_context *ntvfs,
/*
initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_cifs_posix_init(void)
+NTSTATUS ntvfs_cifs_posix_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 88ac0c1b231..ff45aafd676 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -1297,7 +1297,7 @@ static NTSTATUS ipc_ioctl(struct ntvfs_module_context *ntvfs,
/*
initialialise the IPC backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_ipc_init(void)
+NTSTATUS ntvfs_ipc_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c
index c3e0a4257cf..0b2ccf2cb56 100644
--- a/source4/ntvfs/nbench/vfs_nbench.c
+++ b/source4/ntvfs/nbench/vfs_nbench.c
@@ -28,7 +28,7 @@
#include "system/filesys.h"
#include "lib/util/sys_rw.h"
-NTSTATUS ntvfs_nbench_init(void);
+NTSTATUS ntvfs_nbench_init(TALLOC_CTX *);
/* this is stored in ntvfs_private */
struct nbench_private {
@@ -923,7 +923,7 @@ static NTSTATUS nbench_trans(struct ntvfs_module_context *ntvfs,
/*
initialise the nbench backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_nbench_init(void)
+NTSTATUS ntvfs_nbench_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index d037a0ea377..5c438bbd5a2 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -228,7 +228,7 @@ static NTSTATUS ntvfs_add_ipc_share(struct loadparm_context *lp_ctx)
NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_ntvfs_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_ntvfs_MODULES };
init_module_fn *shared_init;
@@ -238,8 +238,8 @@ NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx)
shared_init = load_samba_modules(NULL, "ntvfs");
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ run_init_functions(NULL, static_init);
+ run_init_functions(NULL, shared_init);
talloc_free(shared_init);
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index b2987645128..9a110caf236 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -85,7 +85,7 @@ const struct pvfs_acl_ops *pvfs_acl_backend_byname(const char *name)
NTSTATUS pvfs_acl_init(void)
{
static bool initialized = false;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_pvfs_acl_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_pvfs_acl_MODULES };
init_module_fn *shared_init;
@@ -95,8 +95,8 @@ NTSTATUS pvfs_acl_init(void)
shared_init = load_samba_modules(NULL, "pvfs_acl");
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ run_init_functions(NULL, static_init);
+ run_init_functions(NULL, shared_init);
talloc_free(shared_init);
diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c b/source4/ntvfs/posix/pvfs_acl_nfs4.c
index bd00794763d..392dc92fe12 100644
--- a/source4/ntvfs/posix/pvfs_acl_nfs4.c
+++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c
@@ -26,7 +26,7 @@
#include "librpc/gen_ndr/ndr_nfs4acl.h"
#include "libcli/security/security.h"
-NTSTATUS pvfs_acl_nfs4_init(void);
+NTSTATUS pvfs_acl_nfs4_init(TALLOC_CTX *);
#define ACE4_IDENTIFIER_GROUP 0x40
@@ -188,7 +188,7 @@ static NTSTATUS pvfs_acl_save_nfs4(struct pvfs_state *pvfs, struct pvfs_filename
/*
initialise pvfs acl NFS4 backend
*/
-NTSTATUS pvfs_acl_nfs4_init(void)
+NTSTATUS pvfs_acl_nfs4_init(TALLOC_CTX *ctx)
{
struct pvfs_acl_ops ops = {
.name = "nfs4acl",
diff --git a/source4/ntvfs/posix/pvfs_acl_xattr.c b/source4/ntvfs/posix/pvfs_acl_xattr.c
index d9cceef1bc3..648c459dadd 100644
--- a/source4/ntvfs/posix/pvfs_acl_xattr.c
+++ b/source4/ntvfs/posix/pvfs_acl_xattr.c
@@ -24,7 +24,7 @@
#include "../lib/util/unix_privs.h"
#include "librpc/gen_ndr/ndr_xattr.h"
-NTSTATUS pvfs_acl_xattr_init(void);
+NTSTATUS pvfs_acl_xattr_init(TALLOC_CTX *);
/*
load the current ACL from extended attributes
@@ -93,7 +93,7 @@ static NTSTATUS pvfs_acl_save_xattr(struct pvfs_state *pvfs, struct pvfs_filenam
/*
initialise pvfs acl xattr backend
*/
-NTSTATUS pvfs_acl_xattr_init(void)
+NTSTATUS pvfs_acl_xattr_init(TALLOC_CTX *ctx)
{
struct pvfs_acl_ops ops = {
.name = "xattr",
diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c
index 7d1fea549fa..4133723c50a 100644
--- a/source4/ntvfs/posix/vfs_posix.c
+++ b/source4/ntvfs/posix/vfs_posix.c
@@ -359,7 +359,7 @@ static NTSTATUS pvfs_trans(struct ntvfs_module_context *ntvfs,
/*
initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_posix_init(void)
+NTSTATUS ntvfs_posix_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c
index 829fa7877ec..3578f002c31 100644
--- a/source4/ntvfs/print/vfs_print.c
+++ b/source4/ntvfs/print/vfs_print.c
@@ -26,7 +26,7 @@
#include "ntvfs/ntvfs.h"
#include "param/param.h"
-NTSTATUS ntvfs_print_init(void);
+NTSTATUS ntvfs_print_init(TALLOC_CTX *);
/*
connect to a share - used when a tree_connect operation comes
@@ -102,7 +102,7 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs,
/*
initialialise the print backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_print_init(void)
+NTSTATUS ntvfs_print_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index abd76d25c88..2fe20844821 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -1055,7 +1055,7 @@ static NTSTATUS svfs_trans(struct ntvfs_module_context *ntvfs,
/*
initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_simple_init(void)
+NTSTATUS ntvfs_simple_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/smb2/vfs_smb2.c b/source4/ntvfs/smb2/vfs_smb2.c
index dbb76b3dc12..b2b61f0b7ea 100644
--- a/source4/ntvfs/smb2/vfs_smb2.c
+++ b/source4/ntvfs/smb2/vfs_smb2.c
@@ -41,7 +41,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
-NTSTATUS ntvfs_smb2_init(void);
+NTSTATUS ntvfs_smb2_init(TALLOC_CTX *);
struct cvfs_file {
struct cvfs_file *prev, *next;
@@ -847,7 +847,7 @@ static NTSTATUS cvfs_notify(struct ntvfs_module_context *ntvfs,
/*
initialise the CIFS->CIFS backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_smb2_init(void)
+NTSTATUS ntvfs_smb2_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/ntvfs/sysdep/inotify.c b/source4/ntvfs/sysdep/inotify.c
index 091ca1da283..c769618cf42 100644
--- a/source4/ntvfs/sysdep/inotify.c
+++ b/source4/ntvfs/sysdep/inotify.c
@@ -390,8 +390,8 @@ static struct sys_notify_backend inotify = {
/*
initialialise the inotify module
*/
-NTSTATUS sys_notify_inotify_init(void);
-NTSTATUS sys_notify_inotify_init(void)
+NTSTATUS sys_notify_inotify_init(TALLOC_CTX *);
+NTSTATUS sys_notify_inotify_init(TALLOC_CTX *ctx)
{
/* register ourselves as a system inotify module */
return sys_notify_register(&inotify);
diff --git a/source4/ntvfs/sysdep/sys_lease.c b/source4/ntvfs/sysdep/sys_lease.c
index 1c8c33f3cf1..3db67030a1f 100644
--- a/source4/ntvfs/sysdep/sys_lease.c
+++ b/source4/ntvfs/sysdep/sys_lease.c
@@ -118,14 +118,14 @@ _PUBLIC_ NTSTATUS sys_lease_register(const struct sys_lease_ops *backend)
_PUBLIC_ NTSTATUS sys_lease_init(void)
{
static bool initialized = false;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_sys_lease_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_sys_lease_MODULES };
if (initialized) return NT_STATUS_OK;
initialized = true;
- run_init_functions(static_init);
+ run_init_functions(NULL, static_init);
return NT_STATUS_OK;
}
diff --git a/source4/ntvfs/sysdep/sys_lease_linux.c b/source4/ntvfs/sysdep/sys_lease_linux.c
index 3b0605b73b9..1c70f4e1a6f 100644
--- a/source4/ntvfs/sysdep/sys_lease_linux.c
+++ b/source4/ntvfs/sysdep/sys_lease_linux.c
@@ -30,7 +30,7 @@
#include "../lib/util/dlinklist.h"
#include "cluster/cluster.h"
-NTSTATUS sys_lease_linux_init(void);
+NTSTATUS sys_lease_linux_init(TALLOC_CTX *);
#define LINUX_LEASE_RT_SIGNAL (SIGRTMIN+1)
@@ -208,7 +208,7 @@ static struct sys_lease_ops linux_lease_ops = {
/*
initialialise the linux lease module
*/
-NTSTATUS sys_lease_linux_init(void)
+NTSTATUS sys_lease_linux_init(TALLOC_CTX *ctx)
{
/* register ourselves as a system lease module */
return sys_lease_register(&linux_lease_ops);
diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c
index dee3295de80..aad3b900dd1 100644
--- a/source4/ntvfs/sysdep/sys_notify.c
+++ b/source4/ntvfs/sysdep/sys_notify.c
@@ -135,14 +135,14 @@ _PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend)
_PUBLIC_ NTSTATUS sys_notify_init(void)
{
static bool initialized = false;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_sys_notify_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_sys_notify_MODULES };
if (initialized) return NT_STATUS_OK;
initialized = true;
- run_init_functions(static_init);
+ run_init_functions(NULL, static_init);
return NT_STATUS_OK;
}
diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c
index ce7abfca638..40ccd4ae7a9 100644
--- a/source4/ntvfs/unixuid/vfs_unixuid.c
+++ b/source4/ntvfs/unixuid/vfs_unixuid.c
@@ -30,7 +30,7 @@
#include <tevent.h>
#include "../lib/util/setid.h"
-NTSTATUS ntvfs_unixuid_init(void);
+NTSTATUS ntvfs_unixuid_init(TALLOC_CTX *);
struct unixuid_private {
struct security_unix_token *last_sec_ctx;
@@ -665,7 +665,7 @@ static NTSTATUS unixuid_trans(struct ntvfs_module_context *ntvfs,
/*
initialise the unixuid backend, registering ourselves with the ntvfs subsystem
*/
-NTSTATUS ntvfs_unixuid_init(void)
+NTSTATUS ntvfs_unixuid_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
struct ntvfs_ops ops;
diff --git a/source4/param/share.c b/source4/param/share.c
index 2bf4b89c23c..7a571510812 100644
--- a/source4/param/share.c
+++ b/source4/param/share.c
@@ -147,11 +147,11 @@ NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name
*/
NTSTATUS share_init(void)
{
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_share_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_share_MODULES };
- run_init_functions(static_init);
+ run_init_functions(NULL, static_init);
return NT_STATUS_OK;
}
diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c
index 67ea392824f..d938cb29f55 100644
--- a/source4/param/share_classic.c
+++ b/source4/param/share_classic.c
@@ -23,7 +23,7 @@
#include "param/share.h"
#include "param/param.h"
-NTSTATUS share_classic_init(void);
+NTSTATUS share_classic_init(TALLOC_CTX *);
static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx,
const struct share_ops *ops,
@@ -383,7 +383,7 @@ static const struct share_ops ops = {
.get_config = sclassic_get_config
};
-NTSTATUS share_classic_init(void)
+NTSTATUS share_classic_init(TALLOC_CTX *ctx)
{
return share_register(&ops);
}
diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c
index cf8c5bb3d4f..f8b1a3f5d97 100644
--- a/source4/param/share_ldb.c
+++ b/source4/param/share_ldb.c
@@ -27,7 +27,7 @@
#include "param/share.h"
#include "param/param.h"
-NTSTATUS share_ldb_init(void);
+NTSTATUS share_ldb_init(TALLOC_CTX *);
static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops,
struct tevent_context *ev_ctx,
@@ -598,7 +598,7 @@ static const struct share_ops ops = {
.remove = sldb_remove
};
-NTSTATUS share_ldb_init(void)
+NTSTATUS share_ldb_init(TALLOC_CTX *ctx)
{
return share_register(&ops);
}
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 3663a2b4be4..9f62c115b5f 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -2112,7 +2112,7 @@ const struct dcesrv_endpoint_server *dcesrv_ep_server_byname(const char *name)
void dcerpc_server_init(struct loadparm_context *lp_ctx)
{
static bool initialized;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_dcerpc_server_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES };
init_module_fn *shared_init;
@@ -2124,8 +2124,8 @@ void dcerpc_server_init(struct loadparm_context *lp_ctx)
shared_init = load_samba_modules(NULL, "dcerpc_server");
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ run_init_functions(NULL, static_init);
+ run_init_functions(NULL, shared_init);
talloc_free(shared_init);
}
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 2aa700619d6..f013d99580b 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -4771,15 +4771,15 @@ static WERROR dcesrv_dssetup_DsRoleAbortDownlevelServerUpgrade(struct dcesrv_cal
/* include the generated boilerplate */
#include "librpc/gen_ndr/ndr_dssetup_s.c"
-NTSTATUS dcerpc_server_lsa_init(void)
+NTSTATUS dcerpc_server_lsa_init(TALLOC_CTX *ctx)
{
NTSTATUS ret;
- ret = dcerpc_server_dssetup_init();
+ ret = dcerpc_server_dssetup_init(ctx);
if (!NT_STATUS_IS_OK(ret)) {
return ret;
}
- ret = dcerpc_server_lsarpc_init();
+ ret = dcerpc_server_lsarpc_init(ctx);
if (!NT_STATUS_IS_OK(ret)) {
return ret;
}
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c
index 8fb8332ef0f..f6b1ac9f821 100644
--- a/source4/rpc_server/service_rpc.c
+++ b/source4/rpc_server/service_rpc.c
@@ -39,7 +39,7 @@
#include "../libcli/named_pipe_auth/npa_tstream.h"
#include "smbd/process_model.h"
-NTSTATUS server_service_rpc_init(void);
+NTSTATUS server_service_rpc_init(TALLOC_CTX *);
/*
open the dcerpc server sockets
@@ -124,7 +124,7 @@ failed:
task_server_terminate(task, "Failed to startup dcerpc server task", true);
}
-NTSTATUS server_service_rpc_init(void)
+NTSTATUS server_service_rpc_init(TALLOC_CTX *ctx)
{
return register_server_service("rpc", dcesrv_task_init);
}
diff --git a/source4/smb_server/service_smb.c b/source4/smb_server/service_smb.c
index 05004b009c9..1a830d0e322 100644
--- a/source4/smb_server/service_smb.c
+++ b/source4/smb_server/service_smb.c
@@ -85,7 +85,7 @@ failed:
}
/* called at smbd startup - register ourselves as a server service */
-NTSTATUS server_service_smb_init(void)
+NTSTATUS server_service_smb_init(TALLOC_CTX *ctx)
{
ntvfs_init(cmdline_lp_ctx);
share_init();
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index bbcbe3b6acc..20a130b70c3 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -101,7 +101,7 @@ _PUBLIC_ NTSTATUS register_process_model(const struct model_ops *ops)
_PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
{
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_process_model_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_process_model_MODULES };
init_module_fn *shared_init;
@@ -114,8 +114,8 @@ _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
shared_init = load_samba_modules(NULL, "process_model");
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ run_init_functions(NULL, static_init);
+ run_init_functions(NULL, shared_init);
talloc_free(shared_init);
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index a1b785ee41b..f483e000be7 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -26,7 +26,7 @@
#include "system/filesys.h"
#include "cluster/cluster.h"
-NTSTATUS process_model_single_init(void);
+NTSTATUS process_model_single_init(TALLOC_CTX *);
/*
called when the process model is selected
@@ -132,7 +132,7 @@ const struct model_ops single_ops = {
initialise the single process model, registering ourselves with the
process model subsystem
*/
-NTSTATUS process_model_single_init(void)
+NTSTATUS process_model_single_init(TALLOC_CTX *ctx)
{
return register_process_model(&single_ops);
}
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 92f07add42c..967b06468d1 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -39,7 +39,7 @@ struct standard_child_state {
struct tevent_fd *from_child_fde;
};
-NTSTATUS process_model_standard_init(void);
+NTSTATUS process_model_standard_init(TALLOC_CTX *);
/* we hold a pipe open in the parent, and the any child
processes wait for EOF on that pipe. This ensures that
@@ -502,7 +502,7 @@ static const struct model_ops standard_ops = {
/*
initialise the standard process model, registering ourselves with the process model subsystem
*/
-NTSTATUS process_model_standard_init(void)
+NTSTATUS process_model_standard_init(TALLOC_CTX *ctx)
{
return register_process_model(&standard_ops);
}
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index fdc36dec129..a8bad06bed3 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -343,7 +343,7 @@ static int binary_smbd_main(const char *binary_name,
bool opt_interactive = false;
int opt;
poptContext pc;
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_service_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_service_MODULES };
init_module_fn *shared_init;
@@ -484,8 +484,8 @@ static int binary_smbd_main(const char *binary_name,
shared_init = load_samba_modules(NULL, "service");
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ run_init_functions(NULL, static_init);
+ run_init_functions(NULL, shared_init);
talloc_free(shared_init);
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 737c799358f..f5ee966eac8 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1935,7 +1935,7 @@ static bool run_birthtimetest(struct torture_context *tctx,
}
-NTSTATUS torture_base_init(void)
+NTSTATUS torture_base_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "base");
diff --git a/source4/torture/dfs/domaindfs.c b/source4/torture/dfs/domaindfs.c
index ee884f1860e..82e6843bbcf 100644
--- a/source4/torture/dfs/domaindfs.c
+++ b/source4/torture/dfs/domaindfs.c
@@ -501,7 +501,7 @@ static bool test_low_referral_level(struct torture_context *tctx,
return true;
}
-NTSTATUS torture_dfs_init(void)
+NTSTATUS torture_dfs_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "dfs");
struct torture_suite *suite_basic = torture_suite_create(suite, "domain");
diff --git a/source4/torture/dns/dlz_bind9.c b/source4/torture/dns/dlz_bind9.c
index d7f4c991429..7a01ec0ec28 100644
--- a/source4/torture/dns/dlz_bind9.c
+++ b/source4/torture/dns/dlz_bind9.c
@@ -1080,8 +1080,8 @@ static struct torture_suite *dlz_bind9_suite(TALLOC_CTX *ctx)
/**
* DNS torture module initialization
*/
-NTSTATUS torture_bind_dns_init(void);
-NTSTATUS torture_bind_dns_init(void)
+NTSTATUS torture_bind_dns_init(TALLOC_CTX *);
+NTSTATUS torture_bind_dns_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite;
TALLOC_CTX *mem_ctx = talloc_autofree_context();
diff --git a/source4/torture/dns/internal_dns.c b/source4/torture/dns/internal_dns.c
index b1cb9672e8b..ac234e1b38b 100644
--- a/source4/torture/dns/internal_dns.c
+++ b/source4/torture/dns/internal_dns.c
@@ -171,12 +171,12 @@ static struct torture_suite *internal_dns_suite(TALLOC_CTX *ctx)
/* Silence silly compiler warning */
-NTSTATUS torture_internal_dns_init(void);
+NTSTATUS torture_internal_dns_init(TALLOC_CTX *);
/**
* DNS torture module initialization
*/
-NTSTATUS torture_internal_dns_init(void)
+NTSTATUS torture_internal_dns_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite;
TALLOC_CTX *mem_ctx = talloc_autofree_context();
diff --git a/source4/torture/drs/drs_init.c b/source4/torture/drs/drs_init.c
index b0aeb411da5..2dcb6f1b56d 100644
--- a/source4/torture/drs/drs_init.c
+++ b/source4/torture/drs/drs_init.c
@@ -62,7 +62,7 @@ static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx,
/**
* DRSUAPI torture module initialization
*/
-NTSTATUS torture_drs_init(void)
+NTSTATUS torture_drs_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite;
TALLOC_CTX *mem_ctx = talloc_autofree_context();
diff --git a/source4/torture/krb5/kdc-heimdal.c b/source4/torture/krb5/kdc-heimdal.c
index 70fcc32df17..b6c811724bc 100644
--- a/source4/torture/krb5/kdc-heimdal.c
+++ b/source4/torture/krb5/kdc-heimdal.c
@@ -685,7 +685,7 @@ static bool torture_krb5_as_req_aes_rc4(struct torture_context *tctx)
TORTURE_KRB5_TEST_AES_RC4);
}
-NTSTATUS torture_krb5_init(void)
+NTSTATUS torture_krb5_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "krb5");
struct torture_suite *kdc_suite = torture_suite_create(suite, "kdc");
diff --git a/source4/torture/krb5/kdc-mit.c b/source4/torture/krb5/kdc-mit.c
index 88bff0b0ee4..882627eb6f3 100644
--- a/source4/torture/krb5/kdc-mit.c
+++ b/source4/torture/krb5/kdc-mit.c
@@ -38,7 +38,7 @@ static bool test_skip(struct torture_context *tctx)
return true;
}
-NTSTATUS torture_krb5_init(void)
+NTSTATUS torture_krb5_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite =
torture_suite_create(talloc_autofree_context(), "krb5");
diff --git a/source4/torture/ldap/common.c b/source4/torture/ldap/common.c
index a37af68e1fd..50c5e033cb5 100644
--- a/source4/torture/ldap/common.c
+++ b/source4/torture/ldap/common.c
@@ -129,7 +129,7 @@ NTSTATUS torture_ldap_close(struct ldap_connection *conn)
return NT_STATUS_OK;
}
-NTSTATUS torture_ldap_init(void)
+NTSTATUS torture_ldap_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "ldap");
torture_suite_add_simple_test(suite, "bench-cldap", torture_bench_cldap);
diff --git a/source4/torture/libnet/libnet.c b/source4/torture/libnet/libnet.c
index 3b9548cec90..7b9c31a6daa 100644
--- a/source4/torture/libnet/libnet.c
+++ b/source4/torture/libnet/libnet.c
@@ -24,7 +24,7 @@
#include "libnet/libnet.h"
#include "torture/libnet/proto.h"
-NTSTATUS torture_net_init(void)
+NTSTATUS torture_net_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(
talloc_autofree_context(), "net");
diff --git a/source4/torture/libnetapi/libnetapi.c b/source4/torture/libnetapi/libnetapi.c
index 5e316ac2559..856b2c8f997 100644
--- a/source4/torture/libnetapi/libnetapi.c
+++ b/source4/torture/libnetapi/libnetapi.c
@@ -80,7 +80,7 @@ static bool torture_libnetapi_initialize(struct torture_context *tctx)
return true;
}
-NTSTATUS torture_libnetapi_init(void)
+NTSTATUS torture_libnetapi_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite;
diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c
index 2e78c3a4020..c714a975c76 100644
--- a/source4/torture/libsmbclient/libsmbclient.c
+++ b/source4/torture/libsmbclient/libsmbclient.c
@@ -201,7 +201,7 @@ bool torture_libsmbclient_options(struct torture_context *tctx)
return true;
}
-NTSTATUS torture_libsmbclient_init(void)
+NTSTATUS torture_libsmbclient_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite;
diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c
index 353cc270fa4..e7231524a51 100644
--- a/source4/torture/local/local.c
+++ b/source4/torture/local/local.c
@@ -79,7 +79,7 @@
NULL
};
-NTSTATUS torture_local_init(void)
+NTSTATUS torture_local_init(TALLOC_CTX *ctx)
{
int i;
struct torture_suite *suite = torture_suite_create(
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index 2f1043590a7..979f16e5666 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -284,7 +284,7 @@ bool torture_nbench(struct torture_context *torture)
return correct;
}
-NTSTATUS torture_nbench_init(void)
+NTSTATUS torture_nbench_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(
talloc_autofree_context(), "bench");
diff --git a/source4/torture/nbt/nbt.c b/source4/torture/nbt/nbt.c
index 1b7fe49cf84..ac53c9167c5 100644
--- a/source4/torture/nbt/nbt.c
+++ b/source4/torture/nbt/nbt.c
@@ -48,7 +48,7 @@ bool torture_nbt_get_name(struct torture_context *tctx,
return true;
}
-NTSTATUS torture_nbt_init(void)
+NTSTATUS torture_nbt_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(
talloc_autofree_context(), "nbt");
diff --git a/source4/torture/ntp/ntp_signd.c b/source4/torture/ntp/ntp_signd.c
index 18ac1428550..1963e573246 100644
--- a/source4/torture/ntp/ntp_signd.c
+++ b/source4/torture/ntp/ntp_signd.c
@@ -284,7 +284,7 @@ static bool test_ntp_signd(struct torture_context *tctx,
return true;
}
-NTSTATUS torture_ntp_init(void)
+NTSTATUS torture_ntp_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "ntp");
struct torture_rpc_tcase *tcase;
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index ee37158a431..043154b4621 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -241,7 +241,7 @@ bool torture_rap_scan(struct torture_context *torture, struct smbcli_state *cli)
return true;
}
-NTSTATUS torture_rap_init(void)
+NTSTATUS torture_rap_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "rap");
struct torture_suite *suite_basic = torture_suite_create(suite, "basic");
diff --git a/source4/torture/raw/raw.c b/source4/torture/raw/raw.c
index bda463b8a72..5b237d32ebf 100644
--- a/source4/torture/raw/raw.c
+++ b/source4/torture/raw/raw.c
@@ -23,7 +23,7 @@
#include "torture/smbtorture.h"
#include "torture/raw/proto.h"
-NTSTATUS torture_raw_init(void)
+NTSTATUS torture_raw_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(
talloc_autofree_context(), "raw");
diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c
index 4c9f75f05d4..12dcced1e2a 100644
--- a/source4/torture/rpc/rpc.c
+++ b/source4/torture/rpc/rpc.c
@@ -482,7 +482,7 @@ _PUBLIC_ struct torture_test *torture_rpc_tcase_add_test_ex(
return test;
}
-NTSTATUS torture_rpc_init(void)
+NTSTATUS torture_rpc_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "rpc");
diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c
index d8e3a066ced..3c3c22a43f3 100644
--- a/source4/torture/smb2/smb2.c
+++ b/source4/torture/smb2/smb2.c
@@ -143,7 +143,7 @@ struct torture_test *torture_suite_add_2smb2_test(struct torture_suite *suite,
return test;
}
-NTSTATUS torture_smb2_init(void)
+NTSTATUS torture_smb2_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "smb2");
torture_suite_add_simple_test(suite, "connect", torture_smb2_connect);
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index fc50436933f..1595786c2b3 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -560,7 +560,7 @@ int main(int argc, const char *argv[])
if (fn == NULL)
d_printf("Unable to load module from %s\n", poptGetOptArg(pc));
else {
- status = fn();
+ status = fn(NULL);
if (NT_STATUS_IS_ERR(status)) {
d_printf("Error initializing module %s: %s\n",
poptGetOptArg(pc), nt_errstr(status));
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index b066d3e1ac6..01089219b87 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -46,13 +46,13 @@ bool torture_register_suite(struct torture_suite *suite)
_PUBLIC_ int torture_init(void)
{
-#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+#define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
STATIC_smbtorture_MODULES_PROTO;
init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, "smbtorture");
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ run_init_functions(NULL, static_init);
+ run_init_functions(NULL, shared_init);
talloc_free(shared_init);
diff --git a/source4/torture/unix/unix.c b/source4/torture/unix/unix.c
index ec8afef279a..0ea1b51f9bc 100644
--- a/source4/torture/unix/unix.c
+++ b/source4/torture/unix/unix.c
@@ -21,7 +21,7 @@
#include "torture/smbtorture.h"
#include "torture/unix/proto.h"
-NTSTATUS torture_unix_init(void)
+NTSTATUS torture_unix_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite =
torture_suite_create(talloc_autofree_context(), "unix");
diff --git a/source4/torture/vfs/vfs.c b/source4/torture/vfs/vfs.c
index 710e93bf2ef..8c1f1ff6f40 100644
--- a/source4/torture/vfs/vfs.c
+++ b/source4/torture/vfs/vfs.c
@@ -101,7 +101,7 @@ struct torture_test *torture_suite_add_2ns_smb2_test(struct torture_suite *suite
return test;
}
-NTSTATUS torture_vfs_init(void)
+NTSTATUS torture_vfs_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(
talloc_autofree_context(), "vfs");
diff --git a/source4/torture/winbind/winbind.c b/source4/torture/winbind/winbind.c
index 29ef5dbaaf0..74de3819722 100644
--- a/source4/torture/winbind/winbind.c
+++ b/source4/torture/winbind/winbind.c
@@ -290,7 +290,7 @@ static bool torture_winbind_pac_krb5(struct torture_context *tctx)
return torture_winbind_pac(tctx, NULL, "krb5");
}
-NTSTATUS torture_winbind_init(void)
+NTSTATUS torture_winbind_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "winbind");
struct torture_suite *pac_suite;
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index d83b35a5429..02f24609cc5 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -28,7 +28,7 @@
#include "lib/socket/netif.h"
#include "param/param.h"
-NTSTATUS server_service_web_init(void);
+NTSTATUS server_service_web_init(TALLOC_CTX *);
/* don't allow connections to hang around forever */
#define HTTP_TIMEOUT 120
@@ -370,7 +370,7 @@ failed:
/* called at smbd startup - register ourselves as a server service */
-NTSTATUS server_service_web_init(void)
+NTSTATUS server_service_web_init(TALLOC_CTX *ctx)
{
return register_server_service("web", websrv_task_init);
}
diff --git a/source4/winbind/winbindd.c b/source4/winbind/winbindd.c
index 80abd7a3105..6e6f262cf7a 100644
--- a/source4/winbind/winbindd.c
+++ b/source4/winbind/winbindd.c
@@ -86,9 +86,9 @@ static void winbindd_task_init(struct task_server *task)
}
/* called at winbindd startup - register ourselves as a server service */
-NTSTATUS server_service_winbindd_init(void);
+NTSTATUS server_service_winbindd_init(TALLOC_CTX *);
-NTSTATUS server_service_winbindd_init(void)
+NTSTATUS server_service_winbindd_init(TALLOC_CTX *ctx)
{
NTSTATUS status = register_server_service("winbindd", winbindd_task_init);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index 75a927aaac9..d054a222cad 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -506,7 +506,7 @@ static void wreplsrv_task_init(struct task_server *task)
/*
register ourselves as a available server
*/
-NTSTATUS server_service_wrepl_init(void)
+NTSTATUS server_service_wrepl_init(TALLOC_CTX *ctx)
{
return register_server_service("wrepl", wreplsrv_task_init);
}