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 /source3 | |
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 'source3')
106 files changed, 175 insertions, 170 deletions
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') |