From: Jelmer Vernooij Date: Mon, 22 Dec 2008 20:03:09 +0000 (+0100) Subject: Fix missing symbols issues when building with shared libraries. X-Git-Tag: samba-4.0.0alpha6~414 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=c023828962d7050668c38129170121cc50cd300f Fix missing symbols issues when building with shared libraries. --- diff --git a/lib/crypto/config.mk b/lib/crypto/config.mk index ee111bd0882..e39f06dcaeb 100644 --- a/lib/crypto/config.mk +++ b/lib/crypto/config.mk @@ -8,8 +8,7 @@ LIBCRYPTO_OBJ_FILES = $(addprefix $(libcryptosrcdir)/, \ crc32.o md5.o hmacmd5.o md4.o \ arcfour.o sha256.o hmacsha256.o) -[MODULE::TORTURE_LIBCRYPTO] -SUBSYSTEM = smbtorture +[SUBSYSTEM::TORTURE_LIBCRYPTO] PRIVATE_DEPENDENCIES = LIBCRYPTO TORTURE_LIBCRYPTO_OBJ_FILES = $(addprefix $(libcryptosrcdir)/, \ diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index d9cbca06140..a80d10733ba 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -128,7 +128,7 @@ sub SharedModule($$) $self->_prepare_list($ctx, "LINK_FLAGS"); if (defined($ctx->{INIT_FUNCTION}) and $ctx->{INIT_FUNCTION_TYPE} =~ /\(\*\)/ and not ($ctx->{INIT_FUNCTION} =~ /\(/)) { - $self->output("\$($ctx->{NAME}_OBJ_FILES): CFLAGS+=-D$ctx->{INIT_FUNCTION}=init_module\n"); + $self->output("\$($ctx->{NAME}_OBJ_FILES): CFLAGS+=-D$ctx->{INIT_FUNCTION}=samba_init_module\n"); } $self->output("\$(eval \$(call shared_module_template,$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS)))\n"); diff --git a/source4/cldap_server/config.mk b/source4/cldap_server/config.mk index baf2620f32e..045fca3fd00 100644 --- a/source4/cldap_server/config.mk +++ b/source4/cldap_server/config.mk @@ -4,7 +4,7 @@ # Start SUBSYSTEM CLDAPD [MODULE::CLDAPD] INIT_FUNCTION = server_service_cldapd_init -SUBSYSTEM = samba +SUBSYSTEM = service PRIVATE_DEPENDENCIES = \ LIBCLI_CLDAP LIBNETIF process_model # End SUBSYSTEM CLDAPD diff --git a/source4/dsdb/config.mk b/source4/dsdb/config.mk index bd188192a05..2ca4e4ca6d7 100644 --- a/source4/dsdb/config.mk +++ b/source4/dsdb/config.mk @@ -46,7 +46,7 @@ $(eval $(call proto_header_template,$(dsdbsrcdir)/schema/proto.h,$(SAMDB_SCHEMA_ # Start SUBSYSTEM DREPL_SRV [MODULE::DREPL_SRV] INIT_FUNCTION = server_service_drepl_init -SUBSYSTEM = samba +SUBSYSTEM = service PRIVATE_DEPENDENCIES = \ SAMDB \ process_model diff --git a/source4/nbt_server/config.mk b/source4/nbt_server/config.mk index 951949a43f9..b6db2090d25 100644 --- a/source4/nbt_server/config.mk +++ b/source4/nbt_server/config.mk @@ -70,7 +70,7 @@ $(eval $(call proto_header_template,$(nbt_serversrcdir)/nbt_server_proto.h,$(NBT [MODULE::service_nbtd] INIT_FUNCTION = server_service_nbtd_init -SUBSYSTEM = samba +SUBSYSTEM = service PRIVATE_DEPENDENCIES = NBT_SERVER process_model service_nbtd_OBJ_FILES = \ diff --git a/source4/ntp_signd/config.mk b/source4/ntp_signd/config.mk index 3b52a200ce4..07c404d8226 100644 --- a/source4/ntp_signd/config.mk +++ b/source4/ntp_signd/config.mk @@ -4,7 +4,7 @@ # Start SUBSYSTEM NTP_signd [MODULE::NTP_SIGND] INIT_FUNCTION = server_service_ntp_signd_init -SUBSYSTEM = samba +SUBSYSTEM = service PRIVATE_DEPENDENCIES = \ SAMDB NDR_NTP_SIGND # End SUBSYSTEM NTP_SIGND diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index 0cf651dd7c6..acadcc08b07 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -310,7 +310,7 @@ PyTypeObject PyLoadparmService = { .tp_flags = Py_TPFLAGS_DEFAULT, }; -struct loadparm_context *lp_from_py_object(PyObject *py_obj) +_PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj) { struct loadparm_context *lp_ctx; if (PyString_Check(py_obj)) { diff --git a/source4/param/pyparam.h b/source4/param/pyparam.h index 4d7e32d9082..1cda8f1dba4 100644 --- a/source4/param/pyparam.h +++ b/source4/param/pyparam.h @@ -20,6 +20,6 @@ #ifndef _PYPARAM_H_ #define _PYPARAM_H_ -struct loadparm_context *lp_from_py_object(PyObject *py_obj); +_PUBLIC_ struct loadparm_context *lp_from_py_object(PyObject *py_obj); #endif /* _PYPARAM_H_ */ diff --git a/source4/rpc_server/config.mk b/source4/rpc_server/config.mk index f7b3812b06c..f00c975ccaf 100644 --- a/source4/rpc_server/config.mk +++ b/source4/rpc_server/config.mk @@ -219,7 +219,7 @@ PUBLIC_HEADERS += $(rpc_serversrcdir)/dcerpc_server.h [MODULE::DCESRV] INIT_FUNCTION = server_service_rpc_init -SUBSYSTEM = samba +SUBSYSTEM = service PRIVATE_DEPENDENCIES = dcerpc_server DCESRV_OBJ_FILES = $(rpc_serversrcdir)/service_rpc.o diff --git a/source4/smb_server/config.mk b/source4/smb_server/config.mk index cabfedc0ee7..8031c4eb1f1 100644 --- a/source4/smb_server/config.mk +++ b/source4/smb_server/config.mk @@ -13,7 +13,7 @@ $(eval $(call proto_header_template,$(smb_serversrcdir)/service_smb_proto.h,$(SE # [MODULE::SERVICE_SAMBA3_SMB] INIT_FUNCTION = server_service_samba3_smb_init -SUBSYSTEM = samba +SUBSYSTEM = service SERVICE_SAMBA3_SMB_OBJ_FILES = $(smb_serversrcdir)/smb_samba3.o diff --git a/source4/smbd/config.mk b/source4/smbd/config.mk index a5f5aab65e6..26b2c447d55 100644 --- a/source4/smbd/config.mk +++ b/source4/smbd/config.mk @@ -36,5 +36,6 @@ PRIVATE_DEPENDENCIES = \ CLUSTER samba_OBJ_FILES = $(smbdsrcdir)/server.o +$(samba_OBJ_FILES): CFLAGS+=-DSTATIC_service_MODULES="$(service_INIT_FUNCTIONS)NULL" MANPAGES += $(smbdsrcdir)/samba.8 diff --git a/source4/smbd/process_model.mk b/source4/smbd/process_model.mk index d2ef048f409..d216edd4017 100644 --- a/source4/smbd/process_model.mk +++ b/source4/smbd/process_model.mk @@ -4,6 +4,7 @@ # Start MODULE process_model_single [MODULE::process_model_single] INIT_FUNCTION = process_model_single_init +OUTPUT_TYPE = MERGED_OBJ SUBSYSTEM = process_model # End MODULE process_model_single ################################################ diff --git a/source4/smbd/server.c b/source4/smbd/server.c index fd4b21b17f9..0f6d248d822 100644 --- a/source4/smbd/server.c +++ b/source4/smbd/server.c @@ -200,7 +200,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[ extern NTSTATUS server_service_rpc_init(void); extern NTSTATUS server_service_ntp_signd_init(void); extern NTSTATUS server_service_samba3_smb_init(void); - init_module_fn static_init[] = { STATIC_samba_MODULES }; + init_module_fn static_init[] = { STATIC_service_MODULES }; init_module_fn *shared_init; struct event_context *event_ctx; uint16_t stdin_event_flags; diff --git a/source4/torture/config.mk b/source4/torture/config.mk index 71fa391003d..895fef61745 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -9,6 +9,7 @@ TORTURE_UTIL_OBJ_FILES = $(addprefix $(torturesrcdir)/, util_smb.o) [MODULE::TORTURE_BASIC] SUBSYSTEM = smbtorture INIT_FUNCTION = torture_base_init +OUTPUT_TYPE = MERGED_OBJ PRIVATE_DEPENDENCIES = \ LIBCLI_SMB POPT_CREDENTIALS \ TORTURE_UTIL LIBCLI_RAW \ @@ -41,6 +42,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/basic/proto.h,$(TORTURE_BAS ################################# # Start SUBSYSTEM TORTURE_RAW [MODULE::TORTURE_RAW] +OUTPUT_TYPE = MERGED_OBJ SUBSYSTEM = smbtorture INIT_FUNCTION = torture_raw_init PRIVATE_DEPENDENCIES = \ @@ -89,13 +91,14 @@ mkinclude smb2/config.mk mkinclude winbind/config.mk [SUBSYSTEM::TORTURE_NDR] -PRIVATE_DEPENDENCIES = torture +PRIVATE_DEPENDENCIES = torture SERVICE_SMB TORTURE_NDR_OBJ_FILES = $(addprefix $(torturesrcdir)/ndr/, ndr.o winreg.o atsvc.o lsa.o epmap.o dfs.o netlogon.o drsuapi.o spoolss.o samr.o) $(eval $(call proto_header_template,$(torturesrcdir)/ndr/proto.h,$(TORTURE_NDR_OBJ_FILES:.o=.c))) [MODULE::torture_rpc] +OUTPUT_TYPE = MERGED_OBJ # TORTURE_NET and TORTURE_NBT use functions from torture_rpc... #OUTPUT_TYPE = MERGED_OBJ SUBSYSTEM = smbtorture @@ -124,6 +127,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/rpc/proto.h,$(torture_rpc_O ################################# # Start SUBSYSTEM TORTURE_RAP [MODULE::TORTURE_RAP] +OUTPUT_TYPE = MERGED_OBJ SUBSYSTEM = smbtorture INIT_FUNCTION = torture_rap_init PRIVATE_DEPENDENCIES = TORTURE_UTIL LIBCLI_SMB @@ -137,6 +141,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/rap/proto.h,$(TORTURE_RAP_O ################################# # Start SUBSYSTEM TORTURE_AUTH [MODULE::TORTURE_AUTH] +OUTPUT_TYPE = MERGED_OBJ SUBSYSTEM = smbtorture PRIVATE_DEPENDENCIES = \ LIBCLI_SMB gensec auth KERBEROS \ @@ -153,6 +158,7 @@ mkinclude local/config.mk ################################# # Start MODULE TORTURE_NBENCH [MODULE::TORTURE_NBENCH] +OUTPUT_TYPE = MERGED_OBJ SUBSYSTEM = smbtorture INIT_FUNCTION = torture_nbench_init PRIVATE_DEPENDENCIES = TORTURE_UTIL @@ -167,6 +173,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/nbench/proto.h,$(TORTURE_NB # Start MODULE TORTURE_UNIX [MODULE::TORTURE_UNIX] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_unix_init PRIVATE_DEPENDENCIES = TORTURE_UTIL # End MODULE TORTURE_UNIX @@ -180,6 +187,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/unix/proto.h,$(TORTURE_UNIX # Start SUBSYSTEM TORTURE_LDAP [MODULE::TORTURE_LDAP] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_ldap_init PRIVATE_DEPENDENCIES = \ LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture @@ -194,6 +202,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/ldap/proto.h,$(TORTURE_LDAP # Start SUBSYSTEM TORTURE_LDB [MODULE::TORTURE_LDB] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_ldb_init PRIVATE_DEPENDENCIES = \ LDB_WRAP @@ -208,6 +217,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/ldb/proto.h,$(TORTURE_LDB_O # Start SUBSYSTEM TORTURE_NBT [MODULE::TORTURE_NBT] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_nbt_init PRIVATE_DEPENDENCIES = \ LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL torture_rpc @@ -223,6 +233,7 @@ $(eval $(call proto_header_template,$(torturesrcdir)/nbt/proto.h,$(TORTURE_NBT_O # Start SUBSYSTEM TORTURE_NET [MODULE::TORTURE_NET] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_net_init PRIVATE_DEPENDENCIES = \ LIBSAMBA-NET \ diff --git a/source4/torture/local/config.mk b/source4/torture/local/config.mk index 60cbf25edad..36f4f08072a 100644 --- a/source4/torture/local/config.mk +++ b/source4/torture/local/config.mk @@ -2,6 +2,7 @@ # Start SUBSYSTEM TORTURE_LOCAL [MODULE::TORTURE_LOCAL] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_local_init PRIVATE_DEPENDENCIES = \ RPC_NDR_ECHO \ @@ -13,6 +14,7 @@ PRIVATE_DEPENDENCIES = \ TORTURE_AUTH \ TORTURE_UTIL \ TORTURE_NDR \ + TORTURE_LIBCRYPTO \ share \ torture_registry \ PROVISION diff --git a/source4/torture/smb2/config.mk b/source4/torture/smb2/config.mk index 3a1ac5e06cd..e0fc29f2789 100644 --- a/source4/torture/smb2/config.mk +++ b/source4/torture/smb2/config.mk @@ -3,6 +3,7 @@ # Start SUBSYSTEM TORTURE_SMB2 [MODULE::TORTURE_SMB2] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_smb2_init PRIVATE_DEPENDENCIES = \ LIBCLI_SMB2 POPT_CREDENTIALS torture diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 3f9a6607cf5..deae65c2659 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -62,7 +62,7 @@ _PUBLIC_ int torture_init(void) extern NTSTATUS torture_unix_init(void); extern NTSTATUS torture_winbind_init(void); init_module_fn static_init[] = { STATIC_smbtorture_MODULES }; - init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "torture"); + init_module_fn *shared_init = load_samba_modules(NULL, cmdline_lp_ctx, "smbtorture"); run_init_functions(static_init); run_init_functions(shared_init); diff --git a/source4/torture/winbind/config.mk b/source4/torture/winbind/config.mk index 9648a7472b2..d2c57e9c979 100644 --- a/source4/torture/winbind/config.mk +++ b/source4/torture/winbind/config.mk @@ -3,9 +3,10 @@ # Start SUBSYSTEM TORTURE_WINBIND [MODULE::TORTURE_WINBIND] SUBSYSTEM = smbtorture +OUTPUT_TYPE = MERGED_OBJ INIT_FUNCTION = torture_winbind_init PRIVATE_DEPENDENCIES = \ - LIBWINBIND-CLIENT torture + LIBWINBIND-CLIENT torture PAM_ERRORS # End SUBSYSTEM TORTURE_WINBIND ################################# diff --git a/source4/web_server/config.mk b/source4/web_server/config.mk index e034590111d..ff587508fc4 100644 --- a/source4/web_server/config.mk +++ b/source4/web_server/config.mk @@ -4,7 +4,7 @@ # Start SUBSYSTEM WEB [MODULE::WEB] INIT_FUNCTION = server_service_web_init -SUBSYSTEM = samba +SUBSYSTEM = service PRIVATE_DEPENDENCIES = LIBTLS smbcalls process_model LIBPYTHON # End SUBSYSTEM WEB ####################### diff --git a/source4/winbind/config.mk b/source4/winbind/config.mk index 865ff90567a..7be4e3d2131 100644 --- a/source4/winbind/config.mk +++ b/source4/winbind/config.mk @@ -4,7 +4,7 @@ # Start SUBSYSTEM WINBIND [MODULE::WINBIND] INIT_FUNCTION = server_service_winbind_init -SUBSYSTEM = samba +SUBSYSTEM = service PRIVATE_DEPENDENCIES = \ WB_HELPER \ IDMAP \