Revision: 20040 http://gar.svn.sourceforge.net/gar/?rev=20040&view=rev Author: chninkel Date: 2013-01-06 16:14:37 +0000 (Sun, 06 Jan 2013) Log Message: ----------- gar/v2: skiped standard Solaris libraries for direct binding check
Some solaris standard libraries export non directly bindable symbols (libc.so.1 forbids direct binding to functions free, malloc...) Some libraries, often plugins, are only linked to these symbols which triggers false positives for the direct binding check. We simply skip the check for the solaris standard libraries, this is ok because Sun guarantees the stability of these libraries. Direct binding is mostly important for opencsw provided libraries. Modified Paths: -------------- csw/mgar/gar/v2/lib/python/dependency_checks.py csw/mgar/gar/v2/lib/python/package_checks_test.py csw/mgar/gar/v2/lib/python/testdata/vsftpd_stats.py Modified: csw/mgar/gar/v2/lib/python/dependency_checks.py =================================================================== --- csw/mgar/gar/v2/lib/python/dependency_checks.py 2013-01-06 15:27:51 UTC (rev 20039) +++ csw/mgar/gar/v2/lib/python/dependency_checks.py 2013-01-06 16:14:37 UTC (rev 20040) @@ -39,14 +39,14 @@ PREFERRED_DIRECTORY_PROVIDERS = set([u"CSWcommon"]) -BASE_SOLARIS_LIBRARIES = ( +BASE_SOLARIS_LIBRARIES = set([ "libsocket.so.1", "libnsl.so.1", "libdl.so.1", "librt.so.1", "libresolv.so.2", "libpthread.so.1", # linked by default with C++, see "Default C++ Libraries" # in Solaris Studio C++ User's Guide "libCstd.so.1", "libCrun.so.1", "libm.so.1", "libm.so.2", "libw.so.1", "libcx.so.1", "libc.so.1", "libC.so.3", "libC.so.5", -) +]) ALLOWED_VERSION_DEPENDENCIES = { "libc.so.1": ['SYSVABI_1.3', 'SUNWprivate_1.1', 'SUNW_1.22.6', @@ -195,12 +195,21 @@ # symbol is directly bound to because that definitely means that # -B direct or -z direct was used. binary_elf_info = pkg_data["binaries_elf_info"][binary_info["path"]] + libs = set(binary_info["needed sonames"]) + + # we skip the standard Solaris libraries: a lot of plugins only + # link to non directly bindable symbols of libc.so.1, librt.so.1 + # which trigger false positives. + # Direct binding really matters for opencsw libraries so it's + # easier and riskless to just skip theses libraries + libs.difference_update(BASE_SOLARIS_LIBRARIES) + db_libs = set() for syminfo in binary_elf_info['symbol table']: if (syminfo['shndx'] == 'UNDEF' and syminfo['flags'] and 'D' in syminfo['flags'] and 'B' in syminfo['flags']): db_libs.add(syminfo['soname']) - no_db_libs = db_libs.symmetric_difference(binary_info["needed sonames"]) + no_db_libs = libs.difference(db_libs) if no_db_libs: messenger.Message( Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py =================================================================== --- csw/mgar/gar/v2/lib/python/package_checks_test.py 2013-01-06 15:27:51 UTC (rev 20039) +++ csw/mgar/gar/v2/lib/python/package_checks_test.py 2013-01-06 16:14:37 UTC (rev 20040) @@ -1523,10 +1523,11 @@ self.error_mgr_mock.NeedFile( mox.IsA(str), mox.IsA(str), mox.IsA(str)) - self.error_mgr_mock.ReportError( - 'CSWvsftpd', - 'no-direct-binding', - '/opt/csw/sbin/vsftpd is not directly bound to soname ' + soname) + for soname in ['libssl.so.1.0.0']: + self.error_mgr_mock.ReportError( + 'CSWvsftpd', + 'no-direct-binding', + '/opt/csw/sbin/vsftpd is not directly bound to soname ' + soname) def testDirectBindingNoSyminfo(self): self.pkg_data = vsftpd_stats @@ -1570,9 +1571,8 @@ self.error_mgr_mock.NeedFile( mox.IsA(str), mox.IsA(str), mox.IsA(str)) - for soname in [ 'libpam.so.1', 'libnsl.so.1', 'libcrypto.so.1.0.0', - 'librt.so.1', 'libsendfile.so.1', 'libssl.so.1.0.0', - 'libsocket.so.1', 'libc.so.1' ]: + for soname in ['libsendfile.so.1', 'libssl.so.1.0.0', 'libcrypto.so.1.0.0', + 'libpam.so.1']: self.error_mgr_mock.ReportError( 'CSWvsftpd', 'no-direct-binding', Modified: csw/mgar/gar/v2/lib/python/testdata/vsftpd_stats.py =================================================================== --- csw/mgar/gar/v2/lib/python/testdata/vsftpd_stats.py 2013-01-06 15:27:51 UTC (rev 20039) +++ csw/mgar/gar/v2/lib/python/testdata/vsftpd_stats.py 2013-01-06 16:14:37 UTC (rev 20040) @@ -106,7 +106,7 @@ 'symbol': 'tunable_anon_max_rate', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_load_verify_locations', @@ -148,7 +148,7 @@ 'symbol': 'vsf_sysutil_shutdown_failok', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_use_certificate_chain_file', @@ -238,7 +238,7 @@ 'symbol': 'tunable_dual_log_enable', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_free', @@ -280,7 +280,7 @@ 'symbol': '.st_int', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_verify', @@ -568,7 +568,7 @@ 'symbol': 'vsf_sysutil_getpwuid', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_ctrl', @@ -622,7 +622,7 @@ 'symbol': 'priv_sock_get_int', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CIPHER_get_name', @@ -646,7 +646,7 @@ 'symbol': 'nanosleep', 'version': 'SUNW_0.7'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_set_fd', @@ -658,7 +658,7 @@ 'symbol': 'tunable_dirlist_enable', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_rbio', @@ -712,7 +712,7 @@ 'symbol': 'setregid', 'version': 'SUNW_0.9'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_cipher_list', @@ -1258,7 +1258,7 @@ 'symbol': 'tunable_sslv2', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_read', @@ -1378,7 +1378,7 @@ 'symbol': 'vsf_sysutil_exit', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_error', @@ -1798,7 +1798,7 @@ 'symbol': 'vsf_sysutil_wait', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_shutdown', @@ -2014,7 +2014,7 @@ 'symbol': 'str_right', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_peer_certificate', @@ -2062,7 +2062,7 @@ 'symbol': '_edata', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CIPHER_get_version', @@ -2128,7 +2128,7 @@ 'symbol': 'vsf_sysutil_isspace', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSLv23_server_method', @@ -2158,7 +2158,7 @@ 'symbol': 'vsf_sysutil_setuid', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_wbio', @@ -2230,7 +2230,7 @@ 'symbol': 'vsf_sysutil_getpwnam', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_current_cipher', @@ -2536,13 +2536,13 @@ 'symbol': 'vsf_sysutil_qsort', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_new', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_load_error_strings', @@ -2674,7 +2674,7 @@ 'symbol': 'mkdir', 'version': 'SYSVABI_1.3'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_shutdown', @@ -2806,7 +2806,7 @@ 'symbol': 'tunable_delay_successful_login', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_ctrl', @@ -2848,7 +2848,7 @@ 'symbol': 'vsf_tcp_wrapper_ok', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_accept', @@ -3070,7 +3070,7 @@ 'symbol': '__ctype', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_client_CA_list', @@ -3124,7 +3124,7 @@ 'symbol': 'free', 'version': 'SYSVABI_1.3'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_session_id_context', @@ -3142,7 +3142,7 @@ 'symbol': 'vsf_secbuf_free', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_timeout', @@ -3382,7 +3382,7 @@ 'symbol': 'tunable_pasv_max_port', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_new', @@ -4042,7 +4042,7 @@ 'symbol': 'str_list_get_pstr', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_load_client_CA_file', @@ -4132,7 +4132,7 @@ 'symbol': 'tunable_pasv_address', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_write', @@ -4390,7 +4390,7 @@ 'symbol': 'str_mid_to_end', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_library_init', @@ -4600,7 +4600,7 @@ 'symbol': 'tunable_deny_email_enable', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_peek', @@ -4738,7 +4738,7 @@ 'symbol': 'vsf_sysutil_activate_oobinline', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_use_PrivateKey_file', @@ -4894,7 +4894,7 @@ 'symbol': 'tunable_anon_max_rate', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_load_verify_locations', @@ -4936,7 +4936,7 @@ 'symbol': 'vsf_sysutil_shutdown_failok', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_use_certificate_chain_file', @@ -5026,7 +5026,7 @@ 'symbol': 'tunable_dual_log_enable', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_free', @@ -5068,7 +5068,7 @@ 'symbol': '.st_int', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_verify', @@ -5356,7 +5356,7 @@ 'symbol': 'vsf_sysutil_getpwuid', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_ctrl', @@ -5410,7 +5410,7 @@ 'symbol': 'priv_sock_get_int', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CIPHER_get_name', @@ -5434,7 +5434,7 @@ 'symbol': 'nanosleep', 'version': 'SUNW_0.7'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_set_fd', @@ -5446,7 +5446,7 @@ 'symbol': 'tunable_dirlist_enable', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_rbio', @@ -5500,7 +5500,7 @@ 'symbol': 'setregid', 'version': 'SUNW_0.9'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_cipher_list', @@ -6046,7 +6046,7 @@ 'symbol': 'tunable_sslv2', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_read', @@ -6166,7 +6166,7 @@ 'symbol': 'vsf_sysutil_exit', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_error', @@ -6586,7 +6586,7 @@ 'symbol': 'vsf_sysutil_wait', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_shutdown', @@ -6802,7 +6802,7 @@ 'symbol': 'str_right', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_peer_certificate', @@ -6850,7 +6850,7 @@ 'symbol': '_edata', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CIPHER_get_version', @@ -6916,7 +6916,7 @@ 'symbol': 'vsf_sysutil_isspace', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSLv23_server_method', @@ -6946,7 +6946,7 @@ 'symbol': 'vsf_sysutil_setuid', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_wbio', @@ -7018,7 +7018,7 @@ 'symbol': 'vsf_sysutil_getpwnam', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_current_cipher', @@ -7324,13 +7324,13 @@ 'symbol': 'vsf_sysutil_qsort', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_new', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_load_error_strings', @@ -7462,7 +7462,7 @@ 'symbol': 'mkdir', 'version': 'SYSVABI_1.3'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_get_shutdown', @@ -7594,7 +7594,7 @@ 'symbol': 'tunable_delay_successful_login', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_ctrl', @@ -7636,7 +7636,7 @@ 'symbol': 'vsf_tcp_wrapper_ok', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_accept', @@ -7858,7 +7858,7 @@ 'symbol': '__ctype', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_client_CA_list', @@ -7912,7 +7912,7 @@ 'symbol': 'free', 'version': 'SYSVABI_1.3'}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_session_id_context', @@ -7930,7 +7930,7 @@ 'symbol': 'vsf_secbuf_free', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_set_timeout', @@ -8170,7 +8170,7 @@ 'symbol': 'tunable_pasv_max_port', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_new', @@ -8830,7 +8830,7 @@ 'symbol': 'str_list_get_pstr', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_load_client_CA_file', @@ -8920,7 +8920,7 @@ 'symbol': 'tunable_pasv_address', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_write', @@ -9178,7 +9178,7 @@ 'symbol': 'str_mid_to_end', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_library_init', @@ -9388,7 +9388,7 @@ 'symbol': 'tunable_deny_email_enable', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_peek', @@ -9526,7 +9526,7 @@ 'symbol': 'vsf_sysutil_activate_oobinline', 'version': None}, {'bind': 'GLOB', - 'flags': 'DBL', + 'flags': 'D', 'shndx': 'UNDEF', 'soname': 'libssl.so.1.0.0', 'symbol': 'SSL_CTX_use_PrivateKey_file', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel