From a43774a2577cd852222f4df16eb5a95aa4f11f5e Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 30 Aug 2012 19:09:14 +0300 Subject: s3-waf: avoid exporting init symbols from statically linked modules WAF builds with and without AD DC affect list of statically linked modules that are added into libpdb. This makes impossible to have ABI for libpdb that does not depend on configured features. By making init functions from statically linked modules to have local scope in shared libraries, we avoid unwarranted ABI changes. Additionally, pdb_samba_dsdb imports IDMAP subsystem of source4/ as it is not a shared library. Making its symbols private as well. Finally, in order to have the filtering of symbols work, libpdb has to be public library. --- source3/wscript_build | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'source3/wscript_build') diff --git a/source3/wscript_build b/source3/wscript_build index 66171bfe6c..ca08ed8c42 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -692,14 +692,30 @@ bld.SAMBA3_SUBSYSTEM('TLDAP', source=TLDAP_SRC, deps='asn1util LIBTSOCKET') +static_pdb_modules = ['tdbsam', 'ldap', 'smbpasswd', 'wbc_sam'] +static_pdb_match = filter(lambda x: bld.SAMBA3_IS_STATIC_MODULE('pdb_%s' % x), static_pdb_modules) +private_pdb_match = [] +if bld.SAMBA3_IS_STATIC_MODULE('pdb_samba_dsdb') and bld.AD_DC_BUILD_IS_ENABLED(): + static_pdb_match.append('samba_dsdb') + private_pdb_match.append('!idmap_init') + private_pdb_match.append('!idmap_sids_to_xids') + private_pdb_match.append('!idmap_xids_to_sids') + +private_pdb_match = private_pdb_match + map(lambda x: '!pdb_%s_init' % x, static_pdb_match) + bld.SAMBA3_LIBRARY('pdb', source=PASSDB_SRC, deps='secrets3 GROUPDB SERVER_MUTEX wbclient LIBCLI_AUTH flag_mapping', - private_library=True, + private_library=False, + pc_files=[], + public_headers_install=True, public_headers=''' include/passdb.h passdb/machine_sid.h passdb/lookup_sid.h''', + abi_match=private_pdb_match + ['*'], + abi_directory='passdb/ABI', + vnum='0', vars=locals()) bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX', -- cgit