diff options
-rw-r--r-- | source4/auth/auth.c | 5 | ||||
-rw-r--r-- | source4/auth/gensec/gensec.c | 6 | ||||
-rw-r--r-- | source4/build/smb_build/header.pm | 11 | ||||
-rw-r--r-- | source4/cldap_server/netlogon.c | 2 | ||||
-rw-r--r-- | source4/lib/events/events.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/common/ldb_modules.c | 12 | ||||
-rw-r--r-- | source4/lib/ldb/include/ldb_private.h | 6 | ||||
-rw-r--r-- | source4/libcli/raw/interfaces.h | 18 | ||||
-rw-r--r-- | source4/libcli/smb2/read.c | 13 | ||||
-rw-r--r-- | source4/ntptr/ntptr_base.c | 1 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_base.c | 10 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs_generic.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/sysdep/sys_lease.c | 1 | ||||
-rw-r--r-- | source4/ntvfs/sysdep/sys_notify.c | 1 | ||||
-rw-r--r-- | source4/param/share.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/service_rpc.c | 12 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls.c | 26 | ||||
-rw-r--r-- | source4/smb_server/smb2/fileio.c | 10 | ||||
-rw-r--r-- | source4/smbd/process_model.c | 3 | ||||
-rw-r--r-- | source4/smbd/server.c | 12 | ||||
-rw-r--r-- | source4/torture/torture.c | 12 | ||||
-rw-r--r-- | source4/winbind/idmap.c | 4 |
22 files changed, 141 insertions, 32 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c index af3796a70d..6c86cf2d7c 100644 --- a/source4/auth/auth.c +++ b/source4/auth/auth.c @@ -516,6 +516,11 @@ const struct auth_critical_sizes *auth_interface_version(void) _PUBLIC_ NTSTATUS auth_init(void) { static bool initialized = false; + extern NTSTATUS auth_developer_init(void); + extern NTSTATUS auth_winbind_init(void); + extern NTSTATUS auth_anonymous_init(void); + extern NTSTATUS auth_unix_init(void); + extern NTSTATUS auth_sam_init(void); init_module_fn static_init[] = { STATIC_auth_MODULES }; diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c index 59c19b96ab..59ad15740e 100644 --- a/source4/auth/gensec/gensec.c +++ b/source4/auth/gensec/gensec.c @@ -1268,6 +1268,12 @@ static int sort_gensec(struct gensec_security_ops **gs1, struct gensec_security_ _PUBLIC_ NTSTATUS gensec_init(struct loadparm_context *lp_ctx) { static bool initialized = false; + extern NTSTATUS gensec_sasl_init(void); + extern NTSTATUS gensec_krb5_init(void); + extern NTSTATUS gensec_schannel_init(void); + extern NTSTATUS gensec_spnego_init(void); + extern NTSTATUS gensec_gssapi_init(void); + extern NTSTATUS gensec_ntlmssp_init(void); init_module_fn static_init[] = { STATIC_gensec_MODULES }; init_module_fn *shared_init; diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm index c2bdbaf4c8..ffac5e2601 100644 --- a/source4/build/smb_build/header.pm +++ b/source4/build/smb_build/header.pm @@ -42,17 +42,6 @@ sub _prepare_build_h($) $DEFINE->{VAL} = "\\\n"; foreach (@{$key->{INIT_FUNCTIONS}}) { $DEFINE->{VAL} .= "\t$_, \\\n"; - unless (/{/) { - my $fn = $key->{INIT_FUNCTION_TYPE}; - my $n = $_; - if ($fn =~ /\(\*\)/) { - $fn =~ s/\(\*\)/$n/; - $output .= "$fn;\n"; - } else { - $n =~ s/\&//; - $output .= "$fn $n;\n"; - } - } } $DEFINE->{VAL} .= "\t$key->{INIT_FUNCTION_SENTINEL} \n"; diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c index 32a71e43af..a524a6f8bd 100644 --- a/source4/cldap_server/netlogon.c +++ b/source4/cldap_server/netlogon.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "libcli/ldap/ldap_ndr.h" #include "lib/ldb/include/ldb.h" #include "lib/ldb/include/ldb_errors.h" #include "lib/events/events.h" @@ -28,6 +27,7 @@ #include "smbd/service_task.h" #include "cldap_server/cldap_server.h" #include "librpc/gen_ndr/ndr_misc.h" +#include "libcli/ldap/ldap_ndr.h" #include "dsdb/samdb/samdb.h" #include "auth/auth.h" #include "ldb_wrap.h" diff --git a/source4/lib/events/events.c b/source4/lib/events/events.c index 555a5092cc..5d43a91161 100644 --- a/source4/lib/events/events.c +++ b/source4/lib/events/events.c @@ -102,6 +102,9 @@ void event_set_default_backend(const char *backend) static void event_backend_init(void) { #if _SAMBA_BUILD_ + NTSTATUS s4_events_standard_init(void); + NTSTATUS s4_events_select_init(void); + NTSTATUS s4_events_epoll_init(void); init_module_fn static_init[] = { STATIC_LIBEVENTS_MODULES }; if (event_backends) return; run_init_functions(static_init); diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index 34e0afbf93..eece9af5f7 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -126,14 +126,16 @@ static struct ops_list_entry { struct ops_list_entry *next; } *registered_modules = NULL; +#define LDB_MODULE(name) (&ldb_ ## name ## _module_ops) + #ifndef STATIC_LIBLDB_MODULES #define STATIC_LIBLDB_MODULES \ - &ldb_operational_module_ops, \ - &ldb_rdn_name_module_ops, \ - &ldb_paged_results_module_ops, \ - &ldb_server_sort_module_ops, \ - &ldb_asq_module_ops, \ + LDB_MODULE(operational), \ + LDB_MODULE(rdn_name), \ + LDB_MODULE(paged_results), \ + LDB_MODULE(server_sort), \ + LDB_MODULE(asq), \ NULL #endif diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index 0ffba9d99b..ea8533bc38 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -188,8 +188,14 @@ extern const struct ldb_module_ops ldb_asq_module_ops; extern const struct ldb_module_ops ldb_server_sort_module_ops; extern const struct ldb_module_ops ldb_ldap_module_ops; extern const struct ldb_module_ops ldb_ildap_module_ops; +extern const struct ldb_module_ops ldb_paged_searches_module_ops; extern const struct ldb_module_ops ldb_tdb_module_ops; +extern const struct ldb_module_ops ldb_skel_module_ops; +extern const struct ldb_module_ops ldb_subtree_rename_module_ops; +extern const struct ldb_module_ops ldb_subtree_delete_module_ops; extern const struct ldb_module_ops ldb_sqlite3_module_ops; +extern const struct ldb_module_ops ldb_wins_ldb_module_ops; +extern const struct ldb_module_ops ldb_ranged_results_module_ops; extern const struct ldb_backend_ops ldb_tdb_backend_ops; extern const struct ldb_backend_ops ldb_sqlite3_backend_ops; diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index 3965c58204..61441b2cdc 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -1706,19 +1706,27 @@ union smb_read { /* static body buffer 48 (0x30) bytes */ /* uint16_t buffer_code; 0x31 = 0x30 + 1 */ - uint16_t _pad; + uint8_t _pad; + uint8_t reserved; uint32_t length; uint64_t offset; /* struct smb2_handle handle; */ - uint64_t unknown1; /* 0x0000000000000000 */ - uint64_t unknown2; /* 0x0000000000000000 */ + uint32_t min_count; + uint32_t channel; + uint32_t remaining; + /* the docs give no indication of what + these channel variables are for */ + uint16_t channel_offset; + uint16_t channel_length; } in; struct { /* static body buffer 16 (0x10) bytes */ /* uint16_t buffer_code; 0x11 = 0x10 + 1 */ - /* uint16_t data_ofs; */ + /* uint8_t data_ofs; */ + /* uint8_t reserved; */ /* uint32_t data_size; */ - uint64_t unknown1; /* 0x0000000000000000 */ + uint32_t remaining; + uint32_t reserved; /* dynamic body */ DATA_BLOB data; diff --git a/source4/libcli/smb2/read.c b/source4/libcli/smb2/read.c index b61f918481..9d40e32a4d 100644 --- a/source4/libcli/smb2/read.c +++ b/source4/libcli/smb2/read.c @@ -33,12 +33,16 @@ struct smb2_request *smb2_read_send(struct smb2_tree *tree, struct smb2_read *io req = smb2_request_init_tree(tree, SMB2_OP_READ, 0x30, true, 0); if (req == NULL) return NULL; - SSVAL(req->out.body, 0x02, 0); /* pad */ + SCVAL(req->out.body, 0x02, 0); /* pad */ + SCVAL(req->out.body, 0x03, 0); /* reserved */ SIVAL(req->out.body, 0x04, io->in.length); SBVAL(req->out.body, 0x08, io->in.offset); smb2_push_handle(req->out.body+0x10, &io->in.file.handle); - SBVAL(req->out.body, 0x20, io->in.unknown1); - SBVAL(req->out.body, 0x28, io->in.unknown2); + SIVAL(req->out.body, 0x20, io->in.min_count); + SIVAL(req->out.body, 0x24, io->in.channel); + SIVAL(req->out.body, 0x28, io->in.remaining); + SSVAL(req->out.body, 0x2C, io->in.channel_offset); + SSVAL(req->out.body, 0x2E, io->in.channel_length); smb2_transport_send(req); @@ -67,7 +71,8 @@ NTSTATUS smb2_read_recv(struct smb2_request *req, return status; } - io->out.unknown1 = BVAL(req->in.body, 0x08); + io->out.remaining = IVAL(req->in.body, 0x08); + io->out.reserved = IVAL(req->in.body, 0x0C); return smb2_request_destroy(req); } diff --git a/source4/ntptr/ntptr_base.c b/source4/ntptr/ntptr_base.c index 26e192d64b..0000337cb0 100644 --- a/source4/ntptr/ntptr_base.c +++ b/source4/ntptr/ntptr_base.c @@ -71,6 +71,7 @@ NTSTATUS ntptr_register(const void *_ops) NTSTATUS ntptr_init(struct loadparm_context *lp_ctx) { + extern NTSTATUS ntptr_simple_ldb_init(void); init_module_fn static_init[] = { STATIC_ntptr_MODULES }; init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "ntptr"); diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c index 51faa44372..8f574fa96b 100644 --- a/source4/ntvfs/ntvfs_base.c +++ b/source4/ntvfs/ntvfs_base.c @@ -204,6 +204,16 @@ NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, e NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx) { static bool initialized = false; + extern NTSTATUS ntvfs_posix_init(void); + extern NTSTATUS ntvfs_cifs_init(void); + extern NTSTATUS ntvfs_nbench_init(void); + extern NTSTATUS ntvfs_unixuid_init(void); + extern NTSTATUS ntvfs_ipc_init(void); + extern NTSTATUS pvfs_acl_nfs4_init(void); + extern NTSTATUS pvfs_acl_xattr_init(void); + extern NTSTATUS ntvfs_print_init(void); + extern NTSTATUS ntvfs_simple_init(void); + extern NTSTATUS ntvfs_cifs_posix_init(void); init_module_fn static_init[] = { STATIC_ntvfs_MODULES }; init_module_fn *shared_init; diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index e1a86c07c0..fee3269eaf 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -1214,7 +1214,8 @@ static NTSTATUS ntvfs_map_read_finish(struct ntvfs_module_context *ntvfs, break; case RAW_READ_SMB2: rd->smb2.out.data.length= rd2->generic.out.nread; - rd->smb2.out.unknown1 = 0; + rd->smb2.out.remaining = 0; + rd->smb2.out.reserved = 0; break; default: return NT_STATUS_INVALID_LEVEL; diff --git a/source4/ntvfs/sysdep/sys_lease.c b/source4/ntvfs/sysdep/sys_lease.c index 28dd27a708..b8a165aa51 100644 --- a/source4/ntvfs/sysdep/sys_lease.c +++ b/source4/ntvfs/sysdep/sys_lease.c @@ -112,6 +112,7 @@ _PUBLIC_ NTSTATUS sys_lease_register(const struct sys_lease_ops *backend) _PUBLIC_ NTSTATUS sys_lease_init(void) { static bool initialized = false; + extern NTSTATUS sys_lease_linux_init(void); init_module_fn static_init[] = { STATIC_sys_lease_MODULES }; diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 84ba745f5b..eb5cc3793f 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -124,6 +124,7 @@ _PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) _PUBLIC_ NTSTATUS sys_notify_init(void) { static bool initialized = false; + extern NTSTATUS sys_notify_inotify_init(void); init_module_fn static_init[] = { STATIC_sys_notify_MODULES }; diff --git a/source4/param/share.c b/source4/param/share.c index bc2999b03d..51134d8970 100644 --- a/source4/param/share.c +++ b/source4/param/share.c @@ -146,6 +146,8 @@ NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name */ NTSTATUS share_init(void) { + extern NTSTATUS share_ldb_init(void); + extern NTSTATUS share_classic_init(void); init_module_fn static_init[] = { STATIC_share_MODULES }; run_init_functions(static_init); diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c index ddcf1c2a99..e81b8cd0aa 100644 --- a/source4/rpc_server/service_rpc.c +++ b/source4/rpc_server/service_rpc.c @@ -459,6 +459,18 @@ failed: NTSTATUS server_service_rpc_init(void) { + extern NTSTATUS dcerpc_server_wkssvc_init(void); + extern NTSTATUS dcerpc_server_drsuapi_init(void); + extern NTSTATUS dcerpc_server_winreg_init(void); + extern NTSTATUS dcerpc_server_spoolss_init(void); + extern NTSTATUS dcerpc_server_epmapper_init(void); + extern NTSTATUS dcerpc_server_srvsvc_init(void); + extern NTSTATUS dcerpc_server_netlogon_init(void); + extern NTSTATUS dcerpc_server_rpcecho_init(void); + extern NTSTATUS dcerpc_server_unixinfo_init(void); + extern NTSTATUS dcerpc_server_samr_init(void); + extern NTSTATUS dcerpc_server_remote_init(void); + extern NTSTATUS dcerpc_server_lsa_init(void); init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES }; init_module_fn *shared_init = load_samba_modules(NULL, global_loadparm, "dcerpc_server"); diff --git a/source4/scripting/ejs/smbcalls.c b/source4/scripting/ejs/smbcalls.c index 63a80e17db..b1a2f6a37b 100644 --- a/source4/scripting/ejs/smbcalls.c +++ b/source4/scripting/ejs/smbcalls.c @@ -173,6 +173,32 @@ _PUBLIC_ void ejs_exception(const char *reason) */ void smb_setup_ejs_functions(void (*exception_handler)(const char *)) { + extern NTSTATUS ejs_init_security(void); + extern NTSTATUS ejs_init_initshutdown(void); + extern NTSTATUS smb_setup_ejs_reg(void); + extern NTSTATUS smb_setup_ejs_string(void); + extern NTSTATUS ejs_init_lsarpc(void); + extern NTSTATUS ejs_init_rpcecho(void); + extern NTSTATUS ejs_init_winreg(void); + extern NTSTATUS smb_setup_ejs_random(void); + extern NTSTATUS smb_setup_ejs_config(void); + extern NTSTATUS ejs_init_misc(void); + extern NTSTATUS ejs_init_netdfs(void); + extern NTSTATUS smb_setup_ejs_datablob(void); + extern NTSTATUS smb_setup_ejs_auth(void); + extern NTSTATUS smb_setup_ejs_nss(void); + extern NTSTATUS ejs_init_samr(void); + extern NTSTATUS ejs_init_wkssvc(void); + extern NTSTATUS smb_setup_ejs_system(void); + extern NTSTATUS smb_setup_ejs_ldb(void); + extern NTSTATUS ejs_init_svcctl(void); + extern NTSTATUS smb_setup_ejs_nbt(void); + extern NTSTATUS smb_setup_ejs_net(void); + extern NTSTATUS ejs_init_srvsvc(void); + extern NTSTATUS ejs_init_netlogon(void); + extern NTSTATUS ejs_init_drsuapi(void); + extern NTSTATUS ejs_init_irpc(void); + extern NTSTATUS ejs_init_eventlog(void); init_module_fn static_init[] = { STATIC_smbcalls_MODULES }; init_module_fn *shared_init; diff --git a/source4/smb_server/smb2/fileio.c b/source4/smb_server/smb2/fileio.c index 0e3df56b42..8f8b4e771c 100644 --- a/source4/smb_server/smb2/fileio.c +++ b/source4/smb_server/smb2/fileio.c @@ -167,7 +167,8 @@ static void smb2srv_read_send(struct ntvfs_request *ntvfs) /* TODO: avoid the memcpy */ SMB2SRV_CHECK(smb2_push_o16s32_blob(&req->out, 0x02, io->smb2.out.data)); - SBVAL(req->out.body, 0x08, io->smb2.out.unknown1); + SIVAL(req->out.body, 0x08, io->smb2.out.remaining); + SIVAL(req->out.body, 0x0C, io->smb2.out.reserved); smb2srv_send_reply(req); } @@ -185,8 +186,11 @@ void smb2srv_read_recv(struct smb2srv_request *req) io->smb2.in.length = IVAL(req->in.body, 0x04); io->smb2.in.offset = BVAL(req->in.body, 0x08); io->smb2.in.file.ntvfs = smb2srv_pull_handle(req, req->in.body, 0x10); - io->smb2.in.unknown1 = BVAL(req->in.body, 0x20); - io->smb2.in.unknown2 = BVAL(req->in.body, 0x28); + io->smb2.in.min_count = IVAL(req->in.body, 0x20); + io->smb2.in.channel = IVAL(req->in.body, 0x24); + io->smb2.in.remaining = IVAL(req->in.body, 0x28); + io->smb2.in.channel_offset = SVAL(req->in.body, 0x2C); + io->smb2.in.channel_length = SVAL(req->in.body, 0x2E); SMB2SRV_CHECK_FILE_HANDLE(io->smb2.in.file.ntvfs); diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c index fcbe2d9872..2cb551a520 100644 --- a/source4/smbd/process_model.c +++ b/source4/smbd/process_model.c @@ -82,6 +82,9 @@ _PUBLIC_ NTSTATUS register_process_model(const void *_ops) _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx) { + extern NTSTATUS process_model_standard_init(void); + extern NTSTATUS process_model_prefork_init(void); + extern NTSTATUS process_model_single_init(void); init_module_fn static_init[] = { STATIC_process_model_MODULES }; init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "process_model"); diff --git a/source4/smbd/server.c b/source4/smbd/server.c index d6e2fb19e4..3f6cb48013 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -187,6 +187,18 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ bool opt_interactive = false; int opt; poptContext pc; + extern NTSTATUS server_service_wrepl_init(void); + extern NTSTATUS server_service_kdc_init(void); + extern NTSTATUS server_service_ldap_init(void); + extern NTSTATUS server_service_web_init(void); + extern NTSTATUS server_service_ldap_init(void); + extern NTSTATUS server_service_winbind_init(void); + extern NTSTATUS server_service_nbtd_init(void); + extern NTSTATUS server_service_auth_init(void); + extern NTSTATUS server_service_cldapd_init(void); + extern NTSTATUS server_service_smb_init(void); + extern NTSTATUS server_service_drepl_init(void); + extern NTSTATUS server_service_rpc_init(void); init_module_fn static_init[] = { STATIC_service_MODULES }; init_module_fn *shared_init; struct event_context *event_ctx; diff --git a/source4/torture/torture.c b/source4/torture/torture.c index ea8efaa8c3..8a41b72249 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -48,6 +48,18 @@ bool torture_register_suite(struct torture_suite *suite) _PUBLIC_ int torture_init(void) { + extern NTSTATUS torture_base_init(void); + extern NTSTATUS torture_ldap_init(void); + extern NTSTATUS torture_local_init(void); + extern NTSTATUS torture_nbt_init(void); + extern NTSTATUS torture_nbench_init(void); + extern NTSTATUS torture_rap_init(void); + extern NTSTATUS torture_rpc_init(void); + extern NTSTATUS torture_smb2_init(void); + extern NTSTATUS torture_net_init(void); + extern NTSTATUS torture_raw_init(void); + extern NTSTATUS torture_unix_init(void); + extern NTSTATUS torture_winbind_init(void); init_module_fn static_init[] = { STATIC_torture_MODULES }; init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "torture"); diff --git a/source4/winbind/idmap.c b/source4/winbind/idmap.c index 92ac41f1d2..0c729825db 100644 --- a/source4/winbind/idmap.c +++ b/source4/winbind/idmap.c @@ -654,7 +654,7 @@ NTSTATUS idmap_xids_to_sids(struct idmap_context *idmap_ctx, &id[i].sid); } if (!NT_STATUS_IS_OK(id[i].status)) { - DEBUG(1, ("idmapping failed for id[%d]\n", i)); + DEBUG(1, ("idmapping xid_to_sid failed for id[%d]\n", i)); error_count++; } } @@ -699,7 +699,7 @@ NTSTATUS idmap_sids_to_xids(struct idmap_context *idmap_ctx, &id[i].unixid); } if (!NT_STATUS_IS_OK(id[i].status)) { - DEBUG(1, ("idmapping failed for id[%d]\n", i)); + DEBUG(1, ("idmapping sid_to_xid failed for id[%d]\n", i)); error_count++; } } |