diff options
author | Jeremy Allison <jra@samba.org> | 2017-04-20 12:24:43 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-04-22 01:17:00 +0200 |
commit | 306783d6f5d577a0b8bd31d659d8c802f22f0333 (patch) | |
tree | 20e1c5a45b027d061d3dc0cab9028bbccaef7ab7 /source4 | |
parent | 9342b3ebf7fe7b7565406bd9a606b6676c08b029 (diff) | |
download | samba-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
Diffstat (limited to 'source4')
78 files changed, 131 insertions, 131 deletions
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); } |