1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Fix the build.

This commit is contained in:
Jelmer Vernooij 2008-03-08 17:02:40 +01:00
parent 0ba8ac6a14
commit f2e4974471
21 changed files with 97 additions and 48 deletions

View File

@ -89,7 +89,7 @@ PAM_ERRORS_OBJ_FILES = $(addprefix auth/, pam_errors.o)
[MODULE::service_auth]
INIT_FUNCTION = server_service_auth_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = auth_proto.h
PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBSECURITY SAMDB CREDENTIALS

View File

@ -136,6 +136,24 @@ $(1): $(2) ;
endef
# Shared library
# Arguments: Target, dependencies, link flags, soname
define shared_library_template
$(1): $(2)
@echo Linking $$@
@mkdir -p $$(@D)
@$$(SHLD) $$(LDFLAGS) $$(SHLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) \
$(3) \
$$(if $$(SONAMEFLAG), $$(SONAMEFLAG)$(4))
ifneq ($(notdir $(1)), $(notdir $(4)))
$(4): $(1)
@echo "Creating symbolic link for $(4)"
@ln -fs $(notdir $(4)) $(1)
endif
endef
# Shared alias
# Arguments: Target, subsystem name, alias name
define shared_module_alias_template

View File

@ -162,21 +162,7 @@ sub SharedLibrary($$)
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
$self->output(<< "__EOD__"
$ctx->{RESULT_SHARED_LIBRARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
\@echo Linking \$\@
\@mkdir -p \$(\@D)
\@\$(SHLD) \$(LDFLAGS) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS) \\
\$(if \$(SONAMEFLAG), \$(SONAMEFLAG)$ctx->{LIBRARY_SONAME})
ifneq ($ctx->{LIBRARY_REALNAME}, $ctx->{LIBRARY_SONAME})
\@test \$($ctx->{NAME}_VERSION) = \$($ctx->{NAME}_SOVERSION) || ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}
endif
ifdef $ctx->{NAME}_SOVERSION
\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_DEBUGNAME}
endif
__EOD__
);
$self->output("\$(eval \$(call shared_library_template,$ctx->{RESULT_SHARED_LIBRARY}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS),$ctx->{LIBRARY_SONAME}))\n");
}
sub MergedObj($$)

View File

@ -4,7 +4,7 @@
# Start SUBSYSTEM CLDAPD
[MODULE::CLDAPD]
INIT_FUNCTION = server_service_cldapd_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = proto.h
PRIVATE_DEPENDENCIES = \
LIBCLI_CLDAP LIBNETIF process_model

View File

@ -44,7 +44,7 @@ PUBLIC_HEADERS += dsdb/schema/schema.h
# Start SUBSYSTEM DREPL_SRV
[MODULE::DREPL_SRV]
INIT_FUNCTION = server_service_drepl_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = repl/drepl_service_proto.h
PRIVATE_DEPENDENCIES = \
SAMDB \

View File

@ -4,7 +4,7 @@
# Start SUBSYSTEM KDC
[MODULE::KDC]
INIT_FUNCTION = server_service_kdc_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_DEPENDENCIES = \
LIBLDB HEIMDAL HEIMDAL_KDC HEIMDAL_HDB SAMDB
# End SUBSYSTEM KDC

View File

@ -4,7 +4,7 @@
# Start SUBSYSTEM LDAP
[MODULE::LDAP]
INIT_FUNCTION = server_service_ldap_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = proto.h
PRIVATE_DEPENDENCIES = CREDENTIALS \
LIBCLI_LDAP SAMDB \

View File

@ -66,7 +66,7 @@ NBT_SERVER_OBJ_FILES = $(addprefix nbt_server/, \
[MODULE::service_nbtd]
INIT_FUNCTION = server_service_nbtd_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_DEPENDENCIES = NBT_SERVER process_model
service_nbtd_OBJ_FILES = \

View File

@ -70,6 +70,7 @@ NTSTATUS ntptr_register(const void *_ops)
NTSTATUS ntptr_init(struct loadparm_context *lp_ctx)
{
extern int 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");

View File

@ -203,6 +203,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;

View File

@ -123,6 +123,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 };

View File

@ -145,6 +145,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);

View File

@ -16,7 +16,7 @@ PUBLIC_HEADERS += rpc_server/common/common.h
# Start MODULE dcerpc_rpcecho
[MODULE::dcerpc_rpcecho]
INIT_FUNCTION = dcerpc_server_rpcecho_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = NDR_ECHO
# End MODULE dcerpc_rpcecho
################################################
@ -27,7 +27,7 @@ dcerpc_rpcecho_OBJ_FILES = rpc_server/echo/rpc_echo.o
# Start MODULE dcerpc_epmapper
[MODULE::dcerpc_epmapper]
INIT_FUNCTION = dcerpc_server_epmapper_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = NDR_EPMAPPER
# End MODULE dcerpc_epmapper
################################################
@ -38,7 +38,7 @@ dcerpc_epmapper_OBJ_FILES = rpc_server/epmapper/rpc_epmapper.o
# Start MODULE dcerpc_remote
[MODULE::dcerpc_remote]
INIT_FUNCTION = dcerpc_server_remote_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
LIBCLI_SMB NDR_TABLE
# End MODULE dcerpc_remote
@ -51,7 +51,7 @@ dcerpc_remote_OBJ_FILES = rpc_server/remote/dcesrv_remote.o
[MODULE::dcerpc_srvsvc]
INIT_FUNCTION = dcerpc_server_srvsvc_init
PRIVATE_PROTO_HEADER = srvsvc/proto.h
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON NDR_SRVSVC share
# End MODULE dcerpc_srvsvc
@ -63,7 +63,7 @@ dcerpc_srvsvc_OBJ_FILES = $(addprefix rpc_server/srvsvc/, dcesrv_srvsvc.o srvsvc
# Start MODULE dcerpc_wkssvc
[MODULE::dcerpc_wkssvc]
INIT_FUNCTION = dcerpc_server_wkssvc_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON NDR_WKSSVC
# End MODULE dcerpc_wkssvc
@ -75,7 +75,7 @@ dcerpc_wkssvc_OBJ_FILES = rpc_server/wkssvc/dcesrv_wkssvc.o
# Start MODULE dcerpc_unixinfo
[MODULE::dcerpc_unixinfo]
INIT_FUNCTION = dcerpc_server_unixinfo_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON \
SAMDB \
@ -91,7 +91,7 @@ dcerpc_unixinfo_OBJ_FILES = rpc_server/unixinfo/dcesrv_unixinfo.o
[MODULE::dcesrv_samr]
INIT_FUNCTION = dcerpc_server_samr_init
PRIVATE_PROTO_HEADER = samr/proto.h
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
SAMDB \
DCERPC_COMMON \
@ -105,7 +105,7 @@ dcesrv_samr_OBJ_FILES = $(addprefix rpc_server/samr/, dcesrv_samr.o samr_passwor
# Start MODULE dcerpc_winreg
[MODULE::dcerpc_winreg]
INIT_FUNCTION = dcerpc_server_winreg_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
OUTPUT_TYPE = MERGED_OBJ
PRIVATE_DEPENDENCIES = \
registry NDR_WINREG
@ -118,7 +118,7 @@ dcerpc_winreg_OBJ_FILES = rpc_server/winreg/rpc_winreg.o
# Start MODULE dcerpc_netlogon
[MODULE::dcerpc_netlogon]
INIT_FUNCTION = dcerpc_server_netlogon_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON \
SCHANNELDB \
@ -133,7 +133,7 @@ dcerpc_netlogon_OBJ_FILES = rpc_server/netlogon/dcerpc_netlogon.o
# Start MODULE dcerpc_lsa
[MODULE::dcerpc_lsarpc]
INIT_FUNCTION = dcerpc_server_lsa_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_PROTO_HEADER= lsa/proto.h
PRIVATE_DEPENDENCIES = \
SAMDB \
@ -151,7 +151,7 @@ dcerpc_lsarpc_OBJ_FILES = $(addprefix rpc_server/lsa/, dcesrv_lsa.o lsa_init.o l
# Start MODULE dcerpc_spoolss
[MODULE::dcerpc_spoolss]
INIT_FUNCTION = dcerpc_server_spoolss_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
OUTPUT_TYPE = MERGED_OBJ
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON \
@ -167,7 +167,7 @@ dcerpc_spoolss_OBJ_FILES = rpc_server/spoolss/dcesrv_spoolss.o
# Start MODULE dcerpc_drsuapi
[MODULE::dcerpc_drsuapi]
INIT_FUNCTION = dcerpc_server_drsuapi_init
SUBSYSTEM = dcerpc_server
SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
SAMDB \
DCERPC_COMMON \
@ -199,7 +199,7 @@ PUBLIC_HEADERS += rpc_server/dcerpc_server.h
[MODULE::DCESRV]
INIT_FUNCTION = server_service_rpc_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_DEPENDENCIES = dcerpc_server
DCESRV_OBJ_FILES = rpc_server/service_rpc.o

View File

@ -458,7 +458,19 @@ failed:
NTSTATUS server_service_rpc_init(void)
{
init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES };
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_DCESRV_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, global_loadparm, "dcerpc_server");
run_init_functions(static_init);

View File

@ -2,7 +2,7 @@
#
[MODULE::SERVICE_SMB]
INIT_FUNCTION = server_service_smb_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = service_smb_proto.h
PRIVATE_DEPENDENCIES = SMB_SERVER

View File

@ -81,6 +81,9 @@ _PUBLIC_ NTSTATUS register_process_model(const void *_ops)
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");

View File

@ -186,7 +186,19 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
bool opt_interactive = false;
int opt;
poptContext pc;
init_module_fn static_init[] = { STATIC_service_MODULES };
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_smbd_MODULES };
init_module_fn *shared_init;
struct event_context *event_ctx;
NTSTATUS status;

View File

@ -47,14 +47,18 @@ bool torture_register_suite(struct torture_suite *suite)
int torture_init(void)
{
extern NTSTATUS torture_nbt_init();
extern NTSTATUS torture_nbench_init();
extern NTSTATUS torture_rap_init();
extern NTSTATUS torture_rpc_init();
extern NTSTATUS torture_smb2_init();
extern NTSTATUS torture_base_init();
extern NTSTATUS torture_net_init();
extern NTSTATUS torture_winbind_init();
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");

View File

@ -4,7 +4,7 @@
# Start SUBSYSTEM WEB
[MODULE::WEB]
INIT_FUNCTION = server_service_web_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = proto.h
PRIVATE_DEPENDENCIES = ESP LIBTLS smbcalls process_model
# End SUBSYSTEM WEB

View File

@ -4,7 +4,7 @@
# Start SUBSYSTEM WINBIND
[MODULE::WINBIND]
INIT_FUNCTION = server_service_winbind_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = wb_proto.h
PRIVATE_DEPENDENCIES = \
WB_HELPER \

View File

@ -4,7 +4,7 @@
# Start SUBSYSTEM WREPL_SRV
[MODULE::WREPL_SRV]
INIT_FUNCTION = server_service_wrepl_init
SUBSYSTEM = service
SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = wrepl_server_proto.h
PRIVATE_DEPENDENCIES = \
LIBCLI_WREPL WINSDB process_model