Version in base suite: 2.9.15.1-5 Base version: snort_2.9.15.1-5 Target version: snort_2.9.20-0+deb11u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/s/snort/snort_2.9.15.1-5.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/s/snort/snort_2.9.20-0+deb11u1.dsc /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/doc/snort_manual.pdf |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/LibnetNT.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/Packet.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/WanPacket.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/npptools.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/ntwdblib.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/pcre.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/wpcap.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/zlib1.dll |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/Packet.lib |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/libdnet/dnet.lib |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/pcre.lib |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/wpcap.lib |binary /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/zlib.lib |binary snort-2.9.20/ChangeLog | 546 snort-2.9.20/Makefile.in | 67 snort-2.9.20/RELEASE.NOTES | 17 snort-2.9.20/VERSION | 2 snort-2.9.20/aclocal.m4 | 3311 - snort-2.9.20/compile | 348 snort-2.9.20/config.guess | 854 snort-2.9.20/config.h.in | 9 snort-2.9.20/config.sub | 409 snort-2.9.20/configure | 2822 - snort-2.9.20/configure.in | 149 snort-2.9.20/debian/changelog | 42 snort-2.9.20/debian/control | 2 snort-2.9.20/debian/my/lisapaper.txt | 2 snort-2.9.20/debian/patches/autoconf |21024 ---------- snort-2.9.20/debian/patches/config | 16 snort-2.9.20/debian/patches/config_disabled_rules | 2 snort-2.9.20/debian/patches/cross.patch | 136 snort-2.9.20/debian/patches/decoding_do_not_assume_ipv4 | 4 snort-2.9.20/debian/patches/documentation | 8 snort-2.9.20/debian/patches/documentation_debian | 6 snort-2.9.20/debian/patches/fix_compile_errors | 38 snort-2.9.20/debian/patches/fix_ftbfs_in_manual.tex | 4 snort-2.9.20/debian/patches/fix_ftbfs_rpc | 78 snort-2.9.20/debian/patches/fix_ftbfs_rpc.patch | 84 snort-2.9.20/debian/patches/fix_upstream_typos | 4 snort-2.9.20/debian/patches/series | 6 snort-2.9.20/debian/patches/signature_documentation | 10 snort-2.9.20/debian/patches/snort_binary_typos | 234 snort-2.9.20/debian/rules | 8 snort-2.9.20/debian/snort-common.postinst | 1 snort-2.9.20/debian/snort-common.postrm | 25 snort-2.9.20/debian/snort-common.preinst | 34 snort-2.9.20/debian/snort-rules-default.README.Debian | 2 snort-2.9.20/debian/snort-stat.8 | 2 snort-2.9.20/debian/snort.lintian-overrides | 6 snort-2.9.20/debian/upstream/metadata | 10 snort-2.9.20/depcomp | 10 snort-2.9.20/doc/Makefile.in | 37 snort-2.9.20/doc/README | 4 snort-2.9.20/doc/README.counts | 20 snort-2.9.20/doc/snort_manual.tex | 122 snort-2.9.20/etc/Makefile.in | 34 snort-2.9.20/etc/file_magic.conf | 2 snort-2.9.20/etc/gen-msg.map | 8 snort-2.9.20/etc/snort.conf | 2 snort-2.9.20/install-sh | 393 snort-2.9.20/ltmain.sh | 5428 +- snort-2.9.20/m4/Makefile.in | 34 snort-2.9.20/missing | 18 snort-2.9.20/preproc_rules/Makefile.in | 34 snort-2.9.20/preproc_rules/decoder.rules | 1 snort-2.9.20/preproc_rules/preprocessor.rules | 7 snort-2.9.20/rpm/Makefile.in | 34 snort-2.9.20/rpm/snort.spec | 4 snort-2.9.20/src/Makefile.am | 1 snort-2.9.20/src/Makefile.in | 48 snort-2.9.20/src/active.c | 2 snort-2.9.20/src/active.h | 2 snort-2.9.20/src/appIdApi.h | 2 snort-2.9.20/src/build.h | 2 snort-2.9.20/src/byte_extract.c | 2 snort-2.9.20/src/byte_extract.h | 2 snort-2.9.20/src/checksum.h | 2 snort-2.9.20/src/control/Makefile.in | 38 snort-2.9.20/src/control/sfcontrol.c | 2 snort-2.9.20/src/control/sfcontrol.h | 4 snort-2.9.20/src/control/sfcontrol_funcs.h | 2 snort-2.9.20/src/cpuclock.h | 2 snort-2.9.20/src/debug.c | 2 snort-2.9.20/src/decode.c | 191 snort-2.9.20/src/decode.h | 18 snort-2.9.20/src/detect.c | 13 snort-2.9.20/src/detect.h | 8 snort-2.9.20/src/detection-plugins/Makefile.in | 38 snort-2.9.20/src/detection-plugins/detection_leaf_node.c | 17 snort-2.9.20/src/detection-plugins/detection_options.c | 4 snort-2.9.20/src/detection-plugins/detection_options.h | 2 snort-2.9.20/src/detection-plugins/sp_appid.c | 2 snort-2.9.20/src/detection-plugins/sp_appid.h | 2 snort-2.9.20/src/detection-plugins/sp_asn1.c | 2 snort-2.9.20/src/detection-plugins/sp_asn1.h | 2 snort-2.9.20/src/detection-plugins/sp_asn1_detect.c | 2 snort-2.9.20/src/detection-plugins/sp_asn1_detect.h | 2 snort-2.9.20/src/detection-plugins/sp_base64_data.c | 2 snort-2.9.20/src/detection-plugins/sp_base64_data.h | 2 snort-2.9.20/src/detection-plugins/sp_base64_decode.c | 2 snort-2.9.20/src/detection-plugins/sp_base64_decode.h | 2 snort-2.9.20/src/detection-plugins/sp_byte_check.c | 50 snort-2.9.20/src/detection-plugins/sp_byte_check.h | 2 snort-2.9.20/src/detection-plugins/sp_byte_extract.c | 15 snort-2.9.20/src/detection-plugins/sp_byte_extract.h | 2 snort-2.9.20/src/detection-plugins/sp_byte_jump.c | 38 snort-2.9.20/src/detection-plugins/sp_byte_jump.h | 2 snort-2.9.20/src/detection-plugins/sp_byte_math.c | 88 snort-2.9.20/src/detection-plugins/sp_byte_math.h | 4 snort-2.9.20/src/detection-plugins/sp_clientserver.c | 2 snort-2.9.20/src/detection-plugins/sp_clientserver.h | 2 snort-2.9.20/src/detection-plugins/sp_cvs.c | 2 snort-2.9.20/src/detection-plugins/sp_cvs.h | 2 snort-2.9.20/src/detection-plugins/sp_dsize_check.c | 2 snort-2.9.20/src/detection-plugins/sp_dsize_check.h | 2 snort-2.9.20/src/detection-plugins/sp_file_data.c | 2 snort-2.9.20/src/detection-plugins/sp_file_data.h | 2 snort-2.9.20/src/detection-plugins/sp_file_type.c | 2 snort-2.9.20/src/detection-plugins/sp_file_type.h | 2 snort-2.9.20/src/detection-plugins/sp_flowbits.c | 13 snort-2.9.20/src/detection-plugins/sp_flowbits.h | 2 snort-2.9.20/src/detection-plugins/sp_ftpbounce.c | 2 snort-2.9.20/src/detection-plugins/sp_ftpbounce.h | 2 snort-2.9.20/src/detection-plugins/sp_hdr_opt_wrap.c | 2 snort-2.9.20/src/detection-plugins/sp_hdr_opt_wrap.h | 2 snort-2.9.20/src/detection-plugins/sp_icmp_code_check.c | 2 snort-2.9.20/src/detection-plugins/sp_icmp_code_check.h | 2 snort-2.9.20/src/detection-plugins/sp_icmp_id_check.c | 2 snort-2.9.20/src/detection-plugins/sp_icmp_id_check.h | 2 snort-2.9.20/src/detection-plugins/sp_icmp_seq_check.c | 2 snort-2.9.20/src/detection-plugins/sp_icmp_seq_check.h | 2 snort-2.9.20/src/detection-plugins/sp_icmp_type_check.c | 2 snort-2.9.20/src/detection-plugins/sp_icmp_type_check.h | 2 snort-2.9.20/src/detection-plugins/sp_ip_fragbits.c | 2 snort-2.9.20/src/detection-plugins/sp_ip_fragbits.h | 2 snort-2.9.20/src/detection-plugins/sp_ip_id_check.c | 2 snort-2.9.20/src/detection-plugins/sp_ip_id_check.h | 2 snort-2.9.20/src/detection-plugins/sp_ip_proto.c | 2 snort-2.9.20/src/detection-plugins/sp_ip_proto.h | 2 snort-2.9.20/src/detection-plugins/sp_ip_same_check.c | 2 snort-2.9.20/src/detection-plugins/sp_ip_same_check.h | 2 snort-2.9.20/src/detection-plugins/sp_ip_tos_check.c | 2 snort-2.9.20/src/detection-plugins/sp_ip_tos_check.h | 2 snort-2.9.20/src/detection-plugins/sp_ipoption_check.c | 2 snort-2.9.20/src/detection-plugins/sp_ipoption_check.h | 2 snort-2.9.20/src/detection-plugins/sp_isdataat.c | 24 snort-2.9.20/src/detection-plugins/sp_isdataat.h | 2 snort-2.9.20/src/detection-plugins/sp_pattern_match.c | 162 snort-2.9.20/src/detection-plugins/sp_pattern_match.h | 2 snort-2.9.20/src/detection-plugins/sp_pcre.c | 2 snort-2.9.20/src/detection-plugins/sp_pcre.h | 2 snort-2.9.20/src/detection-plugins/sp_pkt_data.c | 2 snort-2.9.20/src/detection-plugins/sp_pkt_data.h | 2 snort-2.9.20/src/detection-plugins/sp_react.c | 7 snort-2.9.20/src/detection-plugins/sp_react.h | 2 snort-2.9.20/src/detection-plugins/sp_replace.c | 2 snort-2.9.20/src/detection-plugins/sp_replace.h | 2 snort-2.9.20/src/detection-plugins/sp_respond.h | 2 snort-2.9.20/src/detection-plugins/sp_respond3.c | 2 snort-2.9.20/src/detection-plugins/sp_rpc_check.c | 2 snort-2.9.20/src/detection-plugins/sp_rpc_check.h | 2 snort-2.9.20/src/detection-plugins/sp_session.c | 4 snort-2.9.20/src/detection-plugins/sp_session.h | 2 snort-2.9.20/src/detection-plugins/sp_tcp_ack_check.c | 2 snort-2.9.20/src/detection-plugins/sp_tcp_ack_check.h | 2 snort-2.9.20/src/detection-plugins/sp_tcp_flag_check.c | 2 snort-2.9.20/src/detection-plugins/sp_tcp_flag_check.h | 2 snort-2.9.20/src/detection-plugins/sp_tcp_seq_check.c | 2 snort-2.9.20/src/detection-plugins/sp_tcp_seq_check.h | 2 snort-2.9.20/src/detection-plugins/sp_tcp_win_check.c | 2 snort-2.9.20/src/detection-plugins/sp_tcp_win_check.h | 2 snort-2.9.20/src/detection-plugins/sp_ttl_check.c | 2 snort-2.9.20/src/detection-plugins/sp_ttl_check.h | 2 snort-2.9.20/src/detection-plugins/sp_urilen_check.c | 2 snort-2.9.20/src/detection-plugins/sp_urilen_check.h | 2 snort-2.9.20/src/detection_filter.c | 2 snort-2.9.20/src/detection_filter.h | 2 snort-2.9.20/src/detection_util.c | 2 snort-2.9.20/src/detection_util.h | 2 snort-2.9.20/src/dump.c | 2 snort-2.9.20/src/dump.h | 2 snort-2.9.20/src/dynamic-examples/Makefile.am | 10 snort-2.9.20/src/dynamic-examples/Makefile.in | 46 snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/Makefile.in | 38 snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/sf_preproc_info.h | 2 snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/spp_example.c | 2 snort-2.9.20/src/dynamic-examples/dynamic-rule/Makefile.in | 38 snort-2.9.20/src/dynamic-examples/dynamic-rule/detection_lib_meta.h | 2 snort-2.9.20/src/dynamic-examples/dynamic-rule/rules.c | 2 snort-2.9.20/src/dynamic-examples/dynamic-rule/sid109.c | 2 snort-2.9.20/src/dynamic-examples/dynamic-rule/sid637.c | 2 snort-2.9.20/src/dynamic-output/Makefile.in | 36 snort-2.9.20/src/dynamic-output/libs/Makefile.in | 39 snort-2.9.20/src/dynamic-output/libs/output_lib.c | 2 snort-2.9.20/src/dynamic-output/plugins/Makefile.in | 38 snort-2.9.20/src/dynamic-output/plugins/output.h | 2 snort-2.9.20/src/dynamic-output/plugins/output_api.h | 2 snort-2.9.20/src/dynamic-output/plugins/output_base.c | 2 snort-2.9.20/src/dynamic-output/plugins/output_common.h | 2 snort-2.9.20/src/dynamic-output/plugins/output_lib.h | 2 snort-2.9.20/src/dynamic-output/plugins/output_plugin.c | 2 snort-2.9.20/src/dynamic-plugins/Makefile.in | 40 snort-2.9.20/src/dynamic-plugins/sf_convert_dynamic.c | 2 snort-2.9.20/src/dynamic-plugins/sf_convert_dynamic.h | 2 snort-2.9.20/src/dynamic-plugins/sf_decompression_define.h | 2 snort-2.9.20/src/dynamic-plugins/sf_dynamic_common.h | 3 snort-2.9.20/src/dynamic-plugins/sf_dynamic_decompression.c | 2 snort-2.9.20/src/dynamic-plugins/sf_dynamic_decompression.h | 2 snort-2.9.20/src/dynamic-plugins/sf_dynamic_define.h | 2 snort-2.9.20/src/dynamic-plugins/sf_dynamic_detection.h | 2 snort-2.9.20/src/dynamic-plugins/sf_dynamic_engine.h | 2 snort-2.9.20/src/dynamic-plugins/sf_dynamic_meta.h | 4 snort-2.9.20/src/dynamic-plugins/sf_dynamic_plugins.c | 90 snort-2.9.20/src/dynamic-plugins/sf_dynamic_preprocessor.h | 35 snort-2.9.20/src/dynamic-plugins/sf_dynamic_side_channel.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/Makefile.in | 40 snort-2.9.20/src/dynamic-plugins/sf_engine/bmh.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/bmh.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1000.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1001.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/109.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/12759.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1915.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1939.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2044.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2313.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2404.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2486.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2527.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2528.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2570.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3036.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3052.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3099.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/32694.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/34408.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3665.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/36733.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/36734.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3682.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/593.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/637.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/652.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/Makefile.in | 38 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug109059-builtin.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug109059-custom.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug25673.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug26266.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug29818.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug30013.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug31159.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug31842.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug34427.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug35218.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/dce_so_rule.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/detection_lib_meta.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_ber.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_ber.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_mozilla_sslv2_cmk.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_mysql_com_table_dump.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rule_http_buffers.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rule_relative_contents.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rules.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid1026.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid1902.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2257.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2489.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2578.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2922.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid9999.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-client_test.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_decompression.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_decompression.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_packet.h | 19 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.h | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_byte.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_content.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_hdropts.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_loop.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_pcre.c | 2 snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_rc4.c | 2 snort-2.9.20/src/dynamic-plugins/sf_preproc_example/Makefile.in | 34 snort-2.9.20/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.c | 2 snort-2.9.20/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.h | 2 snort-2.9.20/src/dynamic-plugins/sp_dynamic.c | 2 snort-2.9.20/src/dynamic-plugins/sp_dynamic.h | 2 snort-2.9.20/src/dynamic-plugins/sp_preprocopt.c | 2 snort-2.9.20/src/dynamic-plugins/sp_preprocopt.h | 2 snort-2.9.20/src/dynamic-preprocessors/Makefile.am | 22 snort-2.9.20/src/dynamic-preprocessors/Makefile.in | 79 snort-2.9.20/src/dynamic-preprocessors/appid/Makefile.in | 41 snort-2.9.20/src/dynamic-preprocessors/appid/appId.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/appId.h | 3 snort-2.9.20/src/dynamic-preprocessors/appid/appIdApi.c | 26 snort-2.9.20/src/dynamic-preprocessors/appid/appIdConfig.c | 12 snort-2.9.20/src/dynamic-preprocessors/appid/appIdConfig.h | 6 snort-2.9.20/src/dynamic-preprocessors/appid/appIdStats.c | 28 snort-2.9.20/src/dynamic-preprocessors/appid/appIdStats.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/appId_ss.c | 6 snort-2.9.20/src/dynamic-preprocessors/appid/appId_ss.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/appInfoTable.c | 73 snort-2.9.20/src/dynamic-preprocessors/appid/appInfoTable.h | 4 snort-2.9.20/src/dynamic-preprocessors/appid/app_forecast.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/app_forecast.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/attribute.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/clientAppConfig.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_api.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_base.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_base.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_bit.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_bit_tracker.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_rtp.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ssh.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_timbuktu.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_tns.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_vnc.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/commonAppMatcher.c | 13 snort-2.9.20/src/dynamic-preprocessors/appid/commonAppMatcher.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_api.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_base.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_base.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c | 18 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_http.c | 21 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_http.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c | 4 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_kerberos.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c | 22 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_smtp.c | 10 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/dns_defs.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/flow.c | 13 snort-2.9.20/src/dynamic-preprocessors/appid/flow.h | 90 snort-2.9.20/src/dynamic-preprocessors/appid/flow_error.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/fw_appid.c | 612 snort-2.9.20/src/dynamic-preprocessors/appid/fw_appid.h | 46 snort-2.9.20/src/dynamic-preprocessors/appid/hostPortAppCache.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/hostPortAppCache.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/httpCommon.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/lengthAppCache.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/lengthAppCache.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorApi.c | 102 snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorApi.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorFlowApi.c | 7 snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorFlowApi.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorModule.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorModule.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/dcerpc.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/dcerpc.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/serviceConfig.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_api.h | 4 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_base.c | 357 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_base.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bgp.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bgp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bit.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bootp.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bootp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_flap.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_flap.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ftp.c | 4 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ftp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_irc.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_irc.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_lpr.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_lpr.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_mysql.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_mysql.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_netbios.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_netbios.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_nntp.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_nntp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ntp.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ntp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_radius.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_radius.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rexec.c | 5 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rexec.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rfb.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rfb.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c | 9 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rpc.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rshell.c | 5 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rshell.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rsync.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rsync.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_snmp.c | 11 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_snmp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssh.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssh.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssl.c | 68 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssl.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_telnet.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_telnet.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tftp.c | 5 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tftp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_timbuktu.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tns.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_util.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/service_state.c | 112 snort-2.9.20/src/dynamic-preprocessors/appid/service_state.h | 31 snort-2.9.20/src/dynamic-preprocessors/appid/spp_appid.c | 94 snort-2.9.20/src/dynamic-preprocessors/appid/spp_appid.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_api.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_types.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_utils.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_utils.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/NetworkSet.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/NetworkSet.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/OutputFile.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/OutputFile.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/common_util.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/common_util.h | 13 snort-2.9.20/src/dynamic-preprocessors/appid/util/fw_avltree.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/fw_avltree.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/ip_funcs.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/ip_funcs.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_mlmp.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_mlmp.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_multi_mpse.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_multi_mpse.h | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/sfutil.c | 2 snort-2.9.20/src/dynamic-preprocessors/appid/util/sfutil.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_cl.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_cl.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_co.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_co.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_config.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_debug.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_debug.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_event.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_event.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_http.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_http.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_list.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_list.h | 6 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_memory.c | 44 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_memory.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_paf.c | 17 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_paf.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_roptions.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_roptions.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_session.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb.c | 99 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb.h | 22 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb2.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb2.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_stats.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_stats.h | 3 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_tcp.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_tcp.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_udp.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_udp.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_utils.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_utils.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/includes/dcerpc.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/includes/smb.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj | 343 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/snort_dce2.c | 4 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/snort_dce2.h | 2 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c | 206 snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.h | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/dnp3/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_map.c | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_map.h | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_paf.c | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_paf.h | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_reassembly.c | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_reassembly.h | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_roptions.c | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_roptions.h | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj | 312 snort-2.9.20/src/dynamic-preprocessors/dnp3/spp_dnp3.c | 2 snort-2.9.20/src/dynamic-preprocessors/dnp3/spp_dnp3.h | 2 snort-2.9.20/src/dynamic-preprocessors/dns/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/dns/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/dns/dns_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/dns/dns_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/dns/sf_dns.vcxproj | 298 snort-2.9.20/src/dynamic-preprocessors/dns/spp_dns.c | 60 snort-2.9.20/src/dynamic-preprocessors/dns/spp_dns.h | 2 snort-2.9.20/src/dynamic-preprocessors/dynamic_preprocessors.vcxproj | 189 snort-2.9.20/src/dynamic-preprocessors/file/Makefile.in | 38 snort-2.9.20/src/dynamic-preprocessors/file/file_agent.c | 14 snort-2.9.20/src/dynamic-preprocessors/file/file_agent.h | 2 snort-2.9.20/src/dynamic-preprocessors/file/file_event_log.c | 2 snort-2.9.20/src/dynamic-preprocessors/file/file_event_log.h | 2 snort-2.9.20/src/dynamic-preprocessors/file/file_inspect_config.c | 6 snort-2.9.20/src/dynamic-preprocessors/file/file_inspect_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/file/file_sha.c | 25 snort-2.9.20/src/dynamic-preprocessors/file/file_sha.h | 2 snort-2.9.20/src/dynamic-preprocessors/file/include/circular_buffer.c | 2 snort-2.9.20/src/dynamic-preprocessors/file/include/output_lib.c | 2 snort-2.9.20/src/dynamic-preprocessors/file/spp_file.c | 65 snort-2.9.20/src/dynamic-preprocessors/file/spp_file.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.c | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_client.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.c | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_server.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_events.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.c | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_include.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_return_codes.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_si.c | 72 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_si.h | 10 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.c | 6 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.c | 21 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.c | 6 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.c | 14 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.c | 18 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.h | 4 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_ftp.c | 21 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_ftp.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_telnet.c | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_telnet.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj | 343 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.c | 179 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.h | 2 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.c | 108 snort-2.9.20/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.h | 15 snort-2.9.20/src/dynamic-preprocessors/gtp/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/gtp/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_config.c | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_debug.h | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_parser.c | 12 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_parser.h | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_roptions.c | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_roptions.h | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/sf_gtp.vcxproj | 303 snort-2.9.20/src/dynamic-preprocessors/gtp/spp_gtp.c | 2 snort-2.9.20/src/dynamic-preprocessors/gtp/spp_gtp.h | 2 snort-2.9.20/src/dynamic-preprocessors/imap/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/imap/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/imap/imap_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/imap/imap_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/imap/imap_config.c | 2 snort-2.9.20/src/dynamic-preprocessors/imap/imap_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/imap/imap_log.c | 2 snort-2.9.20/src/dynamic-preprocessors/imap/imap_log.h | 2 snort-2.9.20/src/dynamic-preprocessors/imap/imap_paf.c | 12 snort-2.9.20/src/dynamic-preprocessors/imap/imap_paf.h | 2 snort-2.9.20/src/dynamic-preprocessors/imap/imap_util.c | 60 snort-2.9.20/src/dynamic-preprocessors/imap/imap_util.h | 4 snort-2.9.20/src/dynamic-preprocessors/imap/sf_imap.vcxproj | 326 snort-2.9.20/src/dynamic-preprocessors/imap/snort_imap.c | 28 snort-2.9.20/src/dynamic-preprocessors/imap/snort_imap.h | 4 snort-2.9.20/src/dynamic-preprocessors/imap/spp_imap.c | 10 snort-2.9.20/src/dynamic-preprocessors/imap/spp_imap.h | 2 snort-2.9.20/src/dynamic-preprocessors/libs/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/libs/Makefile.in | 36 snort-2.9.20/src/dynamic-preprocessors/libs/sf_preproc_info.h | 2 snort-2.9.20/src/dynamic-preprocessors/libs/sfcommon.h | 2 snort-2.9.20/src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj | 248 snort-2.9.20/src/dynamic-preprocessors/libs/sfparser.c | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/modbus/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_decode.c | 68 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_decode.h | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_paf.c | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_paf.h | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_roptions.c | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_roptions.h | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/sf_modbus.vcxproj | 305 snort-2.9.20/src/dynamic-preprocessors/modbus/spp_modbus.c | 2 snort-2.9.20/src/dynamic-preprocessors/modbus/spp_modbus.h | 2 snort-2.9.20/src/dynamic-preprocessors/pop/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/pop/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/pop/pop_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/pop/pop_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/pop/pop_config.c | 2 snort-2.9.20/src/dynamic-preprocessors/pop/pop_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/pop/pop_log.c | 2 snort-2.9.20/src/dynamic-preprocessors/pop/pop_log.h | 2 snort-2.9.20/src/dynamic-preprocessors/pop/pop_paf.c | 4 snort-2.9.20/src/dynamic-preprocessors/pop/pop_paf.h | 2 snort-2.9.20/src/dynamic-preprocessors/pop/pop_util.c | 58 snort-2.9.20/src/dynamic-preprocessors/pop/pop_util.h | 4 snort-2.9.20/src/dynamic-preprocessors/pop/sf_pop.vcxproj | 329 snort-2.9.20/src/dynamic-preprocessors/pop/snort_pop.c | 60 snort-2.9.20/src/dynamic-preprocessors/pop/snort_pop.h | 5 snort-2.9.20/src/dynamic-preprocessors/pop/spp_pop.c | 10 snort-2.9.20/src/dynamic-preprocessors/pop/spp_pop.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/reputation/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_config.c | 16 snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_debug.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_utils.c | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_utils.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/sf_reputation.vcxproj | 315 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.c | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_common.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_config.c | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.c | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_lib.c | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_lib.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.c | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.h | 2 snort-2.9.20/src/dynamic-preprocessors/reputation/spp_reputation.c | 26 snort-2.9.20/src/dynamic-preprocessors/reputation/spp_reputation.h | 6 snort-2.9.20/src/dynamic-preprocessors/s7commplus/Makefile.am | 34 snort-2.9.20/src/dynamic-preprocessors/s7commplus/Makefile.in | 682 snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_decode.c | 148 snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_decode.h | 57 snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_paf.c | 142 snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_paf.h | 62 snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_roptions.c | 272 snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_roptions.h | 66 snort-2.9.20/src/dynamic-preprocessors/s7commplus/spp_s7comm.c | 688 snort-2.9.20/src/dynamic-preprocessors/s7commplus/spp_s7comm.h | 74 snort-2.9.20/src/dynamic-preprocessors/sdf/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/sdf/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_credit_card.c | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_credit_card.h | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_detection_option.c | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_detection_option.h | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_pattern_match.c | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_pattern_match.h | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_us_ssn.c | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_us_ssn.h | 2 snort-2.9.20/src/dynamic-preprocessors/sdf/sf_sdf.vcxproj | 307 snort-2.9.20/src/dynamic-preprocessors/sdf/spp_sdf.c | 6 snort-2.9.20/src/dynamic-preprocessors/sdf/spp_sdf.h | 2 snort-2.9.20/src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj | 1250 snort-2.9.20/src/dynamic-preprocessors/sip/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/sip/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/sip/sf_sip.vcxproj | 316 snort-2.9.20/src/dynamic-preprocessors/sip/sip_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_config.c | 14 snort-2.9.20/src/dynamic-preprocessors/sip/sip_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_debug.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_dialog.c | 38 snort-2.9.20/src/dynamic-preprocessors/sip/sip_dialog.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_paf.c | 13 snort-2.9.20/src/dynamic-preprocessors/sip/sip_paf.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_parser.c | 14 snort-2.9.20/src/dynamic-preprocessors/sip/sip_parser.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_roptions.c | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_roptions.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_utils.c | 2 snort-2.9.20/src/dynamic-preprocessors/sip/sip_utils.h | 2 snort-2.9.20/src/dynamic-preprocessors/sip/spp_sip.c | 81 snort-2.9.20/src/dynamic-preprocessors/sip/spp_sip.h | 6 snort-2.9.20/src/dynamic-preprocessors/smtp/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/smtp/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/smtp/sf_smtp.vcxproj | 337 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_config.c | 23 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_log.c | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_log.h | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_normalize.c | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_normalize.h | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_paf.c | 10 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_paf.h | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_util.c | 61 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_util.h | 4 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_xlink2state.c | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_xlink2state.h | 2 snort-2.9.20/src/dynamic-preprocessors/smtp/snort_smtp.c | 81 snort-2.9.20/src/dynamic-preprocessors/smtp/snort_smtp.h | 6 snort-2.9.20/src/dynamic-preprocessors/smtp/spp_smtp.c | 14 snort-2.9.20/src/dynamic-preprocessors/smtp/spp_smtp.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssh/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/ssh/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/ssh/sf_ssh.vcxproj | 298 snort-2.9.20/src/dynamic-preprocessors/ssh/spp_ssh.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssh/spp_ssh.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssh/ssh_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssh/ssh_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl/Makefile.am | 1 snort-2.9.20/src/dynamic-preprocessors/ssl/Makefile.in | 39 snort-2.9.20/src/dynamic-preprocessors/ssl/sf_ssl.vcxproj | 305 snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_buffer_dump.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_buffer_dump.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_setup.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_setup.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_config.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_config.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_ha.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_ha.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_include.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_inspect.c | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_inspect.h | 2 snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_session.h | 2 snort-2.9.20/src/encode.c | 7 snort-2.9.20/src/encode.h | 2 snort-2.9.20/src/event.h | 2 snort-2.9.20/src/event_queue.c | 2 snort-2.9.20/src/event_queue.h | 2 snort-2.9.20/src/event_wrapper.c | 2 snort-2.9.20/src/event_wrapper.h | 2 snort-2.9.20/src/file-process/Makefile.in | 40 snort-2.9.20/src/file-process/circular_buffer.c | 2 snort-2.9.20/src/file-process/circular_buffer.h | 2 snort-2.9.20/src/file-process/file_api.h | 10 snort-2.9.20/src/file-process/file_capture.c | 75 snort-2.9.20/src/file-process/file_capture.h | 5 snort-2.9.20/src/file-process/file_mail_common.h | 2 snort-2.9.20/src/file-process/file_mempool.c | 19 snort-2.9.20/src/file-process/file_mempool.h | 2 snort-2.9.20/src/file-process/file_mime_config.c | 2 snort-2.9.20/src/file-process/file_mime_config.h | 2 snort-2.9.20/src/file-process/file_mime_process.c | 14 snort-2.9.20/src/file-process/file_mime_process.h | 2 snort-2.9.20/src/file-process/file_resume_block.c | 64 snort-2.9.20/src/file-process/file_resume_block.h | 2 snort-2.9.20/src/file-process/file_segment_process.c | 183 snort-2.9.20/src/file-process/file_segment_process.h | 4 snort-2.9.20/src/file-process/file_service.c | 128 snort-2.9.20/src/file-process/file_service.h | 2 snort-2.9.20/src/file-process/file_service_config.c | 15 snort-2.9.20/src/file-process/file_service_config.h | 2 snort-2.9.20/src/file-process/file_ss.c | 6 snort-2.9.20/src/file-process/file_ss.h | 2 snort-2.9.20/src/file-process/file_stats.c | 2 snort-2.9.20/src/file-process/file_stats.h | 2 snort-2.9.20/src/file-process/libs/Makefile.in | 38 snort-2.9.20/src/file-process/libs/file_config.c | 28 snort-2.9.20/src/file-process/libs/file_config.h | 2 snort-2.9.20/src/file-process/libs/file_identifier.c | 17 snort-2.9.20/src/file-process/libs/file_identifier.h | 2 snort-2.9.20/src/file-process/libs/file_lib.c | 36 snort-2.9.20/src/file-process/libs/file_lib.h | 13 snort-2.9.20/src/fpcreate.c | 50 snort-2.9.20/src/fpcreate.h | 2 snort-2.9.20/src/fpdetect.c | 2 snort-2.9.20/src/fpdetect.h | 2 snort-2.9.20/src/generators.h | 17 snort-2.9.20/src/hashstring.c | 2 snort-2.9.20/src/hashstring.h | 2 snort-2.9.20/src/idle_processing.c | 2 snort-2.9.20/src/idle_processing.h | 2 snort-2.9.20/src/idle_processing_funcs.h | 2 snort-2.9.20/src/ipv6_port.h | 2 snort-2.9.20/src/log.c | 6 snort-2.9.20/src/log.h | 2 snort-2.9.20/src/log_text.c | 6 snort-2.9.20/src/log_text.h | 2 snort-2.9.20/src/memory_stats.c | 668 snort-2.9.20/src/memory_stats.h | 65 snort-2.9.20/src/mempool.c | 2 snort-2.9.20/src/mempool.h | 2 snort-2.9.20/src/mstring.c | 2 snort-2.9.20/src/mstring.h | 2 snort-2.9.20/src/obfuscation.c | 2 snort-2.9.20/src/obfuscation.h | 2 snort-2.9.20/src/output-plugins/Makefile.in | 38 snort-2.9.20/src/output-plugins/spo_alert_fast.c | 2 snort-2.9.20/src/output-plugins/spo_alert_fast.h | 2 snort-2.9.20/src/output-plugins/spo_alert_full.c | 2 snort-2.9.20/src/output-plugins/spo_alert_full.h | 2 snort-2.9.20/src/output-plugins/spo_alert_sf_socket.c | 2 snort-2.9.20/src/output-plugins/spo_alert_sf_socket.h | 2 snort-2.9.20/src/output-plugins/spo_alert_syslog.c | 2 snort-2.9.20/src/output-plugins/spo_alert_syslog.h | 2 snort-2.9.20/src/output-plugins/spo_alert_test.c | 2 snort-2.9.20/src/output-plugins/spo_alert_test.h | 2 snort-2.9.20/src/output-plugins/spo_alert_unixsock.c | 2 snort-2.9.20/src/output-plugins/spo_alert_unixsock.h | 2 snort-2.9.20/src/output-plugins/spo_csv.c | 2 snort-2.9.20/src/output-plugins/spo_csv.h | 2 snort-2.9.20/src/output-plugins/spo_log_ascii.c | 2 snort-2.9.20/src/output-plugins/spo_log_ascii.h | 2 snort-2.9.20/src/output-plugins/spo_log_buffer_dump.c | 2 snort-2.9.20/src/output-plugins/spo_log_buffer_dump.h | 2 snort-2.9.20/src/output-plugins/spo_log_null.c | 2 snort-2.9.20/src/output-plugins/spo_log_null.h | 2 snort-2.9.20/src/output-plugins/spo_log_tcpdump.c | 2 snort-2.9.20/src/output-plugins/spo_log_tcpdump.h | 2 snort-2.9.20/src/output-plugins/spo_unified2.c | 16 snort-2.9.20/src/output-plugins/spo_unified2.h | 2 snort-2.9.20/src/packet_time.c | 2 snort-2.9.20/src/packet_time.h | 2 snort-2.9.20/src/parser.c | 156 snort-2.9.20/src/parser.h | 4 snort-2.9.20/src/parser/IpAddrSet.c | 2 snort-2.9.20/src/parser/IpAddrSet.h | 2 snort-2.9.20/src/parser/Makefile.in | 38 snort-2.9.20/src/pcap_pkthdr32.h | 2 snort-2.9.20/src/pcrm.c | 2 snort-2.9.20/src/pcrm.h | 2 snort-2.9.20/src/pkt_tracer.c | 48 snort-2.9.20/src/pkt_tracer.h | 2 snort-2.9.20/src/plugbase.c | 2 snort-2.9.20/src/plugbase.h | 2 snort-2.9.20/src/plugin_enum.h | 2 snort-2.9.20/src/ppm.c | 2 snort-2.9.20/src/ppm.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/Makefile.in | 36 snort-2.9.20/src/preprocessors/HttpInspect/anomaly_detection/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/anomaly_detection/hi_ad.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/client/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/client/hi_client.c | 175 snort-2.9.20/src/preprocessors/HttpInspect/client/hi_client_norm.c | 7 snort-2.9.20/src/preprocessors/HttpInspect/event_output/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/event_output/hi_eo_log.c | 18 snort-2.9.20/src/preprocessors/HttpInspect/files/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp.c | 11 snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_PDF.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_SWF.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/Makefile.in | 34 snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_PDF.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_SWF.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ad.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_buffer_dump.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client.h | 9 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client_norm.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client_stateful.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_cmd_lookup.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo_events.h | 20 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo_log.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_include.h | 4 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_mi.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_norm.h | 3 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_paf.h | 3 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_reqmethod_check.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_return_codes.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_server.h | 22 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_server_norm.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_si.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_stateful_inspect.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_config.h | 4 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_iis_unicode_map.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_server_lookup.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_uri.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_hbm.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_kmap.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_xmalloc.h | 2 snort-2.9.20/src/preprocessors/HttpInspect/mode_inspection/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/mode_inspection/hi_mi.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/normalization/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/normalization/hi_norm.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/server/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/server/hi_server.c | 427 snort-2.9.20/src/preprocessors/HttpInspect/server/hi_server_norm.c | 36 snort-2.9.20/src/preprocessors/HttpInspect/session_inspection/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/session_inspection/hi_si.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/user_interface/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_config.c | 6 snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_iis_unicode_map.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_server_lookup.c | 14 snort-2.9.20/src/preprocessors/HttpInspect/utils/Makefile.in | 38 snort-2.9.20/src/preprocessors/HttpInspect/utils/h2_common.c | 91 snort-2.9.20/src/preprocessors/HttpInspect/utils/h2_paf.c | 29 snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_buffer_dump.c | 13 snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_cmd_lookup.c | 2 snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_paf.c | 92 snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_hbm.c | 7 snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_kmap.c | 7 snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_xmalloc.c | 2 snort-2.9.20/src/preprocessors/Makefile.in | 40 snort-2.9.20/src/preprocessors/Session/Makefile.in | 38 snort-2.9.20/src/preprocessors/Session/session_common.c | 2 snort-2.9.20/src/preprocessors/Session/session_common.h | 4 snort-2.9.20/src/preprocessors/Session/session_expect.c | 22 snort-2.9.20/src/preprocessors/Session/session_expect.h | 2 snort-2.9.20/src/preprocessors/Session/snort_session.c | 2 snort-2.9.20/src/preprocessors/Session/snort_session.h | 2 snort-2.9.20/src/preprocessors/Session/stream5_ha.c | 2 snort-2.9.20/src/preprocessors/Session/stream5_ha.h | 2 snort-2.9.20/src/preprocessors/Stream6/Makefile.in | 38 snort-2.9.20/src/preprocessors/Stream6/snort_stream_icmp.c | 29 snort-2.9.20/src/preprocessors/Stream6/snort_stream_icmp.h | 4 snort-2.9.20/src/preprocessors/Stream6/snort_stream_ip.c | 24 snort-2.9.20/src/preprocessors/Stream6/snort_stream_ip.h | 4 snort-2.9.20/src/preprocessors/Stream6/snort_stream_tcp.c | 720 snort-2.9.20/src/preprocessors/Stream6/snort_stream_tcp.h | 6 snort-2.9.20/src/preprocessors/Stream6/snort_stream_udp.c | 161 snort-2.9.20/src/preprocessors/Stream6/snort_stream_udp.h | 10 snort-2.9.20/src/preprocessors/Stream6/stream_common.c | 33 snort-2.9.20/src/preprocessors/Stream6/stream_common.h | 12 snort-2.9.20/src/preprocessors/Stream6/stream_paf.c | 73 snort-2.9.20/src/preprocessors/Stream6/stream_paf.h | 6 snort-2.9.20/src/preprocessors/cip_common.h | 2 snort-2.9.20/src/preprocessors/normalize.c | 2 snort-2.9.20/src/preprocessors/normalize.h | 2 snort-2.9.20/src/preprocessors/perf-base.c | 2 snort-2.9.20/src/preprocessors/perf-base.h | 2 snort-2.9.20/src/preprocessors/perf-event.c | 2 snort-2.9.20/src/preprocessors/perf-event.h | 2 snort-2.9.20/src/preprocessors/perf-flow.c | 11 snort-2.9.20/src/preprocessors/perf-flow.h | 2 snort-2.9.20/src/preprocessors/perf.c | 2 snort-2.9.20/src/preprocessors/perf.h | 2 snort-2.9.20/src/preprocessors/perf_indicators.c | 2 snort-2.9.20/src/preprocessors/perf_indicators.h | 2 snort-2.9.20/src/preprocessors/portscan.c | 2 snort-2.9.20/src/preprocessors/portscan.h | 2 snort-2.9.20/src/preprocessors/session_api.c | 2 snort-2.9.20/src/preprocessors/session_api.h | 28 snort-2.9.20/src/preprocessors/sfprocpidstats.c | 2 snort-2.9.20/src/preprocessors/sfprocpidstats.h | 2 snort-2.9.20/src/preprocessors/sip_common.h | 4 snort-2.9.20/src/preprocessors/snort_httpinspect.c | 169 snort-2.9.20/src/preprocessors/snort_httpinspect.h | 29 snort-2.9.20/src/preprocessors/spp_arpspoof.c | 2 snort-2.9.20/src/preprocessors/spp_arpspoof.h | 2 snort-2.9.20/src/preprocessors/spp_bo.c | 2 snort-2.9.20/src/preprocessors/spp_bo.h | 2 snort-2.9.20/src/preprocessors/spp_frag3.c | 186 snort-2.9.20/src/preprocessors/spp_frag3.h | 2 snort-2.9.20/src/preprocessors/spp_httpinspect.c | 234 snort-2.9.20/src/preprocessors/spp_httpinspect.h | 2 snort-2.9.20/src/preprocessors/spp_normalize.c | 2 snort-2.9.20/src/preprocessors/spp_normalize.h | 2 snort-2.9.20/src/preprocessors/spp_perfmonitor.c | 2 snort-2.9.20/src/preprocessors/spp_perfmonitor.h | 2 snort-2.9.20/src/preprocessors/spp_rpc_decode.c | 2 snort-2.9.20/src/preprocessors/spp_rpc_decode.h | 2 snort-2.9.20/src/preprocessors/spp_session.c | 291 snort-2.9.20/src/preprocessors/spp_session.h | 2 snort-2.9.20/src/preprocessors/spp_sfportscan.c | 4 snort-2.9.20/src/preprocessors/spp_sfportscan.h | 2 snort-2.9.20/src/preprocessors/spp_stream6.c | 325 snort-2.9.20/src/preprocessors/spp_stream6.h | 2 snort-2.9.20/src/preprocessors/str_search.c | 2 snort-2.9.20/src/preprocessors/str_search.h | 2 snort-2.9.20/src/preprocessors/stream_api.c | 2 snort-2.9.20/src/preprocessors/stream_api.h | 4 snort-2.9.20/src/preprocids.h | 5 snort-2.9.20/src/profiler.c | 2 snort-2.9.20/src/profiler.h | 2 snort-2.9.20/src/rate_filter.c | 2 snort-2.9.20/src/rate_filter.h | 2 snort-2.9.20/src/reg_test.c | 2 snort-2.9.20/src/reg_test.h | 2 snort-2.9.20/src/reload-adjust/Makefile.in | 38 snort-2.9.20/src/reload.c | 43 snort-2.9.20/src/reload.h | 2 snort-2.9.20/src/reload_api.h | 2 snort-2.9.20/src/rule_option_types.h | 2 snort-2.9.20/src/rules.h | 2 snort-2.9.20/src/sf_protocols.h | 2 snort-2.9.20/src/sf_sdlist.c | 2 snort-2.9.20/src/sf_sdlist.h | 2 snort-2.9.20/src/sf_sdlist_types.h | 2 snort-2.9.20/src/sf_types.h | 2 snort-2.9.20/src/sfdaq.c | 18 snort-2.9.20/src/sfdaq.h | 7 snort-2.9.20/src/sfthreshold.c | 2 snort-2.9.20/src/sfthreshold.h | 2 snort-2.9.20/src/sfutil/Makefile.in | 38 snort-2.9.20/src/sfutil/Unified2_common.h | 2 snort-2.9.20/src/sfutil/acsmx.c | 5 snort-2.9.20/src/sfutil/acsmx.h | 2 snort-2.9.20/src/sfutil/acsmx2.c | 2 snort-2.9.20/src/sfutil/acsmx2.h | 2 snort-2.9.20/src/sfutil/asn1.c | 2 snort-2.9.20/src/sfutil/asn1.h | 2 snort-2.9.20/src/sfutil/bitop.h | 2 snort-2.9.20/src/sfutil/bitop_funcs.h | 2 snort-2.9.20/src/sfutil/bnfa_search.c | 2 snort-2.9.20/src/sfutil/bnfa_search.h | 2 snort-2.9.20/src/sfutil/getopt.h | 2 snort-2.9.20/src/sfutil/intel-soft-cpm.c | 2 snort-2.9.20/src/sfutil/intel-soft-cpm.h | 2 snort-2.9.20/src/sfutil/ipobj.c | 2 snort-2.9.20/src/sfutil/ipobj.h | 2 snort-2.9.20/src/sfutil/mpse.c | 2 snort-2.9.20/src/sfutil/mpse.h | 2 snort-2.9.20/src/sfutil/mpse_methods.h | 2 snort-2.9.20/src/sfutil/segment_mem.c | 2 snort-2.9.20/src/sfutil/segment_mem.h | 2 snort-2.9.20/src/sfutil/sfActionQueue.c | 2 snort-2.9.20/src/sfutil/sfActionQueue.h | 2 snort-2.9.20/src/sfutil/sfPolicy.c | 2 snort-2.9.20/src/sfutil/sfPolicy.h | 2 snort-2.9.20/src/sfutil/sfPolicyData.h | 2 snort-2.9.20/src/sfutil/sfPolicyUserData.c | 2 snort-2.9.20/src/sfutil/sfPolicyUserData.h | 2 snort-2.9.20/src/sfutil/sf_base64decode.c | 2 snort-2.9.20/src/sfutil/sf_base64decode.h | 2 snort-2.9.20/src/sfutil/sf_email_attach_decode.c | 2 snort-2.9.20/src/sfutil/sf_email_attach_decode.h | 2 snort-2.9.20/src/sfutil/sf_ip.c | 2 snort-2.9.20/src/sfutil/sf_ip.h | 74 snort-2.9.20/src/sfutil/sf_iph.c | 2 snort-2.9.20/src/sfutil/sf_iph.h | 2 snort-2.9.20/src/sfutil/sf_ipvar.c | 2 snort-2.9.20/src/sfutil/sf_ipvar.h | 2 snort-2.9.20/src/sfutil/sf_sechash.c | 2 snort-2.9.20/src/sfutil/sf_sechash.h | 2 snort-2.9.20/src/sfutil/sf_seqnums.h | 2 snort-2.9.20/src/sfutil/sf_textlog.c | 2 snort-2.9.20/src/sfutil/sf_textlog.h | 2 snort-2.9.20/src/sfutil/sf_vartable.c | 2 snort-2.9.20/src/sfutil/sf_vartable.h | 2 snort-2.9.20/src/sfutil/sfdebug.h | 2 snort-2.9.20/src/sfutil/sfeventq.c | 2 snort-2.9.20/src/sfutil/sfeventq.h | 2 snort-2.9.20/src/sfutil/sfghash.c | 2 snort-2.9.20/src/sfutil/sfghash.h | 2 snort-2.9.20/src/sfutil/sfhashfcn.c | 2 snort-2.9.20/src/sfutil/sfhashfcn.h | 2 snort-2.9.20/src/sfutil/sfksearch.c | 2 snort-2.9.20/src/sfutil/sfksearch.h | 2 snort-2.9.20/src/sfutil/sflsq.c | 2 snort-2.9.20/src/sfutil/sflsq.h | 2 snort-2.9.20/src/sfutil/sfmemcap.c | 2 snort-2.9.20/src/sfutil/sfmemcap.h | 2 snort-2.9.20/src/sfutil/sfportobject.c | 8 snort-2.9.20/src/sfutil/sfportobject.h | 2 snort-2.9.20/src/sfutil/sfprimetable.c | 2 snort-2.9.20/src/sfutil/sfprimetable.h | 2 snort-2.9.20/src/sfutil/sfrf.c | 2 snort-2.9.20/src/sfutil/sfrf.h | 2 snort-2.9.20/src/sfutil/sfrim.c | 2 snort-2.9.20/src/sfutil/sfrim.h | 2 snort-2.9.20/src/sfutil/sfrt.c | 2 snort-2.9.20/src/sfutil/sfrt.h | 2 snort-2.9.20/src/sfutil/sfrt_dir.c | 2 snort-2.9.20/src/sfutil/sfrt_dir.h | 2 snort-2.9.20/src/sfutil/sfrt_flat.c | 2 snort-2.9.20/src/sfutil/sfrt_flat.h | 2 snort-2.9.20/src/sfutil/sfrt_flat_dir.c | 2 snort-2.9.20/src/sfutil/sfrt_flat_dir.h | 2 snort-2.9.20/src/sfutil/sfrt_trie.h | 2 snort-2.9.20/src/sfutil/sfsnprintfappend.c | 2 snort-2.9.20/src/sfutil/sfsnprintfappend.h | 2 snort-2.9.20/src/sfutil/sfthd.c | 2 snort-2.9.20/src/sfutil/sfthd.h | 2 snort-2.9.20/src/sfutil/sfxhash.c | 2 snort-2.9.20/src/sfutil/sfxhash.h | 2 snort-2.9.20/src/sfutil/strvec.c | 2 snort-2.9.20/src/sfutil/strvec.h | 2 snort-2.9.20/src/sfutil/util_jsnorm.c | 4 snort-2.9.20/src/sfutil/util_jsnorm.h | 2 snort-2.9.20/src/sfutil/util_math.c | 2 snort-2.9.20/src/sfutil/util_math.h | 2 snort-2.9.20/src/sfutil/util_net.c | 2 snort-2.9.20/src/sfutil/util_net.h | 2 snort-2.9.20/src/sfutil/util_str.c | 2 snort-2.9.20/src/sfutil/util_str.h | 2 snort-2.9.20/src/sfutil/util_unfold.c | 2 snort-2.9.20/src/sfutil/util_unfold.h | 2 snort-2.9.20/src/sfutil/util_utf.c | 2 snort-2.9.20/src/sfutil/util_utf.h | 2 snort-2.9.20/src/side-channel/Makefile.in | 40 snort-2.9.20/src/side-channel/dmq.c | 2 snort-2.9.20/src/side-channel/dmq.h | 2 snort-2.9.20/src/side-channel/dynamic-plugins/Makefile.in | 42 snort-2.9.20/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.c | 2 snort-2.9.20/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.h | 2 snort-2.9.20/src/side-channel/dynamic-plugins/sf_side_channel_info.h | 2 snort-2.9.20/src/side-channel/plugins/Makefile.in | 38 snort-2.9.20/src/side-channel/plugins/sscm_logger.c | 2 snort-2.9.20/src/side-channel/plugins/sscm_logger.h | 2 snort-2.9.20/src/side-channel/rbmq.c | 2 snort-2.9.20/src/side-channel/rbmq.h | 2 snort-2.9.20/src/side-channel/sidechannel.c | 10 snort-2.9.20/src/side-channel/sidechannel.h | 2 snort-2.9.20/src/side-channel/sidechannel_define.h | 2 snort-2.9.20/src/signature.c | 2 snort-2.9.20/src/signature.h | 2 snort-2.9.20/src/smtp_api.h | 36 snort-2.9.20/src/snort.c | 222 snort-2.9.20/src/snort.h | 24 snort-2.9.20/src/snort_bounds.h | 2 snort-2.9.20/src/snort_debug.h | 2 snort-2.9.20/src/spo_plugbase.h | 2 snort-2.9.20/src/tag.c | 2 snort-2.9.20/src/tag.h | 2 snort-2.9.20/src/target-based/Makefile.in | 41 snort-2.9.20/src/target-based/sf_attribute_table.c | 287 snort-2.9.20/src/target-based/sf_attribute_table.y | 2 snort-2.9.20/src/target-based/sf_attribute_table_parser.c | 239 snort-2.9.20/src/target-based/sf_attribute_table_parser.l | 2 snort-2.9.20/src/target-based/sftarget_hostentry.c | 2 snort-2.9.20/src/target-based/sftarget_hostentry.h | 2 snort-2.9.20/src/target-based/sftarget_protocol_reference.c | 2 snort-2.9.20/src/target-based/sftarget_protocol_reference.h | 2 snort-2.9.20/src/target-based/sftarget_reader.c | 2 snort-2.9.20/src/target-based/sftarget_reader.h | 2 snort-2.9.20/src/treenodes.h | 2 snort-2.9.20/src/util.c | 85 snort-2.9.20/src/util.h | 5 snort-2.9.20/src/win32/Makefile.am | 15 snort-2.9.20/src/win32/Makefile.in | 48 snort-2.9.20/src/win32/WIN32-Code/getopt.c | 2 snort-2.9.20/src/win32/WIN32-Code/inet_aton.c | 2 snort-2.9.20/src/win32/WIN32-Code/misc.c | 2 snort-2.9.20/src/win32/WIN32-Code/name.h | 2 snort-2.9.20/src/win32/WIN32-Includes/config.h | 4 snort-2.9.20/src/win32/WIN32-Includes/getopt.h | 2 snort-2.9.20/src/win32/WIN32-Includes/inttypes.h | 2 snort-2.9.20/src/win32/WIN32-Prj/build_all.vcxproj | 127 snort-2.9.20/src/win32/WIN32-Prj/sf_engine.vcxproj | 363 snort-2.9.20/src/win32/WIN32-Prj/sf_engine_initialize.vcxproj | 329 snort-2.9.20/src/win32/WIN32-Prj/snort.vcxproj | 812 snort-2.9.20/src/win32/WIN32-Prj/snort_initialize.vcxproj | 165 snort-2.9.20/src/win32/WIN32-Prj/snort_installer.nsi | 10 snort-2.9.20/src/win32/WIN32-Prj/snort_installer_x64.nsi | 260 snort-2.9.20/src/win32/WIN32-Prj/snort_x64.dsw | 416 snort-2.9.20/templates/Makefile.in | 34 snort-2.9.20/tools/Makefile.in | 38 snort-2.9.20/tools/control/Makefile.in | 60 snort-2.9.20/tools/control/sfcontrol.c | 2 snort-2.9.20/tools/control/snort_dump_packets.c | 2 snort-2.9.20/tools/file_server/Makefile.in | 55 snort-2.9.20/tools/file_server/file_server.c | 2 snort-2.9.20/tools/u2boat/Makefile.in | 55 snort-2.9.20/tools/u2boat/u2boat.c | 2 snort-2.9.20/tools/u2boat/u2boat.h | 2 snort-2.9.20/tools/u2openappid/Makefile.in | 54 snort-2.9.20/tools/u2openappid/u2openappid.c | 2 snort-2.9.20/tools/u2spewfoo/Makefile.am | 1 snort-2.9.20/tools/u2spewfoo/Makefile.in | 55 snort-2.9.20/tools/u2spewfoo/u2spewfoo.c | 2 snort-2.9.20/tools/u2spewfoo/u2spewfoo.vcxproj | 260 snort-2.9.20/tools/u2streamer/Makefile.in | 84 snort-2.9.20/tools/u2streamer/Unified2File.c | 3 snort-2.9.20/tools/u2streamer/u2streamer.c | 2 snort-2.9.20/ylwrap | 34 1184 files changed, 32276 insertions(+), 30280 deletions(-) diff -Nru snort-2.9.15.1/ChangeLog snort-2.9.20/ChangeLog --- snort-2.9.15.1/ChangeLog 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/ChangeLog 2022-05-23 14:41:16.000000000 +0000 @@ -1,3 +1,517 @@ +2022-05-13 Jaganmohanrao valluri +snort 2.9.20 + + * src/dynamic-preprocessors/appid/service_plugins/service_ssl.c : + Fixed a scenario where SSL traffic was not detected correctly. + + * src/dynamic-preprocessors/smtp/snort_smtp.c : + Fixed a possible memory corruption. + + * src/dynamic-preprocessors/imap/imap_util.c + src/dynamic-preprocessors/pop/pop_util.c + src/dynamic-preprocessors/smtp/smtp_util.c + src/preprocessors/spp_httpinspect.c : + Fixed malformed packet debug engine output. + + * src/preprocessors/Stream6/snort_stream_tcp.c : + Fixed security zones info in intrusion events. + + * src/dynamic-preprocessors/appid/fw_appid.c : + Fixed URL lookup failure. + + * src/preprocessors/HttpInspect/server/hi_server.c : + Fixed a possible memory leak. + + * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c + src/dynamic-preprocessors/appid/fw_appid.c + src/dynamic-preprocessors/appid/fw_appid.h + src/dynamic-preprocessors/appid/detector_plugins/service_plugins/service_api.h : + Added support for dns root queries and underflow. + + * src/dynamic-preprocessors/smtp/snort_smtp.c + src/Makefile.am + src/dynamic-examples/Makefile.am + src/dynamic-plugins/sf_dynamic_plugins.c + src/dynamic-plugins/sf_dynamic_preprocessor.h + src/dynamic-preprocessors/Makefile.am + src/dynamic-preprocessors/smtp/snort_smtp.h + src/dynamic-preprocessors/smtp/spp_smtp.c + src/smtp_api.h : + Added support to get extra data from SMTP and HTTP into IPS event. + + * src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c + src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c : + Added support for login success and failure eventing for IMAP and POP3. + + * src/dynamic-preprocessors/appid/hi_server.c : + Added support to handle empty string for SNI/CN/SAN/ORG. + +2021-12-01 Jaganmohanrao valluri +snort 2.9.19 + + * src/snort.c : + Fixed an issue where verdict will be applied onto next session when timeout occurs in some scenarios. + + * rc/file-process/file_service.c : + Removed an excessively flooding log. + + * src/dynamic-preprocessors/modbus/modbus_decode.c : + Fixed possible integer overflow. + + * src/fpcreate.c : + Added fix to GCC compiled snort to use AC-BNFA-Q search-method when Intel-cpm is enabled. + + * src/generators.h + src/preprocessors/Stream6/snort_stream_tcp.c : + Added fix to not to drop packets when window size is 0 by TCP normalizer and Added new alert with GID 129 and SID 21 when such packets are seen. + + * src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c + src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c : + Added support for Appid to detect login success and failure for IMAP and POP3 protocols. + + * src/dynamic-preprocessors/reputation/reputation_config.c + src/dynamic-preprocessors/reputation/spp_reputation.c + src/dynamic-preprocessors/reputation/spp_reputation.h + src/pkt_tracer.c + src/snort.c + src/util.c : + Fixed terminology to be bias-free in log/error messages. + + * src/snort.c : + Fixed a potential race condition. + + +2021-08-17 Jaganmohanrao valluri +snort 2.9.18.1 + + * snort/src/dynamic-preprocessors/dcerpc2/dce2_smb.c: + Fixed possible memory corruption in SMB preprocessor. + +2021-05-26 Ramachandrareddy Dhanireddy +snort 2.9.18 + + * src/file-process/file_service.c, + src/generators.h, + src/preprocessors/HttpInspect/event_output/hi_eo_log.c, + src/preprocessors/HttpInspect/include/hi_eo_events.h, + src/preprocessors/HttpInspect/server/hi_server.c, + src/preprocessors/snort_httpinspect.c, + src/preprocessors/snort_httpinspect.h : + Added range field support in HTTP preprocessor. + + * src/preprocessors/HttpInspect/client/hi_client.c : + Added alert for http chunk size mismatch. + + * src/detection-plugins/detection_leaf_node.c : + Fixed a condition in which alert would not be generated. + + * src/dynamic-preprocessors/appid/service_plugins/service_snmp.c : + Added support to detect snmp 'report pdu'. + + * src/dynamic-preprocessors/dcerpc2/dce2_paf.c, + src/dynamic-preprocessors/dcerpc2/dce2_smb.h : + Fixed possible memory corruption in smb preprocessor. + + * src/preprocessors/Stream6/snort_stream_icmp.c, + src/preprocessors/Stream6/stream_common.h, + src/preprocessors/spp_stream6.c : + Fixed handling ICMP error code -4. + + * src/dynamic-preprocessors/dcerpc2/dce2_memory.c, + src/dynamic-preprocessors/dcerpc2/spp_dce2.c, + src/memory_stats.c : + Added additional stats for SMB preprocessor. + + * src/dynamic-preprocessors/appid/appInfoTable.c : + Fixed an error when debugmsgs option enabled in compilation. + +2021-03-19 Divakar Y +snort 2.9.17.1 + + * src/preprocessors/Stream6/snort_stream_tcp.c : + Fixed wrong reference to configuration during reload. + + * src/dynamic-preprocessors/appid/fw_appid.c : + Fixed possible memleak in appid. + + * src/detect.c, + src/preprocessors/snort_httpinspect.c : + Fixed a race-condition in http preproc and IPS. + + * configure.in : + Fixed compilation issues when intel-soft-cpm is enabled. + + * src/preprocessors/Stream6/snort_stream_tcp.c, + src/preprocessors/Stream6/stream_common.h, + src/preprocessors/spp_stream6.c : + Fixed a race-condition in stream preproc. + +2020-10-30 Divakar Y +snort 2.9.17 + + * src/preprocessors/Stream6/snort_stream_tcp.c, + src/preprocessors/spp_stream6.c : + Fixed Memory leak in reassembly networks and ports config during reload. + + * src/file-process/file_resume_block.c, + src/file-process/file_service.c, + src/file-process/file_lib.c, + src/file-process/file_lib.h : + Fixed resume-block for SMBv2 partial content retry and pending verdicts. + + * src/win32/WIN32-Prj/snort_installer.nsi : + Added user visible message to choose 4.1.1 or any higher version of winpcap, in windows 32 installer. + + * src/win32/WIN32-Prj/snort_installer_x64.nsi, + src/win32/WIN32-Prj/snort_installer.nsi : + Fixed popup message that was not honoring windows silent uninstaller option. + + * src/preprocessors/snort_httpinspect.c : + Fix to populate original client IP for drop events, when inline normalization is disabled. + + * src/dynamic-preprocessors/appid/luaDetectorApi.c : + Fixed AppID caching proxy IP instead of tunneled IP in the dynamic cache during ultrasurf traffic. + + * src/detection-plugins/sp_react.c, + src/dynamic-preprocessors/sdf/spp_sdf.c, + src/parser.c, + src/preprocessors/Stream6/snort_stream_tcp.c, + tools/u2streamer/Unified2File.c, + src/dynamic-preprocessors/appid/luaDetectorApi.c, + src/dynamic-preprocessors/appid/appInfoTable.c, + snort/src/dynamic-plugins/sf_dynamic_plugins.c, + src/memory_stats.c, + src/sfutil/sfportobject.c, + src/snort.h : + Fixed multiple static analysis issues. + + * src/dynamic-preprocessors/appid/appInfoTable.c : + Fixed a potential race condition. + + * configure.in, + src/reload.c : + Fix to not rely on the last-modified-time for loading the dynamic detection libs. + + * src/dynamic-preprocessors/appid/detector_plugins/detector_smtp.c, + src/file-process/file_capture.c, + src/file-process/file_resume_block.c, + src/file-process/file_segment_process.c, + src/file-process/file_service.c : + Added debug messages in file-process packet flow. + + * src/dynamic-preprocessors/appid/detector_plugins/detector_smtp.c : + Fix to address cases of ambiguous codes between SMTP & FTP and when SMTP server does not support EHLO. + + * src/file-process/file_segment_process.c : + Fixed issue of generating multiple events for a single file transfer over SMB. + + * src/dynamic-preprocessors/appid/appIdConfig.h, + src/dynamic-preprocessors/appid/appInfoTable.c, + src/dynamic-preprocessors/appid/appInfoTable.h, + src/dynamic-preprocessors/appid/flow.h, + src/dynamic-preprocessors/appid/fw_appid.c, + src/dynamic-preprocessors/appid/flow.h : + Fixed false positives for ultrasurf. + + * src/dynamic-preprocessors/sip/spp_sip.c : + Fixed SIP pre-processor to detect SSL encrypted SIP traffic better. + + * src/dynamic-preprocessors/appid/luaDetectorApi.c, + etc/gen-msg.map, + preproc_rules/preprocessor.rules, + src/file-process/file_service.c, + src/generators.h, + src/preprocessors/HttpInspect/client/hi_client.c, + src/preprocessors/HttpInspect/event_output/hi_eo_log.c, + src/preprocessors/HttpInspect/include/hi_client.h, + src/preprocessors/HttpInspect/include/hi_eo_events.h, + src/preprocessors/HttpInspect/include/hi_server.h, + src/preprocessors/HttpInspect/server/hi_server.c, + src/preprocessors/snort_httpinspect.c, + src/preprocessors/snort_httpinspect.h : + Added support for HTTP range field parsing to detect if HTTP response/request is indeed partial or full content. + + * src/preprocessors/spp_session.c : + Fixed TCP memcap oversize. + + * src/dynamic-preprocessors/dcerpc2/dce2_stats.h, + src/dynamic-preprocessors/dcerpc2/snort_dce2.c, + src/dynamic-preprocessors/dcerpc2/spp_dce2.c, + src/dynamic-preprocessors/ftptelnet/ftpp_si.c, + src/dynamic-preprocessors/ftptelnet/pp_ftp.c, + src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.c, + src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.h, + src/preprocessors/HttpInspect/client/hi_client.c, + src/preprocessors/HttpInspect/client/hi_client_norm.c, + src/preprocessors/HttpInspect/include/hi_include.h, + src/preprocessors/HttpInspect/include/hi_paf.h, + src/preprocessors/HttpInspect/utils/hi_paf.c, + src/preprocessors/Stream6/snort_stream_icmp.c, + src/preprocessors/Stream6/snort_stream_icmp.h, + src/preprocessors/Stream6/snort_stream_ip.c, + src/preprocessors/Stream6/snort_stream_ip.h, + src/preprocessors/Stream6/snort_stream_tcp.c, + src/preprocessors/Stream6/snort_stream_tcp.h, + src/preprocessors/Stream6/snort_stream_udp.c, + src/preprocessors/Stream6/snort_stream_udp.h, + src/preprocessors/Stream6/stream_common.h, + src/preprocessors/snort_httpinspect.c, + src/preprocessors/snort_httpinspect.h, + src/preprocessors/spp_httpinspect.c, + src/preprocessors/spp_httpinspect.h, + src/preprocessors/spp_stream6.c, + src/dynamic-preprocessors/appid/fw_appid.c, + src/dynamic-preprocessors/appid/fw_appid.h, + src/dynamic-preprocessors/appid/spp_appid.c : + Enhanced statistics dumped during snort exit and SIGUSR1. + + * src/dynamic-preprocessors/imap/imap_paf.c, + src/dynamic-preprocessors/imap/snort_imap.h, + src/dynamic-preprocessors/pop/pop_paf.c, + src/dynamic-preprocessors/pop/snort_pop.h, + src/dynamic-preprocessors/sip/spp_sip.h, + src/dynamic-preprocessors/smtp/smtp_paf.c, + src/dynamic-preprocessors/smtp/snort_smtp.h, + src/dynamic-preprocessors/appid/flow.h, + src/dynamic-preprocessors/appid/service_plugins/service_ssl.c, + src/dynamic-preprocessors/dcerpc2/dce2_list.h, + src/dynamic-preprocessors/ftptelnet/ftpp_si.h, + src/file-process/file_segment_process.h, + src/file-process/libs/file_lib.h, + src/preprocessors/sip_common.h, + src/preprocessors/snort_httpinspect.h : + Optimized structures in several preprocessors. + + * src/dynamic-preprocessors/dcerpc2/dce2_smb.c, + src/dynamic-preprocessors/dcerpc2/dce2_smb.h + src/file-process/file_service.c : + Fixed SMBv1 file block for pending verdict retry packets. + + * src/dynamic-preprocessors/dcerpc2/dce2_smb.c : + Fixed SMBv1 unknown file size upload block. + + * src/detect.c, + src/detect.h, + src/parser.c, + src/parser.h, + src/preprocessors/Session/session_common.h, + src/preprocessors/Stream6/snort_stream_udp.c, + src/preprocessors/Stream6/snort_stream_udp.h, + src/preprocessors/spp_stream6.c, + src/preprocessors/Stream6/stream_common.c, + src/preprocessors/Stream6/stream_common.h, + src/preprocessors/spp_stream6.c, + src/reload.c, + src/snort.c, + src/snort.h : + Fixed incorrect filtering of UDP traffic when "ignore_any_rules" is configured. + + * src/detection-plugins/sp_session.c, + src/detection-plugins/sp_session.h, + src/sfutil/util_jsnorm.c : + Fixed GCC 10.1.1 compilation issues. + + * src/decode.c, + src/decode.h, + src/log_text.c, + src/log.c, + src/preprocessors/Stream6/snort_stream_tcp.c : + Added support to detect TCP Fast Open packets. + + * src/preprocessors/Stream6/snort_stream_tcp.c : + Fixed TCP segment queue hole issue as per the RFC793 recommendation for OOO Ack packet handling. + + * src/detection-plugins/detection_leaf_node.c, + src/detection-plugins/detection_options.c, + src/dynamic-preprocessors/appid/appInfoTable.c, + src/dynamic-preprocessors/appid/fw_appid.c, + src/dynamic-preprocessors/appid/service_plugins/service_base.c, + src/dynamic-preprocessors/appid/service_plugins/service_ftp.c, + src/dynamic-preprocessors/appid/service_plugins/service_rexec.c, + src/dynamic-preprocessors/appid/service_plugins/service_rpc.c, + src/dynamic-preprocessors/appid/service_plugins/service_rshell.c, + src/dynamic-preprocessors/appid/service_plugins/service_snmp.c, + src/dynamic-preprocessors/appid/service_plugins/service_tftp.c, + src/dynamic-preprocessors/ftptelnet/ftpp_si.c, + src/dynamic-preprocessors/ftptelnet/pp_ftp.c, + src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.c, + src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.c, + src/fpcreate.c, + src/parser.c, + src/preprocessors/Session/session_common.h, + src/preprocessors/spp_session.c, + src/reload.c, + src/snort.c : + Fixed build when some configure options were disabled. + + * src/detection-plugins/sp_byte_math.c : + Fixed byte_math operation for multiplication integer overflow. + + * src/dynamic-preprocessors/appid/appId.h, + src/dynamic-preprocessors/appid/service_plugins/service_ssl.c : + Fix to include 853 port in SSL detector for DNS over TLS runs on SSL. + + * src/dynamic-plugins/sf_dynamic_plugins.c, + src/dynamic-plugins/sf_dynamic_preprocessor.h, + src/dynamic-preprocessors/appid/Makefile_defs, + src/dynamic-preprocessors/appid/luaDetectorApi.c, + src/dynamic-preprocessors/appid/util/common_util.h : + Fix for excessive logging of lua detector invalid LUA (null). + + * snort/src/detection-plugins/sp_byte_check.c, + src/detection-plugins/sp_byte_extract.c, + src/detection-plugins/sp_byte_jump.c, + src/detection-plugins/sp_byte_math.c, + src/detection-plugins/sp_byte_math.h, + src/detection-plugins/sp_isdataat.c, + src/detection-plugins/sp_pattern_match.c : + Added support for allowing common names across rule options. + + * src/memory_stats.c : + Removed a redundant log. + + * spp_sip.c : + Fixed handling encrypted traffic by SIP preprocessor. + + * snort/configure.in, + snort/doc/README.s7commplus, + snort/etc/sf_rule_options, + snort/etc/sf_rule_validation.conf, + snort/src/dynamic-preprocessors/Makefile.am, + snort/src/dynamic-preprocessors/s7commplus/Makefile.am, + snort/src/dynamic-preprocessors/s7commplus/s7comm_decode.c, + snort/src/dynamic-preprocessors/s7commplus/s7comm_decode.h, + snort/src/dynamic-preprocessors/s7commplus/s7comm_paf.c, + snort/src/dynamic-preprocessors/s7commplus/s7comm_paf.h, + snort/src/dynamic-preprocessors/s7commplus/s7comm_roptions.c, + snort/src/dynamic-preprocessors/s7commplus/s7comm_roptions.h, + snort/src/dynamic-preprocessors/s7commplus/spp_s7comm.c, + snort/src/dynamic-preprocessors/s7commplus/spp_s7comm.h, + snort/src/generators.h, + snort/src/preprocids.h : + Added support for s7Commplus protocol. + + * src/preprocessors/Stream6/snort_stream_tcp.c : + Fixed out of order FIN packet leading to segment trimming. + + * src/output-plugins/spo_unified2.c, + src/preprocessors/Stream6/snort_stream_tcp.c : + Fix to populate original IP in dropped events when inline normalization is enabled. + + * snort/src/sfutil/sf_ip.h : + Fixed compiler warnings. + + * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c : + Fixed DNS application detector failing to detect DNS traffic in some scenarios. + +2020-07-24 Hariharan Chandrashekar +snort 2.9.16.1 + + * src/dynamic-preprocessors/appid/appIdConfig.h, + src/dynamic-preprocessors/appid/appInfoTable.c, + src/dynamic-preprocessors/appid/flow.h, + src/dynamic-preprocessors/appid/fw_appid.c : + Added packet counters to make sure flows with one-way data don't pend forever. + + * src/detection-plugins/sp_flowbits.c, + src/snort.c : + Fixed potential race condition between reload and exit path. + + * src/detection-plugins/sp_session.c, + src/preprocessors/Stream6/stream_paf.h, + src/sfutil/util_jsnorm.c : + Added support for GCC version 10.1.1. + +2020-03-15 Hariharan Chandrashekar +snort 2.9.16 + + * src/preprocessors/Stream6/snort_stream_tcp.c : + Addressed an issue when out-of-order FIN is received by dropping it. + + * src/output-plugins/spo_unified2.c, + src/preprocessors/Stream6/snort_stream_tcp.c : + Fixed an issue in which xtradata is not added to the alert in unified file. + + * src/reload.c, + src/snort.c : + Fixed potential race condition between reload and exit path (main thread). + + * etc/file_magic.conf : + Updated the file magic to detect ALZ file types. + + * src/sfutil/sf_ip.h : + Added support for gcc version 9.2.1. + + * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c : + Fixed an issue in which APPID returns no match. + + * src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj, + src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj, + src/dynamic-preprocessors/dns/sf_dns.vcxproj, + src/dynamic-preprocessors/dynamic_preprocessors.vcxproj, + src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj, + src/dynamic-preprocessors/gtp/sf_gtp.vcxproj, + src/dynamic-preprocessors/imap/sf_imap.vcxproj, + src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj, + src/dynamic-preprocessors/modbus/sf_modbus.vcxproj, + src/dynamic-preprocessors/pop/sf_pop.vcxproj, + src/dynamic-preprocessors/reputation/sf_reputation.vcxproj, + src/dynamic-preprocessors/sdf/sf_sdf.vcxproj, + src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj, + src/dynamic-preprocessors/sip/sf_sip.vcxproj, + src/dynamic-preprocessors/smtp/sf_smtp.vcxproj, + src/dynamic-preprocessors/ssh/sf_ssh.vcxproj, + src/dynamic-preprocessors/ssl/sf_ssl.vcxproj, + src/win32/WIN32-Prj/build_all.vcxproj, + src/win32/WIN32-Prj/sf_engine.vcxproj, + src/win32/WIN32-Prj/sf_engine_initialize.vcxproj, + src/win32/WIN32-Prj/snort.vcxproj, + src/win32/WIN32-Prj/snort_initialize.vcxproj, + src/win32/WIN32-Prj/snort_installer_x64.nsi, + src/win32/WIN32-Prj/snort_x64.dsw, + src/win64/WIN64-Libraries/Packet.lib, + src/win64/WIN64-Libraries/libdnet/dnet.lib, + src/win64/WIN64-Libraries/pcre.lib, + src/win64/WIN64-Libraries/wpcap.lib, + src/win64/WIN64-Libraries/zlib.lib, + tools/u2spewfoo/u2spewfoo.vcxproj : + Added 64-bit support for Windows 10 operating system. + + * src/dynamic-preprocessors/pop/snort_pop.c : + Fixed an issue where POP preprocessor was not generating alert in some cases. + + * src/dynamic-preprocessors/gtp/gtp_parser.c : + Fixed the alerting logic for GTP v2 with missing TEID. + + * src/preprocessors/HttpInspect/utils/hi_paf.c : + Fixed file policy not working with character prefix in chunk size. + + * configure.in, + src/reload.c, + src/side-channel/sidechannel.c, + src/snort.c, + src/target-based/sftarget_reader.c, + src/util.h : + Added support for glibc version 2.30. + + * src/decode.h, + src/dynamic-plugins/sf_engine/sf_snort_packet.h, + src/preprocessors/HttpInspect/utils/hi_paf.c, + src/preprocessors/Stream6/snort_stream_tcp.c, + src/preprocessors/Stream6/stream_paf.c, + src/preprocessors/snort_httpinspect.c, + src/preprocessors/snort_httpinspect.h, + src/preprocessors/stream_api.h : + Added support for early inspection of HTTP payload before flushing in pre-ack mode. + + * src/file-process/file_api.h, + src/file-process/file_service.c, + src/preprocessors/HttpInspect/include/hi_norm.h, + src/preprocessors/HttpInspect/include/hi_ui_config.h, + src/preprocessors/HttpInspect/server/hi_server_norm.c, + src/preprocessors/snort_httpinspect.c : + Normalize randomly encoded nulls interspersed in the HTTP server response to UTF-8. + 2019-12-15 Hariharan Chandrashekar snort 2.9.15.1 @@ -132,7 +646,7 @@ Added DPD callbacks for receiving ftp transfer mode before generating file events. * snort/etc/file_magic.conf : - Fixed RTF file magic to a more generic value to prevent evasions. + Fixed RTF file magic to a more generic value. * src/preprocessors/spp_httpinspect.c : Added debug logs during HTTP Reload. @@ -722,7 +1236,7 @@ detector_plugins/detector_smtp.c, service_plugins/service_ftp.c : Fixed an issue where is SMTP is detected too late. - * src/: dynamic-plugins/sf_dynamic_plugins.c, + * src/dynamic-plugins/sf_dynamic_plugins.c, dynamic-preprocessors/appid/appIdConfig.h, dynamic-preprocessors/appid/fw_appid.c : Added mutex protections into the framework API to protect against some thread contention. @@ -3291,7 +3805,7 @@ preprocessors/Stream6/snort_stream_ip.c, preprocessors/Stream6/snort_stream_tcp.c, preprocessors/Stream6/snort_stream_udp.c: - Fixed issue with blacklisting of flow traffic. + Fixed issue with blocklisting of flow traffic. * src/preprocessors: spp_session.c, spp_stream6.c: @@ -5409,7 +5923,7 @@ eliminate read-mode check when determining window * src/preprocessors/Stream5/snort_stream5_tcp.c: - don't reassemble on the tracked whitelisted flows + don't reassemble on the tracked allowlisted flows fix sequence number validation on ack to zero window syn+ack fix timestamp tracking to use window base instead of next expected @@ -5478,7 +5992,7 @@ Also, export REQ_ENGINE_LIB_MAJOR and REQ_ENGINE_LIB_MINOR from snort * src/preprocessors/Stream5/snort_stream5_tcp.c: - allow stream5 to track whitelisted sessions + allow stream5 to track allowlisted sessions * src/: snort.c, dynamic-preprocessors/dnp3/spp_dnp3.c, preprocessors/Stream5/snort_stream5_tcp.c, @@ -6101,7 +6615,7 @@ for ftp-data channel. * src/: decode.c, decode.h, encode.c, sf_protocols.h, snort.c: - Whitelist encrypted ESP tunnels if decoding ESP traffic. + Allowlist encrypted ESP tunnels if decoding ESP traffic. * src/detection-plugins/sp_react.c: Fix issue where react action was lost when Snort reloads. @@ -6294,8 +6808,8 @@ * doc/README.counts, doc/snort_manual.pdf, doc/snort_manual.tex, src/decode.c, src/parser.c, src/snort.h: - Added config tunnel_verdicts and tunnel bypass for whitelist and - blacklist verdicts for 6in4 or 4in6 encapsulated traffic. + Added config tunnel_verdicts and tunnel bypass for allowlist and + blocklist verdicts for 6in4 or 4in6 encapsulated traffic. * src/preprocessors/spp_frag3.c: Don't update IP options length and count in frag3 after allocating @@ -6428,8 +6942,8 @@ * doc/README.counts, doc/snort_manual.tex, doc/snort_manual.pdf, src/active.c, src/active.h, src/decode.c, src/parser.c, src/parser.h, src/snort.c, src/snort.h, src/util.c: - added config tunnel_verdicts and tunnel bypass for whitelist and - blacklist verdicts for gtp or teredo encapsulated traffic. + added config tunnel_verdicts and tunnel bypass for allowlist and + blocklist verdicts for gtp or teredo encapsulated traffic. * src/dynamic-preprocessors/smtp/: snort_smtp.c, snort_smtp.h: Handle MS Exchange X-EXPS and XEXCH50 commands in the SMTP @@ -7063,7 +7577,7 @@ added 134:3 and IPs and ports to log messages for PPM packet events * src/snort.c: - force drop TCP/UDP now gets DAQ blacklist instead of DAQ block verdict + force drop TCP/UDP now gets DAQ blocklist instead of DAQ block verdict * doc/README.stream5, etc/gen-msg.map, preproc_rules/preprocessor.rules, src/generators.h, @@ -7344,7 +7858,7 @@ * src/: sfdaq.c, sfdaq.h, dynamic-plugins/sf_dynamic_plugins.c, dynamic-plugins/sf_dynamic_preprocessor.h: - Add API for checking whether DAQ can whitelist. + Add API for checking whether DAQ can allowlist. * src/: parser.c, parser.h, snort.c: @@ -8525,7 +9039,7 @@ dynamic-preprocessors/reputation/reputation_config.c, dynamic-preprocessors/reputation/shmem/shmem_datamgmt.c, dynamic-preprocessors/reputation/shmem/shmem_datamgmt.h: - The paths to whitelist & blacklist files are now relative to + The paths to allowlist & blocklist files are now relative to the location of snort.conf. * src/preprocessors/Stream5/snort_stream5_session.c: @@ -8648,7 +9162,7 @@ tools/Makefile.am: - Added support for shared memory between Snort processes. This is used in the IP Reputation preprocessor to share a single copy - of IP whitelists & blacklists. + of IP allowlists & blocklists. - Added a control channel, so that commands may be issued to a running Snort process by way of a Unix socket. @@ -8913,7 +9427,7 @@ src/dynamic-preprocessors/Makefile.am, configure.in, src/preprocids.h, etc/gen-msg.map: Added the IP Reputation preprocessor. This preprocessor provides - the ability to whitelist and blacklist packets based on IP addresses. + the ability to allowlist and blocklist packets based on IP addresses. See README.reputation for more information. * src/: sf_types.h, dynamic-plugins/sf_dynamic_plugins.c, @@ -9201,7 +9715,7 @@ for HTTP response bodies & decoded email attachments. * src/: snort.c, preprocessors/spp_stream5.c, preprocessors/stream_api.h: - Update Snort to return a DAQ verdict of whitelist (meaning don't + Update Snort to return a DAQ verdict of allowlist (meaning don't send Snort any more packets) for sessions that are being ignored in both directions or ports that are configured to ignore. For DAQ modules and hardware that supports it, this should result in diff -Nru snort-2.9.15.1/Makefile.in snort-2.9.20/Makefile.in --- snort-2.9.15.1/Makefile.in 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,14 +89,12 @@ build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/snort.pc.in COPYING ChangeLog \ - config.guess config.sub install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -106,7 +114,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ @@ -161,7 +169,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, @@ -184,6 +192,9 @@ CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/snort.pc.in COPYING ChangeLog compile config.guess \ + config.sub install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -270,6 +281,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -385,15 +397,14 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -406,8 +417,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -601,7 +612,10 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -669,7 +683,7 @@ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -685,11 +699,17 @@ $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -707,7 +727,7 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -717,22 +737,23 @@ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -917,6 +938,8 @@ uninstall-am uninstall-man uninstall-man8 \ uninstall-pkgconfigDATA +.PRECIOUS: Makefile + dist-hook: # always ensure that the win32 build is in sync diff -Nru snort-2.9.15.1/RELEASE.NOTES snort-2.9.20/RELEASE.NOTES --- snort-2.9.15.1/RELEASE.NOTES 2019-12-03 09:06:14.000000000 +0000 +++ snort-2.9.20/RELEASE.NOTES 2022-05-23 14:56:22.000000000 +0000 @@ -1,11 +1,20 @@ -2019-12-15 - Snort 2.9.15.1 +2022-05-13 - Snort 2.9.20 [*] New Additions - * Added support for glibc version 2.30. + Added support for dns root queries and underflow. + + Added support to get extra data from SMTP and HTTP into IPS event. + + Added support for login success and failure eventing for IMAP and POP3. + + Added support to handle empty string for SNI/CN/SAN/ORG. [*] Improvements / Fix - * Fixed snort core seen during ssl re-configuration. - * Fixed file access issues on files from SMB share. + Fixed a scenario where SSL traffic was not detected correctly. + + Fixed security zones info in intrusion events. + + Fixed URL lookup failure. diff -Nru snort-2.9.15.1/VERSION snort-2.9.20/VERSION --- snort-2.9.15.1/VERSION 2019-12-03 09:06:14.000000000 +0000 +++ snort-2.9.20/VERSION 2022-04-29 07:12:49.000000000 +0000 @@ -1 +1 @@ -2.9.15.1 +2.9.20 diff -Nru snort-2.9.15.1/aclocal.m4 snort-2.9.20/aclocal.m4 --- snort-2.9.15.1/aclocal.m4 2019-12-03 09:30:40.000000000 +0000 +++ snort-2.9.20/aclocal.m4 2022-05-23 15:42:27.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.13.4 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -22,9 +22,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -32,36 +30,30 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. # -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . ]) -# serial 57 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -89,7 +81,7 @@ # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl @@ -113,7 +105,7 @@ _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -133,26 +125,43 @@ dnl AC_DEFUN([AM_PROG_LIBTOOL], []) +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + # _LT_CC_BASENAME(CC) # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -199,15 +208,16 @@ m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl +m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -220,7 +230,7 @@ # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -231,14 +241,14 @@ ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -291,21 +301,21 @@ # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from `configure', and `config.status' +# Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' +# in macros and then make a single call at the end using the 'libtool' # label. @@ -437,8 +447,8 @@ # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) @@ -462,7 +472,7 @@ # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl +available_tags='_LT_TAGS'dnl ]) @@ -490,7 +500,7 @@ # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], @@ -516,8 +526,8 @@ # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], @@ -563,7 +573,7 @@ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -576,7 +586,7 @@ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -592,7 +602,7 @@ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this +# '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). @@ -614,7 +624,7 @@ _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl +test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT @@ -637,7 +647,7 @@ } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, +'$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -659,7 +669,7 @@ This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." -while test $[#] != 0 +while test 0 != $[#] do case $[1] in --version | --v* | -V ) @@ -672,10 +682,10 @@ lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; esac shift done @@ -701,7 +711,7 @@ # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: -test "$silent" = yes && +test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false @@ -721,27 +731,31 @@ _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. -# + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS @@ -749,13 +763,24 @@ _LT_EOF + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -772,8 +797,6 @@ sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - _LT_PROG_REPLACE_SHELLFNS - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -791,7 +814,6 @@ [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -988,7 +1010,7 @@ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -1006,7 +1028,7 @@ cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1024,7 +1046,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], @@ -1046,7 +1068,7 @@ _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1056,32 +1078,32 @@ ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1101,29 +1123,29 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1143,7 +1165,7 @@ # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then +if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], @@ -1161,7 +1183,7 @@ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) @@ -1181,8 +1203,8 @@ # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO @@ -1210,10 +1232,10 @@ # Invoke $ECHO with all args, space-separated. func_echo_all () { - $ECHO "$*" + $ECHO "$*" } -case "$ECHO" in +case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; @@ -1239,16 +1261,17 @@ AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], +[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -1258,14 +1281,14 @@ no|'') ;; #( *) - AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) +[dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- @@ -1273,31 +1296,33 @@ [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1326,9 +1351,46 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1338,9 +1400,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1359,7 +1431,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1377,19 +1452,20 @@ *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1397,7 +1473,7 @@ case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -1406,7 +1482,7 @@ esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -1422,7 +1498,7 @@ ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK @@ -1441,11 +1517,11 @@ [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -1453,7 +1529,7 @@ ]) ]) -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -1484,7 +1560,7 @@ if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -1520,7 +1596,7 @@ [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -1547,7 +1623,7 @@ $RM conftest* ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1569,7 +1645,7 @@ m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -1588,10 +1664,10 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1612,7 +1688,7 @@ AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -1652,7 +1728,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1702,22 +1778,23 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1733,7 +1810,7 @@ ;; esac ]) -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1761,7 +1838,7 @@ # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : +if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -1808,9 +1885,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -1836,7 +1913,7 @@ return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in @@ -1857,7 +1934,7 @@ # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then +if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1867,44 +1944,52 @@ case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], + [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], + [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) @@ -1913,21 +1998,21 @@ ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -1937,7 +2022,7 @@ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl @@ -1947,9 +2032,9 @@ ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -2041,8 +2126,8 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes @@ -2052,8 +2137,8 @@ ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else @@ -2080,8 +2165,8 @@ _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -2093,15 +2178,15 @@ _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -2115,12 +2200,12 @@ fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2144,7 +2229,7 @@ # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2162,6 +2247,47 @@ ])# _LT_CMD_STRIPLIB +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2172,17 +2298,18 @@ m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -2198,28 +2325,35 @@ ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -2233,7 +2367,7 @@ # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -2242,7 +2376,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2259,14 +2393,17 @@ # flags to be left without arguments need_version=unknown +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) @@ -2274,41 +2411,91 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -2318,18 +2505,18 @@ powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -2337,8 +2524,8 @@ bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -2350,7 +2537,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -2359,8 +2546,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -2376,17 +2563,17 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -2395,8 +2582,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -2423,7 +2610,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -2436,8 +2623,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -2450,7 +2637,7 @@ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -2463,8 +2650,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -2477,8 +2664,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2496,12 +2683,13 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -2526,26 +2714,15 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2563,14 +2740,15 @@ dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2578,8 +2756,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -2588,8 +2766,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -2602,8 +2780,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2614,7 +2792,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -2622,8 +2800,8 @@ esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -2642,8 +2820,8 @@ esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -2652,13 +2830,33 @@ dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2686,11 +2884,15 @@ # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -2707,12 +2909,12 @@ need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -2722,7 +2924,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -2731,58 +2933,68 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -2793,8 +3005,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -2804,11 +3016,11 @@ sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -2816,8 +3028,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -2838,24 +3050,24 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -2873,7 +3085,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -2881,8 +3093,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2891,20 +3103,30 @@ ;; esac AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -2937,39 +3159,41 @@ [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program which can recognize shared library +# find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -2992,11 +3216,11 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -3014,7 +3238,7 @@ # _LT_PATH_MAGIC # -------------- -# find a file program which can recognize a shared library +# find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -3041,16 +3265,16 @@ AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], + [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -3064,7 +3288,7 @@ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -3075,37 +3299,37 @@ with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -3191,13 +3452,13 @@ # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) @@ -3224,8 +3485,7 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -3261,10 +3521,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3303,7 +3559,7 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3325,8 +3581,8 @@ lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' @@ -3379,6 +3635,9 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac ]) @@ -3419,33 +3678,38 @@ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3456,21 +3720,21 @@ esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -3478,8 +3742,8 @@ esac fi AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -3525,8 +3789,8 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -3538,7 +3802,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) @@ -3565,13 +3829,28 @@ lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + + # LT_LIB_M # -------- # check for math library @@ -3583,11 +3862,11 @@ # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) @@ -3606,7 +3885,7 @@ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; @@ -3658,7 +3937,7 @@ symcode='[[ABCDGISTW]]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; @@ -3691,14 +3970,44 @@ symcode='[[ABCDGIRSTW]]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3716,21 +4025,24 @@ # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -3770,11 +4082,11 @@ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else @@ -3800,7 +4112,7 @@ { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -3820,9 +4132,9 @@ mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -3843,7 +4155,7 @@ rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -3870,12 +4182,16 @@ [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3891,17 +4207,18 @@ m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3912,8 +4229,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -3929,6 +4246,11 @@ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3978,7 +4300,7 @@ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4019,14 +4341,14 @@ case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -4055,7 +4377,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4063,7 +4385,7 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' @@ -4208,17 +4530,18 @@ fi ], [ - if test "$GCC" = yes; then + if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -4229,8 +4552,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -4247,6 +4570,11 @@ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -4317,7 +4645,7 @@ case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -4325,11 +4653,30 @@ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -4345,7 +4692,7 @@ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -4354,9 +4701,9 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4381,6 +4728,12 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4478,7 +4831,7 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4507,7 +4860,7 @@ fi ]) case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4573,17 +4926,21 @@ case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -4629,9 +4986,9 @@ # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -4647,7 +5004,7 @@ # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -4655,7 +5012,7 @@ # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac @@ -4665,7 +5022,7 @@ # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -4687,24 +5044,24 @@ esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -4717,7 +5074,7 @@ case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -4736,7 +5093,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4752,7 +5109,7 @@ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4762,7 +5119,7 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -4770,61 +5127,89 @@ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4835,42 +5220,47 @@ lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4884,8 +5274,8 @@ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4903,8 +5293,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4916,7 +5306,7 @@ _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -4931,9 +5321,9 @@ # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4950,15 +5340,15 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= @@ -4974,7 +5364,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported @@ -4982,34 +5372,57 @@ ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -5028,13 +5441,21 @@ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5053,61 +5474,80 @@ ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -5116,7 +5556,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -5146,16 +5586,17 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes @@ -5164,18 +5605,18 @@ # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -5184,7 +5625,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -5234,33 +5675,33 @@ ;; hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5268,25 +5709,25 @@ ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ @@ -5294,14 +5735,14 @@ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in @@ -5312,7 +5753,7 @@ *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -5323,16 +5764,16 @@ ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + [save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], @@ -5345,21 +5786,31 @@ end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + LDFLAGS=$save_LDFLAGS]) + if test yes = "$lt_cv_irix_exported_symbol"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -5374,7 +5825,7 @@ newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -5382,27 +5833,19 @@ *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no @@ -5413,33 +5856,53 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5450,24 +5913,24 @@ solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -5477,11 +5940,11 @@ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi @@ -5491,10 +5954,10 @@ ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -5543,43 +6006,43 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -5594,17 +6057,17 @@ ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -5621,7 +6084,7 @@ # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -5701,12 +6164,12 @@ _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the + "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR @@ -5747,10 +6210,10 @@ # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" +lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -5786,18 +6249,18 @@ LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report which library types will actually be built + # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -5805,8 +6268,12 @@ ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -5814,13 +6281,13 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC="$lt_save_CC" +CC=$lt_save_CC ])# _LT_LANG_C_CONFIG @@ -5828,14 +6295,14 @@ # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes @@ -5877,7 +6344,7 @@ # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -5919,35 +6386,35 @@ if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -5983,18 +6450,30 @@ _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -6004,6 +6483,13 @@ ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -6022,13 +6508,21 @@ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -6046,64 +6540,84 @@ fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -6113,7 +6627,7 @@ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6141,57 +6655,58 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6202,6 +6717,34 @@ _LT_DARWIN_LINKER_FEATURES($1) ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -6236,18 +6779,15 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default @@ -6259,7 +6799,7 @@ _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6268,11 +6808,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GXX"; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -6282,15 +6822,15 @@ ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi @@ -6316,13 +6856,13 @@ aCC*) case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -6333,20 +6873,20 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -6361,22 +6901,22 @@ interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -6385,22 +6925,22 @@ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6408,8 +6948,8 @@ # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -6418,10 +6958,10 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -6435,59 +6975,59 @@ # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -6501,18 +7041,18 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -6520,10 +7060,10 @@ *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on @@ -6581,22 +7121,17 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -6612,9 +7147,9 @@ # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -6632,17 +7167,17 @@ cxx*) case $host in osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -6657,21 +7192,21 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists @@ -6717,9 +7252,9 @@ # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6727,7 +7262,7 @@ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; @@ -6744,30 +7279,30 @@ ;; gcx*) # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -6775,11 +7310,11 @@ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -6788,52 +7323,52 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" + '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -6864,10 +7399,10 @@ esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6894,7 +7429,7 @@ lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG @@ -6916,13 +7451,14 @@ AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -7006,13 +7542,13 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -7028,16 +7564,16 @@ case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -7045,9 +7581,9 @@ esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" + _LT_TAGVAR(postdeps, $1)=$prev$p else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= @@ -7062,15 +7598,15 @@ continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" + _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" + _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -7101,51 +7637,6 @@ _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac ]) @@ -7154,7 +7645,7 @@ esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) @@ -7174,10 +7665,10 @@ # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then +if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi @@ -7214,7 +7705,7 @@ # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then +if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7236,7 +7727,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} @@ -7250,21 +7741,25 @@ AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7272,11 +7767,11 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7293,9 +7788,9 @@ fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG @@ -7305,11 +7800,11 @@ # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) -if test -z "$FC" || test "X$FC" = "Xno"; then +if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi @@ -7346,7 +7841,7 @@ # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then +if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -7368,7 +7863,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} @@ -7384,21 +7879,25 @@ AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -7406,11 +7905,11 @@ AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -7430,7 +7929,7 @@ GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes +fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -7440,7 +7939,7 @@ # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -7474,7 +7973,7 @@ CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. @@ -7507,7 +8006,7 @@ # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE @@ -7541,7 +8040,7 @@ CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. @@ -7574,7 +8073,7 @@ # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -7590,7 +8089,7 @@ lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" +lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER @@ -7600,7 +8099,7 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= @@ -7629,7 +8128,7 @@ [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -7738,7 +8237,7 @@ # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue + test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -7755,9 +8254,9 @@ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break + test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then + if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -7781,27 +8280,7 @@ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -7825,102 +8304,9 @@ ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- -# Determine which file name conversion functions should be used by +# Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], @@ -7987,15 +8373,15 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 7 ltoptions.m4 +# serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -8016,7 +8402,7 @@ [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl + [m4_warning([Unknown $1 option '$2'])])[]dnl ]) @@ -8062,13 +8448,15 @@ dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS @@ -8096,7 +8484,7 @@ [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) +put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8132,7 +8520,7 @@ _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) +put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8141,9 +8529,9 @@ # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], @@ -8156,14 +8544,14 @@ *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -8195,9 +8583,9 @@ # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], @@ -8210,14 +8598,14 @@ *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -8249,9 +8637,9 @@ # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], @@ -8264,14 +8652,14 @@ *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -8288,14 +8676,14 @@ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) +the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) +the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8303,11 +8691,64 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], @@ -8318,19 +8759,17 @@ *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -8343,7 +8782,7 @@ [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) +put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -8366,7 +8805,8 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -8399,7 +8839,7 @@ # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. +# Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], @@ -8410,7 +8850,7 @@ # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different @@ -8490,7 +8930,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -8499,22 +8939,23 @@ # @configure_input@ -# serial 3337 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.2' -macro_revision='1.3337' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives @@ -8525,7 +8966,7 @@ # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # @@ -8539,7 +8980,7 @@ # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until @@ -8611,32 +9052,63 @@ m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 11 (pkg-config-0.29.1) -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29.1]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -8658,18 +9130,19 @@ PKG_CONFIG="" fi fi[]dnl -])# PKG_PROG_PKG_CONFIG +])dnl PKG_PROG_PKG_CONFIG -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -8679,8 +9152,10 @@ $3])dnl fi]) -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -8692,10 +9167,11 @@ else pkg_failed=untried fi[]dnl -])# _PKG_CONFIG +])dnl _PKG_CONFIG -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -8703,19 +9179,17 @@ else _pkg_short_errors_supported=no fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED +])dnl _PKG_SHORT_ERRORS_SUPPORTED -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -8769,16 +9243,40 @@ AC_MSG_RESULT([yes]) $3 fi[]dnl -])# PKG_CHECK_MODULES +])dnl PKG_CHECK_MODULES -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -8789,16 +9287,18 @@ AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR +])dnl PKG_INSTALLDIR -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --with-noarch-pkgconfigdir parameter. +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -8809,9 +9309,94 @@ AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR +])dnl PKG_NOARCH_INSTALLDIR + + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR + +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES + +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8823,10 +9408,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.13' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.4], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -8842,14 +9427,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.4])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8894,15 +9479,14 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8933,7 +9517,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9124,13 +9708,12 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -9138,49 +9721,41 @@ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -9189,18 +9764,17 @@ # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9209,6 +9783,12 @@ # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -9281,11 +9861,11 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -9317,6 +9897,51 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -9325,7 +9950,6 @@ m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -9347,7 +9971,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9358,7 +9982,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -9368,7 +9992,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9389,7 +10013,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9397,49 +10021,42 @@ # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9480,7 +10097,7 @@ # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9507,7 +10124,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9536,9 +10153,73 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9619,7 +10300,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9679,7 +10360,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9707,7 +10388,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9726,7 +10407,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru snort-2.9.15.1/compile snort-2.9.20/compile --- snort-2.9.15.1/compile 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/compile 2022-05-21 02:28:15.000000000 +0000 @@ -0,0 +1,348 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -Nru snort-2.9.15.1/config.guess snort-2.9.20/config.guess --- snort-2.9.15.1/config.guess 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/config.guess 2022-05-23 15:42:29.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2013-06-10' +timestamp='2018-03-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -24,12 +24,12 @@ # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -39,7 +39,7 @@ Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -107,9 +107,9 @@ dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -132,14 +132,14 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +149,20 @@ LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -168,21 +175,31 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -197,44 +214,67 @@ os=netbsd ;; esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,63 +291,54 @@ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -319,7 +350,7 @@ echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -346,38 +377,38 @@ sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" + eval "$set_cc_for_build" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -386,25 +417,25 @@ ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -415,44 +446,44 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -461,23 +492,23 @@ #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -503,17 +534,17 @@ AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -530,7 +561,7 @@ echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -542,14 +573,14 @@ if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -560,7 +591,7 @@ exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -574,26 +605,27 @@ exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -608,28 +640,28 @@ echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -662,13 +694,13 @@ exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -679,23 +711,23 @@ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -720,11 +752,11 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -733,7 +765,7 @@ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -741,9 +773,9 @@ exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -768,127 +800,109 @@ echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -901,58 +915,64 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -966,64 +986,70 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1037,34 +1063,34 @@ # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1074,12 +1100,12 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1089,9 +1115,9 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1099,7 +1125,7 @@ # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1111,9 +1137,9 @@ exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1133,9 +1159,9 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1144,28 +1170,28 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1176,7 +1202,7 @@ *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1196,23 +1222,23 @@ exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1231,67 +1257,93 @@ echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1300,18 +1352,18 @@ echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1332,14 +1384,14 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1348,182 +1400,48 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif +echo "$0: unable to guess system type" >&2 -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 < -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize +the system type. Please install a C compiler and try again. EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi + ;; +esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp @@ -1542,16 +1460,16 @@ /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru snort-2.9.15.1/config.h.in snort-2.9.20/config.h.in --- snort-2.9.15.1/config.h.in 2019-12-03 09:30:41.000000000 +0000 +++ snort-2.9.20/config.h.in 2022-05-23 15:42:28.000000000 +0000 @@ -31,6 +31,9 @@ /* Define to 1 if the system has the type `boolean'. */ #undef HAVE_BOOLEAN +/* Define to 1 if you have the header file. */ +#undef HAVE_CPA_H + /* Define to 1 if you have the `daq_acquire_with_meta' function. */ #undef HAVE_DAQ_ACQUIRE_WITH_META @@ -109,6 +112,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_JEMALLOC_H + /* Define to 1 if you have the `dnet' library (-ldnet). */ #undef HAVE_LIBDNET @@ -307,8 +313,7 @@ /* Define if Linux */ #undef LINUX -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if MacOS */ diff -Nru snort-2.9.15.1/config.sub snort-2.9.20/config.sub --- snort-2.9.15.1/config.sub 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/config.sub 2022-05-23 15:42:29.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2013-04-24' +timestamp='2018-05-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -25,7 +25,7 @@ # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -33,7 +33,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,12 +53,11 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -68,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -95,7 +94,7 @@ *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -111,28 +110,48 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; +# Spilt fields of configuration type +IFS="-" read -r field1 field2 field3 field4 <&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -369,18 +399,20 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -400,8 +432,10 @@ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -410,19 +444,23 @@ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ + | nfp-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -430,6 +468,8 @@ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -443,7 +483,7 @@ # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -477,7 +517,7 @@ basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -506,6 +546,9 @@ basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -519,7 +562,7 @@ os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -527,13 +570,13 @@ os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -622,10 +665,18 @@ basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -715,9 +766,6 @@ hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -730,26 +778,26 @@ basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -767,17 +815,17 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -794,7 +842,7 @@ os=-mingw64 ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -809,10 +857,10 @@ os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -822,15 +870,19 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -869,7 +921,7 @@ basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -914,6 +966,12 @@ nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -946,7 +1004,7 @@ os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -962,7 +1020,7 @@ basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -977,16 +1035,16 @@ basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -996,23 +1054,23 @@ ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1066,17 +1124,10 @@ sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1095,7 +1146,7 @@ os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1217,6 +1268,9 @@ basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1225,20 +1279,12 @@ basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1267,10 +1313,6 @@ vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1280,9 +1322,6 @@ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1302,7 +1341,7 @@ # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1310,10 +1349,10 @@ # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1321,11 +1360,11 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1336,45 +1375,48 @@ -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1391,12 +1433,12 @@ -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1405,10 +1447,10 @@ os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1419,12 +1461,6 @@ -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1449,7 +1485,7 @@ -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1471,7 +1507,7 @@ -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1486,32 +1522,44 @@ -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; + -ios) + ;; -none) ;; + -*-eabi) + case $basic_machine in + arm*) + ;; + esac + ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1546,6 +1594,9 @@ c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; @@ -1589,9 +1640,6 @@ mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; @@ -1601,12 +1649,12 @@ sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1646,7 +1694,7 @@ m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1661,9 +1709,6 @@ i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1773,15 +1818,15 @@ vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru snort-2.9.15.1/configure snort-2.9.20/configure --- snort-2.9.15.1/configure 2019-12-03 09:30:47.000000000 +0000 +++ snort-2.9.20/configure 2022-05-23 15:42:32.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for snort 2.9.15.1. +# Generated by GNU Autoconf 2.69 for snort 2.9.20. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='snort' PACKAGE_TARNAME='snort' -PACKAGE_VERSION='2.9.15.1' -PACKAGE_STRING='snort 2.9.15.1' +PACKAGE_VERSION='2.9.20' +PACKAGE_STRING='snort 2.9.20' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -662,6 +662,8 @@ BUILD_HA_TRUE BUILD_SNORT_RELOAD_FALSE BUILD_SNORT_RELOAD_TRUE +HAVE_JEMALLOC_FALSE +HAVE_JEMALLOC_TRUE BUILD_PROCPIDSTATS_FALSE BUILD_PROCPIDSTATS_TRUE HAVE_TARGET_BASED_FALSE @@ -691,6 +693,7 @@ XCCFLAGS extra_incl CPP +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -727,7 +730,6 @@ AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -801,7 +803,8 @@ PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -811,6 +814,7 @@ enable_static with_pic enable_fast_install +with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock @@ -843,6 +847,9 @@ enable_perfprofiling enable_linux_smp_stats enable_inline_init_failopen +enable_jemalloc +with_jemalloc_includes +with_jemalloc_libraries enable_pthread enable_debug_msgs enable_debug @@ -868,6 +875,8 @@ enable_large_pcap enable_file_inspect enable_open_appid +with_libluajit_includes +with_libluajit_libraries with_libnghttp2_includes with_libnghttp2_libraries ' @@ -879,6 +888,7 @@ LDFLAGS LIBS CPPFLAGS +LT_SYS_LIBRARY_PATH CPP SIGNAL_SNORT_RELOAD SIGNAL_SNORT_DUMP_STATS @@ -1429,7 +1439,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures snort 2.9.15.1 to adapt to many kinds of systems. +\`configure' configures snort 2.9.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1499,7 +1509,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of snort 2.9.15.1:";; + short | recursive ) echo "Configuration of snort 2.9.20:";; esac cat <<\_ACEOF @@ -1533,6 +1543,7 @@ --disable-perfprofiling Disable preprocessor and rule performance profiling --enable-linux-smp-stats Enable statistics reporting through proc --enable-inline-init-failopen Enable Fail Open during initialization for Inline Mode (adds pthread support implicitly) + --enable-jemalloc Enable jemalloc allocator library --disable-pthread Disable pthread support --enable-debug-msgs Enable debug printing options (bugreports and developers only) --enable-debug Enable debugging options (bugreports and developers only) @@ -1563,9 +1574,12 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). --with-libpcap-includes=DIR libpcap include directory --with-libpcap-libraries=DIR libpcap library directory --with-libpfring-includes=DIR libpfring include directory @@ -1580,8 +1594,12 @@ --with-dnet-libraries=DIR libdnet library directory --with-lzma-includes=DIR liblzma include directory --with-lzma-libraries=DIR liblzma library directory + --with-jemalloc-includes=DIR jemalloc include directory + --with-jemalloc-libraries=DIR jemalloc library directory --with-intel-soft-cpm-includes=DIR Intel Soft CPM include directory --with-intel-soft-cpm-libraries=DIR Intel Soft CPM library directory + --with-libluajit-includes=DIR libluajit include directory + --with-libluajit-libraries=DIR libluajit library directory --with-libnghttp2-includes=DIR libnghttp2 include directory --with-libnghttp2-libraries=DIR libnghttp2 library directory @@ -1593,6 +1611,8 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. CPP C preprocessor SIGNAL_SNORT_RELOAD set the SIGNAL_SNORT_RELOAD value @@ -1677,7 +1697,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -snort configure 2.9.15.1 +snort configure 2.9.20 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2382,7 +2402,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by snort $as_me 2.9.15.1, which was +It was created by snort $as_me 2.9.20, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2736,7 +2756,7 @@ # When changing the snort version, please also update the VERSION # definition in "src/win32/WIN32-Includes/config.h" -am__api_version='1.13' +am__api_version='1.16' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2937,8 +2957,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2957,7 +2977,7 @@ $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3252,7 +3272,7 @@ # Define the identity of the package. PACKAGE=snort - VERSION=2.9.15.1 + VERSION=2.9.20 cat >>confdefs.h <<_ACEOF @@ -3282,12 +3302,12 @@ # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -3303,6 +3323,48 @@ +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + NO_OPTIMIZE="no" @@ -3310,45 +3372,45 @@ ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -4158,6 +4220,65 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -5117,6 +5238,65 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -5253,8 +5433,8 @@ -macro_version='2.4.2' -macro_revision='1.3337' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -5268,7 +5448,7 @@ -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || @@ -5388,7 +5568,7 @@ $ECHO "" } -case "$ECHO" in +case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -5711,19 +5891,19 @@ # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -5737,7 +5917,7 @@ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -5748,7 +5928,7 @@ with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -5759,32 +5939,32 @@ $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -5827,33 +6007,38 @@ else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -5864,15 +6049,15 @@ esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -5978,9 +6163,9 @@ fi fi - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -5988,8 +6173,8 @@ esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -6040,7 +6225,7 @@ $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -6080,7 +6265,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -6130,22 +6315,23 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -6163,7 +6349,7 @@ fi -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -6181,30 +6367,6 @@ : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -6327,13 +6489,13 @@ reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then + if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -6461,13 +6623,13 @@ # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -6494,8 +6656,7 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -6531,10 +6692,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -6573,7 +6730,7 @@ ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -6595,8 +6752,8 @@ lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -6649,6 +6806,9 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -6806,8 +6966,8 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -6819,7 +6979,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac @@ -6974,7 +7134,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -6982,7 +7142,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -6995,7 +7155,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -7212,7 +7372,7 @@ if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -7302,7 +7462,7 @@ symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -7335,14 +7495,44 @@ symcode='[ABCDGIRSTW]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -7360,21 +7550,24 @@ # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -7422,11 +7615,11 @@ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -7452,7 +7645,7 @@ { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -7472,13 +7665,13 @@ mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -7499,7 +7692,7 @@ rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -7552,6 +7745,16 @@ + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } @@ -7564,9 +7767,9 @@ lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -7576,8 +7779,8 @@ no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -7589,18 +7792,99 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -7609,24 +7893,25 @@ test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -7655,9 +7940,50 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -7671,9 +7997,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -7692,7 +8028,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -7710,7 +8049,7 @@ *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -7750,13 +8089,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -7768,7 +8108,7 @@ case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -7777,7 +8117,7 @@ esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -7793,7 +8133,7 @@ ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -7904,7 +8244,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -8407,7 +8747,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -8425,7 +8765,7 @@ cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -8464,7 +8804,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -8493,7 +8833,7 @@ _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -8506,32 +8846,32 @@ $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -8539,6 +8879,41 @@ ;; esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8842,14 +9217,14 @@ *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8873,14 +9248,14 @@ *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8904,14 +9279,14 @@ *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8919,8 +9294,6 @@ fi -test -z "$pic_mode" && pic_mode=default - @@ -8936,14 +9309,14 @@ *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -8957,11 +9330,63 @@ + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -9010,7 +9435,7 @@ -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -9049,7 +9474,7 @@ # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -9060,14 +9485,14 @@ ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -9076,15 +9501,8 @@ test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +func_cc_basename $compiler +cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it @@ -9099,22 +9517,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -9137,13 +9555,13 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -9165,22 +9583,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -9203,13 +9621,13 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -9230,7 +9648,7 @@ # Use C for the default configuration in the libtool script -lt_save_CC="$CC" +lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9288,7 +9706,7 @@ lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -9304,7 +9722,7 @@ lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -9334,7 +9752,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -9352,17 +9770,18 @@ lt_prog_compiler_static= - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -9373,8 +9792,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -9390,6 +9809,11 @@ # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -9460,7 +9884,7 @@ case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -9468,10 +9892,29 @@ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -9487,7 +9930,7 @@ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' + lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -9496,9 +9939,9 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -9523,6 +9966,12 @@ lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -9620,7 +10069,7 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -9649,7 +10098,7 @@ fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -9681,7 +10130,7 @@ lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -9711,7 +10160,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -9743,7 +10192,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -9762,13 +10211,13 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_cv_prog_compiler_static_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= @@ -9888,8 +10337,8 @@ -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -9901,9 +10350,9 @@ ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -9946,9 +10395,9 @@ # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -9963,7 +10412,7 @@ # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -9971,7 +10420,7 @@ # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac @@ -9981,7 +10430,7 @@ # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -10003,24 +10452,24 @@ esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -10033,7 +10482,7 @@ case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -10052,7 +10501,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -10068,7 +10517,7 @@ allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -10078,7 +10527,7 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' + export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -10086,61 +10535,89 @@ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -10151,42 +10628,47 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -10200,8 +10682,8 @@ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -10219,8 +10701,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -10232,7 +10714,7 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -10247,9 +10729,9 @@ # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -10266,15 +10748,15 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac - if test "$ld_shlibs" = no; then + if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -10290,7 +10772,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -10298,34 +10780,57 @@ ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -10344,13 +10849,21 @@ hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='${wl}-f,' + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -10369,35 +10882,42 @@ ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='${wl}-bexpall' + export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -10432,7 +10952,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -10440,17 +10960,17 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -10485,7 +11005,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -10493,21 +11013,33 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -10516,7 +11048,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -10546,16 +11078,17 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes @@ -10564,18 +11097,18 @@ # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -10584,7 +11117,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -10603,24 +11136,24 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" + allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -10662,33 +11195,33 @@ ;; hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -10696,25 +11229,25 @@ ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -10726,7 +11259,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -10745,14 +11278,14 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -10760,8 +11293,8 @@ ;; esac fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -10772,7 +11305,7 @@ *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -10783,8 +11316,8 @@ ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. @@ -10794,8 +11327,8 @@ if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } @@ -10807,24 +11340,34 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -10839,7 +11382,7 @@ newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -10847,27 +11390,19 @@ *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no @@ -10878,33 +11413,53 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -10915,24 +11470,24 @@ solaris*) no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -10942,11 +11497,11 @@ solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi @@ -10956,10 +11511,10 @@ ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -11008,43 +11563,43 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' + no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' + export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -11059,10 +11614,10 @@ ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi @@ -11070,7 +11625,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11096,7 +11651,7 @@ # Assume -lc should be added archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -11311,14 +11866,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -11334,28 +11889,35 @@ ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -11369,7 +11931,7 @@ # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -11378,7 +11940,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -11395,14 +11957,16 @@ # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -11410,41 +11974,91 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -11454,18 +12068,18 @@ powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -11473,8 +12087,8 @@ bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -11486,7 +12100,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -11495,8 +12109,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -11512,17 +12126,17 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -11531,8 +12145,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -11559,7 +12173,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -11572,8 +12186,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -11586,7 +12200,7 @@ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -11599,8 +12213,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -11613,8 +12227,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -11632,12 +12246,13 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -11662,26 +12277,15 @@ esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -11699,14 +12303,15 @@ dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -11714,8 +12319,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -11724,8 +12329,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -11738,8 +12343,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -11750,7 +12355,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -11758,8 +12363,8 @@ esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -11778,8 +12383,8 @@ esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -11788,13 +12393,33 @@ dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -11841,11 +12466,15 @@ # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -11862,12 +12491,12 @@ need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -11877,7 +12506,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -11886,58 +12515,68 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -11948,8 +12587,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -11959,11 +12598,11 @@ sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -11971,8 +12610,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -11993,24 +12632,24 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -12028,7 +12667,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -12036,8 +12675,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -12047,20 +12686,35 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + @@ -12157,15 +12811,15 @@ hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then + test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -12180,12 +12834,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -12195,7 +12849,7 @@ - if test "x$enable_dlopen" != xyes; then + if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -12205,23 +12859,23 @@ case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -12259,10 +12913,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else - lt_cv_dlopen="dyld" + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -12270,10 +12924,18 @@ ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" + lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } @@ -12312,11 +12974,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } @@ -12355,7 +13017,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } @@ -12394,7 +13056,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } @@ -12433,7 +13095,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12454,21 +13116,21 @@ ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -12476,7 +13138,7 @@ if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -12523,9 +13185,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -12555,7 +13217,7 @@ (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -12575,14 +13237,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -12629,9 +13291,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -12661,7 +13323,7 @@ (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -12682,9 +13344,9 @@ $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -12728,7 +13390,7 @@ # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -12756,7 +13418,7 @@ - # Report which library types will actually be built + # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 @@ -12764,13 +13426,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -12778,8 +13440,12 @@ ;; aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -12789,7 +13455,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -12803,7 +13469,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" +CC=$lt_save_CC @@ -16424,6 +17090,76 @@ fi fi +################################################## +# Centos 8+ does not have inbuilt SunRPC support # +# in glibc and is separately availble in tirpc # +# package. Make sure we've got the library and # +# link it # +################################################## +if test -f /etc/centos-release ; then + LINUX_FLAVOUR=$(awk '{ print $1 }' /etc/centos-release) + DISTRO_VERSION=`cut -d ' ' -f 4 /etc/centos-release | cut -d '.' -f 1` + if [ "$LINUX_FLAVOUR" == "CentOS" ] && [ $DISTRO_VERSION -ge 8 ]; then + TIRPC="" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindresvport in -ltirpc" >&5 +$as_echo_n "checking for bindresvport in -ltirpc... " >&6; } +if ${ac_cv_lib_tirpc_bindresvport+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltirpc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char bindresvport (); +int +main () +{ +return bindresvport (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_tirpc_bindresvport=yes +else + ac_cv_lib_tirpc_bindresvport=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tirpc_bindresvport" >&5 +$as_echo "$ac_cv_lib_tirpc_bindresvport" >&6; } +if test "x$ac_cv_lib_tirpc_bindresvport" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBTIRPC 1 +_ACEOF + + LIBS="-ltirpc $LIBS" + +else + TIRPC="no" +fi + + echo "$TIRPC" + if test "x$TIRPC" = "xno"; then + echo + echo " ERROR! tirpc not found, get it by running " + echo " yum install libtirpc-devel or dnf install libtirpc-devel" + exit + fi + LIBS="${LIBS} -ltirpc" + extra_incl="-I/usr/include/tirpc" + fi +fi + Z_LIB="" for ac_header in zlib.h do : @@ -16726,6 +17462,132 @@ LIBS="$LIBS -lpthread" fi +# Check whether --enable-jemalloc was given. +if test "${enable_jemalloc+set}" = set; then : + enableval=$enable_jemalloc; enable_jemalloc="$enableval" +else + enable_jemalloc="no" +fi + + + +# Check whether --with-jemalloc_includes was given. +if test "${with_jemalloc_includes+set}" = set; then : + withval=$with_jemalloc_includes; with_jemalloc_includes="$withval" +else + with_jemalloc_includes="no" +fi + + + +# Check whether --with-jemalloc_libraries was given. +if test "${with_jemalloc_libraries+set}" = set; then : + withval=$with_jemalloc_libraries; with_jemalloc_libraries="$withval" +else + with_jemalloc_libraries="no" +fi + + + if test "x$enable_jemalloc" = "xyes"; then + HAVE_JEMALLOC_TRUE= + HAVE_JEMALLOC_FALSE='#' +else + HAVE_JEMALLOC_TRUE='#' + HAVE_JEMALLOC_FALSE= +fi + +if test "x$enable_jemalloc" = "xyes"; then + + if test "x$with_jemalloc_includes" != "xno"; then + CPPFLAGS="${CPPFLAGS} -I${with_jemalloc_includes}" + JEMALLOC_HEADERS="yes" + else + for ac_header in jemalloc.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "jemalloc.h" "ac_cv_header_jemalloc_h" "$ac_includes_default" +if test "x$ac_cv_header_jemalloc_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_JEMALLOC_H 1 +_ACEOF + JEMALLOC_HEADERS="yes" +else + JEMALLOC_HEADERS="no" +fi + +done + + fi + + if test "x$with_jemalloc_libraries" != "xno"; then + LDFLAGS="${LDFLAGS} -L${with_jemalloc_libraries} -Wl,-rpath,'\$\$ORIGIN/libs/jemalloc',-rpath,'\$\$ORIGIN/jemalloc'" + JEMALLOC_LIB="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ljemalloc" >&5 +$as_echo_n "checking for malloc in -ljemalloc... " >&6; } +if ${ac_cv_lib_jemalloc_malloc+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljemalloc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char malloc (); +int +main () +{ +return malloc (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_jemalloc_malloc=yes +else + ac_cv_lib_jemalloc_malloc=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jemalloc_malloc" >&5 +$as_echo "$ac_cv_lib_jemalloc_malloc" >&6; } +if test "x$ac_cv_lib_jemalloc_malloc" = xyes; then : + JEMALLOC_LIB="yes" +else + JEMALLOC_LIB="no" +fi + + fi + + if test "x$JEMALLOC_LIB" != "xno"; then + if test "x$JEMALLOC_HEADERS" != "xno"; then + CPPFLAGS="$CPPFLAGS -DJEMALLOC" + LIBS="-ljemalloc $LIBS" + fi + fi + + if test "x$JEMALLOC_LIB" = "xno"; then + echo + echo " ERROR! jemalloc library not found." + echo " Go get it from http://jemalloc.net/ ." 1>&2; + exit 1; + fi + + if test "x$JEMALLOC_HEADERS" = "xno"; then + echo + echo " ERROR! jemalloc header not found." + echo " Go get it from http://jemalloc.net/ ." 1>&2; + exit 1; + fi +fi + # Check whether --enable-pthread was given. if test "${enable_pthread+set}" = set; then : enableval=$enable_pthread; enable_pthread="$enableval" @@ -17058,13 +17920,10 @@ if test "x$with_intel_soft_cpm_includes" != "xno"; then enable_intel_soft_cpm="yes" - CPPFLAGS="${CPPFLAGS} -I${with_intel_soft_cpm_includes}" fi if test "x$with_intel_soft_cpm_libraries" != "xno"; then enable_intel_soft_cpm="yes" - LDFLAGS="${LDFLAGS} -L${with_intel_soft_cpm_libraries}" - LIBS="${LIBS} -lpm" fi if test "x$enable_intel_soft_cpm" = "xyes"; then @@ -17076,7 +17935,93 @@ fi if test "x$enable_intel_soft_cpm" = "xyes"; then - CPPFLAGS="${CPPFLAGS} -DINTEL_SOFT_CPM" + + if test "x$with_intel_soft_cpm_includes" != "xno"; then + CPPFLAGS="${CPPFLAGS} -I${with_intel_soft_cpm_includes}" + INTEL_SOFT_CPM_HEADERS="yes" + else + for ac_header in cpa.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "cpa.h" "ac_cv_header_cpa_h" "$ac_includes_default" +if test "x$ac_cv_header_cpa_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CPA_H 1 +_ACEOF + INTEL_SOFT_CPM_HEADERS="yes" +else + INTEL_SOFT_CPM_HEADERS="no" +fi + +done + + fi + + if test "x$with_intel_soft_cpm_libraries" != "xno"; then + LDFLAGS="${LDFLAGS} -L${with_intel_soft_cpm_libraries}" + INTEL_SOFT_CPM_LIB="yes" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpaPmPdbAddPattern in -lpm" >&5 +$as_echo_n "checking for cpaPmPdbAddPattern in -lpm... " >&6; } +if ${ac_cv_lib_pm_cpaPmPdbAddPattern+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cpaPmPdbAddPattern (); +int +main () +{ +return cpaPmPdbAddPattern (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pm_cpaPmPdbAddPattern=yes +else + ac_cv_lib_pm_cpaPmPdbAddPattern=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pm_cpaPmPdbAddPattern" >&5 +$as_echo "$ac_cv_lib_pm_cpaPmPdbAddPattern" >&6; } +if test "x$ac_cv_lib_pm_cpaPmPdbAddPattern" = xyes; then : + INTEL_SOFT_CPM_LIB="yes" +else + INTEL_SOFT_CPM_LIB="no" +fi + + fi + + if test "x$INTEL_SOFT_CPM_LIB" != "xno"; then + if test "x$INTEL_SOFT_CPM_HEADERS" != "xno"; then + CPPFLAGS="$CPPFLAGS -DINTEL_SOFT_CPM" + LIBS="$LIBS -lpm" + fi + fi + + if test "x$INTEL_SOFT_CPM_HEADERS" = "xno"; then + echo + echo " ERROR! intel-soft-cpm header not found." 1>&2; + exit 1; + fi + + if test "x$with_intel_soft_cpm_libraries" = "xno"; then + echo + echo " ERROR! intel-soft-cpm library not found." 1>&2; + exit 1; + fi fi # Check whether --enable-shared_rep was given. @@ -17443,6 +18388,34 @@ ###### End OpenAppId +#include luajit libs + + +# Check whether --with-libluajit_includes was given. +if test "${with_libluajit_includes+set}" = set; then : + withval=$with_libluajit_includes; with_libluajit_includes="$withval" +else + with_libluajit_includes="no" +fi + + + +# Check whether --with-libluajit_libraries was given. +if test "${with_libluajit_libraries+set}" = set; then : + withval=$with_libluajit_libraries; with_libluajit_libraries="$withval" +else + with_libluajit_libraries="no" +fi + + +if test "x$with_libluajit_includes" != "xno"; then + CPPFLAGS="${CPPFLAGS} -I${with_libluajit_includes}" +fi + +if test "x$with_libluajit_libraries" != "xno"; then + LDFLAGS="${LDFLAGS} -L${with_libluajit_libraries}" +fi + #include nghttp2 libs @@ -17633,6 +18606,28 @@ CFLAGS="$CFLAGS -Wall" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SFLINUX" >&5 +$as_echo_n "checking for SFLINUX... " >&6; } +if test -f /etc/os.conf; then + CFLAGS="${CFLAGS} -DSFLINUX" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WRLINUX" >&5 +$as_echo_n "checking for WRLINUX... " >&6; } +if test -f /etc/os-release && grep -q "wrlinux" /etc/os-release; then + CFLAGS="${CFLAGS} -DWRLINUX" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + echo $CFLAGS > cflags.out echo $CPPFLAGS > cppflags.out @@ -17644,7 +18639,7 @@ -ac_config_files="$ac_config_files snort.pc Makefile src/Makefile src/sfutil/Makefile src/control/Makefile src/file-process/Makefile src/file-process/libs/Makefile src/side-channel/Makefile src/side-channel/dynamic-plugins/Makefile src/side-channel/dynamic-plugins/snort_side_channel.pc src/side-channel/plugins/Makefile src/detection-plugins/Makefile src/dynamic-examples/Makefile src/dynamic-examples/dynamic-preprocessor/Makefile src/dynamic-examples/dynamic-rule/Makefile src/dynamic-plugins/Makefile src/dynamic-plugins/sf_engine/Makefile src/dynamic-plugins/sf_engine/examples/Makefile src/dynamic-plugins/sf_preproc_example/Makefile src/dynamic-preprocessors/Makefile src/dynamic-preprocessors/libs/Makefile src/dynamic-preprocessors/libs/snort_preproc.pc src/dynamic-preprocessors/ftptelnet/Makefile src/dynamic-preprocessors/smtp/Makefile src/dynamic-preprocessors/ssh/Makefile src/dynamic-preprocessors/sip/Makefile src/dynamic-preprocessors/reputation/Makefile src/dynamic-preprocessors/gtp/Makefile src/dynamic-preprocessors/dcerpc2/Makefile src/dynamic-preprocessors/pop/Makefile src/dynamic-preprocessors/imap/Makefile src/dynamic-preprocessors/sdf/Makefile src/dynamic-preprocessors/dns/Makefile src/dynamic-preprocessors/ssl/Makefile src/dynamic-preprocessors/modbus/Makefile src/dynamic-preprocessors/dnp3/Makefile src/dynamic-preprocessors/file/Makefile src/dynamic-preprocessors/appid/Makefile src/dynamic-output/Makefile src/dynamic-output/plugins/Makefile src/dynamic-output/libs/Makefile src/dynamic-output/libs/snort_output.pc src/output-plugins/Makefile src/preprocessors/Makefile src/preprocessors/HttpInspect/Makefile src/preprocessors/HttpInspect/include/Makefile src/preprocessors/HttpInspect/utils/Makefile src/preprocessors/HttpInspect/anomaly_detection/Makefile src/preprocessors/HttpInspect/client/Makefile src/preprocessors/HttpInspect/files/Makefile src/preprocessors/HttpInspect/event_output/Makefile src/preprocessors/HttpInspect/mode_inspection/Makefile src/preprocessors/HttpInspect/normalization/Makefile src/preprocessors/HttpInspect/server/Makefile src/preprocessors/HttpInspect/session_inspection/Makefile src/preprocessors/HttpInspect/user_interface/Makefile src/preprocessors/Session/Makefile src/preprocessors/Stream6/Makefile src/parser/Makefile src/target-based/Makefile doc/Makefile rpm/Makefile preproc_rules/Makefile m4/Makefile etc/Makefile templates/Makefile tools/Makefile tools/control/Makefile tools/u2boat/Makefile tools/u2spewfoo/Makefile tools/u2openappid/Makefile tools/u2streamer/Makefile tools/file_server/Makefile src/win32/Makefile src/reload-adjust/Makefile" +ac_config_files="$ac_config_files snort.pc Makefile src/Makefile src/sfutil/Makefile src/control/Makefile src/file-process/Makefile src/file-process/libs/Makefile src/side-channel/Makefile src/side-channel/dynamic-plugins/Makefile src/side-channel/dynamic-plugins/snort_side_channel.pc src/side-channel/plugins/Makefile src/detection-plugins/Makefile src/dynamic-examples/Makefile src/dynamic-examples/dynamic-preprocessor/Makefile src/dynamic-examples/dynamic-rule/Makefile src/dynamic-plugins/Makefile src/dynamic-plugins/sf_engine/Makefile src/dynamic-plugins/sf_engine/examples/Makefile src/dynamic-plugins/sf_preproc_example/Makefile src/dynamic-preprocessors/Makefile src/dynamic-preprocessors/libs/Makefile src/dynamic-preprocessors/libs/snort_preproc.pc src/dynamic-preprocessors/ftptelnet/Makefile src/dynamic-preprocessors/smtp/Makefile src/dynamic-preprocessors/ssh/Makefile src/dynamic-preprocessors/sip/Makefile src/dynamic-preprocessors/reputation/Makefile src/dynamic-preprocessors/gtp/Makefile src/dynamic-preprocessors/dcerpc2/Makefile src/dynamic-preprocessors/pop/Makefile src/dynamic-preprocessors/imap/Makefile src/dynamic-preprocessors/sdf/Makefile src/dynamic-preprocessors/dns/Makefile src/dynamic-preprocessors/ssl/Makefile src/dynamic-preprocessors/modbus/Makefile src/dynamic-preprocessors/dnp3/Makefile src/dynamic-preprocessors/s7commplus/Makefile src/dynamic-preprocessors/file/Makefile src/dynamic-preprocessors/appid/Makefile src/dynamic-output/Makefile src/dynamic-output/plugins/Makefile src/dynamic-output/libs/Makefile src/dynamic-output/libs/snort_output.pc src/output-plugins/Makefile src/preprocessors/Makefile src/preprocessors/HttpInspect/Makefile src/preprocessors/HttpInspect/include/Makefile src/preprocessors/HttpInspect/utils/Makefile src/preprocessors/HttpInspect/anomaly_detection/Makefile src/preprocessors/HttpInspect/client/Makefile src/preprocessors/HttpInspect/files/Makefile src/preprocessors/HttpInspect/event_output/Makefile src/preprocessors/HttpInspect/mode_inspection/Makefile src/preprocessors/HttpInspect/normalization/Makefile src/preprocessors/HttpInspect/server/Makefile src/preprocessors/HttpInspect/session_inspection/Makefile src/preprocessors/HttpInspect/user_interface/Makefile src/preprocessors/Session/Makefile src/preprocessors/Stream6/Makefile src/parser/Makefile src/target-based/Makefile doc/Makefile rpm/Makefile preproc_rules/Makefile m4/Makefile etc/Makefile templates/Makefile tools/Makefile tools/control/Makefile tools/u2boat/Makefile tools/u2spewfoo/Makefile tools/u2openappid/Makefile tools/u2streamer/Makefile tools/file_server/Makefile src/win32/Makefile src/reload-adjust/Makefile" cat >confcache <<\_ACEOF @@ -17824,6 +18819,10 @@ as_fn_error $? "conditional \"BUILD_PROCPIDSTATS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_JEMALLOC_TRUE}" && test -z "${HAVE_JEMALLOC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_JEMALLOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BUILD_SNORT_RELOAD_TRUE}" && test -z "${BUILD_SNORT_RELOAD_FALSE}"; then as_fn_error $? "conditional \"BUILD_SNORT_RELOAD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18257,7 +19256,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by snort $as_me 2.9.15.1, which was +This file was extended by snort $as_me 2.9.20, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18323,7 +19322,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -snort config.status 2.9.15.1 +snort config.status 2.9.20 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -18442,7 +19441,7 @@ # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -18458,6 +19457,7 @@ enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -18507,10 +19507,13 @@ GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -18575,7 +19578,8 @@ finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -18626,9 +19630,12 @@ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ nm_file_list_spec \ +lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -18663,7 +19670,7 @@ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -18690,10 +19697,11 @@ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -18702,19 +19710,16 @@ done ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -18768,6 +19773,7 @@ "src/dynamic-preprocessors/ssl/Makefile") CONFIG_FILES="$CONFIG_FILES src/dynamic-preprocessors/ssl/Makefile" ;; "src/dynamic-preprocessors/modbus/Makefile") CONFIG_FILES="$CONFIG_FILES src/dynamic-preprocessors/modbus/Makefile" ;; "src/dynamic-preprocessors/dnp3/Makefile") CONFIG_FILES="$CONFIG_FILES src/dynamic-preprocessors/dnp3/Makefile" ;; + "src/dynamic-preprocessors/s7commplus/Makefile") CONFIG_FILES="$CONFIG_FILES src/dynamic-preprocessors/s7commplus/Makefile" ;; "src/dynamic-preprocessors/file/Makefile") CONFIG_FILES="$CONFIG_FILES src/dynamic-preprocessors/file/Makefile" ;; "src/dynamic-preprocessors/appid/Makefile") CONFIG_FILES="$CONFIG_FILES src/dynamic-preprocessors/appid/Makefile" ;; "src/dynamic-output/Makefile") CONFIG_FILES="$CONFIG_FILES src/dynamic-output/Makefile" ;; @@ -19406,29 +20412,35 @@ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19446,106 +20458,99 @@ q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)$/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="" +available_tags='' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -19565,6 +20570,9 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -19682,18 +20690,27 @@ # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and in which our libraries should be installed. +# The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -19784,8 +20801,11 @@ # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -19878,13 +20898,13 @@ # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -19936,13 +20956,72 @@ _LT_EOF + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -19951,7 +21030,7 @@ esac -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if @@ -19961,165 +21040,6 @@ sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" diff -Nru snort-2.9.15.1/configure.in snort-2.9.20/configure.in --- snort-2.9.15.1/configure.in 2019-12-03 09:06:14.000000000 +0000 +++ snort-2.9.20/configure.in 2022-04-29 07:12:50.000000000 +0000 @@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h) # When changing the snort version, please also update the VERSION # definition in "src/win32/WIN32-Includes/config.h" -AM_INIT_AUTOMAKE(snort,2.9.15.1) +AM_INIT_AUTOMAKE(snort,2.9.20) NO_OPTIMIZE="no" @@ -1044,6 +1044,30 @@ fi fi +################################################## +# Centos 8+ does not have inbuilt SunRPC support # +# in glibc and is separately availble in tirpc # +# package. Make sure we've got the library and # +# link it # +################################################## +if test -f /etc/centos-release ; then + LINUX_FLAVOUR=$(awk '{ print $1 }' /etc/centos-release) + DISTRO_VERSION=`cut -d ' ' -f 4 /etc/centos-release | cut -d '.' -f 1` + if [[ "$LINUX_FLAVOUR" == "CentOS" ]] && [[ $DISTRO_VERSION -ge 8 ]]; then + TIRPC="" + AC_CHECK_LIB(tirpc,bindresvport,, TIRPC="no") + echo "$TIRPC" + if test "x$TIRPC" = "xno"; then + echo + echo " ERROR! tirpc not found, get it by running " + echo " yum install libtirpc-devel or dnf install libtirpc-devel" + exit + fi + LIBS="${LIBS} -ltirpc" + extra_incl="-I/usr/include/tirpc" + fi +fi + Z_LIB="" AC_CHECK_HEADERS(zlib.h,, Z_LIB="no") if test "x$Z_LIB" = "xno"; then @@ -1170,6 +1194,57 @@ LIBS="$LIBS -lpthread" fi +AC_ARG_ENABLE(jemalloc, +[ --enable-jemalloc Enable jemalloc allocator library], + enable_jemalloc="$enableval", enable_jemalloc="no") + +AC_ARG_WITH(jemalloc_includes, + [ --with-jemalloc-includes=DIR jemalloc include directory], + [with_jemalloc_includes="$withval"],[with_jemalloc_includes="no"]) + +AC_ARG_WITH(jemalloc_libraries, + [ --with-jemalloc-libraries=DIR jemalloc library directory], + [with_jemalloc_libraries="$withval"],[with_jemalloc_libraries="no"]) + +AM_CONDITIONAL(HAVE_JEMALLOC, test "x$enable_jemalloc" = "xyes") +if test "x$enable_jemalloc" = "xyes"; then + + if test "x$with_jemalloc_includes" != "xno"; then + CPPFLAGS="${CPPFLAGS} -I${with_jemalloc_includes}" + JEMALLOC_HEADERS="yes" + else + AC_CHECK_HEADERS(jemalloc.h, JEMALLOC_HEADERS="yes", JEMALLOC_HEADERS="no") + fi + + if test "x$with_jemalloc_libraries" != "xno"; then + LDFLAGS="${LDFLAGS} -L${with_jemalloc_libraries} -Wl,-rpath,'\$\$ORIGIN/libs/jemalloc',-rpath,'\$\$ORIGIN/jemalloc'" + JEMALLOC_LIB="yes" + else + AC_CHECK_LIB(jemalloc, malloc, JEMALLOC_LIB="yes", JEMALLOC_LIB="no") + fi + + if test "x$JEMALLOC_LIB" != "xno"; then + if test "x$JEMALLOC_HEADERS" != "xno"; then + CPPFLAGS="$CPPFLAGS -DJEMALLOC" + LIBS="-ljemalloc $LIBS" + fi + fi + + if test "x$JEMALLOC_LIB" = "xno"; then + echo + echo " ERROR! jemalloc library not found." + echo " Go get it from http://jemalloc.net/ ." 1>&2; + exit 1; + fi + + if test "x$JEMALLOC_HEADERS" = "xno"; then + echo + echo " ERROR! jemalloc header not found." + echo " Go get it from http://jemalloc.net/ ." 1>&2; + exit 1; + fi +fi + AC_ARG_ENABLE(pthread, [ --disable-pthread Disable pthread support], enable_pthread="$enableval", enable_pthread="yes") @@ -1371,18 +1446,47 @@ if test "x$with_intel_soft_cpm_includes" != "xno"; then enable_intel_soft_cpm="yes" - CPPFLAGS="${CPPFLAGS} -I${with_intel_soft_cpm_includes}" fi if test "x$with_intel_soft_cpm_libraries" != "xno"; then enable_intel_soft_cpm="yes" - LDFLAGS="${LDFLAGS} -L${with_intel_soft_cpm_libraries}" - LIBS="${LIBS} -lpm" fi AM_CONDITIONAL(HAVE_INTEL_SOFT_CPM, test "x$enable_intel_soft_cpm" = "xyes") if test "x$enable_intel_soft_cpm" = "xyes"; then - CPPFLAGS="${CPPFLAGS} -DINTEL_SOFT_CPM" + + if test "x$with_intel_soft_cpm_includes" != "xno"; then + CPPFLAGS="${CPPFLAGS} -I${with_intel_soft_cpm_includes}" + INTEL_SOFT_CPM_HEADERS="yes" + else + AC_CHECK_HEADERS(cpa.h, INTEL_SOFT_CPM_HEADERS="yes", INTEL_SOFT_CPM_HEADERS="no") + fi + + if test "x$with_intel_soft_cpm_libraries" != "xno"; then + LDFLAGS="${LDFLAGS} -L${with_intel_soft_cpm_libraries}" + INTEL_SOFT_CPM_LIB="yes" + else + AC_CHECK_LIB(pm, cpaPmPdbAddPattern, INTEL_SOFT_CPM_LIB="yes", INTEL_SOFT_CPM_LIB="no") + fi + + if test "x$INTEL_SOFT_CPM_LIB" != "xno"; then + if test "x$INTEL_SOFT_CPM_HEADERS" != "xno"; then + CPPFLAGS="$CPPFLAGS -DINTEL_SOFT_CPM" + LIBS="$LIBS -lpm" + fi + fi + + if test "x$INTEL_SOFT_CPM_HEADERS" = "xno"; then + echo + echo " ERROR! intel-soft-cpm header not found." 1>&2; + exit 1; + fi + + if test "x$with_intel_soft_cpm_libraries" = "xno"; then + echo + echo " ERROR! intel-soft-cpm library not found." 1>&2; + exit 1; + fi fi AC_ARG_ENABLE(shared_rep, @@ -1469,6 +1573,24 @@ ###### End OpenAppId +#include luajit libs + +AC_ARG_WITH(libluajit_includes, + [ --with-libluajit-includes=DIR libluajit include directory], + [with_libluajit_includes="$withval"],[with_libluajit_includes="no"]) + +AC_ARG_WITH(libluajit_libraries, + [ --with-libluajit-libraries=DIR libluajit library directory], + [with_libluajit_libraries="$withval"],[with_libluajit_libraries="no"]) + +if test "x$with_libluajit_includes" != "xno"; then + CPPFLAGS="${CPPFLAGS} -I${with_libluajit_includes}" +fi + +if test "x$with_libluajit_libraries" != "xno"; then + LDFLAGS="${LDFLAGS} -L${with_libluajit_libraries}" +fi + #include nghttp2 libs AC_ARG_WITH(libnghttp2_includes, @@ -1589,6 +1711,22 @@ CFLAGS="$CFLAGS -Wall" fi +AC_MSG_CHECKING(for SFLINUX) +if test -f /etc/os.conf; then + CFLAGS="${CFLAGS} -DSFLINUX" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +AC_MSG_CHECKING(for WRLINUX) +if test -f /etc/os-release && grep -q "wrlinux" /etc/os-release; then + CFLAGS="${CFLAGS} -DWRLINUX" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + echo $CFLAGS > cflags.out echo $CPPFLAGS > cppflags.out @@ -1637,6 +1775,7 @@ src/dynamic-preprocessors/ssl/Makefile \ src/dynamic-preprocessors/modbus/Makefile \ src/dynamic-preprocessors/dnp3/Makefile \ +src/dynamic-preprocessors/s7commplus/Makefile \ src/dynamic-preprocessors/file/Makefile \ src/dynamic-preprocessors/appid/Makefile \ src/dynamic-output/Makefile \ diff -Nru snort-2.9.15.1/debian/changelog snort-2.9.20/debian/changelog --- snort-2.9.15.1/debian/changelog 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/changelog 2023-02-18 13:40:27.000000000 +0000 @@ -1,3 +1,41 @@ +snort (2.9.20-0+deb11u1) bullseye-security; urgency=high + + + * Non-maintainer upload. + * New upstream version 2.9.20. + -Fix CVE-2021-40114, CVE-2021-34749, CVE-2021-1495, CVE-2021-1494, + CVE-2021-1224, CVE-2021-1223,CVE-2020-3315, CVE-2020-3299, + CVE-2021-1236. + * Refresh the patches. + * Drop autoconf, fix_compile_errors and fix_ftbfs_in_manual.tex patches + because they are apparently no longer required. + + -- Markus Koschany Sat, 18 Feb 2023 14:40:27 +0100 + +snort (2.9.15.1-6) unstable; urgency=medium + + * debian/rules: Rename the cron.daily script from snort-common to 0snort-common + * debian/snort-common.{pre,post}inst, debian/snort-common.postrm: Move the + cron.daily snort-common file to cron.daily/0snort-common in order for + Snort to send reports to the system administrator. With the previous setup + logrotate was running before snort-common which left the log file to 0 + bytes and prevent the package from sending any email reports + (Closes: #991977) + * debian/snort-common.preinst, debian/snort-common.postrm: Apply patch + provided by Andreas Beckmann to call dpkg-maintscript-helper for all actions (Closes: #991630) + * Fix FTCBFS with patch provided by Helmut Grohne: (Closes: #977394) + + Pass reasonable --build and --host to configure. + + cross.patch: Replace a number of AC_RUN_IFELSE with cross-compatible + variants. + * debian/control: Update to Standards Version 4.6.0 (no changes) + * debian/patches/snort_binary_typos: New patch fixing typos detected by + lintian in the snort binary and libraries + * debian/snort-rules-default.README.Debian: Fix typo [lintian fix] + * Add debian/upstream/metadata (pointing to Snort 3 as there is no Snort 2.x + code repository available) + + -- Javier Fernández-Sanguino Peña Sun, 05 Sep 2021 15:38:14 +0200 + snort (2.9.15.1-5) unstable; urgency=medium * debian/snort-common.{preinst,postinst,postrm}: @@ -996,7 +1034,7 @@ snort (2.7.0-12) unstable; urgency=low * Add texlive-latex-recommended to Build-Depends-Indep since refcount.sty - and kvoptions.sty are used + and kvoptions.sty are used * Have the binary-{arch,indep} depend on install-{arch,indep} instead of in the install target. - Move install calls related to snort-common to the install-indep target @@ -1656,7 +1694,7 @@ snort (2.2.0-9) unstable; urgency=low - * Removed old (obsolete) converstion of PPPENV in /var/tmp in postinst + * Removed old (obsolete) convertion of PPPENV in /var/tmp in postinst which actually might open up security holes when using dialup access and installing/upgrading the package. * Updated translations: diff -Nru snort-2.9.15.1/debian/control snort-2.9.20/debian/control --- snort-2.9.15.1/debian/control 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/control 2023-02-18 13:40:27.000000000 +0000 @@ -27,7 +27,7 @@ texlive-font-utils, latex2html, ghostscript -Standards-Version: 4.5.0 +Standards-Version: 4.6.2 Homepage: https://www.snort.org/ Vcs-Git: https://salsa.debian.org/jfs/pkg-snort.git Vcs-Browser: https://salsa.debian.org/jfs/pkg-snort diff -Nru snort-2.9.15.1/debian/my/lisapaper.txt snort-2.9.20/debian/my/lisapaper.txt --- snort-2.9.15.1/debian/my/lisapaper.txt 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/my/lisapaper.txt 2023-02-18 13:40:27.000000000 +0000 @@ -16,7 +16,7 @@ Introduction - Snort fills an important "ecological niche" in the the realm of network + Snort fills an important "ecological niche" in the realm of network security: a cross-platform, lightweight network intrusion detection tool that can be deployed to monitor small TCP/IP networks and detect a wide variety of suspicious network traffic as well as outright attacks. It can provide diff -Nru snort-2.9.15.1/debian/patches/autoconf snort-2.9.20/debian/patches/autoconf --- snort-2.9.15.1/debian/patches/autoconf 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/autoconf 1970-01-01 00:00:00.000000000 +0000 @@ -1,21024 +0,0 @@ -Description: Autoconf updated -Author: Javier Fernández-Sanguino Peña -Forwarded: not-needed -Last-Update: 2020-03-25 - ---- snort-2.9.15.1.orig/aclocal.m4 -+++ snort-2.9.15.1/aclocal.m4 -@@ -1,6 +1,6 @@ --# generated automatically by aclocal 1.13.4 -*- Autoconf -*- -+# generated automatically by aclocal 1.16.1 -*- Autoconf -*- - --# Copyright (C) 1996-2013 Free Software Foundation, Inc. -+# Copyright (C) 1996-2018 Free Software Foundation, Inc. - - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -22,9 +22,7 @@ To do so, use the procedure documented b - - # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - # --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009, 2010, 2011 Free Software --# Foundation, Inc. -+# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. - # Written by Gordon Matzigkeit, 1996 - # - # This file is free software; the Free Software Foundation gives -@@ -32,36 +30,30 @@ To do so, use the procedure documented b - # modifications, as long as this notice is preserved. - - m4_define([_LT_COPYING], [dnl --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009, 2010, 2011 Free Software --# Foundation, Inc. --# Written by Gordon Matzigkeit, 1996 --# --# This file is part of GNU Libtool. -+# Copyright (C) 2014 Free Software Foundation, Inc. -+# This is free software; see the source for copying conditions. There is NO -+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+ -+# GNU Libtool is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of of the License, or -+# (at your option) any later version. - # --# GNU Libtool is free software; you can redistribute it and/or --# modify it under the terms of the GNU General Public License as --# published by the Free Software Foundation; either version 2 of --# the License, or (at your option) any later version. --# --# As a special exception to the GNU General Public License, --# if you distribute this file as part of a program or library that --# is built using GNU Libtool, you may include this file under the --# same distribution terms that you use for the rest of that program. -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program or library that is built -+# using GNU Libtool, you may include this file under the same -+# distribution terms that you use for the rest of that program. - # --# GNU Libtool is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# GNU Libtool is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with GNU Libtool; see the file COPYING. If not, a copy --# can be downloaded from http://www.gnu.org/licenses/gpl.html, or --# obtained by writing to the Free Software Foundation, Inc., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# along with this program. If not, see . - ]) - --# serial 57 LT_INIT -+# serial 58 LT_INIT - - - # LT_PREREQ(VERSION) -@@ -89,7 +81,7 @@ esac - # LT_INIT([OPTIONS]) - # ------------------ - AC_DEFUN([LT_INIT], --[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl - AC_BEFORE([$0], [LT_LANG])dnl - AC_BEFORE([$0], [LT_OUTPUT])dnl -@@ -113,7 +105,7 @@ dnl Parse OPTIONS - _LT_SET_OPTIONS([$0], [$1]) - - # This can be used to rebuild libtool when needed --LIBTOOL_DEPS="$ltmain" -+LIBTOOL_DEPS=$ltmain - - # Always use our own libtool. - LIBTOOL='$(SHELL) $(top_builddir)/libtool' -@@ -133,26 +125,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], []) - dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -+# _LT_PREPARE_CC_BASENAME -+# ----------------------- -+m4_defun([_LT_PREPARE_CC_BASENAME], [ -+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -+func_cc_basename () -+{ -+ for cc_temp in @S|@*""; do -+ case $cc_temp in -+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; -+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; -+ \-*) ;; -+ *) break;; -+ esac -+ done -+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -+} -+])# _LT_PREPARE_CC_BASENAME -+ -+ - # _LT_CC_BASENAME(CC) - # ------------------- --# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -+# but that macro is also expanded into generated libtool script, which -+# arranges for $SED and $ECHO to be set by different means. - m4_defun([_LT_CC_BASENAME], --[for cc_temp in $1""; do -- case $cc_temp in -- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; -- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -+[m4_require([_LT_PREPARE_CC_BASENAME])dnl -+AC_REQUIRE([_LT_DECL_SED])dnl -+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -+func_cc_basename $1 -+cc_basename=$func_cc_basename_result - ]) - - - # _LT_FILEUTILS_DEFAULTS - # ---------------------- - # It is okay to use these file commands and assume they have been set --# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. - m4_defun([_LT_FILEUTILS_DEFAULTS], - [: ${CP="cp -f"} - : ${MV="mv -f"} -@@ -199,15 +208,16 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LIN - m4_require([_LT_CMD_OLD_ARCHIVE])dnl - m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - m4_require([_LT_WITH_SYSROOT])dnl -+m4_require([_LT_CMD_TRUNCATE])dnl - - _LT_CONFIG_LIBTOOL_INIT([ --# See if we are running on zsh, and set the options which allow our -+# See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes INIT. --if test -n "\${ZSH_VERSION+set}" ; then -+if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - ]) --if test -n "${ZSH_VERSION+set}" ; then -+if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - -@@ -220,7 +230,7 @@ aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. -- if test "X${COLLECT_NAMES+set}" != Xset; then -+ if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi -@@ -231,14 +241,14 @@ esac - ofile=libtool - can_build_shared=yes - --# All known linkers require a `.a' archive for static linking (except MSVC, -+# All known linkers require a '.a' archive for static linking (except MSVC, - # which needs '.lib'). - libext=a - --with_gnu_ld="$lt_cv_prog_gnu_ld" -+with_gnu_ld=$lt_cv_prog_gnu_ld - --old_CC="$CC" --old_CFLAGS="$CFLAGS" -+old_CC=$CC -+old_CFLAGS=$CFLAGS - - # Set sane defaults for various variables - test -z "$CC" && CC=cc -@@ -291,21 +301,21 @@ no_glob_subst='s/\*/\\\*/g' - - # _LT_PROG_LTMAIN - # --------------- --# Note that this code is called both from `configure', and `config.status' -+# Note that this code is called both from 'configure', and 'config.status' - # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, --# `config.status' has no value for ac_aux_dir unless we are using Automake, -+# 'config.status' has no value for ac_aux_dir unless we are using Automake, - # so we pass a copy along to make sure it has a sensible value anyway. - m4_defun([_LT_PROG_LTMAIN], - [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl - _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) --ltmain="$ac_aux_dir/ltmain.sh" -+ltmain=$ac_aux_dir/ltmain.sh - ])# _LT_PROG_LTMAIN - - - - # So that we can recreate a full libtool script including additional - # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS --# in macros and then make a single call at the end using the `libtool' -+# in macros and then make a single call at the end using the 'libtool' - # label. - - -@@ -437,8 +447,8 @@ m4_define([_lt_decl_all_varnames], - - # _LT_CONFIG_STATUS_DECLARE([VARNAME]) - # ------------------------------------ --# Quote a variable value, and forward it to `config.status' so that its --# declaration there will have the same value as in `configure'. VARNAME -+# Quote a variable value, and forward it to 'config.status' so that its -+# declaration there will have the same value as in 'configure'. VARNAME - # must have a single quote delimited value for this to work. - m4_define([_LT_CONFIG_STATUS_DECLARE], - [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) -@@ -462,7 +472,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS - # Output comment and list of tags supported by the script - m4_defun([_LT_LIBTOOL_TAGS], - [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl --available_tags="_LT_TAGS"dnl -+available_tags='_LT_TAGS'dnl - ]) - - -@@ -490,7 +500,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libto - # _LT_LIBTOOL_CONFIG_VARS - # ----------------------- - # Produce commented declarations of non-tagged libtool config variables --# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' - # script. Tagged libtool config variables (even for the LIBTOOL CONFIG - # section) are produced by _LT_LIBTOOL_TAG_VARS. - m4_defun([_LT_LIBTOOL_CONFIG_VARS], -@@ -516,8 +526,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], - # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of - # variables for single and double quote escaping we saved from calls - # to _LT_DECL, we can put quote escaped variables declarations --# into `config.status', and then the shell code to quote escape them in --# for loops in `config.status'. Finally, any additional code accumulated -+# into 'config.status', and then the shell code to quote escape them in -+# for loops in 'config.status'. Finally, any additional code accumulated - # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. - m4_defun([_LT_CONFIG_COMMANDS], - [AC_PROVIDE_IFELSE([LT_OUTPUT], -@@ -563,7 +573,7 @@ for var in lt_decl_all_varnames([[ \ - ]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) -- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" -+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" -@@ -576,7 +586,7 @@ for var in lt_decl_all_varnames([[ \ - ]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) -- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" -+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" -@@ -592,7 +602,7 @@ _LT_OUTPUT_LIBTOOL_INIT - # Generate a child script FILE with all initialization necessary to - # reuse the environment learned by the parent script, and make the - # file executable. If COMMENT is supplied, it is inserted after the --# `#!' sequence but before initialization text begins. After this -+# '#!' sequence but before initialization text begins. After this - # macro, additional text can be appended to FILE to form the body of - # the child script. The macro ends with non-zero status if the - # file could not be fully written (such as if the disk is full). -@@ -614,7 +624,7 @@ AS_SHELL_SANITIZE - _AS_PREPARE - exec AS_MESSAGE_FD>&1 - _ASEOF --test $lt_write_fail = 0 && chmod +x $1[]dnl -+test 0 = "$lt_write_fail" && chmod +x $1[]dnl - m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - - # LT_OUTPUT -@@ -637,7 +647,7 @@ exec AS_MESSAGE_LOG_FD>>config.log - } >&AS_MESSAGE_LOG_FD - - lt_cl_help="\ --\`$as_me' creates a local libtool stub from the current configuration, -+'$as_me' creates a local libtool stub from the current configuration, - for use in further configure time tests before the real libtool is - generated. - -@@ -659,7 +669,7 @@ Copyright (C) 2011 Free Software Foundat - This config.lt script is free software; the Free Software Foundation - gives unlimited permision to copy, distribute and modify it." - --while test $[#] != 0 -+while test 0 != $[#] - do - case $[1] in - --version | --v* | -V ) -@@ -672,10 +682,10 @@ do - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] --Try \`$[0] --help' for more information.]) ;; -+Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] --Try \`$[0] --help' for more information.]) ;; -+Try '$[0] --help' for more information.]) ;; - esac - shift - done -@@ -701,7 +711,7 @@ chmod +x "$CONFIG_LT" - # open by configure. Here we exec the FD to /dev/null, effectively closing - # config.log, so it can be properly (re)opened and appended to by config.lt. - lt_cl_success=: --test "$silent" = yes && -+test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -@@ -721,27 +731,30 @@ m4_defun([_LT_CONFIG], - _LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ -- # See if we are running on zsh, and set the options which allow our -+ # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -+ if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - -- cfgfile="${ofile}T" -+ cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" - #! $SHELL -- --# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. --# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -+# Generated automatically by $as_me ($PACKAGE) $VERSION - # NOTE: Changes made to this file will be lost: look at ltmain.sh. --# -+ -+# Provide generalized library-building support services. -+# Written by Gordon Matzigkeit, 1996 -+ - _LT_COPYING - _LT_LIBTOOL_TAGS - -+# Configured defaults for sys_lib_dlsearch_path munging. -+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} -+ - # ### BEGIN LIBTOOL CONFIG - _LT_LIBTOOL_CONFIG_VARS - _LT_LIBTOOL_TAG_VARS -@@ -749,13 +762,24 @@ _LT_LIBTOOL_TAG_VARS - - _LT_EOF - -+ cat <<'_LT_EOF' >> "$cfgfile" -+ -+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE -+ -+_LT_PREPARE_MUNGE_PATH_LIST -+_LT_PREPARE_CC_BASENAME -+ -+# ### END FUNCTIONS SHARED WITH CONFIGURE -+ -+_LT_EOF -+ - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. --if test "X${COLLECT_NAMES+set}" != Xset; then -+if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi -@@ -772,8 +796,6 @@ _LT_EOF - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - -- _LT_PROG_REPLACE_SHELLFNS -- - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -@@ -791,7 +813,6 @@ _LT_EOF - [m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' -- TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) - ])dnl /_LT_CONFIG_SAVE_COMMANDS -@@ -988,7 +1009,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no -- if test -z "${LT_MULTI_MODULE}"; then -+ if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the -@@ -1006,7 +1027,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. -- elif test -f libconftest.dylib && test $_lt_result -eq 0; then -+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD -@@ -1024,7 +1045,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS=$save_LDFLAGS - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], -@@ -1046,7 +1067,7 @@ _LT_EOF - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD -- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then -+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD -@@ -1056,32 +1077,32 @@ _LT_EOF - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; -+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) -- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -- 10.[[012]]*) -- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; -+ 10.[[012]][[,.]]*) -+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac -- if test "$lt_cv_apple_cc_single_mod" = "yes"; then -+ if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi -- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then -- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' -+ if test yes = "$lt_cv_ld_exported_symbols_list"; then -+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else -- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' -+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi -- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then -+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= -@@ -1101,29 +1122,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -- if test "$lt_cv_ld_force_load" = "yes"; then -- _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' -+ if test yes = "$lt_cv_ld_force_load"; then -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" -+ _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined - case $cc_basename in -- ifort*) _lt_dar_can_shared=yes ;; -+ ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac -- if test "$_lt_dar_can_shared" = "yes"; then -+ if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all -- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" -- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" -- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" -- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" -+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" -+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" -+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" -+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - m4_if([$1], [CXX], --[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then -- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" -- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" -+[ if test yes != "$lt_cv_apple_cc_single_mod"; then -+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" -+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi - ],[]) - else -@@ -1143,7 +1164,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], - # Allow to override them for all tags through lt_cv_aix_libpath. - m4_defun([_LT_SYS_MODULE_PATH_AIX], - [m4_require([_LT_DECL_SED])dnl --if test "${lt_cv_aix_libpath+set}" = set; then -+if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath - else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], -@@ -1161,7 +1182,7 @@ else - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then -- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" -+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -@@ -1181,8 +1202,8 @@ m4_define([_LT_SHELL_INIT], - # ----------------------- - # Find how we can fake an echo command that does not interpret backslash. - # In particular, with Autoconf 2.60 or later we add some code to the start --# of the generated configure script which will find a shell with a builtin --# printf (which we can use as an echo command). -+# of the generated configure script that will find a shell with a builtin -+# printf (that we can use as an echo command). - m4_defun([_LT_PROG_ECHO_BACKSLASH], - [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -@@ -1210,10 +1231,10 @@ fi - # Invoke $ECHO with all args, space-separated. - func_echo_all () - { -- $ECHO "$*" -+ $ECHO "$*" - } - --case "$ECHO" in -+case $ECHO in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -@@ -1239,16 +1260,17 @@ _LT_DECL([], [ECHO], [1], [An echo progr - AC_DEFUN([_LT_WITH_SYSROOT], - [AC_MSG_CHECKING([for sysroot]) - AC_ARG_WITH([sysroot], --[ --with-sysroot[=DIR] Search for dependent libraries within DIR -- (or the compiler's sysroot if not specified).], -+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], -+ [Search for dependent libraries within DIR (or the compiler's sysroot -+ if not specified).])], - [], [with_sysroot=no]) - - dnl lt_sysroot will always be passed unquoted. We quote it here - dnl in case the user passed a directory name. - lt_sysroot= --case ${with_sysroot} in #( -+case $with_sysroot in #( - yes) -- if test "$GCC" = yes; then -+ if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( -@@ -1258,14 +1280,14 @@ case ${with_sysroot} in #( - no|'') - ;; #( - *) -- AC_MSG_RESULT([${with_sysroot}]) -+ AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; - esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) - _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl --[dependent libraries, and in which our libraries should be installed.])]) -+[dependent libraries, and where our libraries should be installed.])]) - - # _LT_ENABLE_LOCK - # --------------- -@@ -1273,31 +1295,33 @@ m4_defun([_LT_ENABLE_LOCK], - [AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) --test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -+test no = "$enable_libtool_lock" || enable_libtool_lock=yes - - # Some flags need to be propagated to the compiler or linker for good - # libtool support. - case $host in - ia64-*-hpux*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set mode -+ # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) -- HPUX_IA64_MODE="32" -+ HPUX_IA64_MODE=32 - ;; - *ELF-64*) -- HPUX_IA64_MODE="64" -+ HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; - *-*-irix6*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then -- if test "$lt_cv_prog_gnu_ld" = yes; then -+ if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" -@@ -1326,9 +1350,46 @@ ia64-*-hpux*) - rm -rf conftest* - ;; - --x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -+mips64*-*linux*) -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. -+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext -+ if AC_TRY_EVAL(ac_compile); then -+ emul=elf -+ case `/usr/bin/file conftest.$ac_objext` in -+ *32-bit*) -+ emul="${emul}32" -+ ;; -+ *64-bit*) -+ emul="${emul}64" -+ ;; -+ esac -+ case `/usr/bin/file conftest.$ac_objext` in -+ *MSB*) -+ emul="${emul}btsmip" -+ ;; -+ *LSB*) -+ emul="${emul}ltsmip" -+ ;; -+ esac -+ case `/usr/bin/file conftest.$ac_objext` in -+ *N32*) -+ emul="${emul}n32" -+ ;; -+ esac -+ LD="${LD-ld} -m $emul" -+ fi -+ rm -rf conftest* -+ ;; -+ -+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ - s390*-*linux*|s390*-*tpf*|sparc*-*linux*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. Note that the listed cases only cover the -+ # situations where additional linker options are needed (such as when -+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or -+ # vice versa); the common cases where no linker options are needed do -+ # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in -@@ -1338,9 +1399,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) -- LD="${LD-ld} -m elf_i386" -+ case `/usr/bin/file conftest.o` in -+ *x86-64*) -+ LD="${LD-ld} -m elf32_x86_64" -+ ;; -+ *) -+ LD="${LD-ld} -m elf_i386" -+ ;; -+ esac - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" -+ ;; -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -1359,7 +1430,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -@@ -1377,19 +1451,20 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - - *-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. -- SAVE_CFLAGS="$CFLAGS" -+ SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) -- if test x"$lt_cv_cc_needs_belf" != x"yes"; then -+ if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -- CFLAGS="$SAVE_CFLAGS" -+ CFLAGS=$SAVE_CFLAGS - fi - ;; - *-*solaris*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in -@@ -1397,7 +1472,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - case $lt_cv_prog_gnu_ld in - yes*) - case $host in -- i?86-*-solaris*) -+ i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) -@@ -1406,7 +1481,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then -- LD="${LD-ld}_sol2" -+ LD=${LD-ld}_sol2 - fi - ;; - *) -@@ -1422,7 +1497,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - ;; - esac - --need_locks="$enable_libtool_lock" -+need_locks=$enable_libtool_lock - ])# _LT_ENABLE_LOCK - - -@@ -1441,11 +1516,11 @@ AC_CACHE_CHECK([for archiver @FILE suppo - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) -- if test "$ac_status" -eq 0; then -+ if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) -- if test "$ac_status" -ne 0; then -+ if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi -@@ -1453,7 +1528,7 @@ AC_CACHE_CHECK([for archiver @FILE suppo - ]) - ]) - --if test "x$lt_cv_ar_at_file" = xno; then -+if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= - else - archiver_list_spec=$lt_cv_ar_at_file -@@ -1484,7 +1559,7 @@ old_postuninstall_cmds= - - if test -n "$RANLIB"; then - case $host_os in -- openbsd*) -+ bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) -@@ -1520,7 +1595,7 @@ AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$3" -+ lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins -@@ -1547,7 +1622,7 @@ AC_CACHE_CHECK([$1], [$2], - $RM conftest* - ]) - --if test x"[$]$2" = xyes; then -+if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) - else - m4_if([$6], , :, [$6]) -@@ -1569,7 +1644,7 @@ AC_DEFUN([_LT_LINKER_OPTION], - m4_require([_LT_DECL_SED])dnl - AC_CACHE_CHECK([$1], [$2], - [$2=no -- save_LDFLAGS="$LDFLAGS" -+ save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then -@@ -1588,10 +1663,10 @@ AC_CACHE_CHECK([$1], [$2], - fi - fi - $RM -r conftest* -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS=$save_LDFLAGS - ]) - --if test x"[$]$2" = xyes; then -+if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) - else - m4_if([$5], , :, [$5]) -@@ -1612,7 +1687,7 @@ AC_DEFUN([LT_CMD_MAX_LEN], - AC_MSG_CHECKING([the maximum length of command line arguments]) - AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 -- teststring="ABCD" -+ teststring=ABCD - - case $build_os in - msdosdjgpp*) -@@ -1652,7 +1727,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d - lt_cv_sys_max_cmd_len=8192; - ;; - -- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) -+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` -@@ -1702,22 +1777,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` -- if test -n "$lt_cv_sys_max_cmd_len"; then -+ if test -n "$lt_cv_sys_max_cmd_len" && \ -+ test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. -- for i in 1 2 3 4 5 6 7 8 ; do -+ for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. -- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ -+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && -- test $i != 17 # 1/2 MB should be enough -+ test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring -@@ -1733,7 +1809,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d - ;; - esac - ]) --if test -n $lt_cv_sys_max_cmd_len ; then -+if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) - else - AC_MSG_RESULT(none) -@@ -1761,7 +1837,7 @@ m4_defun([_LT_HEADER_DLFCN], - # ---------------------------------------------------------------- - m4_defun([_LT_TRY_DLOPEN_SELF], - [m4_require([_LT_HEADER_DLFCN])dnl --if test "$cross_compiling" = yes; then : -+if test yes = "$cross_compiling"; then : - [$4] - else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -@@ -1808,9 +1884,9 @@ else - # endif - #endif - --/* When -fvisbility=hidden is used, assume the code has been annotated -+/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ --#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) - int fnord () __attribute__((visibility("default"))); - #endif - -@@ -1836,7 +1912,7 @@ int main () - return status; - }] - _LT_EOF -- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then -+ if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -1857,7 +1933,7 @@ rm -fr conftest* - # ------------------ - AC_DEFUN([LT_SYS_DLOPEN_SELF], - [m4_require([_LT_HEADER_DLFCN])dnl --if test "x$enable_dlopen" != xyes; then -+if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -@@ -1867,44 +1943,52 @@ else - - case $host_os in - beos*) -- lt_cv_dlopen="load_add_on" -+ lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) -- lt_cv_dlopen="LoadLibrary" -+ lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) -- lt_cv_dlopen="dlopen" -+ lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) -- # if libdl is installed we need to link against it -+ # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ -- lt_cv_dlopen="dyld" -+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ -+ lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - -+ tpf*) -+ # Don't try to run any link tests for TPF. We know it's impossible -+ # because TPF is a cross-compiler, and we know how we open DSOs. -+ lt_cv_dlopen=dlopen -+ lt_cv_dlopen_libs= -+ lt_cv_dlopen_self=no -+ ;; -+ - *) - AC_CHECK_FUNC([shl_load], -- [lt_cv_dlopen="shl_load"], -+ [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], -- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], -+ [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], -- [lt_cv_dlopen="dlopen"], -+ [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], -+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], -- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], -+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], -- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) -+ [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) -@@ -1913,21 +1997,21 @@ else - ;; - esac - -- if test "x$lt_cv_dlopen" != xno; then -- enable_dlopen=yes -- else -+ if test no = "$lt_cv_dlopen"; then - enable_dlopen=no -+ else -+ enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) -- save_CPPFLAGS="$CPPFLAGS" -- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -+ save_CPPFLAGS=$CPPFLAGS -+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - -- save_LDFLAGS="$LDFLAGS" -+ save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - -- save_LIBS="$LIBS" -+ save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], -@@ -1937,7 +2021,7 @@ else - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - -- if test "x$lt_cv_dlopen_self" = xyes; then -+ if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl -@@ -1947,9 +2031,9 @@ else - ]) - fi - -- CPPFLAGS="$save_CPPFLAGS" -- LDFLAGS="$save_LDFLAGS" -- LIBS="$save_LIBS" -+ CPPFLAGS=$save_CPPFLAGS -+ LDFLAGS=$save_LDFLAGS -+ LIBS=$save_LIBS - ;; - esac - -@@ -2041,8 +2125,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS], - m4_require([_LT_FILEUTILS_DEFAULTS])dnl - _LT_COMPILER_C_O([$1]) - --hard_links="nottested" --if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then -+hard_links=nottested -+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes -@@ -2052,8 +2136,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) -- if test "$hard_links" = no; then -- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) -+ if test no = "$hard_links"; then -+ AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) - need_locks=warn - fi - else -@@ -2080,8 +2164,8 @@ objdir=$lt_cv_objdir - _LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl - m4_pattern_allow([LT_OBJDIR])dnl --AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", -- [Define to the sub-directory in which libtool stores uninstalled libraries.]) -+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", -+ [Define to the sub-directory where libtool stores uninstalled libraries.]) - ])# _LT_CHECK_OBJDIR - - -@@ -2093,15 +2177,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH], - _LT_TAGVAR(hardcode_action, $1)= - if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || -- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then -+ test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then - - # We can hardcode non-existent directories. -- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && -+ if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && -- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then -+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && -+ test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else -@@ -2115,12 +2199,12 @@ else - fi - AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - --if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || -- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then -+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || -+ test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then - # Fast installation is not supported - enable_fast_install=no --elif test "$shlibpath_overrides_runpath" = yes || -- test "$enable_shared" = no; then -+elif test yes = "$shlibpath_overrides_runpath" || -+ test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless - fi -@@ -2144,7 +2228,7 @@ else - # FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) -- if test -n "$STRIP" ; then -+ if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) -@@ -2162,6 +2246,47 @@ _LT_DECL([], [striplib], [1]) - ])# _LT_CMD_STRIPLIB - - -+# _LT_PREPARE_MUNGE_PATH_LIST -+# --------------------------- -+# Make sure func_munge_path_list() is defined correctly. -+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -+[[# func_munge_path_list VARIABLE PATH -+# ----------------------------------- -+# VARIABLE is name of variable containing _space_ separated list of -+# directories to be munged by the contents of PATH, which is string -+# having a format: -+# "DIR[:DIR]:" -+# string "DIR[ DIR]" will be prepended to VARIABLE -+# ":DIR[:DIR]" -+# string "DIR[ DIR]" will be appended to VARIABLE -+# "DIRP[:DIRP]::[DIRA:]DIRA" -+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -+# "DIRA[ DIRA]" will be appended to VARIABLE -+# "DIR[:DIR]" -+# VARIABLE will be replaced by "DIR[ DIR]" -+func_munge_path_list () -+{ -+ case x@S|@2 in -+ x) -+ ;; -+ *:) -+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" -+ ;; -+ x:*) -+ eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" -+ ;; -+ *::*) -+ eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" -+ eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" -+ ;; -+ *) -+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" -+ ;; -+ esac -+} -+]])# _LT_PREPARE_PATH_LIST -+ -+ - # _LT_SYS_DYNAMIC_LINKER([TAG]) - # ----------------------------- - # PORTME Fill in your ld.so characteristics -@@ -2172,17 +2297,18 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_OBJDUMP])dnl - m4_require([_LT_DECL_SED])dnl - m4_require([_LT_CHECK_SHELL_FEATURES])dnl -+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl - AC_MSG_CHECKING([dynamic linker characteristics]) - m4_if([$1], - [], [ --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - case $host_os in -- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; -- *) lt_awk_arg="/^libraries:/" ;; -+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; -+ *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in -- mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; -- *) lt_sed_strip_eq="s,=/,/,g" ;; -+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; -+ *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in -@@ -2198,28 +2324,35 @@ if test "$GCC" = yes; then - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it -- # and add multilib dir if necessary. -+ # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= -- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` -+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` -+ # ...but if some path component already ends with the multilib dir we assume -+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). -+ case "$lt_multi_os_dir; $lt_search_path_spec " in -+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) -+ lt_multi_os_dir= -+ ;; -+ esac - for lt_sys_path in $lt_search_path_spec; do -- if test -d "$lt_sys_path/$lt_multi_os_dir"; then -- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" -- else -+ if test -d "$lt_sys_path$lt_multi_os_dir"; then -+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" -+ elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' --BEGIN {RS=" "; FS="/|\n";} { -- lt_foo=""; -- lt_count=0; -+BEGIN {RS = " "; FS = "/|\n";} { -+ lt_foo = ""; -+ lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { -- lt_foo="/" $lt_i lt_foo; -+ lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } -@@ -2233,7 +2366,7 @@ BEGIN {RS=" "; FS="/|\n";} { - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ -- $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; -+ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` - else -@@ -2242,7 +2375,7 @@ fi]) - library_names_spec= - libname_spec='lib$name' - soname_spec= --shrext_cmds=".so" -+shrext_cmds=.so - postinstall_cmds= - postuninstall_cmds= - finish_cmds= -@@ -2259,14 +2392,17 @@ hardcode_into_libs=no - # flags to be left without arguments - need_version=unknown - -+AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -+[User-defined run-time library search path.]) -+ - case $host_os in - aix3*) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -+ soname_spec='$libname$release$shared_ext$major' - ;; - - aix[[4-9]]*) -@@ -2274,41 +2410,91 @@ aix[[4-9]]*) - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with -- # the line `#! .'. This would cause the generated library to -- # depend on `.', always an invalid library. This was fixed in -+ # the line '#! .'. This would cause the generated library to -+ # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' -- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then -+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -+ # Using Import Files as archive members, it is possible to support -+ # filename-based versioning of shared library archives on AIX. While -+ # this would work for both with and without runtime linking, it will -+ # prevent static linking of such archives. So we do filename-based -+ # shared library versioning with .so extension only, which is used -+ # when both runtime linking and shared linking is enabled. -+ # Unfortunately, runtime linking may impact performance, so we do -+ # not want this to be the default eventually. Also, we use the -+ # versioned .so libs for executables only if there is the -brtl -+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. -+ # To allow for filename-based versioning support, we need to create -+ # libNAME.so.V as an archive file, containing: -+ # *) an Import File, referring to the versioned filename of the -+ # archive as well as the shared archive member, telling the -+ # bitwidth (32 or 64) of that shared object, and providing the -+ # list of exported symbols of that shared object, eventually -+ # decorated with the 'weak' keyword -+ # *) the shared object with the F_LOADONLY flag set, to really avoid -+ # it being seen by the linker. -+ # At run time we better use the real file rather than another symlink, -+ # but for link time we create the symlink libNAME.so -> libNAME.so.V -+ -+ case $with_aix_soname,$aix_use_runtimelinking in -+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. -- if test "$aix_use_runtimelinking" = yes; then -+ aix,yes) # traditional libtool -+ dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- else -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ ;; -+ aix,no) # traditional AIX only -+ dynamic_linker='AIX lib.a[(]lib.so.V[)]' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. -- library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -- fi -+ library_names_spec='$libname$release.a $libname.a' -+ soname_spec='$libname$release$shared_ext$major' -+ ;; -+ svr4,*) # full svr4 only -+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" -+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' -+ # We do not specify a path in Import Files, so LIBPATH fires. -+ shlibpath_overrides_runpath=yes -+ ;; -+ *,yes) # both, prefer svr4 -+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" -+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' -+ # unpreferred sharedlib libNAME.a needs extra handling -+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' -+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' -+ # We do not specify a path in Import Files, so LIBPATH fires. -+ shlibpath_overrides_runpath=yes -+ ;; -+ *,no) # both, prefer aix -+ dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" -+ library_names_spec='$libname$release.a $libname.a' -+ soname_spec='$libname$release$shared_ext$major' -+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling -+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' -+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' -+ ;; -+ esac - shlibpath_var=LIBPATH - fi - ;; -@@ -2318,18 +2504,18 @@ amigaos*) - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - - beos*) -- library_names_spec='${libname}${shared_ext}' -+ library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; -@@ -2337,8 +2523,8 @@ beos*) - bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -@@ -2350,7 +2536,7 @@ bsdi[[45]]*) - - cygwin* | mingw* | pw32* | cegcc*) - version_type=windows -- shrext_cmds=".dll" -+ shrext_cmds=.dll - need_version=no - need_lib_prefix=no - -@@ -2359,8 +2545,8 @@ cygwin* | mingw* | pw32* | cegcc*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ postinstall_cmds='base_file=`basename \$file`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ -@@ -2376,17 +2562,17 @@ cygwin* | mingw* | pw32* | cegcc*) - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' -@@ -2395,8 +2581,8 @@ m4_if([$1], [],[ - *,cl*) - # Native MSVC - libname_spec='$name' -- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -- library_names_spec='${libname}.dll.lib' -+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' -+ library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) -@@ -2423,7 +2609,7 @@ m4_if([$1], [],[ - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) -- sys_lib_search_path_spec="$LIB" -+ sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -@@ -2436,8 +2622,8 @@ m4_if([$1], [],[ - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ postinstall_cmds='base_file=`basename \$file`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' -@@ -2450,7 +2636,7 @@ m4_if([$1], [],[ - - *) - # Assume MSVC wrapper -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac -@@ -2463,8 +2649,8 @@ darwin* | rhapsody*) - version_type=darwin - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' -+ soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -@@ -2477,8 +2663,8 @@ dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -@@ -2496,12 +2682,13 @@ freebsd* | dragonfly*) - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac -@@ -2526,26 +2713,15 @@ freebsd* | dragonfly*) - esac - ;; - --gnu*) -- version_type=linux # correct to gnu/linux during the next big refactor -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- - haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH -- shlibpath_overrides_runpath=yes -+ shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; -@@ -2563,14 +2739,15 @@ hpux9* | hpux10* | hpux11*) - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' -+ if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' -@@ -2578,8 +2755,8 @@ hpux9* | hpux10* | hpux11*) - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; -@@ -2588,8 +2765,8 @@ hpux9* | hpux10* | hpux11*) - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... -@@ -2602,8 +2779,8 @@ interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -2614,7 +2791,7 @@ irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -+ if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix -@@ -2622,8 +2799,8 @@ irix5* | irix6* | nonstopux*) - esac - need_lib_prefix=no - need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -+ soname_spec='$libname$release$shared_ext$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= -@@ -2642,8 +2819,8 @@ irix5* | irix6* | nonstopux*) - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no -- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" -+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -@@ -2652,13 +2829,33 @@ linux*oldld* | linux*aout* | linux*coff* - dynamic_linker=no - ;; - -+linux*android*) -+ version_type=none # Android doesn't support versioned libraries. -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='$libname$release$shared_ext' -+ soname_spec='$libname$release$shared_ext' -+ finish_cmds= -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ -+ dynamic_linker='Android linker' -+ # Don't embed -rpath directories since the linker doesn't support them. -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -+ ;; -+ - # This must be glibc/ELF. --linux* | k*bsd*-gnu | kopensolaris*-gnu) -+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -2683,14 +2880,15 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - # before this can be enabled. - hardcode_into_libs=yes - -- # Add ABI-specific directories to the system library path. -- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" -- -- # Append ld.so.conf contents to the search path -+ # Ideally, we could use ldconfig to report *all* directores which are -+ # searched for libraries, however this is still not possible. Aside from not -+ # being certain /sbin/ldconfig is available, command -+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, -+ # even though it is searched at run-time. Try to do the best guess by -+ # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" -- -+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -@@ -2702,17 +2900,29 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - dynamic_linker='GNU/Linux ld.so' - ;; - -+netbsdelf*-gnu) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ dynamic_linker='NetBSD ld.elf_so' -+ ;; -+ - netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH -@@ -2722,7 +2932,7 @@ netbsd*) - - newsos6) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -@@ -2731,58 +2941,68 @@ newsos6) - version_type=qnx - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - --openbsd*) -+openbsd* | bitrig*) - version_type=sunos -- sys_lib_dlsearch_path_spec="/usr/lib" -+ sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[[89]] | openbsd2.[[89]].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then -+ need_version=no - else -- shlibpath_overrides_runpath=yes -+ need_version=yes - fi -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes - ;; - - os2*) - libname_spec='$name' -- shrext_cmds=".dll" -+ version_type=windows -+ shrext_cmds=.dll -+ need_version=no - need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -+ # OS/2 can only load a DLL with a base name of 8 characters or less. -+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; -+ v=$($ECHO $release$versuffix | tr -d .-); -+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); -+ $ECHO $n$v`$shared_ext' -+ library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' -- shlibpath_var=LIBPATH -+ shlibpath_var=BEGINLIBPATH -+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -+ postinstall_cmds='base_file=`basename \$file`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname~ -+ chmod a+x \$dldir/$dlname~ -+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then -+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; -+ fi' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' - ;; - - osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='$libname$release$shared_ext$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - - rdos*) -@@ -2793,8 +3013,8 @@ solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes -@@ -2804,11 +3024,11 @@ solaris*) - - sunos4*) - version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes -- if test "$with_gnu_ld" = yes; then -+ if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes -@@ -2816,8 +3036,8 @@ sunos4*) - - sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) -@@ -2838,24 +3058,24 @@ sysv4 | sysv4.3*) - ;; - - sysv4*MP*) -- if test -d /usr/nec ;then -+ if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' -+ soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) -- version_type=freebsd-elf -+ version_type=sco - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes -- if test "$with_gnu_ld" = yes; then -+ if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' -@@ -2873,7 +3093,7 @@ tpf*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes -@@ -2881,8 +3101,8 @@ tpf*) - - uts4*) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -@@ -2891,20 +3111,30 @@ uts4*) - ;; - esac - AC_MSG_RESULT([$dynamic_linker]) --test "$dynamic_linker" = no && can_build_shared=no -+test no = "$dynamic_linker" && can_build_shared=no - - variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - fi - --if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then -- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then -+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec - fi --if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then -- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -+ -+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then -+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec - fi - -+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -+ -+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -+ -+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH -+ - _LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -@@ -2937,39 +3167,41 @@ _LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) - _LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) --_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], -- [Run-time system search path for libraries]) -+_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], -+ [Detected run-time system search path for libraries]) -+_LT_DECL([], [configure_time_lt_sys_library_path], [2], -+ [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) - ])# _LT_SYS_DYNAMIC_LINKER - - - # _LT_PATH_TOOL_PREFIX(TOOL) - # -------------------------- --# find a file program which can recognize shared library -+# find a file program that can recognize shared library - AC_DEFUN([_LT_PATH_TOOL_PREFIX], - [m4_require([_LT_DECL_EGREP])dnl - AC_MSG_CHECKING([for $1]) - AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, - [case $MAGIC_CMD in - [[\\/*] | ?:[\\/]*]) -- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; - *) -- lt_save_MAGIC_CMD="$MAGIC_CMD" -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ lt_save_MAGIC_CMD=$MAGIC_CMD -+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - dnl $ac_dummy forces splitting on constant user-supplied paths. - dnl POSIX.2 word splitting is done only on the output of word expansions, - dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/$1; then -- lt_cv_path_MAGIC_CMD="$ac_dir/$1" -+ if test -f "$ac_dir/$1"; then -+ lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` -- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : -@@ -2992,11 +3224,11 @@ _LT_EOF - break - fi - done -- IFS="$lt_save_ifs" -- MAGIC_CMD="$lt_save_MAGIC_CMD" -+ IFS=$lt_save_ifs -+ MAGIC_CMD=$lt_save_MAGIC_CMD - ;; - esac]) --MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) - else -@@ -3014,7 +3246,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - # _LT_PATH_MAGIC - # -------------- --# find a file program which can recognize a shared library -+# find a file program that can recognize a shared library - m4_defun([_LT_PATH_MAGIC], - [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) - if test -z "$lt_cv_path_MAGIC_CMD"; then -@@ -3041,16 +3273,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], -- [test "$withval" = no || with_gnu_ld=yes], -+ [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - - ac_prog=ld --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) -- # gcc leaves a trailing carriage return which upsets mingw -+ # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -@@ -3064,7 +3296,7 @@ if test "$GCC" = yes; then - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done -- test -z "$LD" && LD="$ac_prog" -+ test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. -@@ -3075,37 +3307,37 @@ if test "$GCC" = yes; then - with_gnu_ld=unknown - ;; - esac --elif test "$with_gnu_ld" = yes; then -+elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) - else - AC_MSG_CHECKING([for non-GNU ld]) - fi - AC_CACHE_VAL(lt_cv_path_LD, - [if test -z "$LD"; then -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- lt_cv_path_LD="$ac_dir/$ac_prog" -+ lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 conftest.i -+cat conftest.i conftest.i >conftest2.i -+: ${lt_DD:=$DD} -+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -+[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then -+ cmp -s conftest.i conftest.out \ -+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -+fi]) -+rm -f conftest.i conftest2.i conftest.out]) -+])# _LT_PATH_DD -+ -+ -+# _LT_CMD_TRUNCATE -+# ---------------- -+# find command to truncate a binary pipe -+m4_defun([_LT_CMD_TRUNCATE], -+[m4_require([_LT_PATH_DD]) -+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -+[printf 0123456789abcdef0123456789abcdef >conftest.i -+cat conftest.i conftest.i >conftest2.i -+lt_cv_truncate_bin= -+if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then -+ cmp -s conftest.i conftest.out \ -+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -+fi -+rm -f conftest.i conftest2.i conftest.out -+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], -+ [Command to truncate a binary pipe]) -+])# _LT_CMD_TRUNCATE -+ -+ - # _LT_CHECK_MAGIC_METHOD - # ---------------------- - # how to check for library dependencies -@@ -3191,13 +3460,13 @@ lt_cv_deplibs_check_method='unknown' - # Need to set the preceding variable on all platforms that support - # interlibrary dependencies. - # 'none' -- dependencies not supported. --# `unknown' -- same as none, but documents that we really don't know. -+# 'unknown' -- same as none, but documents that we really don't know. - # 'pass_all' -- all dependencies passed with no checks. - # 'test_compile' -- check by making test program. - # 'file_magic [[regex]]' -- check by looking for files in library path --# which responds to the $file_magic_cmd with a given extended regex. --# If you have `file' or equivalent on your system and you're not sure --# whether `pass_all' will *always* work, you probably want this one. -+# that responds to the $file_magic_cmd with a given extended regex. -+# If you have 'file' or equivalent on your system and you're not sure -+# whether 'pass_all' will *always* work, you probably want this one. - - case $host_os in - aix[[4-9]]*) -@@ -3224,8 +3493,7 @@ mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. -- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. -- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then -+ if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -@@ -3261,10 +3529,6 @@ freebsd* | dragonfly*) - fi - ;; - --gnu*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- - haiku*) - lt_cv_deplibs_check_method=pass_all - ;; -@@ -3303,11 +3567,11 @@ irix5* | irix6* | nonstopux*) - ;; - - # This must be glibc/ELF. --linux* | k*bsd*-gnu | kopensolaris*-gnu) -+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - --netbsd*) -+netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else -@@ -3325,8 +3589,8 @@ newos6*) - lt_cv_deplibs_check_method=pass_all - ;; - --openbsd*) -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+openbsd* | bitrig*) -+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' -@@ -3379,6 +3643,9 @@ sysv4 | sysv4.3*) - tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -+os2*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - esac - ]) - -@@ -3419,33 +3686,38 @@ AC_DEFUN([LT_PATH_NM], - AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, - [if test -n "$NM"; then - # Let the user override the test. -- lt_cv_path_NM="$NM" -+ lt_cv_path_NM=$NM - else -- lt_nm_to_check="${ac_tool_prefix}nm" -+ lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. -- tmp_nm="$ac_dir/$lt_tmp_nm" -- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then -+ tmp_nm=$ac_dir/$lt_tmp_nm -+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. -- # Adding the `sed 1q' prevents false positives on HP-UX, which says: -+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file -- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in -- */dev/null* | *'Invalid file or object type'*) -+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty -+ case $build_os in -+ mingw*) lt_bad_file=conftest.nm/nofile ;; -+ *) lt_bad_file=/dev/null ;; -+ esac -+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in -+ *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" -- break -+ break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" -- break -+ break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -@@ -3456,21 +3728,21 @@ else - esac - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} - fi]) --if test "$lt_cv_path_NM" != "no"; then -- NM="$lt_cv_path_NM" -+if test no != "$lt_cv_path_NM"; then -+ NM=$lt_cv_path_NM - else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) -- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in -+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) -- DUMPBIN="$DUMPBIN -symbols" -+ DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: -@@ -3478,8 +3750,8 @@ else - esac - fi - AC_SUBST([DUMPBIN]) -- if test "$DUMPBIN" != ":"; then -- NM="$DUMPBIN" -+ if test : != "$DUMPBIN"; then -+ NM=$DUMPBIN - fi - fi - test -z "$NM" && NM=nm -@@ -3525,8 +3797,8 @@ lt_cv_sharedlib_from_linklib_cmd, - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) -- # two different shell functions defined in ltmain.sh -- # decide which to use based on capabilities of $DLLTOOL -+ # two different shell functions defined in ltmain.sh; -+ # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -@@ -3538,7 +3810,7 @@ cygwin* | mingw* | pw32* | cegcc*) - ;; - *) - # fallback: assume linklib IS sharedlib -- lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; - esac - ]) -@@ -3565,13 +3837,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a m - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) --if test "x$lt_cv_path_mainfest_tool" != xyes; then -+if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: - fi - _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl - ])# _LT_PATH_MANIFEST_TOOL - - -+# _LT_DLL_DEF_P([FILE]) -+# --------------------- -+# True iff FILE is a Windows DLL '.def' file. -+# Keep in sync with func_dll_def_p in the libtool script -+AC_DEFUN([_LT_DLL_DEF_P], -+[dnl -+ test DEF = "`$SED -n dnl -+ -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -+ -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -+ -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -+ -e q dnl Only consider the first "real" line -+ $1`" dnl -+])# _LT_DLL_DEF_P -+ -+ - # LT_LIB_M - # -------- - # check for math library -@@ -3583,11 +3870,11 @@ case $host in - # These system don't have libm, or don't need it - ;; - *-ncr-sysv4.3*) -- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") -+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; - *) -- AC_CHECK_LIB(m, cos, LIBM="-lm") -+ AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; - esac - AC_SUBST([LIBM]) -@@ -3606,7 +3893,7 @@ m4_defun([_LT_COMPILER_NO_RTTI], - - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; -@@ -3658,7 +3945,7 @@ cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; - hpux*) -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - symcode='[[ABCDEGRST]]' - fi - ;; -@@ -3691,14 +3978,44 @@ case `$NM -V 2>&1` in - symcode='[[ABCDGIRSTW]]' ;; - esac - -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ # Gets list of data symbols to import. -+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" -+ # Adjust the below global symbol transforms to fixup imported variables. -+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" -+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" -+ lt_c_name_lib_hook="\ -+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -+else -+ # Disable hooks by default. -+ lt_cv_sys_global_symbol_to_import= -+ lt_cdecl_hook= -+ lt_c_name_hook= -+ lt_c_name_lib_hook= -+fi -+ - # Transform an extracted symbol line into a proper C declaration. - # Some systems (esp. on ia64) link data and code symbols differently, - # so use this general approach. --lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -+lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -+$lt_cdecl_hook\ -+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -+$lt_c_name_hook\ -+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" -+ -+# Transform an extracted symbol line into symbol name with lib prefix and -+# symbol address. -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -+$lt_c_name_lib_hook\ -+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -3716,21 +4033,24 @@ for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then -- # Fake it for dumpbin and say T for any non-static function -- # and D for any global variable. -+ # Fake it for dumpbin and say T for any non-static function, -+ # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ - " {last_section=section; section=\$ 3};"\ - " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ - " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ - " \$ 0!~/External *\|/{next};"\ - " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ - " {if(hide[section]) next};"\ --" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ --" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ --" s[1]~/^[@?]/{print s[1], s[1]; next};"\ --" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ - " ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" -@@ -3757,7 +4077,8 @@ _LT_EOF - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm -- if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then -+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD -+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" -@@ -3770,11 +4091,11 @@ _LT_EOF - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext - /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ --#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) --/* DATA imports from DLLs on WIN32 con't be const, because runtime -+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -+/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ - # define LT@&t@_DLSYM_CONST --#elif defined(__osf__) -+#elif defined __osf__ - /* This system does not cope well with relocations in const data. */ - # define LT@&t@_DLSYM_CONST - #else -@@ -3800,7 +4121,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] = - { - { "@PROGRAM@", (void *) 0 }, - _LT_EOF -- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext -+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} - }; -@@ -3820,9 +4141,9 @@ _LT_EOF - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS -- LIBS="conftstm.$ac_objext" -+ LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" -- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then -+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS -@@ -3843,7 +4164,7 @@ _LT_EOF - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. -- if test "$pipe_works" = yes; then -+ if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= -@@ -3870,12 +4191,16 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sy - [Take the output of nm and produce a listing of raw symbols and C names]) - _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], -+ [Transform the output of nm into a list of symbols to manually relocate]) - _LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) - _LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], -+ [The name lister interface]) - _LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) - ]) # _LT_CMD_GLOBAL_SYMBOLS -@@ -3891,17 +4216,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)= - - m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. -- if test "$GXX" = yes; then -+ if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) -@@ -3912,8 +4238,8 @@ m4_if([$1], [CXX], [ - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -+ # adding the '-m68020' flag to GCC prevents building anything better, -+ # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac -@@ -3929,6 +4255,11 @@ m4_if([$1], [CXX], [ - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -+ case $host_os in -+ os2*) -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' -+ ;; -+ esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform -@@ -3978,7 +4309,7 @@ m4_if([$1], [CXX], [ - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else -@@ -4019,14 +4350,14 @@ m4_if([$1], [CXX], [ - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' -- if test "$host_cpu" != ia64; then -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' -+ if test ia64 != "$host_cpu"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default -@@ -4055,7 +4386,7 @@ m4_if([$1], [CXX], [ - ;; - esac - ;; -- linux* | k*bsd*-gnu | kopensolaris*-gnu) -+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler -@@ -4063,7 +4394,7 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) -- # old Intel C++ for x86_64 which still supported -KPIC. -+ # old Intel C++ for x86_64, which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -@@ -4119,7 +4450,7 @@ m4_if([$1], [CXX], [ - ;; - esac - ;; -- netbsd*) -+ netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise -@@ -4208,17 +4539,18 @@ m4_if([$1], [CXX], [ - fi - ], - [ -- if test "$GCC" = yes; then -+ if test yes = "$GCC"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) -@@ -4229,8 +4561,8 @@ m4_if([$1], [CXX], [ - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -+ # adding the '-m68020' flag to GCC prevents building anything better, -+ # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac -@@ -4247,6 +4579,11 @@ m4_if([$1], [CXX], [ - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -+ case $host_os in -+ os2*) -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -4317,7 +4654,7 @@ m4_if([$1], [CXX], [ - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else -@@ -4325,11 +4662,30 @@ m4_if([$1], [CXX], [ - fi - ;; - -+ darwin* | rhapsody*) -+ # PIC is the default on this platform -+ # Common symbols not allowed in MH_DYLIB files -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' -+ case $cc_basename in -+ nagfor*) -+ # NAG Fortran compiler -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' -+ ;; -+ esac -+ ;; -+ - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) -+ case $host_os in -+ os2*) -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' -+ ;; -+ esac - ;; - - hpux9* | hpux10* | hpux11*) -@@ -4345,7 +4701,7 @@ m4_if([$1], [CXX], [ - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? -- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) -@@ -4354,9 +4710,9 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - -- linux* | k*bsd*-gnu | kopensolaris*-gnu) -+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in -- # old Intel for x86_64 which still supported -KPIC. -+ # old Intel for x86_64, which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' -@@ -4381,6 +4737,12 @@ m4_if([$1], [CXX], [ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; -+ tcc*) -+ # Fabrice Bellard et al's Tiny C Compiler -+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' -+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' -+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -4478,7 +4840,7 @@ m4_if([$1], [CXX], [ - ;; - - sysv4*MP*) -- if test -d /usr/nec ;then -+ if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi -@@ -4507,7 +4869,7 @@ m4_if([$1], [CXX], [ - fi - ]) - case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -+ # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; -@@ -4573,17 +4935,21 @@ m4_if([$1], [CXX], [ - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- # Also, AIX nm treats weak defined symbols like other global defined -- # symbols, whereas GNU nm marks them as "W". -+ # -C means demangle to GNU nm, but means don't demangle to AIX nm. -+ # Without the "-l" option, or with the "-B" option, AIX nm treats -+ # weak defined symbols like other global defined symbols, whereas -+ # GNU nm marks them as "W". -+ # While the 'weak' keyword is ignored in the Export File, we need -+ # it in the Import File for the 'aix-soname' feature, so we have -+ # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) -- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" -+ _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in -@@ -4596,6 +4962,9 @@ m4_if([$1], [CXX], [ - ;; - esac - ;; -+ linux* | k*bsd*-gnu | gnu*) -+ _LT_TAGVAR(link_all_deplibs, $1)=no -+ ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; -@@ -4629,9 +4998,9 @@ m4_if([$1], [CXX], [ - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude -- # it will be wrapped by ` (' and `)$', so one must not match beginning or -- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -- # as well as any symbol that contains `d'. -+ # it will be wrapped by ' (' and ')$', so one must not match beginning or -+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', -+ # as well as any symbol that contains 'd'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if -@@ -4647,7 +5016,7 @@ dnl Note also adjust exclude_expsyms for - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. -- if test "$GCC" != yes; then -+ if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; -@@ -4655,9 +5024,12 @@ dnl Note also adjust exclude_expsyms for - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; -- openbsd*) -+ openbsd* | bitrig*) - with_gnu_ld=no - ;; -+ linux* | k*bsd*-gnu | gnu*) -+ _LT_TAGVAR(link_all_deplibs, $1)=no -+ ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes -@@ -4665,7 +5037,7 @@ dnl Note also adjust exclude_expsyms for - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no -- if test "$with_gnu_ld" = yes; then -+ if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility -@@ -4687,24 +5059,24 @@ dnl Note also adjust exclude_expsyms for - esac - fi - -- if test "$lt_use_gnu_ld_interface" = yes; then -+ if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty -- wlarc='${wl}' -+ wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then -- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no -- case `$LD -v 2>&1` in -+ case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... -@@ -4717,7 +5089,7 @@ dnl Note also adjust exclude_expsyms for - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken -- if test "$host_cpu" != ia64; then -+ if test ia64 != "$host_cpu"; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -@@ -4736,7 +5108,7 @@ _LT_EOF - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) -@@ -4752,7 +5124,7 @@ _LT_EOF - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME -- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -4762,7 +5134,7 @@ _LT_EOF - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -@@ -4770,61 +5142,89 @@ _LT_EOF - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ # If the export-symbols file already is a .def file, use it as -+ # is; otherwise, prepend EXPORTS... -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then -+ cp $export_symbols $output_objdir/$soname.def; -+ else -+ echo EXPORTS > $output_objdir/$soname.def; -+ cat $export_symbols >> $output_objdir/$soname.def; -+ fi~ -+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - -+ os2*) -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -+ _LT_TAGVAR(hardcode_minus_L, $1)=yes -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ shrext_cmds=.dll -+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ prefix_cmds="$SED"~ -+ if test EXPORTS = "`$SED 1q $export_symbols`"; then -+ prefix_cmds="$prefix_cmds -e 1d"; -+ fi~ -+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ -+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ ;; -+ - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no -- if test "$host_os" = linux-dietlibc; then -+ if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ -- && test "$tmp_diet" = no -+ && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; -@@ -4835,42 +5235,47 @@ _LT_EOF - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; -+ nagfor*) # NAGFOR 5.3 -+ tmp_sharedflag='-Wl,-shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac -- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - -- if test "x$supports_anon_versioning" = xyes; then -+ if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -+ echo "local: *; };" >> $output_objdir/$libname.ver~ -+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in -+ tcc*) -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' -+ ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' -- if test "x$supports_anon_versioning" = xyes; then -+ if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -+ echo "local: *; };" >> $output_objdir/$libname.ver~ -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -4879,13 +5284,13 @@ _LT_EOF - fi - ;; - -- netbsd*) -+ netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -4903,8 +5308,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -4916,7 +5321,7 @@ _LT_EOF - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - --*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot - *** reliably create shared libraries on SCO systems. Therefore, libtool - *** is disabling shared libraries support. We urge you to upgrade GNU - *** binutils to release 2.16.91.0.3 or newer. Another option is to modify -@@ -4931,9 +5336,9 @@ _LT_EOF - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -4950,15 +5355,15 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - -- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then -+ if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= -@@ -4974,7 +5379,7 @@ _LT_EOF - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes -- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then -+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported -@@ -4982,34 +5387,57 @@ _LT_EOF - ;; - - aix[[4-9]]*) -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' -- no_entry_flag="" -+ no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- # Also, AIX nm treats weak defined symbols like other global -- # defined symbols, whereas GNU nm marks them as "W". -+ # -C means demangle to GNU nm, but means don't demangle to AIX nm. -+ # Without the "-l" option, or with the "-B" option, AIX nm treats -+ # weak defined symbols like other global defined symbols, whereas -+ # GNU nm marks them as "W". -+ # While the 'weak' keyword is ignored in the Export File, we need -+ # it in the Import File for the 'aix-soname' feature, so we have -+ # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else -- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -+ # have runtime linking enabled, and use it for executables. -+ # For shared libraries, we enable/disable runtime linking -+ # depending on the kind of the shared library created - -+ # when "with_aix_soname,aix_use_runtimelinking" is: -+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables -+ # "aix,yes" lib.so shared, rtl:yes, for executables -+ # lib.a static archive -+ # "both,no" lib.so.V(shr.o) shared, rtl:yes -+ # lib.a(lib.so.V) shared, rtl:no, for executables -+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables -+ # lib.a(lib.so.V) shared, rtl:no -+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables -+ # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do -- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then -+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done -+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then -+ # With aix-soname=svr4, we create the lib.so.V shared archives only, -+ # so we don't have lib.a shared libs to link our executables. -+ # We have to force runtime linking in this case. -+ aix_use_runtimelinking=yes -+ LDFLAGS="$LDFLAGS -Wl,-brtl" -+ fi - ;; - esac - -@@ -5028,13 +5456,21 @@ _LT_EOF - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' -+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,' -+ case $with_aix_soname,$aix_use_runtimelinking in -+ aix,*) ;; # traditional, no import file -+ svr4,* | *,yes) # use import file -+ # The Import File defines what to hardcode. -+ _LT_TAGVAR(hardcode_direct, $1)=no -+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no -+ ;; -+ esac - -- if test "$GCC" = yes; then -+ if test yes = "$GCC"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -+ collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then -@@ -5053,61 +5489,80 @@ _LT_EOF - ;; - esac - shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -+ if test yes = "$aix_use_runtimelinking"; then -+ shared_flag="$shared_flag "'$wl-G' - fi -+ # Need to ensure runtime linking is disabled for the traditional -+ # shared library, or the linker may eventually find shared libraries -+ # /with/ Import File - we do not want to mix them. -+ shared_flag_aix='-shared' -+ shared_flag_svr4='-shared $wl-G' - else - # not using gcc -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -+ if test yes = "$aix_use_runtimelinking"; then -+ shared_flag='$wl-G' - else -- shared_flag='${wl}-bM:SRE' -+ shared_flag='$wl-bM:SRE' - fi -+ shared_flag_aix='$wl-bM:SRE' -+ shared_flag_svr4='$wl-G' - fi - fi - -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes -- if test "$aix_use_runtimelinking" = yes; then -+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else -- if test "$host_cpu" = ia64; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' -+ if test ia64 = "$host_cpu"; then -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" -+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' -- if test "$with_gnu_ld" = yes; then -+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' -+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' -+ if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' -+ # -brtl affects multiple linker settings, -berok does not and is overridden later -+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' -+ if test svr4 != "$with_aix_soname"; then -+ # This is similar to how AIX traditionally builds its shared libraries. -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' -+ fi -+ if test aix != "$with_aix_soname"; then -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' -+ else -+ # used by -dlpreopen to get the symbols -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' -+ fi -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; -@@ -5116,7 +5571,7 @@ _LT_EOF - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) -@@ -5146,16 +5601,17 @@ _LT_EOF - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -+ shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. -- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -- else -- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -- fi~ -- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -- linknames=' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then -+ cp "$export_symbols" "$output_objdir/$soname.def"; -+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; -+ else -+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -@@ -5164,18 +5620,18 @@ _LT_EOF - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ -- lt_tool_outputfile="@TOOL_OUTPUT@"~ -- case $lt_outputfile in -- *.exe|*.EXE) ;; -- *) -- lt_outputfile="$lt_outputfile.exe" -- lt_tool_outputfile="$lt_tool_outputfile.exe" -- ;; -- esac~ -- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -- $RM "$lt_outputfile.manifest"; -- fi' -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile=$lt_outputfile.exe -+ lt_tool_outputfile=$lt_tool_outputfile.exe -+ ;; -+ esac~ -+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' - ;; - *) - # Assume MSVC wrapper -@@ -5184,7 +5640,7 @@ _LT_EOF - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -+ shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. -@@ -5234,33 +5690,33 @@ _LT_EOF - ;; - - hpux9*) -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ if test yes = "$GCC"; then -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - - hpux10*) -- if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes,no = "$GCC,$with_gnu_ld"; then -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -- if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -+ if test no = "$with_gnu_ld"; then -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes -@@ -5268,25 +5724,25 @@ _LT_EOF - ;; - - hpux11*) -- if test "$GCC" = yes && test "$with_gnu_ld" = no; then -+ if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ -@@ -5294,14 +5750,14 @@ _LT_EOF - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], -- [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], -+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], -- [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) -+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi -- if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -+ if test no = "$with_gnu_ld"; then -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in -@@ -5312,7 +5768,7 @@ _LT_EOF - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -@@ -5323,16 +5779,16 @@ _LT_EOF - ;; - - irix5* | irix6* | nonstopux*) -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ if test yes = "$GCC"; then -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], -- [save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ [save_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], -@@ -5345,22 +5801,33 @@ _LT_EOF - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) -- LDFLAGS="$save_LDFLAGS"]) -- if test "$lt_cv_irix_exported_symbol" = yes; then -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ LDFLAGS=$save_LDFLAGS]) -+ if test yes = "$lt_cv_irix_exported_symbol"; then -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi -+ _LT_TAGVAR(link_all_deplibs, $1)=no - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - -- netbsd*) -+ linux*) -+ case $cc_basename in -+ tcc*) -+ # Fabrice Bellard et al's Tiny C Compiler -+ _LT_TAGVAR(ld_shlibs, $1)=yes -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ ;; -+ esac -+ ;; -+ -+ netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else -@@ -5374,7 +5841,7 @@ _LT_EOF - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; -@@ -5382,27 +5849,19 @@ _LT_EOF - *nto* | *qnx*) - ;; - -- openbsd*) -+ openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - else -- case $host_os in -- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) -- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- ;; -- *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- ;; -- esac -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no -@@ -5413,33 +5872,53 @@ _LT_EOF - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -+ shrext_cmds=.dll -+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ prefix_cmds="$SED"~ -+ if test EXPORTS = "`$SED 1q $export_symbols`"; then -+ prefix_cmds="$prefix_cmds -e 1d"; -+ fi~ -+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ -+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - osf3*) -- if test "$GCC" = yes; then -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ if test yes = "$GCC"; then -+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag -- if test "$GCC" = yes; then -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ if test yes = "$GCC"; then -+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ -- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' -+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -@@ -5450,24 +5929,24 @@ _LT_EOF - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' -- if test "$GCC" = yes; then -- wlarc='${wl}' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes = "$GCC"; then -+ wlarc='$wl' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' -- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' -+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) -- wlarc='${wl}' -- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ wlarc='$wl' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi -@@ -5477,11 +5956,11 @@ _LT_EOF - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, -- # but understands `-z linker_flag'. GCC discards it without `$wl', -+ # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) -- if test "$GCC" = yes; then -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' -+ if test yes = "$GCC"; then -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi -@@ -5491,10 +5970,10 @@ _LT_EOF - ;; - - sunos4*) -- if test "x$host_vendor" = xsequent; then -+ if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -5543,43 +6022,43 @@ _LT_EOF - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes = "$GCC"; then -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) -- # Note: We can NOT use -z defs as we might desire, because we do not -+ # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' -+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' -+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - -- if test "$GCC" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes = "$GCC"; then -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - -@@ -5594,17 +6073,17 @@ _LT_EOF - ;; - esac - -- if test x$host_vendor = xsni; then -+ if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' - ;; - esac - fi - fi - ]) - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) --test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - - _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -@@ -5621,7 +6100,7 @@ x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - -- if test "$enable_shared" = yes && test "$GCC" = yes; then -+ if test yes,yes = "$GCC,$enable_shared"; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. -@@ -5701,12 +6180,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_sp - _LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) - _LT_TAGDECL([], [hardcode_direct], [0], -- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary]) - _LT_TAGDECL([], [hardcode_direct_absolute], [0], -- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes -+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary and the resulting library dependency is -- "absolute", i.e impossible to change by setting ${shlibpath_var} if the -+ "absolute", i.e impossible to change by setting $shlibpath_var if the - library is relocated]) - _LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR -@@ -5747,10 +6226,10 @@ dnl [Compiler flag to generate thread - # ------------------------ - # Ensure that the configuration variables for a C compiler are suitably - # defined. These variables are subsequently used by _LT_CONFIG to write --# the compiler configuration to `libtool'. -+# the compiler configuration to 'libtool'. - m4_defun([_LT_LANG_C_CONFIG], - [m4_require([_LT_DECL_EGREP])dnl --lt_save_CC="$CC" -+lt_save_CC=$CC - AC_LANG_PUSH(C) - - # Source file extension for C test sources. -@@ -5786,18 +6265,18 @@ if test -n "$compiler"; then - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - -- # Report which library types will actually be built -+ # Report what library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) -- test "$can_build_shared" = "no" && enable_shared=no -+ test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) -- test "$enable_shared" = yes && enable_static=no -+ test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' -@@ -5805,8 +6284,12 @@ if test -n "$compiler"; then - ;; - - aix[[4-9]]*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -+ if test ia64 != "$host_cpu"; then -+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in -+ yes,aix,yes) ;; # shared object as lib.so file only -+ yes,svr4,*) ;; # shared object as lib.so archive member only -+ yes,*) enable_static=no ;; # shared object in lib.a archive as well -+ esac - fi - ;; - esac -@@ -5814,13 +6297,13 @@ if test -n "$compiler"; then - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. -- test "$enable_shared" = yes || enable_static=yes -+ test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) - fi - AC_LANG_POP --CC="$lt_save_CC" -+CC=$lt_save_CC - ])# _LT_LANG_C_CONFIG - - -@@ -5828,14 +6311,14 @@ CC="$lt_save_CC" - # -------------------------- - # Ensure that the configuration variables for a C++ compiler are suitably - # defined. These variables are subsequently used by _LT_CONFIG to write --# the compiler configuration to `libtool'. -+# the compiler configuration to 'libtool'. - m4_defun([_LT_LANG_CXX_CONFIG], - [m4_require([_LT_FILEUTILS_DEFAULTS])dnl - m4_require([_LT_DECL_EGREP])dnl - m4_require([_LT_PATH_MANIFEST_TOOL])dnl --if test -n "$CXX" && ( test "X$CXX" != "Xno" && -- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || -- (test "X$CXX" != "Xg++"))) ; then -+if test -n "$CXX" && ( test no != "$CXX" && -+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || -+ (test g++ != "$CXX"))); then - AC_PROG_CXXCPP - else - _lt_caught_CXX_error=yes -@@ -5877,7 +6360,7 @@ _LT_TAGVAR(objext, $1)=$objext - # the CXX compiler isn't working. Some variables (like enable_shared) - # are currently assumed to apply to all compilers on this platform, - # and will be corrupted by setting them based on a non-working compiler. --if test "$_lt_caught_CXX_error" != yes; then -+if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - -@@ -5919,35 +6402,35 @@ if test "$_lt_caught_CXX_error" != yes; - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately -- if test "$GXX" = yes; then -+ if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - -- if test "$GXX" = yes; then -+ if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. -- if test "$with_gnu_ld" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ if test yes = "$with_gnu_ld"; then -+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) -- wlarc='${wl}' -+ wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then -- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi -@@ -5966,7 +6449,7 @@ if test "$_lt_caught_CXX_error" != yes; - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' -+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - GXX=no -@@ -5983,18 +6466,30 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' -- no_entry_flag="" -+ no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -+ # have runtime linking enabled, and use it for executables. -+ # For shared libraries, we enable/disable runtime linking -+ # depending on the kind of the shared library created - -+ # when "with_aix_soname,aix_use_runtimelinking" is: -+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables -+ # "aix,yes" lib.so shared, rtl:yes, for executables -+ # lib.a static archive -+ # "both,no" lib.so.V(shr.o) shared, rtl:yes -+ # lib.a(lib.so.V) shared, rtl:no, for executables -+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables -+ # lib.a(lib.so.V) shared, rtl:no -+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables -+ # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in -@@ -6004,6 +6499,13 @@ if test "$_lt_caught_CXX_error" != yes; - ;; - esac - done -+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then -+ # With aix-soname=svr4, we create the lib.so.V shared archives only, -+ # so we don't have lib.a shared libs to link our executables. -+ # We have to force runtime linking in this case. -+ aix_use_runtimelinking=yes -+ LDFLAGS="$LDFLAGS -Wl,-brtl" -+ fi - ;; - esac - -@@ -6022,13 +6524,21 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' -+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,' -+ case $with_aix_soname,$aix_use_runtimelinking in -+ aix,*) ;; # no import file -+ svr4,* | *,yes) # use import file -+ # The Import File defines what to hardcode. -+ _LT_TAGVAR(hardcode_direct, $1)=no -+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no -+ ;; -+ esac - -- if test "$GXX" = yes; then -+ if test yes = "$GXX"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -+ collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then -@@ -6046,64 +6556,84 @@ if test "$_lt_caught_CXX_error" != yes; - fi - esac - shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -+ if test yes = "$aix_use_runtimelinking"; then -+ shared_flag=$shared_flag' $wl-G' - fi -+ # Need to ensure runtime linking is disabled for the traditional -+ # shared library, or the linker may eventually find shared libraries -+ # /with/ Import File - we do not want to mix them. -+ shared_flag_aix='-shared' -+ shared_flag_svr4='-shared $wl-G' - else - # not using gcc -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -+ if test yes = "$aix_use_runtimelinking"; then -+ shared_flag='$wl-G' - else -- shared_flag='${wl}-bM:SRE' -+ shared_flag='$wl-bM:SRE' - fi -+ shared_flag_aix='$wl-bM:SRE' -+ shared_flag_svr4='$wl-G' - fi - fi - -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes -- if test "$aix_use_runtimelinking" = yes; then -+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. -- _LT_TAGVAR(allow_undefined_flag, $1)='-berok' -+ # The "-G" linker flag allows undefined symbols. -+ _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else -- if test "$host_cpu" = ia64; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' -+ if test ia64 = "$host_cpu"; then -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" -+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' -- if test "$with_gnu_ld" = yes; then -+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' -+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' -+ if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes -- # This is similar to how AIX traditionally builds its shared -- # libraries. -- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' -+ # -brtl affects multiple linker settings, -berok does not and is overridden later -+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' -+ if test svr4 != "$with_aix_soname"; then -+ # This is similar to how AIX traditionally builds its shared -+ # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' -+ fi -+ if test aix != "$with_aix_soname"; then -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' -+ else -+ # used by -dlpreopen to get the symbols -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' -+ fi -+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; -@@ -6113,7 +6643,7 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME -- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -6141,57 +6671,58 @@ if test "$_lt_caught_CXX_error" != yes; - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -+ shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. -- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -- else -- $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -- fi~ -- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -- linknames=' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then -+ cp "$export_symbols" "$output_objdir/$soname.def"; -+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; -+ else -+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ -- lt_tool_outputfile="@TOOL_OUTPUT@"~ -- case $lt_outputfile in -- *.exe|*.EXE) ;; -- *) -- lt_outputfile="$lt_outputfile.exe" -- lt_tool_outputfile="$lt_tool_outputfile.exe" -- ;; -- esac~ -- func_to_tool_file "$lt_outputfile"~ -- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -- $RM "$lt_outputfile.manifest"; -- fi' -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile=$lt_outputfile.exe -+ lt_tool_outputfile=$lt_tool_outputfile.exe -+ ;; -+ esac~ -+ func_to_tool_file "$lt_outputfile"~ -+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ # If the export-symbols file already is a .def file, use it as -+ # is; otherwise, prepend EXPORTS... -+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then -+ cp $export_symbols $output_objdir/$soname.def; -+ else -+ echo EXPORTS > $output_objdir/$soname.def; -+ cat $export_symbols >> $output_objdir/$soname.def; -+ fi~ -+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -@@ -6202,6 +6733,34 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_DARWIN_LINKER_FEATURES($1) - ;; - -+ os2*) -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' -+ _LT_TAGVAR(hardcode_minus_L, $1)=yes -+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported -+ shrext_cmds=.dll -+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ prefix_cmds="$SED"~ -+ if test EXPORTS = "`$SED 1q $export_symbols`"; then -+ prefix_cmds="$prefix_cmds -e 1d"; -+ fi~ -+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ -+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' -+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes -+ ;; -+ - dgux*) - case $cc_basename in - ec++*) -@@ -6236,18 +6795,15 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - -- gnu*) -- ;; -- - haiku*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default -@@ -6259,7 +6815,7 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -@@ -6268,11 +6824,11 @@ if test "$_lt_caught_CXX_error" != yes; - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' -+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) -- if test "$GXX" = yes; then -- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ if test yes = "$GXX"; then -+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no -@@ -6282,15 +6838,15 @@ if test "$_lt_caught_CXX_error" != yes; - ;; - - hpux10*|hpux11*) -- if test $with_gnu_ld = no; then -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' -+ if test no = "$with_gnu_ld"; then -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - esac - fi -@@ -6316,13 +6872,13 @@ if test "$_lt_caught_CXX_error" != yes; - aCC*) - case $host_cpu in - hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists -@@ -6333,20 +6889,20 @@ if test "$_lt_caught_CXX_error" != yes; - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. -- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' -+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) -- if test "$GXX" = yes; then -- if test $with_gnu_ld = no; then -+ if test yes = "$GXX"; then -+ if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi -@@ -6361,22 +6917,22 @@ if test "$_lt_caught_CXX_error" != yes; - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is -@@ -6385,22 +6941,22 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) -- if test "$GXX" = yes; then -- if test "$with_gnu_ld" = no; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ if test yes = "$GXX"; then -+ if test no = "$with_gnu_ld"; then -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - -- linux* | k*bsd*-gnu | kopensolaris*-gnu) -+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler -@@ -6408,8 +6964,8 @@ if test "$_lt_caught_CXX_error" != yes; - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. -- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' -+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -@@ -6418,10 +6974,10 @@ if test "$_lt_caught_CXX_error" != yes; - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. -- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' -+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. -@@ -6435,59 +6991,59 @@ if test "$_lt_caught_CXX_error" != yes; - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ -- compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' -+ rm -rf $tpldir~ -+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ -+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ -- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ -- $RANLIB $oldlib' -+ rm -rf $tpldir~ -+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ -+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ -+ $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -+ rm -rf $tpldir~ -+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ -- rm -rf $tpldir~ -- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -+ rm -rf $tpldir~ -+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ -+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' -@@ -6501,18 +7057,18 @@ if test "$_lt_caught_CXX_error" != yes; - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' -+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' -- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- if test "x$supports_anon_versioning" = xyes; then -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -+ echo "local: *; };" >> $output_objdir/$libname.ver~ -+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) -@@ -6520,10 +7076,10 @@ if test "$_lt_caught_CXX_error" != yes; - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' -- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on -@@ -6581,22 +7137,17 @@ if test "$_lt_caught_CXX_error" != yes; - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - -- openbsd2*) -- # C++ shared libraries are fairly broken -- _LT_TAGVAR(ld_shlibs, $1)=no -- ;; -- -- openbsd*) -+ openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' -- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' -+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else -@@ -6612,9 +7163,9 @@ if test "$_lt_caught_CXX_error" != yes; - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. -- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' -+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using -@@ -6632,17 +7183,17 @@ if test "$_lt_caught_CXX_error" != yes; - cxx*) - case $host in - osf3*) -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ -- echo "-hidden">> $lib.exp~ -- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ -- $RM $lib.exp' -+ echo "-hidden">> $lib.exp~ -+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ -+ $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac -@@ -6657,27 +7208,27 @@ if test "$_lt_caught_CXX_error" != yes; - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. -- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' -+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' -+ if test yes,no = "$GXX,$with_gnu_ld"; then -+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' -+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - # FIXME: insert proper C++ library support -@@ -6717,9 +7268,9 @@ if test "$_lt_caught_CXX_error" != yes; - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' -- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -@@ -6727,7 +7278,7 @@ if test "$_lt_caught_CXX_error" != yes; - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, -- # but understands `-z linker_flag'. -+ # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; -@@ -6744,42 +7295,42 @@ if test "$_lt_caught_CXX_error" != yes; - ;; - gcx*) - # Green Hills C++ Compiler -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker -- if test "$GXX" = yes && test "$with_gnu_ld" = no; then -- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' -+ if test yes,no = "$GXX,$with_gnu_ld"; then -+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' -+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - else -- # g++ 2.7 appears to require `-G' NOT `-shared' on this -+ # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. -- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' -+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. -- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' -+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - fi - -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) -- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' -+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi -@@ -6788,52 +7339,52 @@ if test "$_lt_caught_CXX_error" != yes; - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) -- # Note: We can NOT use -z defs as we might desire, because we do not -+ # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. -- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' -- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' -+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' -+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no -- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' -+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes -- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' -+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) -- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ -- '"$_LT_TAGVAR(old_archive_cmds, $1)" -+ '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ -- '"$_LT_TAGVAR(reload_cmds, $1)" -+ '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) -- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; -@@ -6864,10 +7415,10 @@ if test "$_lt_caught_CXX_error" != yes; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no -+ test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - -- _LT_TAGVAR(GCC, $1)="$GXX" -- _LT_TAGVAR(LD, $1)="$LD" -+ _LT_TAGVAR(GCC, $1)=$GXX -+ _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change -@@ -6894,7 +7445,7 @@ if test "$_lt_caught_CXX_error" != yes; - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld --fi # test "$_lt_caught_CXX_error" != yes -+fi # test yes != "$_lt_caught_CXX_error" - - AC_LANG_POP - ])# _LT_LANG_CXX_CONFIG -@@ -6916,13 +7467,14 @@ AC_REQUIRE([_LT_DECL_SED]) - AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) - func_stripname_cnf () - { -- case ${2} in -- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; -- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; -+ case @S|@2 in -+ .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; -+ *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac - } # func_stripname_cnf - ])# _LT_FUNC_STRIPNAME_CNF - -+ - # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) - # --------------------------------- - # Figure out "hidden" library dependencies from verbose -@@ -7006,13 +7558,13 @@ if AC_TRY_EVAL(ac_compile); then - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do -- case ${prev}${p} in -+ case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. -- if test $p = "-L" || -- test $p = "-R"; then -+ if test x-L = "$p" || -+ test x-R = "$p"; then - prev=$p - continue - fi -@@ -7028,16 +7580,16 @@ if AC_TRY_EVAL(ac_compile); then - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac -- if test "$pre_test_object_deps_done" = no; then -- case ${prev} in -+ if test no = "$pre_test_object_deps_done"; then -+ case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then -- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" -+ _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p - else -- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" -+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" - fi - ;; - # The "-l" case would never come before the object being -@@ -7045,9 +7597,9 @@ if AC_TRY_EVAL(ac_compile); then - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then -- _LT_TAGVAR(postdeps, $1)="${prev}${p}" -+ _LT_TAGVAR(postdeps, $1)=$prev$p - else -- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" -+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" - fi - fi - prev= -@@ -7062,15 +7614,15 @@ if AC_TRY_EVAL(ac_compile); then - continue - fi - -- if test "$pre_test_object_deps_done" = no; then -+ if test no = "$pre_test_object_deps_done"; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then -- _LT_TAGVAR(predep_objects, $1)="$p" -+ _LT_TAGVAR(predep_objects, $1)=$p - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then -- _LT_TAGVAR(postdep_objects, $1)="$p" -+ _LT_TAGVAR(postdep_objects, $1)=$p - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi -@@ -7101,51 +7653,6 @@ interix[[3-9]]*) - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; -- --linux*) -- case `$CC -V 2>&1 | sed 5q` in -- *Sun\ C*) -- # Sun C++ 5.9 -- -- # The more standards-conforming stlport4 library is -- # incompatible with the Cstd library. Avoid specifying -- # it if it's in CXXFLAGS. Ignore libCrun as -- # -library=stlport4 depends on it. -- case " $CXX $CXXFLAGS " in -- *" -library=stlport4 "*) -- solaris_use_stlport4=yes -- ;; -- esac -- -- if test "$solaris_use_stlport4" != yes; then -- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' -- fi -- ;; -- esac -- ;; -- --solaris*) -- case $cc_basename in -- CC* | sunCC*) -- # The more standards-conforming stlport4 library is -- # incompatible with the Cstd library. Avoid specifying -- # it if it's in CXXFLAGS. Ignore libCrun as -- # -library=stlport4 depends on it. -- case " $CXX $CXXFLAGS " in -- *" -library=stlport4 "*) -- solaris_use_stlport4=yes -- ;; -- esac -- -- # Adding this requires a known-good setup of shared libraries for -- # Sun compiler versions before 5.6, else PIC objects from an old -- # archive will be linked into the output, leading to subtle bugs. -- if test "$solaris_use_stlport4" != yes; then -- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' -- fi -- ;; -- esac -- ;; - esac - ]) - -@@ -7154,7 +7661,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in - esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= - if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then -- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` - fi - _LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -@@ -7174,10 +7681,10 @@ _LT_TAGDECL([], [compiler_lib_search_pat - # -------------------------- - # Ensure that the configuration variables for a Fortran 77 compiler are - # suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. -+# to write the compiler configuration to 'libtool'. - m4_defun([_LT_LANG_F77_CONFIG], - [AC_LANG_PUSH(Fortran 77) --if test -z "$F77" || test "X$F77" = "Xno"; then -+if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes - fi - -@@ -7214,7 +7721,7 @@ _LT_TAGVAR(objext, $1)=$objext - # the F77 compiler isn't working. Some variables (like enable_shared) - # are currently assumed to apply to all compilers on this platform, - # and will be corrupted by setting them based on a non-working compiler. --if test "$_lt_disable_F77" != yes; then -+if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t -@@ -7236,7 +7743,7 @@ if test "$_lt_disable_F77" != yes; then - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. -- lt_save_CC="$CC" -+ lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} -@@ -7250,21 +7757,25 @@ if test "$_lt_disable_F77" != yes; then - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) -- test "$can_build_shared" = "no" && enable_shared=no -+ test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) -- test "$enable_shared" = yes && enable_static=no -+ test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -+ if test ia64 != "$host_cpu"; then -+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in -+ yes,aix,yes) ;; # shared object as lib.so file only -+ yes,svr4,*) ;; # shared object as lib.so archive member only -+ yes,*) enable_static=no ;; # shared object in lib.a archive as well -+ esac - fi - ;; - esac -@@ -7272,11 +7783,11 @@ if test "$_lt_disable_F77" != yes; then - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. -- test "$enable_shared" = yes || enable_static=yes -+ test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - -- _LT_TAGVAR(GCC, $1)="$G77" -- _LT_TAGVAR(LD, $1)="$LD" -+ _LT_TAGVAR(GCC, $1)=$G77 -+ _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change -@@ -7293,9 +7804,9 @@ if test "$_lt_disable_F77" != yes; then - fi # test -n "$compiler" - - GCC=$lt_save_GCC -- CC="$lt_save_CC" -- CFLAGS="$lt_save_CFLAGS" --fi # test "$_lt_disable_F77" != yes -+ CC=$lt_save_CC -+ CFLAGS=$lt_save_CFLAGS -+fi # test yes != "$_lt_disable_F77" - - AC_LANG_POP - ])# _LT_LANG_F77_CONFIG -@@ -7305,11 +7816,11 @@ AC_LANG_POP - # ------------------------- - # Ensure that the configuration variables for a Fortran compiler are - # suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. -+# to write the compiler configuration to 'libtool'. - m4_defun([_LT_LANG_FC_CONFIG], - [AC_LANG_PUSH(Fortran) - --if test -z "$FC" || test "X$FC" = "Xno"; then -+if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes - fi - -@@ -7346,7 +7857,7 @@ _LT_TAGVAR(objext, $1)=$objext - # the FC compiler isn't working. Some variables (like enable_shared) - # are currently assumed to apply to all compilers on this platform, - # and will be corrupted by setting them based on a non-working compiler. --if test "$_lt_disable_FC" != yes; then -+if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t -@@ -7368,7 +7879,7 @@ if test "$_lt_disable_FC" != yes; then - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. -- lt_save_CC="$CC" -+ lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} -@@ -7384,21 +7895,25 @@ if test "$_lt_disable_FC" != yes; then - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) -- test "$can_build_shared" = "no" && enable_shared=no -+ test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) -- test "$enable_shared" = yes && enable_static=no -+ test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -+ if test ia64 != "$host_cpu"; then -+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in -+ yes,aix,yes) ;; # shared object as lib.so file only -+ yes,svr4,*) ;; # shared object as lib.so archive member only -+ yes,*) enable_static=no ;; # shared object in lib.a archive as well -+ esac - fi - ;; - esac -@@ -7406,11 +7921,11 @@ if test "$_lt_disable_FC" != yes; then - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. -- test "$enable_shared" = yes || enable_static=yes -+ test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - -- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" -- _LT_TAGVAR(LD, $1)="$LD" -+ _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu -+ _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change -@@ -7430,7 +7945,7 @@ if test "$_lt_disable_FC" != yes; then - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS --fi # test "$_lt_disable_FC" != yes -+fi # test yes != "$_lt_disable_FC" - - AC_LANG_POP - ])# _LT_LANG_FC_CONFIG -@@ -7440,7 +7955,7 @@ AC_LANG_POP - # -------------------------- - # Ensure that the configuration variables for the GNU Java Compiler compiler - # are suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. -+# to write the compiler configuration to 'libtool'. - m4_defun([_LT_LANG_GCJ_CONFIG], - [AC_REQUIRE([LT_PROG_GCJ])dnl - AC_LANG_SAVE -@@ -7474,7 +7989,7 @@ CC=${GCJ-"gcj"} - CFLAGS=$GCJFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC --_LT_TAGVAR(LD, $1)="$LD" -+_LT_TAGVAR(LD, $1)=$LD - _LT_CC_BASENAME([$compiler]) - - # GCJ did not exist at the time GCC didn't implicitly link libc in. -@@ -7507,7 +8022,7 @@ CFLAGS=$lt_save_CFLAGS - # -------------------------- - # Ensure that the configuration variables for the GNU Go compiler - # are suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. -+# to write the compiler configuration to 'libtool'. - m4_defun([_LT_LANG_GO_CONFIG], - [AC_REQUIRE([LT_PROG_GO])dnl - AC_LANG_SAVE -@@ -7541,7 +8056,7 @@ CC=${GOC-"gccgo"} - CFLAGS=$GOFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC --_LT_TAGVAR(LD, $1)="$LD" -+_LT_TAGVAR(LD, $1)=$LD - _LT_CC_BASENAME([$compiler]) - - # Go did not exist at the time GCC didn't implicitly link libc in. -@@ -7574,7 +8089,7 @@ CFLAGS=$lt_save_CFLAGS - # ------------------------- - # Ensure that the configuration variables for the Windows resource compiler - # are suitably defined. These variables are subsequently used by _LT_CONFIG --# to write the compiler configuration to `libtool'. -+# to write the compiler configuration to 'libtool'. - m4_defun([_LT_LANG_RC_CONFIG], - [AC_REQUIRE([LT_PROG_RC])dnl - AC_LANG_SAVE -@@ -7590,7 +8105,7 @@ _LT_TAGVAR(objext, $1)=$objext - lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - - # Code to be used in simple link tests --lt_simple_link_test_code="$lt_simple_compile_test_code" -+lt_simple_link_test_code=$lt_simple_compile_test_code - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER -@@ -7600,7 +8115,7 @@ _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. --lt_save_CC="$CC" -+lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_GCC=$GCC - GCC= -@@ -7629,7 +8144,7 @@ AC_DEFUN([LT_PROG_GCJ], - [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) -- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" -+ test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl - ]) - -@@ -7738,7 +8253,7 @@ lt_ac_count=0 - # Add /usr/xpg4/bin/sed as it is typically found on Solaris - # along with /bin/sed that truncates output. - for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do -- test ! -f $lt_ac_sed && continue -+ test ! -f "$lt_ac_sed" && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in -@@ -7755,9 +8270,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xp - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough -- test $lt_ac_count -gt 10 && break -+ test 10 -lt "$lt_ac_count" && break - lt_ac_count=`expr $lt_ac_count + 1` -- if test $lt_ac_count -gt $lt_ac_max; then -+ if test "$lt_ac_count" -gt "$lt_ac_max"; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi -@@ -7781,27 +8296,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], []) - # Find out whether the shell is Bourne or XSI compatible, - # or has some other useful features. - m4_defun([_LT_CHECK_SHELL_FEATURES], --[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) --# Try some XSI features --xsi_shell=no --( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,b/c, \ -- && eval 'test $(( 1 + 1 )) -eq 2 \ -- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ -- && xsi_shell=yes --AC_MSG_RESULT([$xsi_shell]) --_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) -- --AC_MSG_CHECKING([whether the shell understands "+="]) --lt_shell_append=no --( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ -- >/dev/null 2>&1 \ -- && lt_shell_append=yes --AC_MSG_RESULT([$lt_shell_append]) --_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) -- --if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset - else - lt_unset=false -@@ -7825,102 +8320,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn - ])# _LT_CHECK_SHELL_FEATURES - - --# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) --# ------------------------------------------------------ --# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and --# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. --m4_defun([_LT_PROG_FUNCTION_REPLACE], --[dnl { --sed -e '/^$1 ()$/,/^} # $1 /c\ --$1 ()\ --{\ --m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) --} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: --]) -- -- --# _LT_PROG_REPLACE_SHELLFNS --# ------------------------- --# Replace existing portable implementations of several shell functions with --# equivalent extended shell implementations where those features are available.. --m4_defun([_LT_PROG_REPLACE_SHELLFNS], --[if test x"$xsi_shell" = xyes; then -- _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac]) -- -- _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl -- func_basename_result="${1##*/}"]) -- -- _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl -- case ${1} in -- */*) func_dirname_result="${1%/*}${2}" ;; -- * ) func_dirname_result="${3}" ;; -- esac -- func_basename_result="${1##*/}"]) -- -- _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl -- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are -- # positional parameters, so assign one to ordinary parameter first. -- func_stripname_result=${3} -- func_stripname_result=${func_stripname_result#"${1}"} -- func_stripname_result=${func_stripname_result%"${2}"}]) -- -- _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl -- func_split_long_opt_name=${1%%=*} -- func_split_long_opt_arg=${1#*=}]) -- -- _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl -- func_split_short_opt_arg=${1#??} -- func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) -- -- _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl -- case ${1} in -- *.lo) func_lo2o_result=${1%.lo}.${objext} ;; -- *) func_lo2o_result=${1} ;; -- esac]) -- -- _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) -- -- _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) -- -- _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) --fi -- --if test x"$lt_shell_append" = xyes; then -- _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) -- -- _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl -- func_quote_for_eval "${2}" --dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ -- eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) -- -- # Save a `func_append' function call where possible by direct use of '+=' -- sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -- test 0 -eq $? || _lt_function_replace_fail=: --else -- # Save a `func_append' function call even when '+=' is not available -- sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -- test 0 -eq $? || _lt_function_replace_fail=: --fi -- --if test x"$_lt_function_replace_fail" = x":"; then -- AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) --fi --]) -- - # _LT_PATH_CONVERSION_FUNCTIONS - # ----------------------------- --# Determine which file name conversion functions should be used by -+# Determine what file name conversion functions should be used by - # func_to_host_file (and, implicitly, by func_to_host_path). These are needed - # for certain cross-compile configurations and native mingw. - m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -@@ -7987,15 +8389,15 @@ _LT_DECL([to_tool_file_cmd], [lt_cv_to_t - - # Helper functions for option handling. -*- Autoconf -*- - # --# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, --# Inc. -+# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -+# Foundation, Inc. - # Written by Gary V. Vaughan, 2004 - # - # This file is free software; the Free Software Foundation gives - # unlimited permission to copy and/or distribute it, with or without - # modifications, as long as this notice is preserved. - --# serial 7 ltoptions.m4 -+# serial 8 ltoptions.m4 - - # This is to help aclocal find these macros, as it can't see m4_define. - AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) -@@ -8016,7 +8418,7 @@ m4_define([_LT_SET_OPTION], - [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl - m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), -- [m4_warning([Unknown $1 option `$2'])])[]dnl -+ [m4_warning([Unknown $1 option '$2'])])[]dnl - ]) - - -@@ -8062,13 +8464,15 @@ m4_if([$1],[LT_INIT],[ - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither -- dnl `shared' nor `disable-shared' was passed, we enable building of shared -+ dnl 'shared' nor 'disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], -- [_LT_ENABLE_FAST_INSTALL]) -+ [_LT_ENABLE_FAST_INSTALL]) -+ _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], -+ [_LT_WITH_AIX_SONAME([aix])]) - ]) - ])# _LT_SET_OPTIONS - -@@ -8096,7 +8500,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN], - [_LT_SET_OPTION([LT_INIT], [dlopen]) - AC_DIAGNOSE([obsolete], - [$0: Remove this warning and the call to _LT_SET_OPTION when you --put the `dlopen' option into LT_INIT's first parameter.]) -+put the 'dlopen' option into LT_INIT's first parameter.]) - ]) - - dnl aclocal-1.4 backwards compatibility: -@@ -8132,7 +8536,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL], - _LT_SET_OPTION([LT_INIT], [win32-dll]) - AC_DIAGNOSE([obsolete], - [$0: Remove this warning and the call to _LT_SET_OPTION when you --put the `win32-dll' option into LT_INIT's first parameter.]) -+put the 'win32-dll' option into LT_INIT's first parameter.]) - ]) - - dnl aclocal-1.4 backwards compatibility: -@@ -8141,9 +8545,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - # _LT_ENABLE_SHARED([DEFAULT]) - # ---------------------------- --# implement the --enable-shared flag, and supports the `shared' and --# `disable-shared' LT_INIT options. --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -+# implement the --enable-shared flag, and supports the 'shared' and -+# 'disable-shared' LT_INIT options. -+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. - m4_define([_LT_ENABLE_SHARED], - [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl - AC_ARG_ENABLE([shared], -@@ -8156,14 +8560,14 @@ AC_ARG_ENABLE([shared], - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) -@@ -8195,9 +8599,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - # _LT_ENABLE_STATIC([DEFAULT]) - # ---------------------------- --# implement the --enable-static flag, and support the `static' and --# `disable-static' LT_INIT options. --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -+# implement the --enable-static flag, and support the 'static' and -+# 'disable-static' LT_INIT options. -+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. - m4_define([_LT_ENABLE_STATIC], - [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl - AC_ARG_ENABLE([static], -@@ -8210,14 +8614,14 @@ AC_ARG_ENABLE([static], - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) -@@ -8249,9 +8653,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - # _LT_ENABLE_FAST_INSTALL([DEFAULT]) - # ---------------------------------- --# implement the --enable-fast-install flag, and support the `fast-install' --# and `disable-fast-install' LT_INIT options. --# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -+# implement the --enable-fast-install flag, and support the 'fast-install' -+# and 'disable-fast-install' LT_INIT options. -+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. - m4_define([_LT_ENABLE_FAST_INSTALL], - [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl - AC_ARG_ENABLE([fast-install], -@@ -8264,14 +8668,14 @@ AC_ARG_ENABLE([fast-install], - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) -@@ -8288,14 +8692,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL], - [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) - AC_DIAGNOSE([obsolete], - [$0: Remove this warning and the call to _LT_SET_OPTION when you put --the `fast-install' option into LT_INIT's first parameter.]) -+the 'fast-install' option into LT_INIT's first parameter.]) - ]) - - AU_DEFUN([AC_DISABLE_FAST_INSTALL], - [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) - AC_DIAGNOSE([obsolete], - [$0: Remove this warning and the call to _LT_SET_OPTION when you put --the `disable-fast-install' option into LT_INIT's first parameter.]) -+the 'disable-fast-install' option into LT_INIT's first parameter.]) - ]) - - dnl aclocal-1.4 backwards compatibility: -@@ -8303,11 +8707,64 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [ - dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -+# _LT_WITH_AIX_SONAME([DEFAULT]) -+# ---------------------------------- -+# implement the --with-aix-soname flag, and support the `aix-soname=aix' -+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -+# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -+m4_define([_LT_WITH_AIX_SONAME], -+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -+shared_archive_member_spec= -+case $host,$enable_shared in -+power*-*-aix[[5-9]]*,yes) -+ AC_MSG_CHECKING([which variant of shared library versioning to provide]) -+ AC_ARG_WITH([aix-soname], -+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], -+ [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], -+ [case $withval in -+ aix|svr4|both) -+ ;; -+ *) -+ AC_MSG_ERROR([Unknown argument to --with-aix-soname]) -+ ;; -+ esac -+ lt_cv_with_aix_soname=$with_aix_soname], -+ [AC_CACHE_VAL([lt_cv_with_aix_soname], -+ [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) -+ with_aix_soname=$lt_cv_with_aix_soname]) -+ AC_MSG_RESULT([$with_aix_soname]) -+ if test aix != "$with_aix_soname"; then -+ # For the AIX way of multilib, we name the shared archive member -+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', -+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. -+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, -+ # the AIX toolchain works better with OBJECT_MODE set (default 32). -+ if test 64 = "${OBJECT_MODE-32}"; then -+ shared_archive_member_spec=shr_64 -+ else -+ shared_archive_member_spec=shr -+ fi -+ fi -+ ;; -+*) -+ with_aix_soname=aix -+ ;; -+esac -+ -+_LT_DECL([], [shared_archive_member_spec], [0], -+ [Shared archive member basename, for filename based shared library versioning on AIX])dnl -+])# _LT_WITH_AIX_SONAME -+ -+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) -+ -+ - # _LT_WITH_PIC([MODE]) - # -------------------- --# implement the --with-pic flag, and support the `pic-only' and `no-pic' -+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' - # LT_INIT options. --# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -+# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. - m4_define([_LT_WITH_PIC], - [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], -@@ -8318,19 +8775,17 @@ m4_define([_LT_WITH_PIC], - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac], -- [pic_mode=default]) -- --test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) -+ [pic_mode=m4_default([$1], [default])]) - - _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl - ])# _LT_WITH_PIC -@@ -8343,7 +8798,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE], - [_LT_SET_OPTION([LT_INIT], [pic-only]) - AC_DIAGNOSE([obsolete], - [$0: Remove this warning and the call to _LT_SET_OPTION when you --put the `pic-only' option into LT_INIT's first parameter.]) -+put the 'pic-only' option into LT_INIT's first parameter.]) - ]) - - dnl aclocal-1.4 backwards compatibility: -@@ -8366,7 +8821,8 @@ LT_OPTION_DEFINE([LTDL_INIT], [convenien - - # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- - # --# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -+# Foundation, Inc. - # Written by Gary V. Vaughan, 2004 - # - # This file is free software; the Free Software Foundation gives -@@ -8399,7 +8855,7 @@ m4_define([_lt_join], - # ------------ - # Manipulate m4 lists. - # These macros are necessary as long as will still need to support --# Autoconf-2.59 which quotes differently. -+# Autoconf-2.59, which quotes differently. - m4_define([lt_car], [[$1]]) - m4_define([lt_cdr], - [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], -@@ -8410,7 +8866,7 @@ m4_define([lt_unquote], $1) - - # lt_append(MACRO-NAME, STRING, [SEPARATOR]) - # ------------------------------------------ --# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. - # Note that neither SEPARATOR nor STRING are expanded; they are appended - # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). - # No SEPARATOR is output if MACRO-NAME was previously undefined (different -@@ -8490,7 +8946,7 @@ m4_define([lt_dict_filter], - - # ltversion.m4 -- version numbers -*- Autoconf -*- - # --# Copyright (C) 2004 Free Software Foundation, Inc. -+# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. - # Written by Scott James Remnant, 2004 - # - # This file is free software; the Free Software Foundation gives -@@ -8499,22 +8955,23 @@ m4_define([lt_dict_filter], - - # @configure_input@ - --# serial 3337 ltversion.m4 -+# serial 4179 ltversion.m4 - # This file is part of GNU Libtool - --m4_define([LT_PACKAGE_VERSION], [2.4.2]) --m4_define([LT_PACKAGE_REVISION], [1.3337]) -+m4_define([LT_PACKAGE_VERSION], [2.4.6]) -+m4_define([LT_PACKAGE_REVISION], [2.4.6]) - - AC_DEFUN([LTVERSION_VERSION], --[macro_version='2.4.2' --macro_revision='1.3337' -+[macro_version='2.4.6' -+macro_revision='2.4.6' - _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) - _LT_DECL(, macro_revision, 0) - ]) - - # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- - # --# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -+# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -+# Foundation, Inc. - # Written by Scott James Remnant, 2004. - # - # This file is free software; the Free Software Foundation gives -@@ -8525,7 +8982,7 @@ _LT_DECL(, macro_revision, 0) - - # These exist entirely to fool aclocal when bootstrapping libtool. - # --# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), - # which have later been changed to m4_define as they aren't part of the - # exported API, or moved to Autoconf or Automake where they belong. - # -@@ -8539,7 +8996,7 @@ _LT_DECL(, macro_revision, 0) - # included after everything else. This provides aclocal with the - # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything - # because those macros already exist, or will be overwritten later. --# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. - # - # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. - # Yes, that means every name once taken will need to remain here until -@@ -8611,32 +9068,63 @@ m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_L - m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) - m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - --# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- --# serial 1 (pkg-config-0.24) --# --# Copyright © 2004 Scott James Remnant . --# --# This program is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. --# --# This program is distributed in the hope that it will be useful, but --# WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --# General Public License for more details. --# --# You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --# --# As a special exception to the GNU General Public License, if you --# distribute this file as part of a program that contains a --# configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -- --# PKG_PROG_PKG_CONFIG([MIN-VERSION]) --# ---------------------------------- -+dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -+dnl serial 11 (pkg-config-0.29) -+dnl -+dnl Copyright © 2004 Scott James Remnant . -+dnl Copyright © 2012-2015 Dan Nicholson -+dnl -+dnl This program is free software; you can redistribute it and/or modify -+dnl it under the terms of the GNU General Public License as published by -+dnl the Free Software Foundation; either version 2 of the License, or -+dnl (at your option) any later version. -+dnl -+dnl This program is distributed in the hope that it will be useful, but -+dnl WITHOUT ANY WARRANTY; without even the implied warranty of -+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+dnl General Public License for more details. -+dnl -+dnl You should have received a copy of the GNU General Public License -+dnl along with this program; if not, write to the Free Software -+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -+dnl 02111-1307, USA. -+dnl -+dnl As a special exception to the GNU General Public License, if you -+dnl distribute this file as part of a program that contains a -+dnl configuration script generated by Autoconf, you may include it under -+dnl the same distribution terms that you use for the rest of that -+dnl program. -+ -+dnl PKG_PREREQ(MIN-VERSION) -+dnl ----------------------- -+dnl Since: 0.29 -+dnl -+dnl Verify that the version of the pkg-config macros are at least -+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -+dnl installed version of pkg-config, this checks the developer's version -+dnl of pkg.m4 when generating configure. -+dnl -+dnl To ensure that this macro is defined, also add: -+dnl m4_ifndef([PKG_PREREQ], -+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -+dnl -+dnl See the "Since" comment for each macro you use to see what version -+dnl of the macros you require. -+m4_defun([PKG_PREREQ], -+[m4_define([PKG_MACROS_VERSION], [0.29]) -+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, -+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -+])dnl PKG_PREREQ -+ -+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -+dnl ---------------------------------- -+dnl Since: 0.16 -+dnl -+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -+dnl first found in the path. Checks that the version of pkg-config found -+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -+dnl used since that's the first version where most current features of -+dnl pkg-config existed. - AC_DEFUN([PKG_PROG_PKG_CONFIG], - [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) - m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -@@ -8658,18 +9146,19 @@ if test -n "$PKG_CONFIG"; then - PKG_CONFIG="" - fi - fi[]dnl --])# PKG_PROG_PKG_CONFIG -+])dnl PKG_PROG_PKG_CONFIG - --# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) --# --# Check to see whether a particular set of modules exists. Similar --# to PKG_CHECK_MODULES(), but does not set variables or print errors. --# --# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) --# only at the first occurence in configure.ac, so if the first place --# it's called might be skipped (such as if it is within an "if", you --# have to call PKG_CHECK_EXISTS manually --# -------------------------------------------------------------- -+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -+dnl ------------------------------------------------------------------- -+dnl Since: 0.18 -+dnl -+dnl Check to see whether a particular set of modules exists. Similar to -+dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -+dnl -+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -+dnl only at the first occurence in configure.ac, so if the first place -+dnl it's called might be skipped (such as if it is within an "if", you -+dnl have to call PKG_CHECK_EXISTS manually - AC_DEFUN([PKG_CHECK_EXISTS], - [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl - if test -n "$PKG_CONFIG" && \ -@@ -8679,8 +9168,10 @@ m4_ifvaln([$3], [else - $3])dnl - fi]) - --# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) --# --------------------------------------------- -+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -+dnl --------------------------------------------- -+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -+dnl pkg_failed based on the result. - m4_define([_PKG_CONFIG], - [if test -n "$$1"; then - pkg_cv_[]$1="$$1" -@@ -8692,10 +9183,11 @@ m4_define([_PKG_CONFIG], - else - pkg_failed=untried - fi[]dnl --])# _PKG_CONFIG -+])dnl _PKG_CONFIG - --# _PKG_SHORT_ERRORS_SUPPORTED --# ----------------------------- -+dnl _PKG_SHORT_ERRORS_SUPPORTED -+dnl --------------------------- -+dnl Internal check to see if pkg-config supports short errors. - AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], - [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -@@ -8703,19 +9195,17 @@ if $PKG_CONFIG --atleast-pkgconfig-versi - else - _pkg_short_errors_supported=no - fi[]dnl --])# _PKG_SHORT_ERRORS_SUPPORTED -+])dnl _PKG_SHORT_ERRORS_SUPPORTED - - --# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], --# [ACTION-IF-NOT-FOUND]) --# --# --# Note that if there is a possibility the first call to --# PKG_CHECK_MODULES might not happen, you should be sure to include an --# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac --# --# --# -------------------------------------------------------------- -+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -+dnl [ACTION-IF-NOT-FOUND]) -+dnl -------------------------------------------------------------- -+dnl Since: 0.4.0 -+dnl -+dnl Note that if there is a possibility the first call to -+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac - AC_DEFUN([PKG_CHECK_MODULES], - [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl - AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -@@ -8769,16 +9259,40 @@ else - AC_MSG_RESULT([yes]) - $3 - fi[]dnl --])# PKG_CHECK_MODULES -+])dnl PKG_CHECK_MODULES - - --# PKG_INSTALLDIR(DIRECTORY) --# ------------------------- --# Substitutes the variable pkgconfigdir as the location where a module --# should install pkg-config .pc files. By default the directory is --# $libdir/pkgconfig, but the default can be changed by passing --# DIRECTORY. The user can override through the --with-pkgconfigdir --# parameter. -+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -+dnl [ACTION-IF-NOT-FOUND]) -+dnl --------------------------------------------------------------------- -+dnl Since: 0.29 -+dnl -+dnl Checks for existence of MODULES and gathers its build flags with -+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -+dnl and VARIABLE-PREFIX_LIBS from --libs. -+dnl -+dnl Note that if there is a possibility the first call to -+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -+dnl configure.ac. -+AC_DEFUN([PKG_CHECK_MODULES_STATIC], -+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -+_save_PKG_CONFIG=$PKG_CONFIG -+PKG_CONFIG="$PKG_CONFIG --static" -+PKG_CHECK_MODULES($@) -+PKG_CONFIG=$_save_PKG_CONFIG[]dnl -+])dnl PKG_CHECK_MODULES_STATIC -+ -+ -+dnl PKG_INSTALLDIR([DIRECTORY]) -+dnl ------------------------- -+dnl Since: 0.27 -+dnl -+dnl Substitutes the variable pkgconfigdir as the location where a module -+dnl should install pkg-config .pc files. By default the directory is -+dnl $libdir/pkgconfig, but the default can be changed by passing -+dnl DIRECTORY. The user can override through the --with-pkgconfigdir -+dnl parameter. - AC_DEFUN([PKG_INSTALLDIR], - [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) - m4_pushdef([pkg_description], -@@ -8789,16 +9303,18 @@ AC_ARG_WITH([pkgconfigdir], - AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) - m4_popdef([pkg_default]) - m4_popdef([pkg_description]) --]) dnl PKG_INSTALLDIR -+])dnl PKG_INSTALLDIR - - --# PKG_NOARCH_INSTALLDIR(DIRECTORY) --# ------------------------- --# Substitutes the variable noarch_pkgconfigdir as the location where a --# module should install arch-independent pkg-config .pc files. By --# default the directory is $datadir/pkgconfig, but the default can be --# changed by passing DIRECTORY. The user can override through the --# --with-noarch-pkgconfigdir parameter. -+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -+dnl -------------------------------- -+dnl Since: 0.27 -+dnl -+dnl Substitutes the variable noarch_pkgconfigdir as the location where a -+dnl module should install arch-independent pkg-config .pc files. By -+dnl default the directory is $datadir/pkgconfig, but the default can be -+dnl changed by passing DIRECTORY. The user can override through the -+dnl --with-noarch-pkgconfigdir parameter. - AC_DEFUN([PKG_NOARCH_INSTALLDIR], - [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) - m4_pushdef([pkg_description], -@@ -8809,9 +9325,26 @@ AC_ARG_WITH([noarch-pkgconfigdir], - AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) - m4_popdef([pkg_default]) - m4_popdef([pkg_description]) --]) dnl PKG_NOARCH_INSTALLDIR -+])dnl PKG_NOARCH_INSTALLDIR -+ -+ -+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -+dnl ------------------------------------------- -+dnl Since: 0.28 -+dnl -+dnl Retrieves the value of the pkg-config variable for the given module. -+AC_DEFUN([PKG_CHECK_VAR], -+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl -+ -+_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -+AS_VAR_COPY([$1], [pkg_cv_][$1]) -+ -+AS_VAR_IF([$1], [""], [$5], [$4])dnl -+])dnl PKG_CHECK_VAR - --# Copyright (C) 2002-2013 Free Software Foundation, Inc. -+# Copyright (C) 2002-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -8823,10 +9356,10 @@ m4_popdef([pkg_description]) - # generated from the m4 files accompanying Automake X.Y. - # (This private macro should not be called outside this file.) - AC_DEFUN([AM_AUTOMAKE_VERSION], --[am__api_version='1.13' -+[am__api_version='1.16' - dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to - dnl require some minimum version. Point them to the right macro. --m4_if([$1], [1.13.4], [], -+m4_if([$1], [1.16.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl - ]) - -@@ -8842,14 +9375,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) - # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. - # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], --[AM_AUTOMAKE_VERSION([1.13.4])dnl -+[AM_AUTOMAKE_VERSION([1.16.1])dnl - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl - _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - - # AM_AUX_DIR_EXPAND -*- Autoconf -*- - --# Copyright (C) 2001-2013 Free Software Foundation, Inc. -+# Copyright (C) 2001-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -8894,15 +9427,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCON - # configured tree to be moved without reconfiguration. - - AC_DEFUN([AM_AUX_DIR_EXPAND], --[dnl Rely on autoconf to set up CDPATH properly. --AC_PREREQ([2.50])dnl --# expand $ac_aux_dir to an absolute path --am_aux_dir=`cd $ac_aux_dir && pwd` -+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -+# Expand $ac_aux_dir to an absolute path. -+am_aux_dir=`cd "$ac_aux_dir" && pwd` - ]) - - # AM_CONDITIONAL -*- Autoconf -*- - --# Copyright (C) 1997-2013 Free Software Foundation, Inc. -+# Copyright (C) 1997-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -8933,7 +9465,7 @@ AC_CONFIG_COMMANDS_PRE( - Usually this means the macro was only invoked conditionally.]]) - fi])]) - --# Copyright (C) 1999-2013 Free Software Foundation, Inc. -+# Copyright (C) 1999-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9124,13 +9656,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl - - # Generate code to set up dependency tracking. -*- Autoconf -*- - --# Copyright (C) 1999-2013 Free Software Foundation, Inc. -+# Copyright (C) 1999-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - -- - # _AM_OUTPUT_DEPENDENCY_COMMANDS - # ------------------------------ - AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -@@ -9138,49 +9669,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. -- case $CONFIG_FILES in -- *\'*) eval set x "$CONFIG_FILES" ;; -- *) set x $CONFIG_FILES ;; -- esac -+ # TODO: see whether this extra hack can be removed once we start -+ # requiring Autoconf 2.70 or later. -+ AS_CASE([$CONFIG_FILES], -+ [*\'*], [eval set x "$CONFIG_FILES"], -+ [*], [set x $CONFIG_FILES]) - shift -- for mf -+ # Used to flag and report bootstrapping failures. -+ am_rc=0 -+ for am_mf - do - # Strip MF so we end up with the name of the file. -- mf=`echo "$mf" | sed -e 's/:.*$//'` -- # Check whether this is an Automake generated Makefile or not. -- # We used to match only the files named 'Makefile.in', but -- # some people rename them; so instead we look at the file content. -- # Grep'ing the first line is not enough: some people post-process -- # each Makefile.in and add a new line on top of each file to say so. -- # Grep'ing the whole file is not good either: AIX grep has a line -+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` -+ # Check whether this is an Automake generated Makefile which includes -+ # dependency-tracking related rules and includes. -+ # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. -- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then -- dirpart=`AS_DIRNAME("$mf")` -- else -- continue -- fi -- # Extract the definition of DEPDIR, am__include, and am__quote -- # from the Makefile without running 'make'. -- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` -- test -z "$DEPDIR" && continue -- am__include=`sed -n 's/^am__include = //p' < "$mf"` -- test -z "$am__include" && continue -- am__quote=`sed -n 's/^am__quote = //p' < "$mf"` -- # Find all dependency output files, they are included files with -- # $(DEPDIR) in their names. We invoke sed twice because it is the -- # simplest approach to changing $(DEPDIR) to its actual value in the -- # expansion. -- for file in `sed -n " -- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ -- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do -- # Make sure the directory exists. -- test -f "$dirpart/$file" && continue -- fdir=`AS_DIRNAME(["$file"])` -- AS_MKDIR_P([$dirpart/$fdir]) -- # echo "creating $dirpart/$file" -- echo '# dummy' > "$dirpart/$file" -- done -+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ -+ || continue -+ am_dirpart=`AS_DIRNAME(["$am_mf"])` -+ am_filepart=`AS_BASENAME(["$am_mf"])` -+ AM_RUN_LOG([cd "$am_dirpart" \ -+ && sed -e '/# am--include-marker/d' "$am_filepart" \ -+ | $MAKE -f - am--depfiles]) || am_rc=$? - done -+ if test $am_rc -ne 0; then -+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments -+ for automatic dependency tracking. Try re-running configure with the -+ '--disable-dependency-tracking' option to at least be able to build -+ the package (albeit without support for automatic dependency tracking).]) -+ fi -+ AS_UNSET([am_dirpart]) -+ AS_UNSET([am_filepart]) -+ AS_UNSET([am_mf]) -+ AS_UNSET([am_rc]) -+ rm -f conftest-deps.mk - } - ])# _AM_OUTPUT_DEPENDENCY_COMMANDS - -@@ -9189,18 +9712,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS - # ----------------------------- - # This macro should only be invoked once -- use via AC_REQUIRE. - # --# This code is only required when automatic dependency tracking --# is enabled. FIXME. This creates each '.P' file that we will --# need in order to bootstrap the dependency handling code. -+# This code is only required when automatic dependency tracking is enabled. -+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in -+# order to bootstrap the dependency handling code. - AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], - [AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], -- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) --]) -+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) - - # Do all the work for Automake. -*- Autoconf -*- - --# Copyright (C) 1996-2013 Free Software Foundation, Inc. -+# Copyright (C) 1996-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9209,6 +9731,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS] - # This macro actually does too much. Some checks are only needed if - # your package does certain things. But this isn't really a big deal. - -+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -+m4_define([AC_PROG_CC], -+m4_defn([AC_PROG_CC]) -+[_AM_PROG_CC_C_O -+]) -+ - # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) - # AM_INIT_AUTOMAKE([OPTIONS]) - # ----------------------------------------------- -@@ -9281,11 +9809,11 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl - AC_REQUIRE([AC_PROG_MKDIR_P])dnl - # For better backward compatibility. To be removed once Automake 1.9.x - # dies out for good. For more background, see: --# --# -+# -+# - AC_SUBST([mkdir_p], ['$(MKDIR_P)']) --# We need awk for the "check" target. The system "awk" is bad on --# some platforms. -+# We need awk for the "check" target (and possibly the TAP driver). The -+# system "awk" is bad on some platforms. - AC_REQUIRE([AC_PROG_AWK])dnl - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AM_SET_LEADING_DOT])dnl -@@ -9317,6 +9845,51 @@ dnl macro is hooked onto _AC_COMPILER_EX - AC_CONFIG_COMMANDS_PRE(dnl - [m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -+ -+# POSIX will say in a future version that running "rm -f" with no argument -+# is OK; and we want to be able to make that assumption in our Makefile -+# recipes. So use an aggressive probe to check that the usage we want is -+# actually supported "in the wild" to an acceptable degree. -+# See automake bug#10828. -+# To make any issue more visible, cause the running configure to be aborted -+# by default if the 'rm' program in use doesn't match our expectations; the -+# user can still override this though. -+if rm -f && rm -fr && rm -rf; then : OK; else -+ cat >&2 <<'END' -+Oops! -+ -+Your 'rm' program seems unable to run without file operands specified -+on the command line, even when the '-f' option is present. This is contrary -+to the behaviour of most rm programs out there, and not conforming with -+the upcoming POSIX standard: -+ -+Please tell bug-automake@gnu.org about your system, including the value -+of your $PATH and any error possibly output before this message. This -+can help us improve future automake versions. -+ -+END -+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then -+ echo 'Configuration will proceed anyway, since you have set the' >&2 -+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 -+ echo >&2 -+ else -+ cat >&2 <<'END' -+Aborting the configuration process, to ensure you take notice of the issue. -+ -+You can download and install GNU coreutils to get an 'rm' implementation -+that behaves properly: . -+ -+If you want to complete the configuration process using your problematic -+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -+to "yes", and re-run configure. -+ -+END -+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) -+ fi -+fi -+dnl The trailing newline in this macro's definition is deliberate, for -+dnl backward compatibility and to allow trailing 'dnl'-style comments -+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. - ]) - - dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -@@ -9325,7 +9898,6 @@ dnl mangled by Autoconf and run in a she - m4_define([_AC_COMPILER_EXEEXT], - m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - -- - # When config.status generates a header, we must update the stamp-h file. - # This file resides in the same directory as the config header - # that is generated. The stamp files are numbered to have different names. -@@ -9347,7 +9919,7 @@ for _am_header in $config_headers :; do - done - echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - --# Copyright (C) 2001-2013 Free Software Foundation, Inc. -+# Copyright (C) 2001-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9358,7 +9930,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNA - # Define $install_sh. - AC_DEFUN([AM_PROG_INSTALL_SH], - [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl --if test x"${install_sh}" != xset; then -+if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; -@@ -9368,7 +9940,7 @@ if test x"${install_sh}" != xset; then - fi - AC_SUBST([install_sh])]) - --# Copyright (C) 2003-2013 Free Software Foundation, Inc. -+# Copyright (C) 2003-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9389,7 +9961,7 @@ AC_SUBST([am__leading_dot])]) - - # Check to see how 'make' treats includes. -*- Autoconf -*- - --# Copyright (C) 2001-2013 Free Software Foundation, Inc. -+# Copyright (C) 2001-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9397,49 +9969,42 @@ AC_SUBST([am__leading_dot])]) - - # AM_MAKE_INCLUDE() - # ----------------- --# Check to see how make treats includes. -+# Check whether make has an 'include' directive that can support all -+# the idioms we need for our automatic dependency tracking code. - AC_DEFUN([AM_MAKE_INCLUDE], --[am_make=${MAKE-make} --cat > confinc << 'END' -+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) -+cat > confinc.mk << 'END' - am__doit: -- @echo this is the am__doit target -+ @echo this is the am__doit target >confinc.out - .PHONY: am__doit - END --# If we don't find an include directive, just comment out the code. --AC_MSG_CHECKING([for style of include used by $am_make]) - am__include="#" - am__quote= --_am_result=none --# First try GNU make style include. --echo "include confinc" > confmf --# Ignore all kinds of additional output from 'make'. --case `$am_make -s -f confmf 2> /dev/null` in #( --*the\ am__doit\ target*) -- am__include=include -- am__quote= -- _am_result=GNU -- ;; --esac --# Now try BSD make style include. --if test "$am__include" = "#"; then -- echo '.include "confinc"' > confmf -- case `$am_make -s -f confmf 2> /dev/null` in #( -- *the\ am__doit\ target*) -- am__include=.include -- am__quote="\"" -- _am_result=BSD -- ;; -- esac --fi --AC_SUBST([am__include]) --AC_SUBST([am__quote]) --AC_MSG_RESULT([$_am_result]) --rm -f confinc confmf --]) -+# BSD make does it like this. -+echo '.include "confinc.mk" # ignored' > confmf.BSD -+# Other make implementations (GNU, Solaris 10, AIX) do it like this. -+echo 'include confinc.mk # ignored' > confmf.GNU -+_am_result=no -+for s in GNU BSD; do -+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) -+ AS_CASE([$?:`cat confinc.out 2>/dev/null`], -+ ['0:this is the am__doit target'], -+ [AS_CASE([$s], -+ [BSD], [am__include='.include' am__quote='"'], -+ [am__include='include' am__quote=''])]) -+ if test "$am__include" != "#"; then -+ _am_result="yes ($s style)" -+ break -+ fi -+done -+rm -f confinc.* confmf.* -+AC_MSG_RESULT([${_am_result}]) -+AC_SUBST([am__include])]) -+AC_SUBST([am__quote])]) - - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - --# Copyright (C) 1997-2013 Free Software Foundation, Inc. -+# Copyright (C) 1997-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9480,7 +10045,7 @@ fi - # Obsolete and "removed" macros, that must however still report explicit - # error messages when used, to smooth transition. - # --# Copyright (C) 1996-2013 Free Software Foundation, Inc. -+# Copyright (C) 1996-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9507,7 +10072,7 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOT - - # Helper functions for option handling. -*- Autoconf -*- - --# Copyright (C) 2001-2013 Free Software Foundation, Inc. -+# Copyright (C) 2001-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9536,9 +10101,73 @@ AC_DEFUN([_AM_SET_OPTIONS], - AC_DEFUN([_AM_IF_OPTION], - [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -+# Copyright (C) 1999-2018 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ -+# _AM_PROG_CC_C_O -+# --------------- -+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -+# to automatically call this. -+AC_DEFUN([_AM_PROG_CC_C_O], -+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -+AC_REQUIRE_AUX_FILE([compile])dnl -+AC_LANG_PUSH([C])dnl -+AC_CACHE_CHECK( -+ [whether $CC understands -c and -o together], -+ [am_cv_prog_cc_c_o], -+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) -+ # Make sure it works both with $CC and with simple cc. -+ # Following AC_PROG_CC_C_O, we do the test twice because some -+ # compilers refuse to overwrite an existing .o file with -o, -+ # though they will create one. -+ am_cv_prog_cc_c_o=yes -+ for am_i in 1 2; do -+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ -+ && test -f conftest2.$ac_objext; then -+ : OK -+ else -+ am_cv_prog_cc_c_o=no -+ break -+ fi -+ done -+ rm -f core conftest* -+ unset am_i]) -+if test "$am_cv_prog_cc_c_o" != yes; then -+ # Losing compiler, so override with the script. -+ # FIXME: It is wrong to rewrite CC. -+ # But if we don't then we get into trouble of one sort or another. -+ # A longer-term fix would be to have automake use am__CC in this case, -+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" -+ CC="$am_aux_dir/compile $CC" -+fi -+AC_LANG_POP([C])]) -+ -+# For backward compatibility. -+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -+ -+# Copyright (C) 2001-2018 Free Software Foundation, Inc. -+# -+# This file is free software; the Free Software Foundation -+# gives unlimited permission to copy and/or distribute it, -+# with or without modifications, as long as this notice is preserved. -+ -+# AM_RUN_LOG(COMMAND) -+# ------------------- -+# Run COMMAND, save the exit status in ac_status, and log it. -+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -+AC_DEFUN([AM_RUN_LOG], -+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD -+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD -+ (exit $ac_status); }]) -+ - # Check to make sure that the build environment is sane. -*- Autoconf -*- - --# Copyright (C) 1996-2013 Free Software Foundation, Inc. -+# Copyright (C) 1996-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9619,7 +10248,7 @@ AC_CONFIG_COMMANDS_PRE( - rm -f conftest.file - ]) - --# Copyright (C) 2009-2013 Free Software Foundation, Inc. -+# Copyright (C) 2009-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9679,7 +10308,7 @@ AC_SUBST([AM_BACKSLASH])dnl - _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl - ]) - --# Copyright (C) 2001-2013 Free Software Foundation, Inc. -+# Copyright (C) 2001-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9707,7 +10336,7 @@ fi - INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - AC_SUBST([INSTALL_STRIP_PROGRAM])]) - --# Copyright (C) 2006-2013 Free Software Foundation, Inc. -+# Copyright (C) 2006-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -9726,7 +10355,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_ - - # Check how to create a tarball. -*- Autoconf -*- - --# Copyright (C) 2004-2013 Free Software Foundation, Inc. -+# Copyright (C) 2004-2018 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, ---- /dev/null -+++ snort-2.9.15.1/confdefs.h -@@ -0,0 +1,64 @@ -+/* confdefs.h */ -+#define PACKAGE_NAME "snort" -+#define PACKAGE_TARNAME "snort" -+#define PACKAGE_VERSION "2.9.15.1" -+#define PACKAGE_STRING "snort 2.9.15.1" -+#define PACKAGE_BUGREPORT "" -+#define PACKAGE_URL "" -+#define PACKAGE "snort" -+#define VERSION "2.9.15.1" -+#define STDC_HEADERS 1 -+#define HAVE_SYS_TYPES_H 1 -+#define HAVE_SYS_STAT_H 1 -+#define HAVE_STDLIB_H 1 -+#define HAVE_STRING_H 1 -+#define HAVE_MEMORY_H 1 -+#define HAVE_STRINGS_H 1 -+#define HAVE_INTTYPES_H 1 -+#define HAVE_STDINT_H 1 -+#define HAVE_UNISTD_H 1 -+#define HAVE_DLFCN_H 1 -+#define LT_OBJDIR ".libs/" -+#define LINUX 1 -+#define HAVE__BOOL 1 -+#define HAVE_STDBOOL_H 1 -+#define HAVE_INTTYPES_H 1 -+#define HAVE_MATH_H 1 -+#define HAVE_PATHS_H 1 -+#define HAVE_STDLIB_H 1 -+#define HAVE_STRING_H 1 -+#define HAVE_STRINGS_H 1 -+#define HAVE_UNISTD_H 1 -+#define HAVE_WCHAR_H 1 -+#define HAVE_LIBM 1 -+#define HAVE_LIBM 1 -+#define HAVE_UUID_UUID_H 1 -+#define HAVE_LIBUUID 1 -+#define HAVE_LIBNSL 1 -+#define HAVE_SIGACTION 1 -+#define HAVE_STRERROR 1 -+#define HAVE_VSWPRINTF 1 -+#define HAVE_WPRINTF 1 -+#define HAVE_MEMRCHR 1 -+#define HAVE_INET_NTOP 1 -+#define HAVE_SNPRINTF /**/ -+#define HAVE_MALLOC_TRIM 1 -+#define HAVE_MALLINFO 1 -+#define SIZEOF_CHAR 1 -+#define SIZEOF_SHORT 2 -+#define SIZEOF_INT 4 -+#define SIZEOF_LONG_INT 4 -+#define SIZEOF_LONG_LONG_INT 8 -+#define SIZEOF_UNSIGNED_INT 4 -+#define SIZEOF_UNSIGNED_LONG_INT 4 -+#define SIZEOF_UNSIGNED_LONG_LONG_INT 8 -+#define HAVE_U_INT8_T 1 -+#define HAVE_U_INT16_T 1 -+#define HAVE_U_INT32_T 1 -+#define HAVE_U_INT64_T 1 -+#define HAVE_UINT8_T 1 -+#define HAVE_UINT16_T 1 -+#define HAVE_UINT32_T 1 -+#define HAVE_UINT64_T 1 -+#define HAVE_INT8_T 1 -+#define HAVE_INT16_T 1 ---- snort-2.9.15.1.orig/configure -+++ snort-2.9.15.1/configure -@@ -691,6 +691,7 @@ YACC - XCCFLAGS - extra_incl - CPP -+LT_SYS_LIBRARY_PATH - OTOOL64 - OTOOL - LIPO -@@ -727,7 +728,6 @@ am__nodep - AMDEPBACKSLASH - AMDEP_FALSE - AMDEP_TRUE --am__quote - am__include - DEPDIR - OBJEXT -@@ -783,6 +783,7 @@ infodir - docdir - oldincludedir - includedir -+runstatedir - localstatedir - sharedstatedir - sysconfdir -@@ -801,7 +802,8 @@ PACKAGE_VERSION - PACKAGE_TARNAME - PACKAGE_NAME - PATH_SEPARATOR --SHELL' -+SHELL -+am__quote' - ac_subst_files='' - ac_user_opts=' - enable_option_checking -@@ -811,6 +813,7 @@ enable_shared - enable_static - with_pic - enable_fast_install -+with_aix_soname - with_gnu_ld - with_sysroot - enable_libtool_lock -@@ -879,6 +882,7 @@ CFLAGS - LDFLAGS - LIBS - CPPFLAGS -+LT_SYS_LIBRARY_PATH - CPP - SIGNAL_SNORT_RELOAD - SIGNAL_SNORT_DUMP_STATS -@@ -927,6 +931,7 @@ datadir='${datarootdir}' - sysconfdir='${prefix}/etc' - sharedstatedir='${prefix}/com' - localstatedir='${prefix}/var' -+runstatedir='${localstatedir}/run' - includedir='${prefix}/include' - oldincludedir='/usr/include' - docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -@@ -1179,6 +1184,15 @@ do - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - -+ -runstatedir | --runstatedir | --runstatedi | --runstated \ -+ | --runstate | --runstat | --runsta | --runst | --runs \ -+ | --run | --ru | --r) -+ ac_prev=runstatedir ;; -+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ -+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ -+ | --run=* | --ru=* | --r=*) -+ runstatedir=$ac_optarg ;; -+ - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ -@@ -1316,7 +1330,7 @@ fi - for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ -- libdir localedir mandir -+ libdir localedir mandir runstatedir - do - eval ac_val=\$$ac_var - # Remove trailing slashes. -@@ -1469,6 +1483,7 @@ Fine tuning of the installation director - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] -+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] -@@ -1563,9 +1578,12 @@ Optional Packages: - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use - both] -+ --with-aix-soname=aix|svr4|both -+ shared library versioning (aka "SONAME") variant to -+ provide on AIX, [default=aix]. - --with-gnu-ld assume the C compiler uses GNU ld [default=no] -- --with-sysroot=DIR Search for dependent libraries within DIR -- (or the compiler's sysroot if not specified). -+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the -+ compiler's sysroot if not specified). - --with-libpcap-includes=DIR libpcap include directory - --with-libpcap-libraries=DIR libpcap library directory - --with-libpfring-includes=DIR libpfring include directory -@@ -1593,6 +1611,8 @@ Some influential environment variables: - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory -+ LT_SYS_LIBRARY_PATH -+ User-defined run-time library search path. - CPP C preprocessor - SIGNAL_SNORT_RELOAD - set the SIGNAL_SNORT_RELOAD value -@@ -2736,7 +2756,7 @@ ac_config_headers="$ac_config_headers co - - # When changing the snort version, please also update the VERSION - # definition in "src/win32/WIN32-Includes/config.h" --am__api_version='1.13' -+am__api_version='1.16' - - ac_aux_dir= - for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do -@@ -2937,8 +2957,8 @@ test "$program_suffix" != NONE && - ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' - program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - --# expand $ac_aux_dir to an absolute path --am_aux_dir=`cd $ac_aux_dir && pwd` -+# Expand $ac_aux_dir to an absolute path. -+am_aux_dir=`cd "$ac_aux_dir" && pwd` - - if test x"${MISSING+set}" != xset; then - case $am_aux_dir in -@@ -2957,7 +2977,7 @@ else - $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} - fi - --if test x"${install_sh}" != xset; then -+if test x"${install_sh+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; -@@ -3282,12 +3302,12 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma - - # For better backward compatibility. To be removed once Automake 1.9.x - # dies out for good. For more background, see: --# --# -+# -+# - mkdir_p='$(MKDIR_P)' - --# We need awk for the "check" target. The system "awk" is bad on --# some platforms. -+# We need awk for the "check" target (and possibly the TAP driver). The -+# system "awk" is bad on some platforms. - # Always define AMTAR for backward compatibility. Yes, it's still used - # in the wild :-( We should find a proper way to deprecate it ... - AMTAR='$${TAR-tar}' -@@ -3303,6 +3323,48 @@ am__tar='$${TAR-tar} chof - "$$tardir"' - - - -+# POSIX will say in a future version that running "rm -f" with no argument -+# is OK; and we want to be able to make that assumption in our Makefile -+# recipes. So use an aggressive probe to check that the usage we want is -+# actually supported "in the wild" to an acceptable degree. -+# See automake bug#10828. -+# To make any issue more visible, cause the running configure to be aborted -+# by default if the 'rm' program in use doesn't match our expectations; the -+# user can still override this though. -+if rm -f && rm -fr && rm -rf; then : OK; else -+ cat >&2 <<'END' -+Oops! -+ -+Your 'rm' program seems unable to run without file operands specified -+on the command line, even when the '-f' option is present. This is contrary -+to the behaviour of most rm programs out there, and not conforming with -+the upcoming POSIX standard: -+ -+Please tell bug-automake@gnu.org about your system, including the value -+of your $PATH and any error possibly output before this message. This -+can help us improve future automake versions. -+ -+END -+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then -+ echo 'Configuration will proceed anyway, since you have set the' >&2 -+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 -+ echo >&2 -+ else -+ cat >&2 <<'END' -+Aborting the configuration process, to ensure you take notice of the issue. -+ -+You can download and install GNU coreutils to get an 'rm' implementation -+that behaves properly: . -+ -+If you want to complete the configuration process using your problematic -+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -+to "yes", and re-run configure. -+ -+END -+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 -+ fi -+fi -+ - - NO_OPTIMIZE="no" - -@@ -3310,45 +3372,45 @@ DEPDIR="${am__leading_dot}deps" - - ac_config_commands="$ac_config_commands depfiles" - -- --am_make=${MAKE-make} --cat > confinc << 'END' -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -+$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -+cat > confinc.mk << 'END' - am__doit: -- @echo this is the am__doit target -+ @echo this is the am__doit target >confinc.out - .PHONY: am__doit - END --# If we don't find an include directive, just comment out the code. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 --$as_echo_n "checking for style of include used by $am_make... " >&6; } - am__include="#" - am__quote= --_am_result=none --# First try GNU make style include. --echo "include confinc" > confmf --# Ignore all kinds of additional output from 'make'. --case `$am_make -s -f confmf 2> /dev/null` in #( --*the\ am__doit\ target*) -- am__include=include -- am__quote= -- _am_result=GNU -- ;; --esac --# Now try BSD make style include. --if test "$am__include" = "#"; then -- echo '.include "confinc"' > confmf -- case `$am_make -s -f confmf 2> /dev/null` in #( -- *the\ am__doit\ target*) -- am__include=.include -- am__quote="\"" -- _am_result=BSD -+# BSD make does it like this. -+echo '.include "confinc.mk" # ignored' > confmf.BSD -+# Other make implementations (GNU, Solaris 10, AIX) do it like this. -+echo 'include confinc.mk # ignored' > confmf.GNU -+_am_result=no -+for s in GNU BSD; do -+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 -+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+ case $?:`cat confinc.out 2>/dev/null` in #( -+ '0:this is the am__doit target') : -+ case $s in #( -+ BSD) : -+ am__include='.include' am__quote='"' ;; #( -+ *) : -+ am__include='include' am__quote='' ;; -+esac ;; #( -+ *) : - ;; -- esac --fi -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 --$as_echo "$_am_result" >&6; } --rm -f confinc confmf -+esac -+ if test "$am__include" != "#"; then -+ _am_result="yes ($s style)" -+ break -+ fi -+done -+rm -f confinc.* confmf.* -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -+$as_echo "${_am_result}" >&6; } - - # Check whether --enable-dependency-tracking was given. - if test "${enable_dependency_tracking+set}" = set; then : -@@ -4158,6 +4220,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -+if ${am_cv_prog_cc_c_o+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+ # Make sure it works both with $CC and with simple cc. -+ # Following AC_PROG_CC_C_O, we do the test twice because some -+ # compilers refuse to overwrite an existing .o file with -o, -+ # though they will create one. -+ am_cv_prog_cc_c_o=yes -+ for am_i in 1 2; do -+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 -+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } \ -+ && test -f conftest2.$ac_objext; then -+ : OK -+ else -+ am_cv_prog_cc_c_o=no -+ break -+ fi -+ done -+ rm -f core conftest* -+ unset am_i -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -+$as_echo "$am_cv_prog_cc_c_o" >&6; } -+if test "$am_cv_prog_cc_c_o" != yes; then -+ # Losing compiler, so override with the script. -+ # FIXME: It is wrong to rewrite CC. -+ # But if we don't then we get into trouble of one sort or another. -+ # A longer-term fix would be to have automake use am__CC in this case, -+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" -+ CC="$am_aux_dir/compile $CC" -+fi -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ - depcc="$CC" am_compiler_list= - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -@@ -5117,6 +5238,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -+if ${am_cv_prog_cc_c_o+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+ # Make sure it works both with $CC and with simple cc. -+ # Following AC_PROG_CC_C_O, we do the test twice because some -+ # compilers refuse to overwrite an existing .o file with -o, -+ # though they will create one. -+ am_cv_prog_cc_c_o=yes -+ for am_i in 1 2; do -+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 -+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } \ -+ && test -f conftest2.$ac_objext; then -+ : OK -+ else -+ am_cv_prog_cc_c_o=no -+ break -+ fi -+ done -+ rm -f core conftest* -+ unset am_i -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -+$as_echo "$am_cv_prog_cc_c_o" >&6; } -+if test "$am_cv_prog_cc_c_o" != yes; then -+ # Losing compiler, so override with the script. -+ # FIXME: It is wrong to rewrite CC. -+ # But if we don't then we get into trouble of one sort or another. -+ # A longer-term fix would be to have automake use am__CC in this case, -+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" -+ CC="$am_aux_dir/compile $CC" -+fi -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ - depcc="$CC" am_compiler_list= - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -@@ -5253,8 +5433,8 @@ esac - - - --macro_version='2.4.2' --macro_revision='1.3337' -+macro_version='2.4.6' -+macro_revision='2.4.6' - - - -@@ -5268,7 +5448,7 @@ macro_revision='1.3337' - - - --ltmain="$ac_aux_dir/ltmain.sh" -+ltmain=$ac_aux_dir/ltmain.sh - - # Make sure we can run config.sub. - $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || -@@ -5388,7 +5568,7 @@ func_echo_all () - $ECHO "" - } - --case "$ECHO" in -+case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 - $as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -@@ -5711,19 +5891,19 @@ test -z "$GREP" && GREP=grep - - # Check whether --with-gnu-ld was given. - if test "${with_gnu_ld+set}" = set; then : -- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes - else - with_gnu_ld=no - fi - - ac_prog=ld --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 - $as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) -- # gcc leaves a trailing carriage return which upsets mingw -+ # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -@@ -5737,7 +5917,7 @@ $as_echo_n "checking for ld used by $CC. - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done -- test -z "$LD" && LD="$ac_prog" -+ test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. -@@ -5748,7 +5928,7 @@ $as_echo_n "checking for ld used by $CC. - with_gnu_ld=unknown - ;; - esac --elif test "$with_gnu_ld" = yes; then -+elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 - $as_echo_n "checking for GNU ld... " >&6; } - else -@@ -5759,32 +5939,32 @@ if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 - else - if test -z "$LD"; then -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- lt_cv_path_LD="$ac_dir/$ac_prog" -+ lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 - $as_echo "$LD" >&6; } -@@ -5827,33 +6007,38 @@ if ${lt_cv_path_NM+:} false; then : - else - if test -n "$NM"; then - # Let the user override the test. -- lt_cv_path_NM="$NM" -+ lt_cv_path_NM=$NM - else -- lt_nm_to_check="${ac_tool_prefix}nm" -+ lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. -- tmp_nm="$ac_dir/$lt_tmp_nm" -- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then -+ tmp_nm=$ac_dir/$lt_tmp_nm -+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. -- # Adding the `sed 1q' prevents false positives on HP-UX, which says: -+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file -- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in -- */dev/null* | *'Invalid file or object type'*) -+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty -+ case $build_os in -+ mingw*) lt_bad_file=conftest.nm/nofile ;; -+ *) lt_bad_file=/dev/null ;; -+ esac -+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in -+ *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" -- break -+ break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" -- break -+ break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but -@@ -5864,15 +6049,15 @@ else - esac - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 - $as_echo "$lt_cv_path_NM" >&6; } --if test "$lt_cv_path_NM" != "no"; then -- NM="$lt_cv_path_NM" -+if test no != "$lt_cv_path_NM"; then -+ NM=$lt_cv_path_NM - else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : -@@ -5978,9 +6163,9 @@ esac - fi - fi - -- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in -+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) -- DUMPBIN="$DUMPBIN -symbols" -+ DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: -@@ -5988,8 +6173,8 @@ fi - esac - fi - -- if test "$DUMPBIN" != ":"; then -- NM="$DUMPBIN" -+ if test : != "$DUMPBIN"; then -+ NM=$DUMPBIN - fi - fi - test -z "$NM" && NM=nm -@@ -6040,7 +6225,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; the - $as_echo_n "(cached) " >&6 - else - i=0 -- teststring="ABCD" -+ teststring=ABCD - - case $build_os in - msdosdjgpp*) -@@ -6080,7 +6265,7 @@ else - lt_cv_sys_max_cmd_len=8192; - ;; - -- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) -+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` -@@ -6130,22 +6315,23 @@ else - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` -- if test -n "$lt_cv_sys_max_cmd_len"; then -+ if test -n "$lt_cv_sys_max_cmd_len" && \ -+ test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. -- for i in 1 2 3 4 5 6 7 8 ; do -+ for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. -- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ -+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && -- test $i != 17 # 1/2 MB should be enough -+ test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring -@@ -6163,7 +6349,7 @@ else - - fi - --if test -n $lt_cv_sys_max_cmd_len ; then -+if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 - $as_echo "$lt_cv_sys_max_cmd_len" >&6; } - else -@@ -6181,30 +6367,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len - : ${MV="mv -f"} - : ${RM="rm -f"} - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 --$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } --# Try some XSI features --xsi_shell=no --( _lt_dummy="a/b/c" -- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ -- = c,a/b,b/c, \ -- && eval 'test $(( 1 + 1 )) -eq 2 \ -- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ -- && xsi_shell=yes --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 --$as_echo "$xsi_shell" >&6; } -- -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 --$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } --lt_shell_append=no --( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ -- >/dev/null 2>&1 \ -- && lt_shell_append=yes --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 --$as_echo "$lt_shell_append" >&6; } -- -- - if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset - else -@@ -6327,13 +6489,13 @@ esac - reload_cmds='$LD$reload_flag -o $output$reload_objs' - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) -- if test "$GCC" != yes; then -+ if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) -- if test "$GCC" = yes; then -- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' -+ if test yes = "$GCC"; then -+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi -@@ -6461,13 +6623,13 @@ lt_cv_deplibs_check_method='unknown' - # Need to set the preceding variable on all platforms that support - # interlibrary dependencies. - # 'none' -- dependencies not supported. --# `unknown' -- same as none, but documents that we really don't know. -+# 'unknown' -- same as none, but documents that we really don't know. - # 'pass_all' -- all dependencies passed with no checks. - # 'test_compile' -- check by making test program. - # 'file_magic [[regex]]' -- check by looking for files in library path --# which responds to the $file_magic_cmd with a given extended regex. --# If you have `file' or equivalent on your system and you're not sure --# whether `pass_all' will *always* work, you probably want this one. -+# that responds to the $file_magic_cmd with a given extended regex. -+# If you have 'file' or equivalent on your system and you're not sure -+# whether 'pass_all' will *always* work, you probably want this one. - - case $host_os in - aix[4-9]*) -@@ -6494,8 +6656,7 @@ mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. -- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. -- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then -+ if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else -@@ -6531,10 +6692,6 @@ freebsd* | dragonfly*) - fi - ;; - --gnu*) -- lt_cv_deplibs_check_method=pass_all -- ;; -- - haiku*) - lt_cv_deplibs_check_method=pass_all - ;; -@@ -6573,11 +6730,11 @@ irix5* | irix6* | nonstopux*) - ;; - - # This must be glibc/ELF. --linux* | k*bsd*-gnu | kopensolaris*-gnu) -+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - --netbsd*) -+netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else -@@ -6595,8 +6752,8 @@ newos6*) - lt_cv_deplibs_check_method=pass_all - ;; - --openbsd*) -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+openbsd* | bitrig*) -+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' -@@ -6649,6 +6806,9 @@ sysv4 | sysv4.3*) - tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -+os2*) -+ lt_cv_deplibs_check_method=pass_all -+ ;; - esac - - fi -@@ -6806,8 +6966,8 @@ else - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) -- # two different shell functions defined in ltmain.sh -- # decide which to use based on capabilities of $DLLTOOL -+ # two different shell functions defined in ltmain.sh; -+ # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib -@@ -6819,7 +6979,7 @@ cygwin* | mingw* | pw32* | cegcc*) - ;; - *) - # fallback: assume linklib IS sharedlib -- lt_cv_sharedlib_from_linklib_cmd="$ECHO" -+ lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; - esac - -@@ -6974,7 +7134,7 @@ if ac_fn_c_try_compile "$LINENO"; then : - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -- if test "$ac_status" -eq 0; then -+ if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 -@@ -6982,7 +7142,7 @@ if ac_fn_c_try_compile "$LINENO"; then : - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -- if test "$ac_status" -ne 0; then -+ if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi -@@ -6995,7 +7155,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 - $as_echo "$lt_cv_ar_at_file" >&6; } - --if test "x$lt_cv_ar_at_file" = xno; then -+if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= - else - archiver_list_spec=$lt_cv_ar_at_file -@@ -7212,7 +7372,7 @@ old_postuninstall_cmds= - - if test -n "$RANLIB"; then - case $host_os in -- openbsd*) -+ bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) -@@ -7302,7 +7462,7 @@ cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; - hpux*) -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - symcode='[ABCDEGRST]' - fi - ;; -@@ -7335,14 +7495,44 @@ case `$NM -V 2>&1` in - symcode='[ABCDGIRSTW]' ;; - esac - -+if test "$lt_cv_nm_interface" = "MS dumpbin"; then -+ # Gets list of data symbols to import. -+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" -+ # Adjust the below global symbol transforms to fixup imported variables. -+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" -+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" -+ lt_c_name_lib_hook="\ -+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -+else -+ # Disable hooks by default. -+ lt_cv_sys_global_symbol_to_import= -+ lt_cdecl_hook= -+ lt_c_name_hook= -+ lt_c_name_lib_hook= -+fi -+ - # Transform an extracted symbol line into a proper C declaration. - # Some systems (esp. on ia64) link data and code symbols differently, - # so use this general approach. --lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" -+lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -+$lt_cdecl_hook\ -+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - - # Transform an extracted symbol line into symbol name and symbol address --lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" --lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" -+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -+$lt_c_name_hook\ -+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" -+ -+# Transform an extracted symbol line into symbol name with lib prefix and -+# symbol address. -+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -+$lt_c_name_lib_hook\ -+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - - # Handle CRLF in mingw tool chain - opt_cr= -@@ -7360,21 +7550,24 @@ for ac_symprfx in "" "_"; do - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then -- # Fake it for dumpbin and say T for any non-static function -- # and D for any global variable. -+ # Fake it for dumpbin and say T for any non-static function, -+ # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ - " {last_section=section; section=\$ 3};"\ - " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ - " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ - " \$ 0!~/External *\|/{next};"\ - " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ - " {if(hide[section]) next};"\ --" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ --" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ --" s[1]~/^[@?]/{print s[1], s[1]; next};"\ --" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ - " ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" -@@ -7405,11 +7598,8 @@ _LT_EOF - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm -- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 -- (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && test -s "$nlist"; then -+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 -+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" -@@ -7422,11 +7612,11 @@ _LT_EOF - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext - /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ --#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) --/* DATA imports from DLLs on WIN32 con't be const, because runtime -+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -+/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ - # define LT_DLSYM_CONST --#elif defined(__osf__) -+#elif defined __osf__ - /* This system does not cope well with relocations in const data. */ - # define LT_DLSYM_CONST - #else -@@ -7452,7 +7642,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = - { - { "@PROGRAM@", (void *) 0 }, - _LT_EOF -- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext -+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} - }; -@@ -7472,13 +7662,13 @@ _LT_EOF - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS -- LIBS="conftstm.$ac_objext" -+ LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && test -s conftest${ac_exeext}; then -+ test $ac_status = 0; } && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS -@@ -7499,7 +7689,7 @@ _LT_EOF - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. -- if test "$pipe_works" = yes; then -+ if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= -@@ -7552,6 +7742,16 @@ fi - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 - $as_echo_n "checking for sysroot... " >&6; } - -@@ -7564,9 +7764,9 @@ fi - - - lt_sysroot= --case ${with_sysroot} in #( -+case $with_sysroot in #( - yes) -- if test "$GCC" = yes; then -+ if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( -@@ -7576,8 +7776,8 @@ case ${with_sysroot} in #( - no|'') - ;; #( - *) -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 --$as_echo "${with_sysroot}" >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -+$as_echo "$with_sysroot" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; - esac -@@ -7589,18 +7789,99 @@ $as_echo "${lt_sysroot:-no}" >&6; } - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -+$as_echo_n "checking for a working dd... " >&6; } -+if ${ac_cv_path_lt_DD+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ printf 0123456789abcdef0123456789abcdef >conftest.i -+cat conftest.i conftest.i >conftest2.i -+: ${lt_DD:=$DD} -+if test -z "$lt_DD"; then -+ ac_path_lt_DD_found=false -+ # Loop through the user's path and test for each of PROGNAME-LIST -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_prog in dd; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" -+ as_fn_executable_p "$ac_path_lt_DD" || continue -+if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then -+ cmp -s conftest.i conftest.out \ -+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -+fi -+ $ac_path_lt_DD_found && break 3 -+ done -+ done -+ done -+IFS=$as_save_IFS -+ if test -z "$ac_cv_path_lt_DD"; then -+ : -+ fi -+else -+ ac_cv_path_lt_DD=$lt_DD -+fi -+ -+rm -f conftest.i conftest2.i conftest.out -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -+$as_echo "$ac_cv_path_lt_DD" >&6; } -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -+$as_echo_n "checking how to truncate binary pipes... " >&6; } -+if ${lt_cv_truncate_bin+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ printf 0123456789abcdef0123456789abcdef >conftest.i -+cat conftest.i conftest.i >conftest2.i -+lt_cv_truncate_bin= -+if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then -+ cmp -s conftest.i conftest.out \ -+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -+fi -+rm -f conftest.i conftest2.i conftest.out -+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -+$as_echo "$lt_cv_truncate_bin" >&6; } -+ -+ -+ -+ -+ -+ -+ -+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -+func_cc_basename () -+{ -+ for cc_temp in $*""; do -+ case $cc_temp in -+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -+ \-*) ;; -+ *) break;; -+ esac -+ done -+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -+} -+ - # Check whether --enable-libtool-lock was given. - if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; - fi - --test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes -+test no = "$enable_libtool_lock" || enable_libtool_lock=yes - - # Some flags need to be propagated to the compiler or linker for good - # libtool support. - case $host in - ia64-*-hpux*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set mode -+ # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 -@@ -7609,24 +7890,25 @@ ia64-*-hpux*) - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) -- HPUX_IA64_MODE="32" -+ HPUX_IA64_MODE=32 - ;; - *ELF-64*) -- HPUX_IA64_MODE="64" -+ HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; - *-*-irix6*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- if test "$lt_cv_prog_gnu_ld" = yes; then -+ if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" -@@ -7655,9 +7937,50 @@ ia64-*-hpux*) - rm -rf conftest* - ;; - --x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -+mips64*-*linux*) -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. -+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext -+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ emul=elf -+ case `/usr/bin/file conftest.$ac_objext` in -+ *32-bit*) -+ emul="${emul}32" -+ ;; -+ *64-bit*) -+ emul="${emul}64" -+ ;; -+ esac -+ case `/usr/bin/file conftest.$ac_objext` in -+ *MSB*) -+ emul="${emul}btsmip" -+ ;; -+ *LSB*) -+ emul="${emul}ltsmip" -+ ;; -+ esac -+ case `/usr/bin/file conftest.$ac_objext` in -+ *N32*) -+ emul="${emul}n32" -+ ;; -+ esac -+ LD="${LD-ld} -m $emul" -+ fi -+ rm -rf conftest* -+ ;; -+ -+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ - s390*-*linux*|s390*-*tpf*|sparc*-*linux*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. Note that the listed cases only cover the -+ # situations where additional linker options are needed (such as when -+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or -+ # vice versa); the common cases where no linker options are needed do -+ # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 -@@ -7671,9 +7994,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) -- LD="${LD-ld} -m elf_i386" -+ case `/usr/bin/file conftest.o` in -+ *x86-64*) -+ LD="${LD-ld} -m elf32_x86_64" -+ ;; -+ *) -+ LD="${LD-ld} -m elf_i386" -+ ;; -+ esac -+ ;; -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -7692,7 +8025,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -@@ -7710,7 +8046,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - - *-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. -- SAVE_CFLAGS="$CFLAGS" -+ SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 - $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -@@ -7750,13 +8086,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 - $as_echo "$lt_cv_cc_needs_belf" >&6; } -- if test x"$lt_cv_cc_needs_belf" != x"yes"; then -+ if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf -- CFLAGS="$SAVE_CFLAGS" -+ CFLAGS=$SAVE_CFLAGS - fi - ;; - *-*solaris*) -- # Find out which ABI we are using. -+ # Find out what ABI is being produced by ac_compile, and set linker -+ # options accordingly. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 -@@ -7768,7 +8105,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } - case $lt_cv_prog_gnu_ld in - yes*) - case $host in -- i?86-*-solaris*) -+ i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) -@@ -7777,7 +8114,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then -- LD="${LD-ld}_sol2" -+ LD=${LD-ld}_sol2 - fi - ;; - *) -@@ -7793,7 +8130,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } - ;; - esac - --need_locks="$enable_libtool_lock" -+need_locks=$enable_libtool_lock - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -@@ -7904,7 +8241,7 @@ else - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 - $as_echo "$lt_cv_path_mainfest_tool" >&6; } --if test "x$lt_cv_path_mainfest_tool" != xyes; then -+if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: - fi - -@@ -8407,7 +8744,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; - $as_echo_n "(cached) " >&6 - else - lt_cv_apple_cc_single_mod=no -- if test -z "${LT_MULTI_MODULE}"; then -+ if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the -@@ -8425,7 +8762,7 @@ else - cat conftest.err >&5 - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. -- elif test -f libconftest.dylib && test $_lt_result -eq 0; then -+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 -@@ -8464,7 +8801,7 @@ else - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS=$save_LDFLAGS - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -@@ -8493,7 +8830,7 @@ _LT_EOF - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&5 -- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then -+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 -@@ -8506,32 +8843,32 @@ fi - $as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; -+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) -- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -- 10.[012]*) -- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; -+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; -+ 10.[012][,.]*) -+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) -- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; -+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac -- if test "$lt_cv_apple_cc_single_mod" = "yes"; then -+ if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi -- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then -- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' -+ if test yes = "$lt_cv_ld_exported_symbols_list"; then -+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else -- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' -+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi -- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then -+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= -@@ -8539,6 +8876,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; } - ;; - esac - -+# func_munge_path_list VARIABLE PATH -+# ----------------------------------- -+# VARIABLE is name of variable containing _space_ separated list of -+# directories to be munged by the contents of PATH, which is string -+# having a format: -+# "DIR[:DIR]:" -+# string "DIR[ DIR]" will be prepended to VARIABLE -+# ":DIR[:DIR]" -+# string "DIR[ DIR]" will be appended to VARIABLE -+# "DIRP[:DIRP]::[DIRA:]DIRA" -+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -+# "DIRA[ DIRA]" will be appended to VARIABLE -+# "DIR[:DIR]" -+# VARIABLE will be replaced by "DIR[ DIR]" -+func_munge_path_list () -+{ -+ case x$2 in -+ x) -+ ;; -+ *:) -+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" -+ ;; -+ x:*) -+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" -+ ;; -+ *::*) -+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" -+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" -+ ;; -+ *) -+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" -+ ;; -+ esac -+} -+ - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -8842,14 +9214,14 @@ if test "${enable_shared+set}" = set; th - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac - else -@@ -8873,14 +9245,14 @@ if test "${enable_static+set}" = set; th - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac - else -@@ -8904,14 +9276,14 @@ if test "${with_pic+set}" = set; then : - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac - else -@@ -8919,8 +9291,6 @@ else - fi - - --test -z "$pic_mode" && pic_mode=default -- - - - -@@ -8936,14 +9306,14 @@ if test "${enable_fast_install+set}" = s - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. -- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," -+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - ;; - esac - else -@@ -8957,11 +9327,63 @@ fi - - - -+ shared_archive_member_spec= -+case $host,$enable_shared in -+power*-*-aix[5-9]*,yes) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } -+ -+# Check whether --with-aix-soname was given. -+if test "${with_aix_soname+set}" = set; then : -+ withval=$with_aix_soname; case $withval in -+ aix|svr4|both) -+ ;; -+ *) -+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 -+ ;; -+ esac -+ lt_cv_with_aix_soname=$with_aix_soname -+else -+ if ${lt_cv_with_aix_soname+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ lt_cv_with_aix_soname=aix -+fi -+ -+ with_aix_soname=$lt_cv_with_aix_soname -+fi -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -+$as_echo "$with_aix_soname" >&6; } -+ if test aix != "$with_aix_soname"; then -+ # For the AIX way of multilib, we name the shared archive member -+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', -+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. -+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, -+ # the AIX toolchain works better with OBJECT_MODE set (default 32). -+ if test 64 = "${OBJECT_MODE-32}"; then -+ shared_archive_member_spec=shr_64 -+ else -+ shared_archive_member_spec=shr -+ fi -+ fi -+ ;; -+*) -+ with_aix_soname=aix -+ ;; -+esac -+ -+ -+ -+ -+ -+ -+ - - - - # This can be used to rebuild libtool when needed --LIBTOOL_DEPS="$ltmain" -+LIBTOOL_DEPS=$ltmain - - # Always use our own libtool. - LIBTOOL='$(SHELL) $(top_builddir)/libtool' -@@ -9010,7 +9432,7 @@ test -z "$LN_S" && LN_S="ln -s" - - - --if test -n "${ZSH_VERSION+set}" ; then -+if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - -@@ -9049,7 +9471,7 @@ aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. -- if test "X${COLLECT_NAMES+set}" != Xset; then -+ if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi -@@ -9060,14 +9482,14 @@ esac - ofile=libtool - can_build_shared=yes - --# All known linkers require a `.a' archive for static linking (except MSVC, -+# All known linkers require a '.a' archive for static linking (except MSVC, - # which needs '.lib'). - libext=a - --with_gnu_ld="$lt_cv_prog_gnu_ld" -+with_gnu_ld=$lt_cv_prog_gnu_ld - --old_CC="$CC" --old_CFLAGS="$CFLAGS" -+old_CC=$CC -+old_CFLAGS=$CFLAGS - - # Set sane defaults for various variables - test -z "$CC" && CC=cc -@@ -9076,15 +9498,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS - test -z "$LD" && LD=ld - test -z "$ac_objext" && ac_objext=o - --for cc_temp in $compiler""; do -- case $cc_temp in -- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -- \-*) ;; -- *) break;; -- esac --done --cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -+func_cc_basename $compiler -+cc_basename=$func_cc_basename_result - - - # Only perform the check for file, if the check method requires it -@@ -9099,22 +9514,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then - else - case $MAGIC_CMD in - [\\/*] | ?:[\\/]*) -- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; - *) -- lt_save_MAGIC_CMD="$MAGIC_CMD" -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ lt_save_MAGIC_CMD=$MAGIC_CMD -+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/${ac_tool_prefix}file; then -- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" -+ if test -f "$ac_dir/${ac_tool_prefix}file"; then -+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` -- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : -@@ -9137,13 +9552,13 @@ _LT_EOF - break - fi - done -- IFS="$lt_save_ifs" -- MAGIC_CMD="$lt_save_MAGIC_CMD" -+ IFS=$lt_save_ifs -+ MAGIC_CMD=$lt_save_MAGIC_CMD - ;; - esac - fi - --MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 - $as_echo "$MAGIC_CMD" >&6; } -@@ -9165,22 +9580,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then - else - case $MAGIC_CMD in - [\\/*] | ?:[\\/]*) -- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. -+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; - *) -- lt_save_MAGIC_CMD="$MAGIC_CMD" -- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ lt_save_MAGIC_CMD=$MAGIC_CMD -+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do -- IFS="$lt_save_ifs" -+ IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. -- if test -f $ac_dir/file; then -- lt_cv_path_MAGIC_CMD="$ac_dir/file" -+ if test -f "$ac_dir/file"; then -+ lt_cv_path_MAGIC_CMD=$ac_dir/"file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` -- MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : -@@ -9203,13 +9618,13 @@ _LT_EOF - break - fi - done -- IFS="$lt_save_ifs" -- MAGIC_CMD="$lt_save_MAGIC_CMD" -+ IFS=$lt_save_ifs -+ MAGIC_CMD=$lt_save_MAGIC_CMD - ;; - esac - fi - --MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -+MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 - $as_echo "$MAGIC_CMD" >&6; } -@@ -9230,7 +9645,7 @@ esac - - # Use C for the default configuration in the libtool script - --lt_save_CC="$CC" -+lt_save_CC=$CC - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -9288,7 +9703,7 @@ if test -n "$compiler"; then - - lt_prog_compiler_no_builtin_flag= - --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; -@@ -9304,7 +9719,7 @@ else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="-fno-rtti -fno-exceptions" -+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins -@@ -9334,7 +9749,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 - $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - --if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then -+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" - else - : -@@ -9352,17 +9767,18 @@ lt_prog_compiler_pic= - lt_prog_compiler_static= - - -- if test "$GCC" = yes; then -+ if test yes = "$GCC"; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi -+ lt_prog_compiler_pic='-fPIC' - ;; - - amigaos*) -@@ -9373,8 +9789,8 @@ lt_prog_compiler_static= - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but -- # adding the `-m68020' flag to GCC prevents building anything better, -- # like `-m68040'. -+ # adding the '-m68020' flag to GCC prevents building anything better, -+ # like '-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac -@@ -9390,6 +9806,11 @@ lt_prog_compiler_static= - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' -+ case $host_os in -+ os2*) -+ lt_prog_compiler_static='$wl-static' -+ ;; -+ esac - ;; - - darwin* | rhapsody*) -@@ -9460,7 +9881,7 @@ lt_prog_compiler_static= - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else -@@ -9468,10 +9889,29 @@ lt_prog_compiler_static= - fi - ;; - -+ darwin* | rhapsody*) -+ # PIC is the default on this platform -+ # Common symbols not allowed in MH_DYLIB files -+ lt_prog_compiler_pic='-fno-common' -+ case $cc_basename in -+ nagfor*) -+ # NAG Fortran compiler -+ lt_prog_compiler_wl='-Wl,-Wl,,' -+ lt_prog_compiler_pic='-PIC' -+ lt_prog_compiler_static='-Bstatic' -+ ;; -+ esac -+ ;; -+ - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' -+ case $host_os in -+ os2*) -+ lt_prog_compiler_static='$wl-static' -+ ;; -+ esac - ;; - - hpux9* | hpux10* | hpux11*) -@@ -9487,7 +9927,7 @@ lt_prog_compiler_static= - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? -- lt_prog_compiler_static='${wl}-a ${wl}archive' -+ lt_prog_compiler_static='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) -@@ -9496,9 +9936,9 @@ lt_prog_compiler_static= - lt_prog_compiler_static='-non_shared' - ;; - -- linux* | k*bsd*-gnu | kopensolaris*-gnu) -+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in -- # old Intel for x86_64 which still supported -KPIC. -+ # old Intel for x86_64, which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' -@@ -9523,6 +9963,12 @@ lt_prog_compiler_static= - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; -+ tcc*) -+ # Fabrice Bellard et al's Tiny C Compiler -+ lt_prog_compiler_wl='-Wl,' -+ lt_prog_compiler_pic='-fPIC' -+ lt_prog_compiler_static='-static' -+ ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) -@@ -9620,7 +10066,7 @@ lt_prog_compiler_static= - ;; - - sysv4*MP*) -- if test -d /usr/nec ;then -+ if test -d /usr/nec; then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi -@@ -9649,7 +10095,7 @@ lt_prog_compiler_static= - fi - - case $host_os in -- # For platforms which do not support PIC, -DPIC is meaningless: -+ # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; -@@ -9681,7 +10127,7 @@ else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext -- lt_compiler_flag="$lt_prog_compiler_pic -DPIC" -+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins -@@ -9711,7 +10157,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 - $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - --if test x"$lt_cv_prog_compiler_pic_works" = xyes; then -+if test yes = "$lt_cv_prog_compiler_pic_works"; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; -@@ -9743,7 +10189,7 @@ if ${lt_cv_prog_compiler_static_works+:} - $as_echo_n "(cached) " >&6 - else - lt_cv_prog_compiler_static_works=no -- save_LDFLAGS="$LDFLAGS" -+ save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then -@@ -9762,13 +10208,13 @@ else - fi - fi - $RM -r conftest* -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS=$save_LDFLAGS - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 - $as_echo "$lt_cv_prog_compiler_static_works" >&6; } - --if test x"$lt_cv_prog_compiler_static_works" = xyes; then -+if test yes = "$lt_cv_prog_compiler_static_works"; then - : - else - lt_prog_compiler_static= -@@ -9888,8 +10334,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; - - - --hard_links="nottested" --if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then -+hard_links=nottested -+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 - $as_echo_n "checking if we can lock with hard links... " >&6; } -@@ -9901,9 +10347,9 @@ $as_echo_n "checking if we can lock with - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 - $as_echo "$hard_links" >&6; } -- if test "$hard_links" = no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 --$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} -+ if test no = "$hard_links"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} - need_locks=warn - fi - else -@@ -9946,9 +10392,9 @@ $as_echo_n "checking whether the $compil - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude -- # it will be wrapped by ` (' and `)$', so one must not match beginning or -- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', -- # as well as any symbol that contains `d'. -+ # it will be wrapped by ' (' and ')$', so one must not match beginning or -+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', -+ # as well as any symbol that contains 'd'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if -@@ -9963,7 +10409,7 @@ $as_echo_n "checking whether the $compil - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. -- if test "$GCC" != yes; then -+ if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; -@@ -9971,9 +10417,12 @@ $as_echo_n "checking whether the $compil - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; -- openbsd*) -+ openbsd* | bitrig*) - with_gnu_ld=no - ;; -+ linux* | k*bsd*-gnu | gnu*) -+ link_all_deplibs=no -+ ;; - esac - - ld_shlibs=yes -@@ -9981,7 +10430,7 @@ $as_echo_n "checking whether the $compil - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no -- if test "$with_gnu_ld" = yes; then -+ if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility -@@ -10003,24 +10452,24 @@ $as_echo_n "checking whether the $compil - esac - fi - -- if test "$lt_use_gnu_ld_interface" = yes; then -+ if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty -- wlarc='${wl}' -+ wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -- export_dynamic_flag_spec='${wl}--export-dynamic' -+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' -+ export_dynamic_flag_spec='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then -- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' -+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no -- case `$LD -v 2>&1` in -+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... -@@ -10033,7 +10482,7 @@ $as_echo_n "checking whether the $compil - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken -- if test "$host_cpu" != ia64; then -+ if test ia64 != "$host_cpu"; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -@@ -10052,7 +10501,7 @@ _LT_EOF - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) -@@ -10068,7 +10517,7 @@ _LT_EOF - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME -- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi -@@ -10078,7 +10527,7 @@ _LT_EOF - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' -- export_dynamic_flag_spec='${wl}--export-all-symbols' -+ export_dynamic_flag_spec='$wl--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes -@@ -10086,61 +10535,89 @@ _LT_EOF - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -- # If the export-symbols file already is a .def file (1st line -- # is EXPORTS), use it as is; otherwise, prepend... -- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- cp $export_symbols $output_objdir/$soname.def; -- else -- echo EXPORTS > $output_objdir/$soname.def; -- cat $export_symbols >> $output_objdir/$soname.def; -- fi~ -- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' -+ # If the export-symbols file already is a .def file, use it as -+ # is; otherwise, prepend EXPORTS... -+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then -+ cp $export_symbols $output_objdir/$soname.def; -+ else -+ echo EXPORTS > $output_objdir/$soname.def; -+ cat $export_symbols >> $output_objdir/$soname.def; -+ fi~ -+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - -+ os2*) -+ hardcode_libdir_flag_spec='-L$libdir' -+ hardcode_minus_L=yes -+ allow_undefined_flag=unsupported -+ shrext_cmds=.dll -+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ prefix_cmds="$SED"~ -+ if test EXPORTS = "`$SED 1q $export_symbols`"; then -+ prefix_cmds="$prefix_cmds -e 1d"; -+ fi~ -+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ -+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' -+ enable_shared_with_static_runtimes=yes -+ ;; -+ - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no -- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -- export_dynamic_flag_spec='${wl}-E' -+ hardcode_libdir_flag_spec='$wl-rpath,$libdir' -+ export_dynamic_flag_spec='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. -- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' -+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no -- if test "$host_os" = linux-dietlibc; then -+ if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ -- && test "$tmp_diet" = no -+ && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler -- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers -- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; -@@ -10151,42 +10628,47 @@ _LT_EOF - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; -+ nagfor*) # NAGFOR 5.3 -+ tmp_sharedflag='-Wl,-shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 -- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 -- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' -+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac -- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - -- if test "x$supports_anon_versioning" = xyes; then -+ if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' -+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -+ echo "local: *; };" >> $output_objdir/$libname.ver~ -+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in -+ tcc*) -+ export_dynamic_flag_spec='-rdynamic' -+ ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' -- if test "x$supports_anon_versioning" = xyes; then -+ if test yes = "$supports_anon_versioning"; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ -- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -- echo "local: *; };" >> $output_objdir/$libname.ver~ -- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' -+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ -+ echo "local: *; };" >> $output_objdir/$libname.ver~ -+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac -@@ -10195,13 +10677,13 @@ _LT_EOF - fi - ;; - -- netbsd*) -+ netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else -- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - -@@ -10219,8 +10701,8 @@ _LT_EOF - - _LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -10232,7 +10714,7 @@ _LT_EOF - ld_shlibs=no - cat <<_LT_EOF 1>&2 - --*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot - *** reliably create shared libraries on SCO systems. Therefore, libtool - *** is disabling shared libraries support. We urge you to upgrade GNU - *** binutils to release 2.16.91.0.3 or newer. Another option is to modify -@@ -10247,9 +10729,9 @@ _LT_EOF - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi -@@ -10266,15 +10748,15 @@ _LT_EOF - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then -- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - -- if test "$ld_shlibs" = no; then -+ if test no = "$ld_shlibs"; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= -@@ -10290,7 +10772,7 @@ _LT_EOF - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes -- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then -+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported -@@ -10298,34 +10780,57 @@ _LT_EOF - ;; - - aix[4-9]*) -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' -- no_entry_flag="" -+ no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. -- # -C means demangle to AIX nm, but means don't demangle with GNU nm -- # Also, AIX nm treats weak defined symbols like other global -- # defined symbols, whereas GNU nm marks them as "W". -+ # -C means demangle to GNU nm, but means don't demangle to AIX nm. -+ # Without the "-l" option, or with the "-B" option, AIX nm treats -+ # weak defined symbols like other global defined symbols, whereas -+ # GNU nm marks them as "W". -+ # While the 'weak' keyword is ignored in the Export File, we need -+ # it in the Import File for the 'aix-soname' feature, so we have -+ # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then -- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else -- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' -+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we -- # need to do runtime linking. -+ # have runtime linking enabled, and use it for executables. -+ # For shared libraries, we enable/disable runtime linking -+ # depending on the kind of the shared library created - -+ # when "with_aix_soname,aix_use_runtimelinking" is: -+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables -+ # "aix,yes" lib.so shared, rtl:yes, for executables -+ # lib.a static archive -+ # "both,no" lib.so.V(shr.o) shared, rtl:yes -+ # lib.a(lib.so.V) shared, rtl:no, for executables -+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables -+ # lib.a(lib.so.V) shared, rtl:no -+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables -+ # lib.a static archive - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do -- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then -+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done -+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then -+ # With aix-soname=svr4, we create the lib.so.V shared archives only, -+ # so we don't have lib.a shared libs to link our executables. -+ # We have to force runtime linking in this case. -+ aix_use_runtimelinking=yes -+ LDFLAGS="$LDFLAGS -Wl,-brtl" -+ fi - ;; - esac - -@@ -10344,13 +10849,21 @@ _LT_EOF - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes -- file_list_spec='${wl}-f,' -+ file_list_spec='$wl-f,' -+ case $with_aix_soname,$aix_use_runtimelinking in -+ aix,*) ;; # traditional, no import file -+ svr4,* | *,yes) # use import file -+ # The Import File defines what to hardcode. -+ hardcode_direct=no -+ hardcode_direct_absolute=no -+ ;; -+ esac - -- if test "$GCC" = yes; then -+ if test yes = "$GCC"; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ -- collect2name=`${CC} -print-prog-name=collect2` -+ collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then -@@ -10369,35 +10882,42 @@ _LT_EOF - ;; - esac - shared_flag='-shared' -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag="$shared_flag "'${wl}-G' -+ if test yes = "$aix_use_runtimelinking"; then -+ shared_flag="$shared_flag "'$wl-G' - fi -+ # Need to ensure runtime linking is disabled for the traditional -+ # shared library, or the linker may eventually find shared libraries -+ # /with/ Import File - we do not want to mix them. -+ shared_flag_aix='-shared' -+ shared_flag_svr4='-shared $wl-G' - else - # not using gcc -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else -- if test "$aix_use_runtimelinking" = yes; then -- shared_flag='${wl}-G' -+ if test yes = "$aix_use_runtimelinking"; then -+ shared_flag='$wl-G' - else -- shared_flag='${wl}-bM:SRE' -+ shared_flag='$wl-bM:SRE' - fi -+ shared_flag_aix='$wl-bM:SRE' -+ shared_flag_svr4='$wl-G' - fi - fi - -- export_dynamic_flag_spec='${wl}-bexpall' -+ export_dynamic_flag_spec='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes -- if test "$aix_use_runtimelinking" = yes; then -+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. -- if test "${lt_cv_aix_libpath+set}" = set; then -+ if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath - else - if ${lt_cv_aix_libpath_+:} false; then : -@@ -10432,7 +10952,7 @@ fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then -- lt_cv_aix_libpath_="/usr/lib:/lib" -+ lt_cv_aix_libpath_=/usr/lib:/lib - fi - - fi -@@ -10440,17 +10960,17 @@ fi - aix_libpath=$lt_cv_aix_libpath_ - fi - -- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" -- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" -+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" -+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else -- if test "$host_cpu" = ia64; then -- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' -+ if test ia64 = "$host_cpu"; then -+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" -- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" -+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. -- if test "${lt_cv_aix_libpath+set}" = set; then -+ if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath - else - if ${lt_cv_aix_libpath_+:} false; then : -@@ -10485,7 +11005,7 @@ fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then -- lt_cv_aix_libpath_="/usr/lib:/lib" -+ lt_cv_aix_libpath_=/usr/lib:/lib - fi - - fi -@@ -10493,21 +11013,33 @@ fi - aix_libpath=$lt_cv_aix_libpath_ - fi - -- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" -+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. -- no_undefined_flag=' ${wl}-bernotok' -- allow_undefined_flag=' ${wl}-berok' -- if test "$with_gnu_ld" = yes; then -+ no_undefined_flag=' $wl-bernotok' -+ allow_undefined_flag=' $wl-berok' -+ if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. -- whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' -+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes -- # This is similar to how AIX traditionally builds its shared libraries. -- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' -+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' -+ # -brtl affects multiple linker settings, -berok does not and is overridden later -+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' -+ if test svr4 != "$with_aix_soname"; then -+ # This is similar to how AIX traditionally builds its shared libraries. -+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' -+ fi -+ if test aix != "$with_aix_soname"; then -+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' -+ else -+ # used by -dlpreopen to get the symbols -+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' -+ fi -+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; -@@ -10516,7 +11048,7 @@ fi - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) -@@ -10546,16 +11078,17 @@ fi - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -+ shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. -- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' -- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then -- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; -- else -- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; -- fi~ -- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -- linknames=' -+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' -+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then -+ cp "$export_symbols" "$output_objdir/$soname.def"; -+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; -+ else -+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; -+ fi~ -+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ -+ linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes -@@ -10564,18 +11097,18 @@ fi - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ -- lt_tool_outputfile="@TOOL_OUTPUT@"~ -- case $lt_outputfile in -- *.exe|*.EXE) ;; -- *) -- lt_outputfile="$lt_outputfile.exe" -- lt_tool_outputfile="$lt_tool_outputfile.exe" -- ;; -- esac~ -- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then -- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -- $RM "$lt_outputfile.manifest"; -- fi' -+ lt_tool_outputfile="@TOOL_OUTPUT@"~ -+ case $lt_outputfile in -+ *.exe|*.EXE) ;; -+ *) -+ lt_outputfile=$lt_outputfile.exe -+ lt_tool_outputfile=$lt_tool_outputfile.exe -+ ;; -+ esac~ -+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then -+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; -+ $RM "$lt_outputfile.manifest"; -+ fi' - ;; - *) - # Assume MSVC wrapper -@@ -10584,7 +11117,7 @@ fi - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. -- shrext_cmds=".dll" -+ shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. -@@ -10603,24 +11136,24 @@ fi - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported -- if test "$lt_cv_ld_force_load" = "yes"; then -- whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' -+ if test yes = "$lt_cv_ld_force_load"; then -+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes -- allow_undefined_flag="$_lt_dar_allow_undefined" -+ allow_undefined_flag=$_lt_dar_allow_undefined - case $cc_basename in -- ifort*) _lt_dar_can_shared=yes ;; -+ ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac -- if test "$_lt_dar_can_shared" = "yes"; then -+ if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all -- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" -- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" -- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" -- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" -+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" -+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" -+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" -+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - - else - ld_shlibs=no -@@ -10662,33 +11195,33 @@ fi - ;; - - hpux9*) -- if test "$GCC" = yes; then -- archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ if test yes = "$GCC"; then -+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else -- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' -+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes -- export_dynamic_flag_spec='${wl}-E' -+ export_dynamic_flag_spec='$wl-E' - ;; - - hpux10*) -- if test "$GCC" = yes && test "$with_gnu_ld" = no; then -- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes,no = "$GCC,$with_gnu_ld"; then -+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -- if test "$with_gnu_ld" = no; then -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ if test no = "$with_gnu_ld"; then -+ hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes -- export_dynamic_flag_spec='${wl}-E' -+ export_dynamic_flag_spec='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes -@@ -10696,25 +11229,25 @@ fi - ;; - - hpux11*) -- if test "$GCC" = yes && test "$with_gnu_ld" = no; then -+ if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) -- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) -- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - -@@ -10726,7 +11259,7 @@ if ${lt_cv_prog_compiler__b+:} false; th - $as_echo_n "(cached) " >&6 - else - lt_cv_prog_compiler__b=no -- save_LDFLAGS="$LDFLAGS" -+ save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then -@@ -10745,14 +11278,14 @@ else - fi - fi - $RM -r conftest* -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS=$save_LDFLAGS - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 - $as_echo "$lt_cv_prog_compiler__b" >&6; } - --if test x"$lt_cv_prog_compiler__b" = xyes; then -- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -+if test yes = "$lt_cv_prog_compiler__b"; then -+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -10760,8 +11293,8 @@ fi - ;; - esac - fi -- if test "$with_gnu_ld" = no; then -- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' -+ if test no = "$with_gnu_ld"; then -+ hardcode_libdir_flag_spec='$wl+b $wl$libdir' - hardcode_libdir_separator=: - - case $host_cpu in -@@ -10772,7 +11305,7 @@ fi - *) - hardcode_direct=yes - hardcode_direct_absolute=yes -- export_dynamic_flag_spec='${wl}-E' -+ export_dynamic_flag_spec='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. -@@ -10783,8 +11316,8 @@ fi - ;; - - irix5* | irix6* | nonstopux*) -- if test "$GCC" = yes; then -- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ if test yes = "$GCC"; then -+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. -@@ -10794,8 +11327,8 @@ $as_echo_n "checking whether the $host_o - if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 - else -- save_LDFLAGS="$LDFLAGS" -- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" -+ save_LDFLAGS=$LDFLAGS -+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - int foo (void) { return 0; } -@@ -10807,25 +11340,36 @@ else - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -- LDFLAGS="$save_LDFLAGS" -+ LDFLAGS=$save_LDFLAGS - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 - $as_echo "$lt_cv_irix_exported_symbol" >&6; } -- if test "$lt_cv_irix_exported_symbol" = yes; then -- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -+ if test yes = "$lt_cv_irix_exported_symbol"; then -+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi -+ link_all_deplibs=no - else -- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' -+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' -+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - -- netbsd*) -+ linux*) -+ case $cc_basename in -+ tcc*) -+ # Fabrice Bellard et al's Tiny C Compiler -+ ld_shlibs=yes -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ ;; -+ esac -+ ;; -+ -+ netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else -@@ -10839,7 +11383,7 @@ $as_echo "$lt_cv_irix_exported_symbol" > - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; -@@ -10847,27 +11391,19 @@ $as_echo "$lt_cv_irix_exported_symbol" > - *nto* | *qnx*) - ;; - -- openbsd*) -+ openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' -- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -- export_dynamic_flag_spec='${wl}-E' -+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' -+ hardcode_libdir_flag_spec='$wl-rpath,$libdir' -+ export_dynamic_flag_spec='$wl-E' - else -- case $host_os in -- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) -- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' -- hardcode_libdir_flag_spec='-R$libdir' -- ;; -- *) -- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' -- ;; -- esac -+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' -+ hardcode_libdir_flag_spec='$wl-rpath,$libdir' - fi - else - ld_shlibs=no -@@ -10878,33 +11414,53 @@ $as_echo "$lt_cv_irix_exported_symbol" > - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported -- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' -- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' -+ shrext_cmds=.dll -+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ -+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ -+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ -+ $ECHO EXPORTS >> $output_objdir/$libname.def~ -+ prefix_cmds="$SED"~ -+ if test EXPORTS = "`$SED 1q $export_symbols`"; then -+ prefix_cmds="$prefix_cmds -e 1d"; -+ fi~ -+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ -+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ -+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ -+ emximp -o $lib $output_objdir/$libname.def' -+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' -+ enable_shared_with_static_runtimes=yes - ;; - - osf3*) -- if test "$GCC" = yes; then -- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -+ if test yes = "$GCC"; then -+ allow_undefined_flag=' $wl-expect_unresolved $wl\*' -+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - archive_cmds_need_lc='no' -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag -- if test "$GCC" = yes; then -- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' -- archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' -- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -+ if test yes = "$GCC"; then -+ allow_undefined_flag=' $wl-expect_unresolved $wl\*' -+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' -+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' -- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' -+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ -- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' -+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' -@@ -10915,24 +11471,24 @@ $as_echo "$lt_cv_irix_exported_symbol" > - - solaris*) - no_undefined_flag=' -z defs' -- if test "$GCC" = yes; then -- wlarc='${wl}' -- archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes = "$GCC"; then -+ wlarc='$wl' -+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' -- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' -+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' -+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) -- wlarc='${wl}' -- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ wlarc='$wl' -+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ -- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' -+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi -@@ -10942,11 +11498,11 @@ $as_echo "$lt_cv_irix_exported_symbol" > - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, -- # but understands `-z linker_flag'. GCC discards it without `$wl', -+ # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) -- if test "$GCC" = yes; then -- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' -+ if test yes = "$GCC"; then -+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi -@@ -10956,10 +11512,10 @@ $as_echo "$lt_cv_irix_exported_symbol" > - ;; - - sunos4*) -- if test "x$host_vendor" = xsequent; then -+ if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. -- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi -@@ -11008,43 +11564,43 @@ $as_echo "$lt_cv_irix_exported_symbol" > - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) -- no_undefined_flag='${wl}-z,text' -+ no_undefined_flag='$wl-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - -- if test "$GCC" = yes; then -- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes = "$GCC"; then -+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) -- # Note: We can NOT use -z defs as we might desire, because we do not -+ # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. -- no_undefined_flag='${wl}-z,text' -- allow_undefined_flag='${wl}-z,nodefs' -+ no_undefined_flag='$wl-z,text' -+ allow_undefined_flag='$wl-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no -- hardcode_libdir_flag_spec='${wl}-R,$libdir' -+ hardcode_libdir_flag_spec='$wl-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes -- export_dynamic_flag_spec='${wl}-Bexport' -+ export_dynamic_flag_spec='$wl-Bexport' - runpath_var='LD_RUN_PATH' - -- if test "$GCC" = yes; then -- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ if test yes = "$GCC"; then -+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else -- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' -+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - -@@ -11059,10 +11615,10 @@ $as_echo "$lt_cv_irix_exported_symbol" > - ;; - esac - -- if test x$host_vendor = xsni; then -+ if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) -- export_dynamic_flag_spec='${wl}-Blargedynsym' -+ export_dynamic_flag_spec='$wl-Blargedynsym' - ;; - esac - fi -@@ -11070,7 +11626,7 @@ $as_echo "$lt_cv_irix_exported_symbol" > - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 - $as_echo "$ld_shlibs" >&6; } --test "$ld_shlibs" = no && can_build_shared=no -+test no = "$ld_shlibs" && can_build_shared=no - - with_gnu_ld=$with_gnu_ld - -@@ -11096,7 +11652,7 @@ x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - -- if test "$enable_shared" = yes && test "$GCC" = yes; then -+ if test yes,yes = "$GCC,$enable_shared"; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. -@@ -11311,14 +11867,14 @@ esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 - $as_echo_n "checking dynamic linker characteristics... " >&6; } - --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - case $host_os in -- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; -- *) lt_awk_arg="/^libraries:/" ;; -+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; -+ *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in -- mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; -- *) lt_sed_strip_eq="s,=/,/,g" ;; -+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; -+ *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in -@@ -11334,28 +11890,35 @@ if test "$GCC" = yes; then - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it -- # and add multilib dir if necessary. -+ # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= -- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` -+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` -+ # ...but if some path component already ends with the multilib dir we assume -+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). -+ case "$lt_multi_os_dir; $lt_search_path_spec " in -+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) -+ lt_multi_os_dir= -+ ;; -+ esac - for lt_sys_path in $lt_search_path_spec; do -- if test -d "$lt_sys_path/$lt_multi_os_dir"; then -- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" -- else -+ if test -d "$lt_sys_path$lt_multi_os_dir"; then -+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" -+ elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' --BEGIN {RS=" "; FS="/|\n";} { -- lt_foo=""; -- lt_count=0; -+BEGIN {RS = " "; FS = "/|\n";} { -+ lt_foo = ""; -+ lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { -- lt_foo="/" $lt_i lt_foo; -+ lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } -@@ -11369,7 +11932,7 @@ BEGIN {RS=" "; FS="/|\n";} { - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ -- $SED 's,/\([A-Za-z]:\),\1,g'` ;; -+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` - else -@@ -11378,7 +11941,7 @@ fi - library_names_spec= - libname_spec='lib$name' - soname_spec= --shrext_cmds=".so" -+shrext_cmds=.so - postinstall_cmds= - postuninstall_cmds= - finish_cmds= -@@ -11395,14 +11958,16 @@ hardcode_into_libs=no - # flags to be left without arguments - need_version=unknown - -+ -+ - case $host_os in - aix3*) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. -- soname_spec='${libname}${release}${shared_ext}$major' -+ soname_spec='$libname$release$shared_ext$major' - ;; - - aix[4-9]*) -@@ -11410,41 +11975,91 @@ aix[4-9]*) - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes -- if test "$host_cpu" = ia64; then -+ if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 -- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with -- # the line `#! .'. This would cause the generated library to -- # depend on `.', always an invalid library. This was fixed in -+ # the line '#! .'. This would cause the generated library to -+ # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' -- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then -+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac -- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct -+ # Using Import Files as archive members, it is possible to support -+ # filename-based versioning of shared library archives on AIX. While -+ # this would work for both with and without runtime linking, it will -+ # prevent static linking of such archives. So we do filename-based -+ # shared library versioning with .so extension only, which is used -+ # when both runtime linking and shared linking is enabled. -+ # Unfortunately, runtime linking may impact performance, so we do -+ # not want this to be the default eventually. Also, we use the -+ # versioned .so libs for executables only if there is the -brtl -+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. -+ # To allow for filename-based versioning support, we need to create -+ # libNAME.so.V as an archive file, containing: -+ # *) an Import File, referring to the versioned filename of the -+ # archive as well as the shared archive member, telling the -+ # bitwidth (32 or 64) of that shared object, and providing the -+ # list of exported symbols of that shared object, eventually -+ # decorated with the 'weak' keyword -+ # *) the shared object with the F_LOADONLY flag set, to really avoid -+ # it being seen by the linker. -+ # At run time we better use the real file rather than another symlink, -+ # but for link time we create the symlink libNAME.so -> libNAME.so.V -+ -+ case $with_aix_soname,$aix_use_runtimelinking in -+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. -- if test "$aix_use_runtimelinking" = yes; then -+ aix,yes) # traditional libtool -+ dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- else -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ ;; -+ aix,no) # traditional AIX only -+ dynamic_linker='AIX lib.a(lib.so.V)' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. -- library_names_spec='${libname}${release}.a $libname.a' -- soname_spec='${libname}${release}${shared_ext}$major' -- fi -+ library_names_spec='$libname$release.a $libname.a' -+ soname_spec='$libname$release$shared_ext$major' -+ ;; -+ svr4,*) # full svr4 only -+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" -+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' -+ # We do not specify a path in Import Files, so LIBPATH fires. -+ shlibpath_overrides_runpath=yes -+ ;; -+ *,yes) # both, prefer svr4 -+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" -+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' -+ # unpreferred sharedlib libNAME.a needs extra handling -+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' -+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' -+ # We do not specify a path in Import Files, so LIBPATH fires. -+ shlibpath_overrides_runpath=yes -+ ;; -+ *,no) # both, prefer aix -+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" -+ library_names_spec='$libname$release.a $libname.a' -+ soname_spec='$libname$release$shared_ext$major' -+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling -+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' -+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' -+ ;; -+ esac - shlibpath_var=LIBPATH - fi - ;; -@@ -11454,18 +12069,18 @@ amigaos*) - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. -- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' -+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - - beos*) -- library_names_spec='${libname}${shared_ext}' -+ library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; -@@ -11473,8 +12088,8 @@ beos*) - bsdi[45]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" -@@ -11486,7 +12101,7 @@ bsdi[45]*) - - cygwin* | mingw* | pw32* | cegcc*) - version_type=windows -- shrext_cmds=".dll" -+ shrext_cmds=.dll - need_version=no - need_lib_prefix=no - -@@ -11495,8 +12110,8 @@ cygwin* | mingw* | pw32* | cegcc*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ postinstall_cmds='base_file=`basename \$file`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ -@@ -11512,17 +12127,17 @@ cygwin* | mingw* | pw32* | cegcc*) - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' -- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix -- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' -- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' -@@ -11531,8 +12146,8 @@ cygwin* | mingw* | pw32* | cegcc*) - *,cl*) - # Native MSVC - libname_spec='$name' -- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' -- library_names_spec='${libname}.dll.lib' -+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' -+ library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) -@@ -11559,7 +12174,7 @@ cygwin* | mingw* | pw32* | cegcc*) - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) -- sys_lib_search_path_spec="$LIB" -+ sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` -@@ -11572,8 +12187,8 @@ cygwin* | mingw* | pw32* | cegcc*) - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds -- postinstall_cmds='base_file=`basename \${file}`~ -- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ -+ postinstall_cmds='base_file=`basename \$file`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' -@@ -11586,7 +12201,7 @@ cygwin* | mingw* | pw32* | cegcc*) - - *) - # Assume MSVC wrapper -- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' -+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac -@@ -11599,8 +12214,8 @@ darwin* | rhapsody*) - version_type=darwin - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' -- soname_spec='${libname}${release}${major}$shared_ext' -+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' -+ soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -@@ -11613,8 +12228,8 @@ dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -@@ -11632,12 +12247,13 @@ freebsd* | dragonfly*) - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) -- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac -@@ -11662,26 +12278,15 @@ freebsd* | dragonfly*) - esac - ;; - --gnu*) -- version_type=linux # correct to gnu/linux during the next big refactor -- need_lib_prefix=no -- need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- shlibpath_var=LD_LIBRARY_PATH -- shlibpath_overrides_runpath=no -- hardcode_into_libs=yes -- ;; -- - haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH -- shlibpath_overrides_runpath=yes -+ shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; -@@ -11699,14 +12304,15 @@ hpux9* | hpux10* | hpux11*) - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -- if test "X$HPUX_IA64_MODE" = X32; then -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' -+ if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" -+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" -+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi -- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' -@@ -11714,8 +12320,8 @@ hpux9* | hpux10* | hpux11*) - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; -@@ -11724,8 +12330,8 @@ hpux9* | hpux10* | hpux11*) - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... -@@ -11738,8 +12344,8 @@ interix[3-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -11750,7 +12356,7 @@ irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) -- if test "$lt_cv_prog_gnu_ld" = yes; then -+ if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix -@@ -11758,8 +12364,8 @@ irix5* | irix6* | nonstopux*) - esac - need_lib_prefix=no - need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' -+ soname_spec='$libname$release$shared_ext$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= -@@ -11778,8 +12384,8 @@ irix5* | irix6* | nonstopux*) - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no -- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" -- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" -+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" -+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -@@ -11788,13 +12394,33 @@ linux*oldld* | linux*aout* | linux*coff* - dynamic_linker=no - ;; - -+linux*android*) -+ version_type=none # Android doesn't support versioned libraries. -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='$libname$release$shared_ext' -+ soname_spec='$libname$release$shared_ext' -+ finish_cmds= -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes -+ -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ -+ dynamic_linker='Android linker' -+ # Don't embed -rpath directories since the linker doesn't support them. -+ hardcode_libdir_flag_spec='-L$libdir' -+ ;; -+ - # This must be glibc/ELF. --linux* | k*bsd*-gnu | kopensolaris*-gnu) -+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no -@@ -11838,14 +12464,15 @@ fi - # before this can be enabled. - hardcode_into_libs=yes - -- # Add ABI-specific directories to the system library path. -- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" -- -- # Append ld.so.conf contents to the search path -+ # Ideally, we could use ldconfig to report *all* directores which are -+ # searched for libraries, however this is still not possible. Aside from not -+ # being certain /sbin/ldconfig is available, command -+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, -+ # even though it is searched at run-time. Try to do the best guess by -+ # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" -- -+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -@@ -11857,17 +12484,29 @@ fi - dynamic_linker='GNU/Linux ld.so' - ;; - -+netbsdelf*-gnu) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -+ soname_spec='${libname}${release}${shared_ext}$major' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ hardcode_into_libs=yes -+ dynamic_linker='NetBSD ld.elf_so' -+ ;; -+ - netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH -@@ -11877,7 +12516,7 @@ netbsd*) - - newsos6) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; -@@ -11886,58 +12525,68 @@ newsos6) - version_type=qnx - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - --openbsd*) -+openbsd* | bitrig*) - version_type=sunos -- sys_lib_dlsearch_path_spec="/usr/lib" -+ sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no -- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. -- case $host_os in -- openbsd3.3 | openbsd3.3.*) need_version=yes ;; -- *) need_version=no ;; -- esac -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -- shlibpath_var=LD_LIBRARY_PATH -- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then -- case $host_os in -- openbsd2.[89] | openbsd2.[89].*) -- shlibpath_overrides_runpath=no -- ;; -- *) -- shlibpath_overrides_runpath=yes -- ;; -- esac -+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then -+ need_version=no - else -- shlibpath_overrides_runpath=yes -+ need_version=yes - fi -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=yes - ;; - - os2*) - libname_spec='$name' -- shrext_cmds=".dll" -+ version_type=windows -+ shrext_cmds=.dll -+ need_version=no - need_lib_prefix=no -- library_names_spec='$libname${shared_ext} $libname.a' -+ # OS/2 can only load a DLL with a base name of 8 characters or less. -+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; -+ v=$($ECHO $release$versuffix | tr -d .-); -+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); -+ $ECHO $n$v`$shared_ext' -+ library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' -- shlibpath_var=LIBPATH -+ shlibpath_var=BEGINLIBPATH -+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec -+ postinstall_cmds='base_file=`basename \$file`~ -+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ -+ dldir=$destdir/`dirname \$dlpath`~ -+ test -d \$dldir || mkdir -p \$dldir~ -+ $install_prog $dir/$dlname \$dldir/$dlname~ -+ chmod a+x \$dldir/$dlname~ -+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then -+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; -+ fi' -+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ -+ dlpath=$dir/\$dldll~ -+ $RM \$dlpath' - ;; - - osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no -- soname_spec='${libname}${release}${shared_ext}$major' -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ soname_spec='$libname$release$shared_ext$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" -- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" -+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - - rdos*) -@@ -11948,8 +12597,8 @@ solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes -@@ -11959,11 +12608,11 @@ solaris*) - - sunos4*) - version_type=sunos -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes -- if test "$with_gnu_ld" = yes; then -+ if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes -@@ -11971,8 +12620,8 @@ sunos4*) - - sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) -@@ -11993,24 +12642,24 @@ sysv4 | sysv4.3*) - ;; - - sysv4*MP*) -- if test -d /usr/nec ;then -+ if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' -- soname_spec='$libname${shared_ext}.$major' -+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' -+ soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) -- version_type=freebsd-elf -+ version_type=sco - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes -- if test "$with_gnu_ld" = yes; then -+ if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' -@@ -12028,7 +12677,7 @@ tpf*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes -@@ -12036,8 +12685,8 @@ tpf*) - - uts4*) - version_type=linux # correct to gnu/linux during the next big refactor -- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' -- soname_spec='${libname}${release}${shared_ext}$major' -+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' -+ soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -@@ -12047,20 +12696,35 @@ uts4*) - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 - $as_echo "$dynamic_linker" >&6; } --test "$dynamic_linker" = no && can_build_shared=no -+test no = "$dynamic_linker" && can_build_shared=no - - variables_saved_for_relink="PATH $shlibpath_var $runpath_var" --if test "$GCC" = yes; then -+if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" - fi - --if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then -- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then -+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec - fi --if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then -- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -+ -+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then -+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec - fi - -+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec -+ -+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" -+ -+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH -+ -+ -+ -+ -+ -+ - - - -@@ -12157,15 +12821,15 @@ $as_echo_n "checking how to hardcode lib - hardcode_action= - if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || -- test "X$hardcode_automatic" = "Xyes" ; then -+ test yes = "$hardcode_automatic"; then - - # We can hardcode non-existent directories. -- if test "$hardcode_direct" != no && -+ if test no != "$hardcode_direct" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one -- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && -- test "$hardcode_minus_L" != no; then -+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && -+ test no != "$hardcode_minus_L"; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else -@@ -12180,12 +12844,12 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 - $as_echo "$hardcode_action" >&6; } - --if test "$hardcode_action" = relink || -- test "$inherit_rpath" = yes; then -+if test relink = "$hardcode_action" || -+ test yes = "$inherit_rpath"; then - # Fast installation is not supported - enable_fast_install=no --elif test "$shlibpath_overrides_runpath" = yes || -- test "$enable_shared" = no; then -+elif test yes = "$shlibpath_overrides_runpath" || -+ test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless - fi -@@ -12195,7 +12859,7 @@ fi - - - -- if test "x$enable_dlopen" != xyes; then -+ if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -@@ -12205,23 +12869,23 @@ else - - case $host_os in - beos*) -- lt_cv_dlopen="load_add_on" -+ lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) -- lt_cv_dlopen="LoadLibrary" -+ lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) -- lt_cv_dlopen="dlopen" -+ lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) -- # if libdl is installed we need to link against it -+ # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 - $as_echo_n "checking for dlopen in -ldl... " >&6; } - if ${ac_cv_lib_dl_dlopen+:} false; then : -@@ -12259,10 +12923,10 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 - $as_echo "$ac_cv_lib_dl_dlopen" >&6; } - if test "x$ac_cv_lib_dl_dlopen" = xyes; then : -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl - else - -- lt_cv_dlopen="dyld" -+ lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -@@ -12270,10 +12934,18 @@ fi - - ;; - -+ tpf*) -+ # Don't try to run any link tests for TPF. We know it's impossible -+ # because TPF is a cross-compiler, and we know how we open DSOs. -+ lt_cv_dlopen=dlopen -+ lt_cv_dlopen_libs= -+ lt_cv_dlopen_self=no -+ ;; -+ - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" - if test "x$ac_cv_func_shl_load" = xyes; then : -- lt_cv_dlopen="shl_load" -+ lt_cv_dlopen=shl_load - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 - $as_echo_n "checking for shl_load in -ldld... " >&6; } -@@ -12312,11 +12984,11 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 - $as_echo "$ac_cv_lib_dld_shl_load" >&6; } - if test "x$ac_cv_lib_dld_shl_load" = xyes; then : -- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld - else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" - if test "x$ac_cv_func_dlopen" = xyes; then : -- lt_cv_dlopen="dlopen" -+ lt_cv_dlopen=dlopen - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 - $as_echo_n "checking for dlopen in -ldl... " >&6; } -@@ -12355,7 +13027,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 - $as_echo "$ac_cv_lib_dl_dlopen" >&6; } - if test "x$ac_cv_lib_dl_dlopen" = xyes; then : -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 - $as_echo_n "checking for dlopen in -lsvld... " >&6; } -@@ -12394,7 +13066,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 - $as_echo "$ac_cv_lib_svld_dlopen" >&6; } - if test "x$ac_cv_lib_svld_dlopen" = xyes; then : -- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 - $as_echo_n "checking for dld_link in -ldld... " >&6; } -@@ -12433,7 +13105,7 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 - $as_echo "$ac_cv_lib_dld_dld_link" >&6; } - if test "x$ac_cv_lib_dld_dld_link" = xyes; then : -- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld - fi - - -@@ -12454,21 +13126,21 @@ fi - ;; - esac - -- if test "x$lt_cv_dlopen" != xno; then -- enable_dlopen=yes -- else -+ if test no = "$lt_cv_dlopen"; then - enable_dlopen=no -+ else -+ enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) -- save_CPPFLAGS="$CPPFLAGS" -- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" -+ save_CPPFLAGS=$CPPFLAGS -+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - -- save_LDFLAGS="$LDFLAGS" -+ save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - -- save_LIBS="$LIBS" -+ save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -@@ -12476,7 +13148,7 @@ $as_echo_n "checking whether a program c - if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then : -+ if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self=cross - else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -@@ -12523,9 +13195,9 @@ else - # endif - #endif - --/* When -fvisbility=hidden is used, assume the code has been annotated -+/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ --#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) - int fnord () __attribute__((visibility("default"))); - #endif - -@@ -12555,7 +13227,7 @@ _LT_EOF - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -12575,14 +13247,14 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 - $as_echo "$lt_cv_dlopen_self" >&6; } - -- if test "x$lt_cv_dlopen_self" = xyes; then -+ if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 - $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } - if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then : -+ if test yes = "$cross_compiling"; then : - lt_cv_dlopen_self_static=cross - else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 -@@ -12629,9 +13301,9 @@ else - # endif - #endif - --/* When -fvisbility=hidden is used, assume the code has been annotated -+/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ --#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) - int fnord () __attribute__((visibility("default"))); - #endif - -@@ -12661,7 +13333,7 @@ _LT_EOF - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then -+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in -@@ -12682,9 +13354,9 @@ fi - $as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - -- CPPFLAGS="$save_CPPFLAGS" -- LDFLAGS="$save_LDFLAGS" -- LIBS="$save_LIBS" -+ CPPFLAGS=$save_CPPFLAGS -+ LDFLAGS=$save_LDFLAGS -+ LIBS=$save_LIBS - ;; - esac - -@@ -12728,7 +13400,7 @@ else - # FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) -- if test -n "$STRIP" ; then -+ if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -@@ -12756,7 +13428,7 @@ fi - - - -- # Report which library types will actually be built -+ # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 - $as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -@@ -12764,13 +13436,13 @@ $as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 - $as_echo_n "checking whether to build shared libraries... " >&6; } -- test "$can_build_shared" = "no" && enable_shared=no -+ test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) -- test "$enable_shared" = yes && enable_static=no -+ test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' -@@ -12778,8 +13450,12 @@ $as_echo_n "checking whether to build sh - ;; - - aix[4-9]*) -- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -+ if test ia64 != "$host_cpu"; then -+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in -+ yes,aix,yes) ;; # shared object as lib.so file only -+ yes,svr4,*) ;; # shared object as lib.so archive member only -+ yes,*) enable_static=no ;; # shared object in lib.a archive as well -+ esac - fi - ;; - esac -@@ -12789,7 +13465,7 @@ $as_echo "$enable_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 - $as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. -- test "$enable_shared" = yes || enable_static=yes -+ test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 - $as_echo "$enable_static" >&6; } - -@@ -12803,7 +13479,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - --CC="$lt_save_CC" -+CC=$lt_save_CC - - - -@@ -18442,7 +19118,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ - # - # INIT-COMMANDS - # --AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" -+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" - - - # The HP-UX ksh and POSIX shell print the target directory to stdout -@@ -18458,6 +19134,7 @@ enable_shared='`$ECHO "$enable_shared" | - enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' - pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' - enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' - SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' - ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' - PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' -@@ -18507,10 +19184,13 @@ compiler='`$ECHO "$compiler" | $SED "$de - GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' - nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' - lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' - objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' - MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' - lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -@@ -18575,7 +19255,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SE - finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' - hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' - sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' --sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' - hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' - enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' - enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -@@ -18626,9 +19307,12 @@ CFLAGS \ - compiler \ - lt_cv_sys_global_symbol_pipe \ - lt_cv_sys_global_symbol_to_cdecl \ -+lt_cv_sys_global_symbol_to_import \ - lt_cv_sys_global_symbol_to_c_name_address \ - lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -+lt_cv_nm_interface \ - nm_file_list_spec \ -+lt_cv_truncate_bin \ - lt_prog_compiler_no_builtin_flag \ - lt_prog_compiler_pic \ - lt_prog_compiler_wl \ -@@ -18663,7 +19347,7 @@ old_striplib \ - striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) -- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" -+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" -@@ -18690,10 +19374,11 @@ postinstall_cmds \ - postuninstall_cmds \ - finish_cmds \ - sys_lib_search_path_spec \ --sys_lib_dlsearch_path_spec; do -+configure_time_dlsearch_path \ -+configure_time_lt_sys_library_path; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) -- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" -+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" -@@ -18702,19 +19387,16 @@ sys_lib_dlsearch_path_spec; do - done - - ac_aux_dir='$ac_aux_dir' --xsi_shell='$xsi_shell' --lt_shell_append='$lt_shell_append' - --# See if we are running on zsh, and set the options which allow our -+# See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes INIT. --if test -n "\${ZSH_VERSION+set}" ; then -+if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' -- TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - -@@ -19406,29 +20088,35 @@ $as_echo "$as_me: executing $ac_file com - # Older Autoconf quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. -- case $CONFIG_FILES in -- *\'*) eval set x "$CONFIG_FILES" ;; -- *) set x $CONFIG_FILES ;; -- esac -+ # TODO: see whether this extra hack can be removed once we start -+ # requiring Autoconf 2.70 or later. -+ case $CONFIG_FILES in #( -+ *\'*) : -+ eval set x "$CONFIG_FILES" ;; #( -+ *) : -+ set x $CONFIG_FILES ;; #( -+ *) : -+ ;; -+esac - shift -- for mf -+ # Used to flag and report bootstrapping failures. -+ am_rc=0 -+ for am_mf - do - # Strip MF so we end up with the name of the file. -- mf=`echo "$mf" | sed -e 's/:.*$//'` -- # Check whether this is an Automake generated Makefile or not. -- # We used to match only the files named 'Makefile.in', but -- # some people rename them; so instead we look at the file content. -- # Grep'ing the first line is not enough: some people post-process -- # each Makefile.in and add a new line on top of each file to say so. -- # Grep'ing the whole file is not good either: AIX grep has a line -+ am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` -+ # Check whether this is an Automake generated Makefile which includes -+ # dependency-tracking related rules and includes. -+ # Grep'ing the whole file directly is not great: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. -- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then -- dirpart=`$as_dirname -- "$mf" || --$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$mf" : 'X\(//\)[^/]' \| \ -- X"$mf" : 'X\(//\)$' \| \ -- X"$mf" : 'X\(/\)' \| . 2>/dev/null || --$as_echo X"$mf" | -+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ -+ || continue -+ am_dirpart=`$as_dirname -- "$am_mf" || -+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$am_mf" : 'X\(//\)[^/]' \| \ -+ X"$am_mf" : 'X\(//\)$' \| \ -+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X"$am_mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q -@@ -19446,106 +20134,98 @@ $as_echo X"$mf" | - q - } - s/.*/./; q'` -- else -- continue -- fi -- # Extract the definition of DEPDIR, am__include, and am__quote -- # from the Makefile without running 'make'. -- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` -- test -z "$DEPDIR" && continue -- am__include=`sed -n 's/^am__include = //p' < "$mf"` -- test -z "$am__include" && continue -- am__quote=`sed -n 's/^am__quote = //p' < "$mf"` -- # Find all dependency output files, they are included files with -- # $(DEPDIR) in their names. We invoke sed twice because it is the -- # simplest approach to changing $(DEPDIR) to its actual value in the -- # expansion. -- for file in `sed -n " -- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ -- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do -- # Make sure the directory exists. -- test -f "$dirpart/$file" && continue -- fdir=`$as_dirname -- "$file" || --$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$file" : 'X\(//\)[^/]' \| \ -- X"$file" : 'X\(//\)$' \| \ -- X"$file" : 'X\(/\)' \| . 2>/dev/null || --$as_echo X"$file" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)[^/].*/{ -+ am_filepart=`$as_basename -- "$am_mf" || -+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ -+ X"$am_mf" : 'X\(//\)$' \| \ -+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X/"$am_mf" | -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } -- /^X\(\/\/\)$/{ -+ /^X\/\(\/\/\)$/{ - s//\1/ - q - } -- /^X\(\/\).*/{ -+ /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` -- as_dir=$dirpart/$fdir; as_fn_mkdir_p -- # echo "creating $dirpart/$file" -- echo '# dummy' > "$dirpart/$file" -- done -+ { echo "$as_me:$LINENO: cd "$am_dirpart" \ -+ && sed -e '/# am--include-marker/d' "$am_filepart" \ -+ | $MAKE -f - am--depfiles" >&5 -+ (cd "$am_dirpart" \ -+ && sed -e '/# am--include-marker/d' "$am_filepart" \ -+ | $MAKE -f - am--depfiles) >&5 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } || am_rc=$? - done -+ if test $am_rc -ne 0; then -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "Something went wrong bootstrapping makefile fragments -+ for automatic dependency tracking. Try re-running configure with the -+ '--disable-dependency-tracking' option to at least be able to build -+ the package (albeit without support for automatic dependency tracking). -+See \`config.log' for more details" "$LINENO" 5; } -+ fi -+ { am_dirpart=; unset am_dirpart;} -+ { am_filepart=; unset am_filepart;} -+ { am_mf=; unset am_mf;} -+ { am_rc=; unset am_rc;} -+ rm -f conftest-deps.mk - } - ;; - "libtool":C) - -- # See if we are running on zsh, and set the options which allow our -+ # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. -- if test -n "${ZSH_VERSION+set}" ; then -+ if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - -- cfgfile="${ofile}T" -+ cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" - #! $SHELL -- --# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. --# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -+# Generated automatically by $as_me ($PACKAGE) $VERSION - # NOTE: Changes made to this file will be lost: look at ltmain.sh. -+ -+# Provide generalized library-building support services. -+# Written by Gordon Matzigkeit, 1996 -+ -+# Copyright (C) 2014 Free Software Foundation, Inc. -+# This is free software; see the source for copying conditions. There is NO -+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -+ -+# GNU Libtool is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of of the License, or -+# (at your option) any later version. - # --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, --# 2006, 2007, 2008, 2009, 2010, 2011 Free Software --# Foundation, Inc. --# Written by Gordon Matzigkeit, 1996 --# --# This file is part of GNU Libtool. --# --# GNU Libtool is free software; you can redistribute it and/or --# modify it under the terms of the GNU General Public License as --# published by the Free Software Foundation; either version 2 of --# the License, or (at your option) any later version. --# --# As a special exception to the GNU General Public License, --# if you distribute this file as part of a program or library that --# is built using GNU Libtool, you may include this file under the --# same distribution terms that you use for the rest of that program. -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program or library that is built -+# using GNU Libtool, you may include this file under the same -+# distribution terms that you use for the rest of that program. - # --# GNU Libtool is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# GNU Libtool is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with GNU Libtool; see the file COPYING. If not, a copy --# can be downloaded from http://www.gnu.org/licenses/gpl.html, or --# obtained by writing to the Free Software Foundation, Inc., --# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# along with this program. If not, see . - - - # The names of the tagged configurations supported by this script. --available_tags="" -+available_tags='' -+ -+# Configured defaults for sys_lib_dlsearch_path munging. -+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - - # ### BEGIN LIBTOOL CONFIG - -@@ -19565,6 +20245,9 @@ pic_mode=$pic_mode - # Whether or not to optimize for fast installation. - fast_install=$enable_fast_install - -+# Shared archive member basename,for filename based shared library versioning on AIX. -+shared_archive_member_spec=$shared_archive_member_spec -+ - # Shell to use when invoking shell scripts. - SHELL=$lt_SHELL - -@@ -19682,18 +20365,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_ - # Transform the output of nm in a proper C declaration. - global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -+# Transform the output of nm into a list of symbols to manually relocate. -+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import -+ - # Transform the output of nm in a C name address pair. - global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - - # Transform the output of nm in a C name address pair when lib prefix is needed. - global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -+# The name lister interface. -+nm_interface=$lt_lt_cv_nm_interface -+ - # Specify filename containing input files for \$NM. - nm_file_list_spec=$lt_nm_file_list_spec - --# The root where to search for dependent libraries,and in which our libraries should be installed. -+# The root where to search for dependent libraries,and where our libraries should be installed. - lt_sysroot=$lt_sysroot - -+# Command to truncate a binary pipe. -+lt_truncate_bin=$lt_lt_cv_truncate_bin -+ - # The name of the directory that contains temporary libtool files. - objdir=$objdir - -@@ -19784,8 +20476,11 @@ hardcode_into_libs=$hardcode_into_libs - # Compile-time system search path for libraries. - sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - --# Run-time system search path for libraries. --sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -+# Detected run-time system search path for libraries. -+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path -+ -+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path - - # Whether dlopen is supported. - dlopen_support=$enable_dlopen -@@ -19878,13 +20573,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_l - # Whether we need a single "-rpath" flag with a separated argument. - hardcode_libdir_separator=$lt_hardcode_libdir_separator - --# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes - # DIR into the resulting binary. - hardcode_direct=$hardcode_direct - --# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes - # DIR into the resulting binary and the resulting library dependency is --# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -+# "absolute",i.e impossible to change by setting \$shlibpath_var if the - # library is relocated. - hardcode_direct_absolute=$hardcode_direct_absolute - -@@ -19936,13 +20631,72 @@ hardcode_action=$hardcode_action - - _LT_EOF - -+ cat <<'_LT_EOF' >> "$cfgfile" -+ -+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE -+ -+# func_munge_path_list VARIABLE PATH -+# ----------------------------------- -+# VARIABLE is name of variable containing _space_ separated list of -+# directories to be munged by the contents of PATH, which is string -+# having a format: -+# "DIR[:DIR]:" -+# string "DIR[ DIR]" will be prepended to VARIABLE -+# ":DIR[:DIR]" -+# string "DIR[ DIR]" will be appended to VARIABLE -+# "DIRP[:DIRP]::[DIRA:]DIRA" -+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -+# "DIRA[ DIRA]" will be appended to VARIABLE -+# "DIR[:DIR]" -+# VARIABLE will be replaced by "DIR[ DIR]" -+func_munge_path_list () -+{ -+ case x$2 in -+ x) -+ ;; -+ *:) -+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" -+ ;; -+ x:*) -+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" -+ ;; -+ *::*) -+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" -+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" -+ ;; -+ *) -+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" -+ ;; -+ esac -+} -+ -+ -+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -+func_cc_basename () -+{ -+ for cc_temp in $*""; do -+ case $cc_temp in -+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; -+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; -+ \-*) ;; -+ *) break;; -+ esac -+ done -+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -+} -+ -+ -+# ### END FUNCTIONS SHARED WITH CONFIGURE -+ -+_LT_EOF -+ - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. --if test "X${COLLECT_NAMES+set}" != Xset; then -+if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi -@@ -19951,7 +20705,7 @@ _LT_EOF - esac - - --ltmain="$ac_aux_dir/ltmain.sh" -+ltmain=$ac_aux_dir/ltmain.sh - - - # We use sed instead of cat because bash on DJGPP gets confused if -@@ -19961,165 +20715,6 @@ ltmain="$ac_aux_dir/ltmain.sh" - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - -- if test x"$xsi_shell" = xyes; then -- sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ --func_dirname ()\ --{\ --\ case ${1} in\ --\ */*) func_dirname_result="${1%/*}${2}" ;;\ --\ * ) func_dirname_result="${3}" ;;\ --\ esac\ --} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_basename ()$/,/^} # func_basename /c\ --func_basename ()\ --{\ --\ func_basename_result="${1##*/}"\ --} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ --func_dirname_and_basename ()\ --{\ --\ case ${1} in\ --\ */*) func_dirname_result="${1%/*}${2}" ;;\ --\ * ) func_dirname_result="${3}" ;;\ --\ esac\ --\ func_basename_result="${1##*/}"\ --} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ --func_stripname ()\ --{\ --\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ --\ # positional parameters, so assign one to ordinary parameter first.\ --\ func_stripname_result=${3}\ --\ func_stripname_result=${func_stripname_result#"${1}"}\ --\ func_stripname_result=${func_stripname_result%"${2}"}\ --} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ --func_split_long_opt ()\ --{\ --\ func_split_long_opt_name=${1%%=*}\ --\ func_split_long_opt_arg=${1#*=}\ --} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ --func_split_short_opt ()\ --{\ --\ func_split_short_opt_arg=${1#??}\ --\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ --} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ --func_lo2o ()\ --{\ --\ case ${1} in\ --\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ --\ *) func_lo2o_result=${1} ;;\ --\ esac\ --} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_xform ()$/,/^} # func_xform /c\ --func_xform ()\ --{\ -- func_xform_result=${1%.*}.lo\ --} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_arith ()$/,/^} # func_arith /c\ --func_arith ()\ --{\ -- func_arith_result=$(( $* ))\ --} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_len ()$/,/^} # func_len /c\ --func_len ()\ --{\ -- func_len_result=${#1}\ --} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- --fi -- --if test x"$lt_shell_append" = xyes; then -- sed -e '/^func_append ()$/,/^} # func_append /c\ --func_append ()\ --{\ -- eval "${1}+=\\${2}"\ --} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ --func_append_quoted ()\ --{\ --\ func_quote_for_eval "${2}"\ --\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ --} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") --test 0 -eq $? || _lt_function_replace_fail=: -- -- -- # Save a `func_append' function call where possible by direct use of '+=' -- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -- test 0 -eq $? || _lt_function_replace_fail=: --else -- # Save a `func_append' function call even when '+=' is not available -- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ -- && mv -f "$cfgfile.tmp" "$cfgfile" \ -- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -- test 0 -eq $? || _lt_function_replace_fail=: --fi -- --if test x"$_lt_function_replace_fail" = x":"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 --$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} --fi -- -- - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" ---- /dev/null -+++ snort-2.9.15.1/conftest.c -@@ -0,0 +1,106 @@ -+/* confdefs.h */ -+#define PACKAGE_NAME "snort" -+#define PACKAGE_TARNAME "snort" -+#define PACKAGE_VERSION "2.9.15.1" -+#define PACKAGE_STRING "snort 2.9.15.1" -+#define PACKAGE_BUGREPORT "" -+#define PACKAGE_URL "" -+#define PACKAGE "snort" -+#define VERSION "2.9.15.1" -+#define STDC_HEADERS 1 -+#define HAVE_SYS_TYPES_H 1 -+#define HAVE_SYS_STAT_H 1 -+#define HAVE_STDLIB_H 1 -+#define HAVE_STRING_H 1 -+#define HAVE_MEMORY_H 1 -+#define HAVE_STRINGS_H 1 -+#define HAVE_INTTYPES_H 1 -+#define HAVE_STDINT_H 1 -+#define HAVE_UNISTD_H 1 -+#define HAVE_DLFCN_H 1 -+#define LT_OBJDIR ".libs/" -+#define LINUX 1 -+#define HAVE__BOOL 1 -+#define HAVE_STDBOOL_H 1 -+#define HAVE_INTTYPES_H 1 -+#define HAVE_MATH_H 1 -+#define HAVE_PATHS_H 1 -+#define HAVE_STDLIB_H 1 -+#define HAVE_STRING_H 1 -+#define HAVE_STRINGS_H 1 -+#define HAVE_UNISTD_H 1 -+#define HAVE_WCHAR_H 1 -+#define HAVE_LIBM 1 -+#define HAVE_LIBM 1 -+#define HAVE_UUID_UUID_H 1 -+#define HAVE_LIBUUID 1 -+#define HAVE_LIBNSL 1 -+#define HAVE_SIGACTION 1 -+#define HAVE_STRERROR 1 -+#define HAVE_VSWPRINTF 1 -+#define HAVE_WPRINTF 1 -+#define HAVE_MEMRCHR 1 -+#define HAVE_INET_NTOP 1 -+#define HAVE_SNPRINTF /**/ -+#define HAVE_MALLOC_TRIM 1 -+#define HAVE_MALLINFO 1 -+#define SIZEOF_CHAR 1 -+#define SIZEOF_SHORT 2 -+#define SIZEOF_INT 4 -+#define SIZEOF_LONG_INT 4 -+#define SIZEOF_LONG_LONG_INT 8 -+#define SIZEOF_UNSIGNED_INT 4 -+#define SIZEOF_UNSIGNED_LONG_INT 4 -+#define SIZEOF_UNSIGNED_LONG_LONG_INT 8 -+#define HAVE_U_INT8_T 1 -+#define HAVE_U_INT16_T 1 -+#define HAVE_U_INT32_T 1 -+#define HAVE_U_INT64_T 1 -+#define HAVE_UINT8_T 1 -+#define HAVE_UINT16_T 1 -+#define HAVE_UINT32_T 1 -+#define HAVE_UINT64_T 1 -+#define HAVE_INT8_T 1 -+#define HAVE_INT16_T 1 -+/* end confdefs.h. */ -+#include -+#ifdef HAVE_SYS_TYPES_H -+# include -+#endif -+#ifdef HAVE_SYS_STAT_H -+# include -+#endif -+#ifdef STDC_HEADERS -+# include -+# include -+#else -+# ifdef HAVE_STDLIB_H -+# include -+# endif -+#endif -+#ifdef HAVE_STRING_H -+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -+# include -+# endif -+# include -+#endif -+#ifdef HAVE_STRINGS_H -+# include -+#endif -+#ifdef HAVE_INTTYPES_H -+# include -+#endif -+#ifdef HAVE_STDINT_H -+# include -+#endif -+#ifdef HAVE_UNISTD_H -+# include -+#endif -+int -+main () -+{ -+if (sizeof ((int32_t))) -+ return 0; -+ ; -+ return 0; -+} ---- /dev/null -+++ snort-2.9.15.1/conftest.er1 -@@ -0,0 +1,4 @@ -+conftest.c: In function 'main': -+conftest.c:102:22: error: expected expression before ')' token -+ 102 | if (sizeof ((int32_t))) -+ | ^ ---- /dev/null -+++ snort-2.9.15.1/conftest.err -@@ -0,0 +1,4 @@ -+conftest.c: In function 'main': -+conftest.c:102:22: error: expected expression before ')' token -+ 102 | if (sizeof ((int32_t))) -+ | ^ ---- snort-2.9.15.1.orig/doc/Makefile.in -+++ snort-2.9.15.1/doc/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,12 +89,12 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = doc --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(dist_doc_DATA) AUTHORS INSTALL NEWS README TODO - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ -+ $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -102,7 +112,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -140,6 +150,8 @@ am__uninstall_files_from_dir = { \ - am__installdirs = "$(DESTDIR)$(docdir)" - DATA = $(dist_doc_DATA) - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS INSTALL NEWS README \ -+ TODO - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -185,6 +197,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -266,6 +279,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -359,14 +373,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -411,7 +424,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -560,6 +576,8 @@ uninstall-am: uninstall-dist_docDATA - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-dist_docDATA - -+.PRECIOUS: Makefile -+ - - .tex.dvi: - if [ -f /etc/centos-release ]; then \ ---- snort-2.9.15.1.orig/etc/Makefile.in -+++ snort-2.9.15.1/etc/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = etc --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -109,6 +119,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -154,6 +165,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -235,6 +247,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -262,14 +275,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign etc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign etc/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -293,7 +305,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -437,6 +452,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/m4/Makefile.in -+++ snort-2.9.15.1/m4/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = m4 --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -109,6 +119,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -154,6 +165,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -235,6 +247,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -260,14 +273,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign m4/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign m4/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -291,7 +303,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -435,6 +450,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/preproc_rules/Makefile.in -+++ snort-2.9.15.1/preproc_rules/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = preproc_rules --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -109,6 +119,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -154,6 +165,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -235,6 +247,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -260,14 +273,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign preproc_rules/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign preproc_rules/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -291,7 +303,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -435,6 +450,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/rpm/Makefile.in -+++ snort-2.9.15.1/rpm/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = rpm --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -109,6 +119,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -154,6 +165,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -235,6 +247,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -269,14 +282,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign rpm/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign rpm/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -300,7 +312,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -444,6 +459,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/Makefile.in -+++ snort-2.9.15.1/src/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -88,11 +98,11 @@ bin_PROGRAMS = snort$(EXEEXT) - @BUILD_SNORT_RELOAD_TRUE@am__append_4 = reload-adjust/libreload_adjust.a - @BUILD_SNORT_RELOAD_TRUE@am__append_5 = reload-adjust - subdir = src --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -166,7 +176,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -207,7 +217,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -231,6 +241,7 @@ DIST_SUBDIRS = sfutil win32 output-plugi - dynamic-plugins preprocessors parser dynamic-preprocessors \ - dynamic-output target-based control file-process \ - dynamic-examples side-channel reload-adjust -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -301,6 +312,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -382,6 +394,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -444,14 +457,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -523,10 +535,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -636,7 +648,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -814,6 +829,8 @@ uninstall-am: uninstall-binPROGRAMS - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/control/Makefile.in -+++ snort-2.9.15.1/src/control/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/control --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -314,14 +327,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/control/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/control/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -348,10 +360,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -414,7 +426,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -563,6 +578,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/detection-plugins/Makefile.in -+++ snort-2.9.15.1/src/detection-plugins/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -82,11 +92,11 @@ host_triplet = @host@ - @BUILD_RESPOND3_TRUE@am__append_2 = sp_respond3.c sp_respond.h - @FEAT_OPEN_APPID_TRUE@am__append_3 = sp_appid.c sp_appid.h - subdir = src/detection-plugins --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -165,7 +175,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -214,6 +224,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -259,6 +270,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -340,6 +352,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -441,14 +454,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/detection-plugins/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/detection-plugins/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -475,10 +487,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -541,7 +553,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -693,6 +708,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - sf_snort_plugin_hdropts.c: ../dynamic-plugins/sf_engine/sf_snort_plugin_hdropts.c - @src_file=$?; dst_file=$@; $(sed_hdropts) ---- snort-2.9.15.1.orig/src/dynamic-examples/Makefile.in -+++ snort-2.9.15.1/src/dynamic-examples/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-examples --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ -@@ -123,7 +133,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -144,6 +154,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = dynamic-preprocessor dynamic-rule -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -214,6 +225,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -295,6 +307,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -496,14 +509,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-examples/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-examples/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -620,7 +632,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -796,6 +811,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -+.PRECIOUS: Makefile -+ - - # From main src tree - include/snort_debug.h: $(srcdir)/../snort_debug.h ---- snort-2.9.15.1.orig/src/dynamic-examples/dynamic-preprocessor/Makefile.in -+++ snort-2.9.15.1/src/dynamic-examples/dynamic-preprocessor/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-examples/dynamic-preprocessor --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -145,7 +155,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -190,6 +200,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -235,6 +246,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -316,6 +328,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -359,14 +372,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-preprocessor/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-preprocessor/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -423,10 +435,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -489,7 +501,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -647,6 +662,8 @@ uninstall-am: uninstall-noinst_dynamicpr - tags tags-am uninstall uninstall-am \ - uninstall-noinst_dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - sf_dynamic_preproc_lib.c: ../include/sf_dynamic_preproc_lib.c - cp $? $@ ---- snort-2.9.15.1.orig/src/dynamic-examples/dynamic-rule/Makefile.in -+++ snort-2.9.15.1/src/dynamic-examples/dynamic-rule/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-examples/dynamic-rule --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -144,7 +154,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -189,6 +199,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -234,6 +245,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -315,6 +327,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -362,14 +375,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-rule/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-rule/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -426,10 +438,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -492,7 +504,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -649,6 +664,8 @@ uninstall-am: uninstall-noinst_libLTLIBR - tags tags-am uninstall uninstall-am \ - uninstall-noinst_libLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - sfsnort_dynamic_detection_lib.c: ../include/sfsnort_dynamic_detection_lib.c - cp $? $@ ---- snort-2.9.15.1.orig/src/dynamic-output/Makefile.in -+++ snort-2.9.15.1/src/dynamic-output/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-output --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ -@@ -123,7 +133,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -144,6 +154,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -214,6 +225,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -295,6 +307,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -323,14 +336,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-output/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-output/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -447,7 +459,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -618,6 +633,8 @@ uninstall-am: - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/dynamic-output/libs/Makefile.in -+++ snort-2.9.15.1/src/dynamic-output/libs/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -17,7 +17,17 @@ - - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -81,12 +91,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-output/libs --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(srcdir)/snort_output.pc.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = snort_output.pc -@@ -154,7 +163,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -202,6 +211,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/snort_output.pc.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -247,6 +257,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -328,6 +339,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -388,14 +400,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-output/libs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-output/libs/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -454,10 +465,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -565,7 +576,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -723,6 +737,8 @@ uninstall-am: uninstall-nodist_outputlib - uninstall-nodist_outputlibincludeHEADERS \ - uninstall-outputlibLTLIBRARIES uninstall-pkgconfigDATA - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/dynamic-output/plugins/Makefile.in -+++ snort-2.9.15.1/src/dynamic-output/plugins/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-output/plugins --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -113,7 +123,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - AM_V_lt = $(am__v_lt_@AM_V@) - am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) - am__v_lt_0 = --silent -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -328,14 +341,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-output/plugins/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-output/plugins/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -362,10 +374,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -440,7 +452,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -589,6 +604,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/dynamic-plugins/Makefile.in -+++ snort-2.9.15.1/src/dynamic-plugins/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-plugins --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -115,7 +125,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -160,7 +170,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -181,6 +191,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -251,6 +262,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -332,6 +344,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -381,14 +394,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-plugins/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -415,10 +427,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -528,7 +540,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -704,6 +719,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/dynamic-plugins/sf_engine/Makefile.in -+++ snort-2.9.15.1/src/dynamic-plugins/sf_engine/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-plugins/sf_engine --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -152,7 +162,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -193,7 +203,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -214,6 +224,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -284,6 +295,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -365,6 +377,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -535,14 +548,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -599,10 +611,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -712,7 +724,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -897,6 +912,8 @@ uninstall-am: uninstall-dynamicengineLTL - tags tags-am uninstall uninstall-am \ - uninstall-dynamicengineLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - ipv6_port.h: ../../ipv6_port.h - @src_header=$?; dst_header=$@; $(massage_ipv6_headers) ---- snort-2.9.15.1.orig/src/dynamic-plugins/sf_engine/examples/Makefile.in -+++ snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-plugins/sf_engine/examples --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -158,7 +168,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -203,6 +213,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -248,6 +259,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -329,6 +341,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -428,14 +441,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/examples/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/examples/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -492,10 +504,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -558,7 +570,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -710,6 +725,8 @@ uninstall-am: uninstall-libLTLIBRARIES - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/dynamic-plugins/sf_preproc_example/Makefile.in -+++ snort-2.9.15.1/src/dynamic-plugins/sf_preproc_example/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-plugins/sf_preproc_example --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -109,6 +119,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -154,6 +165,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -235,6 +247,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -263,14 +276,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/sf_preproc_example/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-plugins/sf_preproc_example/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -294,7 +306,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -438,6 +453,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -16,7 +16,17 @@ - - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -124,12 +134,12 @@ host_triplet = @host@ - @BUILD_SNORT_RELOAD_TRUE@include/appdata_adjuster.c - - subdir = src/dynamic-preprocessors --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(am__preproc_HEADERS_DIST) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__preproc_HEADERS_DIST) \ -+ $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -240,7 +250,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -287,7 +297,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -309,6 +319,7 @@ ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = . libs ftptelnet pop imap smtp ssh dns ssl dcerpc2 sdf \ - sip reputation gtp modbus dnp3 file appid -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -379,6 +390,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -460,6 +472,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -811,14 +824,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -878,10 +890,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -1117,7 +1129,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -1307,6 +1322,8 @@ uninstall-am: uninstall-local uninstall- - uninstall-nodist_preprocHEADERS uninstall-preprocHEADERS \ - uninstall-preproclibLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - @SO_WITH_STATIC_LIB_TRUE@all-local: $(LTLIBRARIES) - @SO_WITH_STATIC_LIB_TRUE@ $(MAKE) DESTDIR=`pwd`/build install-preproclibLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/appid/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/appid/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,13 +88,12 @@ PRE_UNINSTALL = : - POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ --DIST_COMMON = $(srcdir)/Makefile_defs $(srcdir)/Makefile.in \ -- $(srcdir)/Makefile.am - subdir = src/dynamic-preprocessors/appid - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -239,7 +248,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -285,6 +294,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile_defs - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -336,6 +346,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -417,6 +428,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -607,16 +619,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/appid/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/appid/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; --$(srcdir)/Makefile_defs: -+$(srcdir)/Makefile_defs $(am__empty): - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -@@ -672,10 +683,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -1005,7 +1016,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -1159,6 +1173,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/dcerpc2/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -85,11 +95,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@dcerpc2_buffer_dump.h - - subdir = src/dynamic-preprocessors/dcerpc2 --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -177,7 +187,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -223,6 +233,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -268,6 +279,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -349,6 +361,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -399,14 +412,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/dcerpc2/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/dcerpc2/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -463,10 +475,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -562,7 +574,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -716,6 +731,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/dnp3/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/dnp3/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -85,11 +95,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@dnp3_buffer_dump.h - - subdir = src/dynamic-preprocessors/dnp3 --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -168,7 +178,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -214,6 +224,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -259,6 +270,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -340,6 +352,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -385,14 +398,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/dnp3/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/dnp3/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -449,10 +461,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -545,7 +557,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -699,6 +714,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/dns/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/dns/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@dns_buffer_dump.h - - subdir = src/dynamic-preprocessors/dns --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -154,7 +164,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -200,6 +210,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -245,6 +256,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -326,6 +338,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -363,14 +376,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/dns/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/dns/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -427,10 +439,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -499,7 +511,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -653,6 +668,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/file/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/file/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-preprocessors/file --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -149,7 +159,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -195,6 +205,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -240,6 +251,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -321,6 +333,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -394,14 +407,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/file/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/file/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -458,10 +470,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -536,7 +548,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -694,6 +709,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - include/output_lib.c: ${top_srcdir}/src/dynamic-output/libs/output_lib.c - @src_header=$?; dst_header=$@; $(copy_headers) ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/ftptelnet/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@ftptelnet_buffer_dump.h - - subdir = src/dynamic-preprocessors/ftptelnet --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -173,7 +183,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -219,6 +229,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -264,6 +275,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -345,6 +357,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -400,14 +413,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/ftptelnet/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/ftptelnet/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -464,10 +476,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -560,7 +572,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -714,6 +729,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/gtp/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/gtp/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@gtp_buffer_dump.c - - subdir = src/dynamic-preprocessors/gtp --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -157,7 +167,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -203,6 +213,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -248,6 +259,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -329,6 +341,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -368,14 +381,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/gtp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/gtp/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -432,10 +444,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -504,7 +516,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -658,6 +673,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/imap/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/imap/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@imap_buffer_dump.h - - subdir = src/dynamic-preprocessors/imap --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -163,7 +173,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -209,6 +219,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -254,6 +265,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -335,6 +347,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -384,14 +397,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/imap/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/imap/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -448,10 +460,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -547,7 +559,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -701,6 +716,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/libs/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/libs/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,12 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-preprocessors/libs --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(srcdir)/snort_preproc.pc.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = snort_preproc.pc -@@ -102,7 +111,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -140,6 +149,7 @@ am__uninstall_files_from_dir = { \ - am__installdirs = "$(DESTDIR)$(pkgconfigdir)" - DATA = $(pkgconfig_DATA) - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/snort_preproc.pc.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -185,6 +195,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -266,6 +277,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -299,14 +311,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/libs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/libs/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -353,7 +364,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -501,6 +515,8 @@ uninstall-am: uninstall-pkgconfigDATA - ps ps-am tags-am uninstall uninstall-am \ - uninstall-pkgconfigDATA - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/modbus/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/modbus/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@modbus_buffer_dump.h - - subdir = src/dynamic-preprocessors/modbus --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -158,7 +168,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -204,6 +214,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -249,6 +260,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -330,6 +342,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -369,14 +382,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/modbus/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/modbus/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -433,10 +445,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -505,7 +517,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -659,6 +674,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/pop/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/pop/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@pop_buffer_dump.h - - subdir = src/dynamic-preprocessors/pop --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -162,7 +172,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -208,6 +218,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -253,6 +264,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -334,6 +346,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -382,14 +395,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/pop/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/pop/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -446,10 +458,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -545,7 +557,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -699,6 +714,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/reputation/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/reputation/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-preprocessors/reputation --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -165,7 +175,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -211,6 +221,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -256,6 +267,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -337,6 +349,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -408,14 +421,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/reputation/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/reputation/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -472,10 +484,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -577,7 +589,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -731,6 +746,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/sdf/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/sdf/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/dynamic-preprocessors/sdf --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -148,7 +158,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -194,6 +204,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -239,6 +250,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -320,6 +332,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -368,14 +381,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/sdf/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/sdf/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -432,10 +444,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -504,7 +516,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -658,6 +673,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/sip/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/sip/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -85,11 +95,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@sip_buffer_dump.h - - subdir = src/dynamic-preprocessors/sip --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -168,7 +178,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -214,6 +224,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -259,6 +270,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -340,6 +352,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -383,14 +396,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/sip/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/sip/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -447,10 +459,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -540,7 +552,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -694,6 +709,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/smtp/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/smtp/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@smtp_buffer_dump.h - - subdir = src/dynamic-preprocessors/smtp --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -164,7 +174,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -210,6 +220,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -255,6 +266,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -336,6 +348,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -387,14 +400,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/smtp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/smtp/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -451,10 +463,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -553,7 +565,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -707,6 +722,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/ssh/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/ssh/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@ssh_buffer_dump.h - - subdir = src/dynamic-preprocessors/ssh --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -154,7 +164,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -200,6 +210,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -245,6 +256,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -326,6 +338,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -363,14 +376,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssh/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssh/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -427,10 +439,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -499,7 +511,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -653,6 +668,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/dynamic-preprocessors/ssl/Makefile.in -+++ snort-2.9.15.1/src/dynamic-preprocessors/ssl/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -83,11 +93,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@ssl_buffer_dump.h - - subdir = src/dynamic-preprocessors/ssl --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -156,7 +166,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -202,6 +212,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -247,6 +258,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -328,6 +340,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -369,14 +382,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssl/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssl/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -433,10 +445,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -517,7 +529,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -671,6 +686,8 @@ uninstall-am: uninstall-dynamicpreproces - tags tags-am uninstall uninstall-am \ - uninstall-dynamicpreprocessorLTLIBRARIES - -+.PRECIOUS: Makefile -+ - - all-local: $(LTLIBRARIES) - $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES ---- snort-2.9.15.1.orig/src/file-process/Makefile.in -+++ snort-2.9.15.1/src/file-process/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/file-process --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -118,7 +128,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - AM_V_lt = $(am__v_lt_@AM_V@) - am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) - am__v_lt_0 = --silent -@@ -163,7 +173,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -184,6 +194,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -254,6 +265,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -335,6 +347,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -390,14 +403,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/file-process/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/file-process/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -424,10 +436,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -543,7 +555,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -719,6 +734,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/file-process/libs/Makefile.in -+++ snort-2.9.15.1/src/file-process/libs/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/file-process/libs --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -113,7 +123,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -322,14 +335,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/file-process/libs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/file-process/libs/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -356,10 +368,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -422,7 +434,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -571,6 +586,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/output-plugins/Makefile.in -+++ snort-2.9.15.1/src/output-plugins/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -82,11 +92,11 @@ host_triplet = @host@ - @BUILD_BUFFER_DUMP_TRUE@spo_log_buffer_dump.c spo_log_buffer_dump.h - - subdir = src/output-plugins --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -130,7 +140,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -179,6 +189,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -224,6 +235,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -305,6 +317,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -339,14 +352,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/output-plugins/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/output-plugins/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -373,10 +385,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -439,7 +451,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -588,6 +603,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/parser/Makefile.in -+++ snort-2.9.15.1/src/parser/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/parser --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -314,14 +327,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/parser/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/parser/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -348,10 +360,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -414,7 +426,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -563,6 +578,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -123,7 +133,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -168,7 +178,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -189,6 +199,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -264,6 +275,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -345,6 +357,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -399,14 +412,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -537,7 +549,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -713,6 +728,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/anomaly_detection/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/anomaly_detection/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/anomaly_detection --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -316,14 +329,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/anomaly_detection/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/anomaly_detection/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -350,10 +362,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -416,7 +428,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -565,6 +580,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/client/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/client/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/client --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -113,7 +123,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -318,14 +331,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/client/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/client/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -352,10 +364,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -418,7 +430,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -567,6 +582,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/event_output/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/event_output/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/event_output --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -316,14 +329,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/event_output/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/event_output/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -350,10 +362,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -416,7 +428,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -565,6 +580,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/files/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/files/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/files --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -113,7 +123,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -319,14 +332,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/files/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/files/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -353,10 +365,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -419,7 +431,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -568,6 +583,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/include/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/include/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/include --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -109,6 +119,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -154,6 +165,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -235,6 +247,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -293,14 +306,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/include/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/include/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -324,7 +336,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -468,6 +483,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - #if BUILD_BUFFER_DUMP - #EXTRA_DIST += \ ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/mode_inspection/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/mode_inspection/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/mode_inspection --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -316,14 +329,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/mode_inspection/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/mode_inspection/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -350,10 +362,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -416,7 +428,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -565,6 +580,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/normalization/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/normalization/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/normalization --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -316,14 +329,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/normalization/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/normalization/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -350,10 +362,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -416,7 +428,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -565,6 +580,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/server/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/server/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/server --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -113,7 +123,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -318,14 +331,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/server/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/server/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -352,10 +364,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -418,7 +430,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -567,6 +582,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/session_inspection/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/session_inspection/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/session_inspection --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -316,14 +329,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/session_inspection/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/session_inspection/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -350,10 +362,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -416,7 +428,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -565,6 +580,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/user_interface/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/user_interface --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -113,7 +123,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -319,14 +332,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/user_interface/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/user_interface/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -353,10 +365,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -419,7 +431,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -568,6 +583,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/HttpInspect/utils/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/HttpInspect/utils/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/HttpInspect/utils --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -115,7 +125,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -164,6 +174,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -214,6 +225,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -295,6 +307,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -331,14 +344,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/utils/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/utils/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -365,10 +377,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -431,7 +443,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -580,6 +595,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -135,7 +145,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -180,7 +190,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -201,6 +211,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -271,6 +282,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -352,6 +364,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -403,14 +416,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -437,10 +449,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -550,7 +562,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -726,6 +741,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/Session/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/Session/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -86,11 +96,11 @@ host_triplet = @host@ - @BUILD_HA_TRUE@stream5_ha.o - - subdir = src/preprocessors/Session --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -126,7 +136,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -175,6 +185,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -220,6 +231,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -301,6 +313,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -332,14 +345,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/Session/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/Session/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -366,10 +378,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -432,7 +444,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -581,6 +596,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/preprocessors/Stream6/Makefile.in -+++ snort-2.9.15.1/src/preprocessors/Stream6/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/preprocessors/Stream6 --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -117,7 +127,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -166,6 +176,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -211,6 +222,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -292,6 +304,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -340,14 +353,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/Stream6/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/preprocessors/Stream6/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -374,10 +386,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -440,7 +452,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -589,6 +604,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/reload-adjust/Makefile.in -+++ snort-2.9.15.1/src/reload-adjust/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/reload-adjust --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -317,14 +330,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/reload-adjust/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/reload-adjust/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -351,10 +363,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -417,7 +429,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -566,6 +581,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/sfutil/Makefile.in -+++ snort-2.9.15.1/src/sfutil/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/sfutil --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -153,7 +163,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -202,6 +212,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -247,6 +258,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -328,6 +340,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -413,14 +426,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sfutil/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/sfutil/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -447,10 +459,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -513,7 +525,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -662,6 +677,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/side-channel/Makefile.in -+++ snort-2.9.15.1/src/side-channel/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/side-channel --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -113,7 +123,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -158,7 +168,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -179,6 +189,7 @@ am__define_uniq_tagged_files = \ - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -249,6 +260,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -330,6 +342,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -358,14 +371,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/side-channel/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/side-channel/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -392,10 +404,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -505,7 +517,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -681,6 +696,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/side-channel/dynamic-plugins/Makefile.in -+++ snort-2.9.15.1/src/side-channel/dynamic-plugins/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -17,7 +17,17 @@ - - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -81,13 +91,12 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/side-channel/dynamic-plugins --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(srcdir)/snort_side_channel.pc.in \ -- $(am__sidechannellibinclude_HEADERS_DIST) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am \ -+ $(am__sidechannellibinclude_HEADERS_DIST) $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = snort_side_channel.pc -@@ -154,7 +163,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ -@@ -204,6 +213,8 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in \ -+ $(srcdir)/snort_side_channel.pc.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -249,6 +260,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -330,6 +342,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -376,14 +389,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/side-channel/dynamic-plugins/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/side-channel/dynamic-plugins/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -442,10 +454,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -574,7 +586,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -736,6 +751,8 @@ uninstall-am: uninstall-nodist_sidechann - uninstall-pkgconfigDATA uninstall-sidechannellibLTLIBRARIES \ - uninstall-sidechannellibincludeHEADERS - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/side-channel/plugins/Makefile.in -+++ snort-2.9.15.1/src/side-channel/plugins/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/side-channel/plugins --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -112,7 +122,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -161,6 +171,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -206,6 +217,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -287,6 +299,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -316,14 +329,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/side-channel/plugins/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/side-channel/plugins/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -350,10 +362,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -416,7 +428,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -565,6 +580,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/src/target-based/Makefile.in -+++ snort-2.9.15.1/src/target-based/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,13 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/target-based --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- sf_attribute_table_parser.c sf_attribute_table.c \ -- $(top_srcdir)/ylwrap - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -129,7 +137,7 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - AM_V_lt = $(am__v_lt_@AM_V@) -@@ -196,6 +204,8 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ylwrap \ -+ sf_attribute_table.c sf_attribute_table_parser.c - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -241,6 +251,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -322,6 +333,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -369,14 +381,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/target-based/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/target-based/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -403,10 +414,10 @@ distclean-compile: - -rm -f *.tab.c - - .c.o: -- $(AM_V_CC)$(COMPILE) -c $< -+ $(AM_V_CC)$(COMPILE) -c -o $@ $< - - .c.obj: -- $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< -@@ -469,7 +480,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -620,6 +634,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - .y.c: - $(YACC) -d -psfat_ -o$@ $? ---- snort-2.9.15.1.orig/src/win32/Makefile.in -+++ snort-2.9.15.1/src/win32/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -79,11 +89,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = src/win32 --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -102,7 +112,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -111,6 +121,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -156,6 +167,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -237,6 +249,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -388,14 +401,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/win32/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/win32/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -422,7 +434,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -568,6 +583,8 @@ uninstall-am: - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/templates/Makefile.in -+++ snort-2.9.15.1/templates/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -14,7 +14,17 @@ - - @SET_MAKE@ - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -78,11 +88,11 @@ POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ - subdir = templates --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -100,7 +110,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - am__can_run_installinfo = \ -@@ -109,6 +119,7 @@ am__can_run_installinfo = \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -154,6 +165,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -235,6 +247,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -260,14 +273,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign templates/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign templates/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -291,7 +303,10 @@ ctags CTAGS: - cscope cscopelist: - - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -435,6 +450,8 @@ uninstall-am: - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/tools/Makefile.in -+++ snort-2.9.15.1/tools/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -80,12 +90,12 @@ build_triplet = @build@ - host_triplet = @host@ - @FEAT_OPEN_APPID_TRUE@am__append_1 = u2openappid u2streamer - subdir = tools --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(am__dist_bin_SCRIPTS_DIST) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_bin_SCRIPTS_DIST) \ -+ $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -133,7 +143,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) - am__v_at_0 = @ - am__v_at_1 = - depcomp = --am__depfiles_maybe = -+am__maybe_remake_depfiles = - SOURCES = - DIST_SOURCES = - RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ -@@ -156,7 +166,7 @@ am__recursive_targets = \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) - AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ -- distdir -+ distdir distdir-am - am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) - # Read a list of newline-separated strings from the standard input, - # and print each of them once, without duplicates. Input order is -@@ -178,6 +188,7 @@ ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = u2boat u2spewfoo control file_server u2openappid \ - u2streamer -+am__DIST_COMMON = $(srcdir)/Makefile.in - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - am__relativize = \ - dir0=`pwd`; \ -@@ -248,6 +259,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -329,6 +341,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -358,14 +371,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -517,7 +529,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -692,6 +707,8 @@ uninstall-am: uninstall-dist_binSCRIPTS - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-dist_binSCRIPTS - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/tools/control/Makefile.in -+++ snort-2.9.15.1/tools/control/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -16,7 +16,17 @@ - - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -82,12 +92,12 @@ host_triplet = @host@ - bin_PROGRAMS = snort_control$(EXEEXT) \ - snort_dump_packets_control$(EXEEXT) - subdir = tools/control --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(top_srcdir)/depcomp $(dist_doc_DATA) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ -+ $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -127,7 +137,9 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp --am__depfiles_maybe = depfiles -+am__maybe_remake_depfiles = depfiles -+am__depfiles_remade = ./$(DEPDIR)/snort_control-sfcontrol.Po \ -+ ./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po - am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -203,6 +215,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -248,6 +261,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -329,6 +343,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -359,14 +374,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/control/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/control/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -441,22 +455,28 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_control-sfcontrol.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_control-sfcontrol.Po@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po@am__quote@ # am--include-marker -+ -+$(am__depfiles_remade): -+ @$(MKDIR_P) $(@D) -+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@ -+ -+am--depfiles: $(am__depfiles_remade) - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - - .c.obj: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -572,7 +592,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -644,7 +667,8 @@ clean: clean-am - clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - - distclean: distclean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/snort_control-sfcontrol.Po -+ -rm -f ./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po - -rm -f Makefile - distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags -@@ -690,7 +714,8 @@ install-ps-am: - installcheck-am: - - maintainer-clean: maintainer-clean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/snort_control-sfcontrol.Po -+ -rm -f ./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po - -rm -f Makefile - maintainer-clean-am: distclean-am maintainer-clean-generic - -@@ -711,7 +736,7 @@ uninstall-am: uninstall-binPROGRAMS unin - - .MAKE: install-am install-strip - --.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ -+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ -@@ -726,6 +751,8 @@ uninstall-am: uninstall-binPROGRAMS unin - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dist_docDATA - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/tools/file_server/Makefile.in -+++ snort-2.9.15.1/tools/file_server/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -16,7 +16,17 @@ - - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -81,12 +91,12 @@ build_triplet = @build@ - host_triplet = @host@ - bin_PROGRAMS = file_server$(EXEEXT) - subdir = tools/file_server --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(top_srcdir)/depcomp $(dist_doc_DATA) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ -+ $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -117,7 +127,8 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp --am__depfiles_maybe = depfiles -+am__maybe_remake_depfiles = depfiles -+am__depfiles_remade = ./$(DEPDIR)/file_server-file_server.Po - am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -191,6 +202,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -236,6 +248,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -317,6 +330,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -345,14 +359,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/file_server/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/file_server/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -423,21 +436,27 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_server-file_server.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_server-file_server.Po@am__quote@ # am--include-marker -+ -+$(am__depfiles_remade): -+ @$(MKDIR_P) $(@D) -+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@ -+ -+am--depfiles: $(am__depfiles_remade) - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - - .c.obj: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -539,7 +558,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -611,7 +633,7 @@ clean: clean-am - clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - - distclean: distclean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/file_server-file_server.Po - -rm -f Makefile - distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags -@@ -657,7 +679,7 @@ install-ps-am: - installcheck-am: - - maintainer-clean: maintainer-clean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/file_server-file_server.Po - -rm -f Makefile - maintainer-clean-am: distclean-am maintainer-clean-generic - -@@ -678,7 +700,7 @@ uninstall-am: uninstall-binPROGRAMS unin - - .MAKE: install-am install-strip - --.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ -+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ -@@ -693,6 +715,8 @@ uninstall-am: uninstall-binPROGRAMS unin - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dist_docDATA - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/tools/u2boat/Makefile.in -+++ snort-2.9.15.1/tools/u2boat/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -16,7 +16,17 @@ - - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -81,12 +91,12 @@ build_triplet = @build@ - host_triplet = @host@ - bin_PROGRAMS = u2boat$(EXEEXT) - subdir = tools/u2boat --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(top_srcdir)/depcomp $(dist_doc_DATA) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ -+ $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -117,7 +127,8 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp --am__depfiles_maybe = depfiles -+am__maybe_remake_depfiles = depfiles -+am__depfiles_remade = ./$(DEPDIR)/u2boat-u2boat.Po - am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -191,6 +202,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -236,6 +248,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -317,6 +330,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -346,14 +360,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2boat/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/u2boat/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -424,21 +437,27 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2boat-u2boat.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2boat-u2boat.Po@am__quote@ # am--include-marker -+ -+$(am__depfiles_remade): -+ @$(MKDIR_P) $(@D) -+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@ -+ -+am--depfiles: $(am__depfiles_remade) - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - - .c.obj: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -540,7 +559,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -612,7 +634,7 @@ clean: clean-am - clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - - distclean: distclean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2boat-u2boat.Po - -rm -f Makefile - distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags -@@ -658,7 +680,7 @@ install-ps-am: - installcheck-am: - - maintainer-clean: maintainer-clean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2boat-u2boat.Po - -rm -f Makefile - maintainer-clean-am: distclean-am maintainer-clean-generic - -@@ -679,7 +701,7 @@ uninstall-am: uninstall-binPROGRAMS unin - - .MAKE: install-am install-strip - --.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ -+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ -@@ -694,6 +716,8 @@ uninstall-am: uninstall-binPROGRAMS unin - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dist_docDATA - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/tools/u2openappid/Makefile.in -+++ snort-2.9.15.1/tools/u2openappid/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -80,12 +90,11 @@ build_triplet = @build@ - host_triplet = @host@ - bin_PROGRAMS = u2openappid$(EXEEXT) - subdir = tools/u2openappid --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(top_srcdir)/depcomp - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -116,7 +125,8 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp --am__depfiles_maybe = depfiles -+am__maybe_remake_depfiles = depfiles -+am__depfiles_remade = ./$(DEPDIR)/u2openappid-u2openappid.Po - am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -316,14 +329,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2openappid/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/u2openappid/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -394,21 +406,27 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2openappid-u2openappid.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2openappid-u2openappid.Po@am__quote@ # am--include-marker -+ -+$(am__depfiles_remade): -+ @$(MKDIR_P) $(@D) -+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@ -+ -+am--depfiles: $(am__depfiles_remade) - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - - .c.obj: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -489,7 +507,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -561,7 +582,7 @@ clean: clean-am - clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - - distclean: distclean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2openappid-u2openappid.Po - -rm -f Makefile - distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags -@@ -607,7 +628,7 @@ install-ps-am: - installcheck-am: - - maintainer-clean: maintainer-clean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2openappid-u2openappid.Po - -rm -f Makefile - maintainer-clean-am: distclean-am maintainer-clean-generic - -@@ -628,7 +649,7 @@ uninstall-am: uninstall-binPROGRAMS - - .MAKE: install-am install-strip - --.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ -+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ -@@ -642,6 +663,8 @@ uninstall-am: uninstall-binPROGRAMS - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/tools/u2spewfoo/Makefile.in -+++ snort-2.9.15.1/tools/u2spewfoo/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -80,12 +90,11 @@ build_triplet = @build@ - host_triplet = @host@ - bin_PROGRAMS = u2spewfoo$(EXEEXT) - subdir = tools/u2spewfoo --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(top_srcdir)/depcomp - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -116,7 +125,8 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp --am__depfiles_maybe = depfiles -+am__maybe_remake_depfiles = depfiles -+am__depfiles_remade = ./$(DEPDIR)/u2spewfoo-u2spewfoo.Po - am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -162,6 +172,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -207,6 +218,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -288,6 +300,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -318,14 +331,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2spewfoo/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/u2spewfoo/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -396,21 +408,27 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2spewfoo-u2spewfoo.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2spewfoo-u2spewfoo.Po@am__quote@ # am--include-marker -+ -+$(am__depfiles_remade): -+ @$(MKDIR_P) $(@D) -+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@ -+ -+am--depfiles: $(am__depfiles_remade) - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - - .c.obj: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -491,7 +509,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -563,7 +584,7 @@ clean: clean-am - clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - - distclean: distclean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2spewfoo-u2spewfoo.Po - -rm -f Makefile - distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags -@@ -609,7 +630,7 @@ install-ps-am: - installcheck-am: - - maintainer-clean: maintainer-clean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2spewfoo-u2spewfoo.Po - -rm -f Makefile - maintainer-clean-am: distclean-am maintainer-clean-generic - -@@ -630,7 +651,7 @@ uninstall-am: uninstall-binPROGRAMS - - .MAKE: install-am install-strip - --.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ -+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ -@@ -644,6 +665,8 @@ uninstall-am: uninstall-binPROGRAMS - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. ---- snort-2.9.15.1.orig/tools/u2streamer/Makefile.in -+++ snort-2.9.15.1/tools/u2streamer/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.13.4 from Makefile.am. -+# Makefile.in generated by automake 1.16.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2018 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -15,7 +15,17 @@ - @SET_MAKE@ - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -80,12 +90,11 @@ build_triplet = @build@ - host_triplet = @host@ - bin_PROGRAMS = u2streamer$(EXEEXT) - subdir = tools/u2streamer --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(top_srcdir)/depcomp - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/configure.in - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -121,7 +130,14 @@ am__v_at_0 = @ - am__v_at_1 = - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp --am__depfiles_maybe = depfiles -+am__maybe_remake_depfiles = depfiles -+am__depfiles_remade = ./$(DEPDIR)/u2streamer-SpoolFileIterator.Po \ -+ ./$(DEPDIR)/u2streamer-TimestampedFile.Po \ -+ ./$(DEPDIR)/u2streamer-Unified2.Po \ -+ ./$(DEPDIR)/u2streamer-Unified2File.Po \ -+ ./$(DEPDIR)/u2streamer-UnifiedLog.Po \ -+ ./$(DEPDIR)/u2streamer-sf_error.Po \ -+ ./$(DEPDIR)/u2streamer-u2streamer.Po - am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -167,6 +183,7 @@ am__define_uniq_tagged_files = \ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - AMTAR = @AMTAR@ -@@ -212,6 +229,7 @@ LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ - LTLIBOBJS = @LTLIBOBJS@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - LUA_CFLAGS = @LUA_CFLAGS@ - LUA_LIBS = @LUA_LIBS@ - MAKEINFO = @MAKEINFO@ -@@ -293,6 +311,7 @@ pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ - psdir = @psdir@ -+runstatedir = @runstatedir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - srcdir = @srcdir@ -@@ -321,14 +340,13 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2streamer/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/u2streamer/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ -- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ -- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ -+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ -+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - - $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) -@@ -399,27 +417,33 @@ mostlyclean-compile: - distclean-compile: - -rm -f *.tab.c - --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-SpoolFileIterator.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-TimestampedFile.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2File.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-UnifiedLog.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-sf_error.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-u2streamer.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-SpoolFileIterator.Po@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-TimestampedFile.Po@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2.Po@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2File.Po@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-UnifiedLog.Po@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-sf_error.Po@am__quote@ # am--include-marker -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-u2streamer.Po@am__quote@ # am--include-marker -+ -+$(am__depfiles_remade): -+ @$(MKDIR_P) $(@D) -+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@ -+ -+am--depfiles: $(am__depfiles_remade) - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< - - .c.obj: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` -+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -584,7 +608,10 @@ cscopelist-am: $(am__tagged_files) - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - --distdir: $(DISTFILES) -+distdir: $(BUILT_SOURCES) -+ $(MAKE) $(AM_MAKEFLAGS) distdir-am -+ -+distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -656,7 +683,13 @@ clean: clean-am - clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - - distclean: distclean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2streamer-SpoolFileIterator.Po -+ -rm -f ./$(DEPDIR)/u2streamer-TimestampedFile.Po -+ -rm -f ./$(DEPDIR)/u2streamer-Unified2.Po -+ -rm -f ./$(DEPDIR)/u2streamer-Unified2File.Po -+ -rm -f ./$(DEPDIR)/u2streamer-UnifiedLog.Po -+ -rm -f ./$(DEPDIR)/u2streamer-sf_error.Po -+ -rm -f ./$(DEPDIR)/u2streamer-u2streamer.Po - -rm -f Makefile - distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags -@@ -702,7 +735,13 @@ install-ps-am: - installcheck-am: - - maintainer-clean: maintainer-clean-am -- -rm -rf ./$(DEPDIR) -+ -rm -f ./$(DEPDIR)/u2streamer-SpoolFileIterator.Po -+ -rm -f ./$(DEPDIR)/u2streamer-TimestampedFile.Po -+ -rm -f ./$(DEPDIR)/u2streamer-Unified2.Po -+ -rm -f ./$(DEPDIR)/u2streamer-Unified2File.Po -+ -rm -f ./$(DEPDIR)/u2streamer-UnifiedLog.Po -+ -rm -f ./$(DEPDIR)/u2streamer-sf_error.Po -+ -rm -f ./$(DEPDIR)/u2streamer-u2streamer.Po - -rm -f Makefile - maintainer-clean-am: distclean-am maintainer-clean-generic - -@@ -723,7 +762,7 @@ uninstall-am: uninstall-binPROGRAMS - - .MAKE: install-am install-strip - --.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ -+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ -@@ -737,6 +776,8 @@ uninstall-am: uninstall-binPROGRAMS - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-binPROGRAMS - -+.PRECIOUS: Makefile -+ - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/debian/patches/config snort-2.9.20/debian/patches/config --- snort-2.9.15.1/debian/patches/config 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/config 2023-02-18 13:40:27.000000000 +0000 @@ -55,7 +55,7 @@ # List of DNS servers on your network ipvar DNS_SERVERS $HOME_NET -@@ -101,17 +125,17 @@ +@@ -101,17 +125,17 @@ ipvar AIM_SERVERS [64.12.24.0/23,64.12.2 # Path to your rules files (this can be a relative path) # Note for Windows users: You are advised to make this an absolute path, # such as: c:\snort\rules @@ -78,7 +78,7 @@ ################################################### # Step #2: Configure the decoder. For more information, see README.decode -@@ -244,13 +268,13 @@ +@@ -244,13 +268,13 @@ config paf_max: 16000 ################################################### # path to dynamic preprocessor libraries @@ -95,7 +95,7 @@ ################################################### # Step #5: Configure preprocessors -@@ -295,7 +319,7 @@ +@@ -295,7 +319,7 @@ preprocessor stream5_udp: timeout 180 # preprocessor perfmonitor: time 300 file /var/snort/snort.stats pktcnt 10000 # HTTP normalization and anomaly detection. For more information, see README.http_inspect @@ -104,7 +104,7 @@ preprocessor http_inspect_server: server default \ http_methods { GET POST PUT SEARCH MKCOL COPY MOVE LOCK UNLOCK NOTIFY POLL BCOPY BDELETE BMOVE LINK UNLINK OPTIONS HEAD DELETE TRACE TRACK CONNECT SOURCE SUBSCRIBE UNSUBSCRIBE PROPFIND PROPPATCH BPROPFIND BPROPPATCH RPC_CONNECT PROXY_SUCCESS BITS_POST CCM_POST SMS_POST RPC_IN_DATA RPC_OUT_DATA RPC_ECHO_DATA } \ chunk_length 500000 \ -@@ -503,13 +527,18 @@ +@@ -503,13 +527,18 @@ preprocessor dnp3: ports { 20000 } \ memcap 262144 \ check_crc @@ -129,7 +129,7 @@ ################################################### # Step #6: Configure output plugins -@@ -519,9 +548,11 @@ +@@ -519,9 +548,11 @@ preprocessor reputation: \ # unified2 # Recommended for most installs # output unified2: filename merged.log, limit 128, nostamp, mpls_event_types, vlan_event_types @@ -141,7 +141,7 @@ # output log_unified2: filename snort.log, limit 128, nostamp # syslog -@@ -530,6 +561,9 @@ +@@ -530,6 +561,9 @@ preprocessor reputation: \ # pcap # output log_tcpdump: tcpdump.log @@ -151,7 +151,7 @@ # metadata reference data. do not modify these lines include classification.config include reference.config -@@ -542,6 +576,10 @@ +@@ -542,6 +576,10 @@ include reference.config # NOTE: All categories are enabled in this conf file ################################################### @@ -162,7 +162,7 @@ # site specific rules include $RULE_PATH/local.rules -@@ -649,6 +687,19 @@ +@@ -649,6 +687,19 @@ include $RULE_PATH/web-iis.rules include $RULE_PATH/web-misc.rules include $RULE_PATH/web-php.rules include $RULE_PATH/x11.rules diff -Nru snort-2.9.15.1/debian/patches/config_disabled_rules snort-2.9.20/debian/patches/config_disabled_rules --- snort-2.9.15.1/debian/patches/config_disabled_rules 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/config_disabled_rules 2023-02-18 13:40:27.000000000 +0000 @@ -14,7 +14,7 @@ --- a/etc/snort.conf +++ b/etc/snort.conf -@@ -580,104 +580,120 @@ +@@ -580,104 +580,120 @@ include reference.config # can be *very* out of date. For more information please read # the /usr/share/doc/snort-rules-default/README.Debian file diff -Nru snort-2.9.15.1/debian/patches/cross.patch snort-2.9.20/debian/patches/cross.patch --- snort-2.9.15.1/debian/patches/cross.patch 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/debian/patches/cross.patch 2023-02-18 13:40:27.000000000 +0000 @@ -0,0 +1,136 @@ +--- a/configure.in ++++ b/configure.in +@@ -283,21 +283,11 @@ AC_CHECK_TYPES([boolean]) + + # In case INADDR_NONE is not defined (like on Solaris) + have_inaddr_none="no" +-AC_MSG_CHECKING([for INADDR_NONE]) +-AC_RUN_IFELSE( +-[AC_LANG_PROGRAM( +-[[ ++AC_CHECK_DECL([INADDR_NONE],[have_inaddr_none="yes"],[have_inaddr_none="no"],[ + #include + #include + #include +-]], +-[[ +- if (inet_addr("10,5,2") == INADDR_NONE); +- return 0; +-]])], +-[have_inaddr_none="yes"], +-[have_inaddr_none="no"]) +-AC_MSG_RESULT($have_inaddr_none) ++]) + if test "x$have_inaddr_none" = "xno"; then + AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition]) + fi +@@ -428,18 +418,7 @@ if test "x$LPCAP" = "xno"; then + fi + fi + +-AC_MSG_CHECKING([for pcap_lex_destroy]) +-AC_RUN_IFELSE( +-[AC_LANG_PROGRAM( +-[[ +-#include +-]], +-[[ +- pcap_lex_destroy(); +-]])], +-[have_pcap_lex_destroy="yes"], +-[have_pcap_lex_destroy="no"]) +-AC_MSG_RESULT($have_pcap_lex_destroy) ++AC_CHECK_FUNC([pcap_lex_destroy],[have_pcap_lex_destroy="yes"],[have_pcap_lex_destroy="no"]) + if test "x$have_pcap_lex_destroy" = "xyes"; then + AC_DEFINE([HAVE_PCAP_LEX_DESTROY],[1],[Can cleanup lex buffer stack created by pcap bpf filter]) + fi +@@ -717,7 +696,7 @@ fi + AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta] [daq_dp_add_dc]) + + AC_MSG_CHECKING([for daq real addresses]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -771,7 +750,7 @@ if test "x$ac_cv_func_daq_dp_add_dc" = " + fi + + AC_MSG_CHECKING([for daq address space ID]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -789,7 +768,7 @@ if test "x$have_daq_address_space_id" = + fi + + AC_MSG_CHECKING([for daq flow ID]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -807,7 +786,7 @@ if test "x$have_daq_flow_id" = "xyes"; t + fi + + AC_MSG_CHECKING([for daq extended flow modifiers]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -828,7 +807,7 @@ if test "x$have_daq_ext_modflow" = "xyes + fi + + AC_MSG_CHECKING([for daq query flow]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -849,7 +828,7 @@ if test "x$have_daq_queryflow" = "xyes"; + fi + + AC_MSG_CHECKING([for daq data channel flags]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -867,7 +846,7 @@ if test "x$have_daq_data_channel_flags" + fi + + AC_MSG_CHECKING([for separate IP versions on pinhole endpoints]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -886,7 +865,7 @@ if test "x$have_daq_data_channel_separat + fi + + AC_MSG_CHECKING([for DAQ_VERDICT_RETRY]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -904,7 +883,7 @@ if test "x$have_daq_verdict_retry" = "xy + fi + + AC_MSG_CHECKING([for daq packet trace]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -924,7 +903,7 @@ else + fi + + AC_MSG_CHECKING([for daq verdict reason]) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include diff -Nru snort-2.9.15.1/debian/patches/decoding_do_not_assume_ipv4 snort-2.9.20/debian/patches/decoding_do_not_assume_ipv4 --- snort-2.9.15.1/debian/patches/decoding_do_not_assume_ipv4 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/decoding_do_not_assume_ipv4 2023-02-18 13:40:27.000000000 +0000 @@ -17,7 +17,7 @@ --- a/src/decode.c +++ b/src/decode.c -@@ -2063,7 +2063,7 @@ +@@ -2077,7 +2077,7 @@ void DecodePppPktEncapsulated(const uint * * Purpose: Decodes packets coming in raw on layer 2, like PPP. Coded and * in by Jed Pickle (thanks Jed!) and modified for a few little tweaks @@ -26,7 +26,7 @@ * * Arguments: p => pointer to decoded packet struct * pkthdr => ptr to the packet header -@@ -2084,9 +2084,17 @@ +@@ -2098,9 +2098,17 @@ void DecodeRawPkt(Packet * p, const DAQ_ p->pkth = pkthdr; p->pkt = pkt; diff -Nru snort-2.9.15.1/debian/patches/documentation snort-2.9.20/debian/patches/documentation --- snort-2.9.15.1/debian/patches/documentation 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/documentation 2023-02-18 13:40:27.000000000 +0000 @@ -2,7 +2,7 @@ Last-Update: 2011-11-28 --- /dev/null -+++ snort-2.9.2/doc/RELEASE.NOTES.2.3 ++++ b/doc/RELEASE.NOTES.2.3 @@ -0,0 +1,133 @@ +2005-04-22 - Snort 2.3.3 Released + @@ -138,7 +138,7 @@ + +* Many other bug fixes, please check the ChangeLog for details. --- /dev/null -+++ snort-2.9.2/doc/RELEASE.NOTES.2.6 ++++ b/doc/RELEASE.NOTES.2.6 @@ -0,0 +1,114 @@ +2007-05-09 - Snort 2.6.1.5 Released +[*] New Additions @@ -255,7 +255,7 @@ + + * Require each rule to have a unique sid/gid pair. --- /dev/null -+++ snort-2.9.2/doc/RELEASE.NOTES.2.7 ++++ b/doc/RELEASE.NOTES.2.7 @@ -0,0 +1,23 @@ +2007-07-09 - Snort 2.7.0 + @@ -281,7 +281,7 @@ + Ensure null termination on string buffers and perform initialization + on memory allocations. --- /dev/null -+++ snort-2.9.2/doc/RELEASE.NOTES.2.4 ++++ b/doc/RELEASE.NOTES.2.4 @@ -0,0 +1,138 @@ +2006-06-05 - Snort 2.4.5 Released + * Fixed potential evasion in URI content buffers diff -Nru snort-2.9.15.1/debian/patches/documentation_debian snort-2.9.20/debian/patches/documentation_debian --- snort-2.9.15.1/debian/patches/documentation_debian 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/documentation_debian 2023-02-18 13:40:27.000000000 +0000 @@ -9,7 +9,7 @@ --- a/snort.8 +++ b/snort.8 -@@ -951,6 +951,77 @@ +@@ -951,6 +951,77 @@ Used internally. Please refer to manual for more details. Any other signal might cause the daemon to close all opened files and exit. @@ -66,7 +66,7 @@ +and sent by email to a designed administrator if eneabled in the Debian package +configuration. + -+The location of the the log directory can be adjusted through the configuration of the ++The location of the log directory can be adjusted through the configuration of the +.B LOGDIR +parameter in the +.IR /etc/default/snort @@ -87,7 +87,7 @@ .SH HISTORY .B Snort has been freely available under the GPL license since 1998. -@@ -958,10 +1029,32 @@ +@@ -958,10 +1029,32 @@ has been freely available under the GPL .B Snort returns a 0 on a successful exit, 1 if it exits on an error. .SH BUGS diff -Nru snort-2.9.15.1/debian/patches/fix_compile_errors snort-2.9.20/debian/patches/fix_compile_errors --- snort-2.9.15.1/debian/patches/fix_compile_errors 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/fix_compile_errors 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -Description: Fix FTBFS when compiling linking by making hex_lookup static -Author: Javier Fernandez-Sanguino -Last-Update: 2020-12-06 - - ---- a/src/sfutil/util_jsnorm.c -+++ b/src/sfutil/util_jsnorm.c -@@ -90,7 +90,7 @@ - ACT_UNESCAPE - } ActionJSNorm; - --int hex_lookup[256]; -+static int hex_lookup[256]; // Defined as static to avoid clash with /src/preprocessors/spp_httpinspect.c - int valid_chars[256]; - - char decoded_out[6335]; ---- a/src/preprocessors/Stream6/stream_paf.h -+++ b/src/preprocessors/Stream6/stream_paf.h -@@ -68,7 +68,7 @@ - uint16_t s5_paf_port_registration_all (void* pv, uint16_t port, bool c2s, bool flush); - uint16_t s5_paf_service_registration (void* pv, uint16_t service, bool c2s, bool flush); - --enum FlushMode -+static enum FlushMode - { - FLUSH_MODE_NORMAL = 0, - FLUSH_MODE_PRE_DISCARD, ---- a/src/detection-plugins/sp_session.c -+++ b/src/detection-plugins/sp_session.c -@@ -80,7 +80,7 @@ - #include "snort.h" - #include "profiler.h" - #ifdef PERF_PROFILING --PreprocStats sessionPerfStats; -+extern PreprocStats sessionPerfStats; - extern PreprocStats ruleOTNEvalPerfStats; - #endif - diff -Nru snort-2.9.15.1/debian/patches/fix_ftbfs_in_manual.tex snort-2.9.20/debian/patches/fix_ftbfs_in_manual.tex --- snort-2.9.15.1/debian/patches/fix_ftbfs_in_manual.tex 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/fix_ftbfs_in_manual.tex 2023-02-18 13:40:27.000000000 +0000 @@ -48,7 +48,7 @@ --- a/src/dynamic-preprocessors/smtp/smtp_util.c +++ b/src/dynamic-preprocessors/smtp/smtp_util.c -@@ -160,7 +160,7 @@ +@@ -213,7 +213,7 @@ int SMTP_CopyToAltBuffer(SFSnortPacket * return 0; } @@ -59,7 +59,7 @@ int log_avail = 0; --- a/src/output-plugins/spo_alert_test.c +++ b/src/output-plugins/spo_alert_test.c -@@ -201,7 +201,7 @@ +@@ -201,7 +201,7 @@ void AlertTest(Packet *p, const char *ms /* * Function: ParseAlertTestArgs(char *) * diff -Nru snort-2.9.15.1/debian/patches/fix_ftbfs_rpc snort-2.9.20/debian/patches/fix_ftbfs_rpc --- snort-2.9.15.1/debian/patches/fix_ftbfs_rpc 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/fix_ftbfs_rpc 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -Description: Fix detection of libtirpc for Debian-based systems -Author: Javier Fernández-Sanguino Peña -Origin: vendor -Last-Update: 2020-12-06 - ---- a/configure.in -+++ b/configure.in -@@ -1037,13 +1037,69 @@ - echo - echo " ERROR! tirpc not found, get it by running " - echo " yum install libtirpc-devel " -- exit -+ exit 1 - fi - LIBS="${LIBS} -ltirpc" - extra_incl="-I/usr/include/tirpc" - fi - fi - -+########################################################### -+# Debian and Ubuntu do not have inbuilt SunRPC support # -+# in glibc 2.26 and later and is separately available # -+# in the libtirpc-dev package. # -+# Make sure we've got the library and link it # -+########################################################### -+ -+if test -f /etc/os-release ; then -+ DISTRO_ID=$(cat /etc/os-release |grep ^ID | awk -F = '{print $2}') -+ DISTRO_LIKE=$(cat /etc/os-release |grep ^ID_LIKE | awk -F = '{print $2}') -+ # Only continue if /usr/include/rpc/rpc.h does not exist or it exist but it is not provided by libc6 -+ if test -f /usr/include/rpc/rpc.h || dpkg -S /usr/include/rpc/rpc.h 2>&1 |grep ^libc6 >/dev/null; then -+ echo " Found RPC (provided by glibc, via libc6-dev package)" -+ else -+ if test $DISTRO_ID = "debian" || test $DISTRO_LIKE = "debian" ; then -+ TIRPC="" -+ AC_CHECK_LIB(tirpc,bindresvport,, TIRPC="no") -+ echo "$TIRPC" -+ if test "x$TIRPC" = "xno"; then -+ echo -+ echo " ERROR! tirpc not found, get it by running " -+ echo " apt install libtirpc-devel " -+ exit 1 -+ fi -+ LIBS="${LIBS} -ltirpc" -+ extra_incl="-I/usr/include/tirpc" -+ fi -+ fi -+fi -+ -+ -+# Alternative code to providing switchable RPC implementation -+# from https://wiki.gentoo.org/wiki/Glibc_2.26_porting_notes/RPC_implementation -+#AC_ARG_WITH([libtirpc], -+# [AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)])]) -+# -+#AS_IF([test "x$with_libtirpc" = xyes], -+# [PKG_CHECK_MODULES([TIRPC], -+# [libtirpc], -+# [RPC_CFLAGS=$TIRPC_CFLAGS; RPC_LIBS=$TIRPC_LIBS;], -+# [AC_MSG_ERROR([libtirpc requested, but library not found.])] -+# )], -+# [AC_CHECK_HEADER(rpc/rpc.h, -+# [RPC_CFLAGS=""; RPC_LIBS="";], -+# [AC_MSG_ERROR([sunrpc requested, but headers are not present.])] -+# )] -+#) -+# -+ -+#AC_SUBST(RPC_CFLAGS) -+#AC_SUBST(RPC_LIBS) -+# -+# or -+# CFLAGS="$CFLAGS $RPC_CFLAGS" -+# LIBS="${LIBS} $RPC_LIBS" -+ - Z_LIB="" - AC_CHECK_HEADERS(zlib.h,, Z_LIB="no") - if test "x$Z_LIB" = "xno"; then diff -Nru snort-2.9.15.1/debian/patches/fix_ftbfs_rpc.patch snort-2.9.20/debian/patches/fix_ftbfs_rpc.patch --- snort-2.9.15.1/debian/patches/fix_ftbfs_rpc.patch 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/debian/patches/fix_ftbfs_rpc.patch 2023-02-18 13:40:27.000000000 +0000 @@ -0,0 +1,84 @@ +From: Markus Koschany +Date: Fri, 20 Jan 2023 21:32:29 +0100 +Subject: fix_ftbfs_rpc + +--- + configure.in | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 58 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index b885cf0..0061ffa 100644 +--- a/configure.in ++++ b/configure.in +@@ -1016,13 +1016,70 @@ if test -f /etc/fedora-release ; then + echo + echo " ERROR! tirpc not found, get it by running " + echo " yum install libtirpc-devel " +- exit ++ exit 1 + fi + LIBS="${LIBS} -ltirpc" + extra_incl="-I/usr/include/tirpc" + fi + fi + ++########################################################### ++# Debian and Ubuntu do not have inbuilt SunRPC support # ++# in glibc 2.26 and later and is separately available # ++# in the libtirpc-dev package. # ++# Make sure we've got the library and link it # ++########################################################### ++ ++if test -f /etc/os-release ; then ++ DISTRO_ID=$(cat /etc/os-release |grep ^ID | awk -F = '{print $2}') ++ DISTRO_LIKE=$(cat /etc/os-release |grep ^ID_LIKE | awk -F = '{print $2}') ++ # Only continue if /usr/include/rpc/rpc.h does not exist or it exist but it is not provided by libc6 ++ if test -f /usr/include/rpc/rpc.h || dpkg -S /usr/include/rpc/rpc.h 2>&1 |grep ^libc6 >/dev/null; then ++ echo " Found RPC (provided by glibc, via libc6-dev package)" ++ else ++ if test $DISTRO_ID = "debian" || test $DISTRO_LIKE = "debian" ; then ++ TIRPC="" ++ AC_CHECK_LIB(tirpc,bindresvport,, TIRPC="no") ++ echo "$TIRPC" ++ if test "x$TIRPC" = "xno"; then ++ echo ++ echo " ERROR! tirpc not found, get it by running " ++ echo " apt install libtirpc-devel " ++ exit 1 ++ fi ++ LIBS="${LIBS} -ltirpc" ++ extra_incl="-I/usr/include/tirpc" ++ fi ++ fi ++fi ++ ++ ++# Alternative code to providing switchable RPC implementation ++# from https://wiki.gentoo.org/wiki/Glibc_2.26_porting_notes/RPC_implementation ++#AC_ARG_WITH([libtirpc], ++# [AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)])]) ++# ++#AS_IF([test "x$with_libtirpc" = xyes], ++# [PKG_CHECK_MODULES([TIRPC], ++# [libtirpc], ++# [RPC_CFLAGS=$TIRPC_CFLAGS; RPC_LIBS=$TIRPC_LIBS;], ++# [AC_MSG_ERROR([libtirpc requested, but library not found.])] ++# )], ++# [AC_CHECK_HEADER(rpc/rpc.h, ++# [RPC_CFLAGS=""; RPC_LIBS="";], ++# [AC_MSG_ERROR([sunrpc requested, but headers are not present.])] ++# )] ++#) ++# ++ ++#AC_SUBST(RPC_CFLAGS) ++#AC_SUBST(RPC_LIBS) ++# ++# or ++# CFLAGS="$CFLAGS $RPC_CFLAGS" ++# LIBS="${LIBS} $RPC_LIBS" ++ ++ + ################################################## + # Centos 8+ does not have inbuilt SunRPC support # + # in glibc and is separately availble in tirpc # diff -Nru snort-2.9.15.1/debian/patches/fix_upstream_typos snort-2.9.20/debian/patches/fix_upstream_typos --- snort-2.9.15.1/debian/patches/fix_upstream_typos 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/fix_upstream_typos 2023-02-18 13:40:27.000000000 +0000 @@ -5,7 +5,7 @@ --- a/src/output-plugins/spo_alert_test.c +++ b/src/output-plugins/spo_alert_test.c -@@ -201,7 +201,7 @@ +@@ -201,7 +201,7 @@ void AlertTest(Packet *p, const char *ms /* * Function: ParseAlertTestArgs(char *) * @@ -14,8 +14,6 @@ * initialize the preprocessor's data struct. This function doesn't * have to exist if it makes sense to parse the args in the init * function. -diff --git a/templates/sp_template.c b/templates/sp_template.c -index 80b0421e..a8a49f85 100644 --- a/templates/sp_template.c +++ b/templates/sp_template.c @@ -14,7 +14,7 @@ diff -Nru snort-2.9.15.1/debian/patches/series snort-2.9.20/debian/patches/series --- snort-2.9.15.1/debian/patches/series 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/series 2023-02-18 13:40:27.000000000 +0000 @@ -1,4 +1,3 @@ -autoconf config # Fixed in 2.9.7.3: #configure_werror @@ -11,6 +10,7 @@ signature_documentation config_disabled_rules documentation_debian -fix_compile_errors -fix_ftbfs_rpc +cross.patch decoding_do_not_assume_ipv4 +snort_binary_typos +fix_ftbfs_rpc.patch diff -Nru snort-2.9.15.1/debian/patches/signature_documentation snort-2.9.20/debian/patches/signature_documentation --- snort-2.9.15.1/debian/patches/signature_documentation 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/patches/signature_documentation 2023-02-18 13:40:27.000000000 +0000 @@ -4596,7 +4596,7 @@ + +-- +Attack Scenarios: -+An attacker can retrieve a sensitive file containing information on the the host. The attacker might then gain administrator access to the host or execute arbitrary code. ++An attacker can retrieve a sensitive file containing information on the host. The attacker might then gain administrator access to the host or execute arbitrary code. + +-- +Ease of Attack: @@ -79287,7 +79287,7 @@ +Detailed Information: +This rule is used to detect overly large numbers of SIP INVITE messages coming +into hosts on an internal network, which may indicate a denial of service -+attack in progress. Since this traffic could also be the the result of a poorly ++attack in progress. Since this traffic could also be the result of a poorly +configured user agent, or simply a very busy SIP proxy, careful analysis of +both the hosts receiving and sending this traffic is required before +determining that an attack has actually taken place. @@ -79498,7 +79498,7 @@ +Detailed Information: +This rule is used to detect overly large numbers of SIP REGISTER messages +coming into hosts on an internal network, which may indicate a denial of -+service attack in progress. Since this traffic could also be the the result of ++service attack in progress. Since this traffic could also be the result of +a poorly configured user agent, or simply a very busy SIP proxy, careful +analysis of both the hosts receiving and sending this traffic is required +before determining that an attack has actually taken place. @@ -156151,7 +156151,7 @@ + +-- +Attack Scenarios: -+An attacker can retrieve a sensitive file containing information on the the host. The attacker might then gain administrator access to the host or execute arbitrary code. ++An attacker can retrieve a sensitive file containing information on the host. The attacker might then gain administrator access to the host or execute arbitrary code. + +-- +Ease of Attack: @@ -200079,7 +200079,7 @@ +ePolicy agents, making this a potentially widespread and damaging attack in +a network. Because of a failure to authenticate credentials, +an attacker can perform administrator functions, such as file uploads, by -+connecting the the ePO web server. The malicious files may be pushed to ++connecting the ePO web server. The malicious files may be pushed to +the ePO agents by the ePO Orchestrator. + +-- diff -Nru snort-2.9.15.1/debian/patches/snort_binary_typos snort-2.9.20/debian/patches/snort_binary_typos --- snort-2.9.15.1/debian/patches/snort_binary_typos 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/debian/patches/snort_binary_typos 2023-02-18 13:40:27.000000000 +0000 @@ -0,0 +1,234 @@ +Description: Fix typos in upstream source + This patch fix typos detected by Debian's lintian in + the Snort binary and the Snort libraries +Author: Javier Fernández-Sanguino Peña +Origin: vendor +Last-Update: 2021-09-05 + + +--- a/ChangeLog ++++ b/ChangeLog +@@ -8100,7 +8100,7 @@ Snort 2.9.3 Beta + - SMTP/IMAP/POP will now extract non-encoded attachments when + content-type MIME headers are present. + - SMTP will not decode when ignore_data is present. +- - Content-Transfer-Encoding should take precendence over ++ - Content-Transfer-Encoding should take precedence over + Content-Type. + - Content-type should first check if boundary in non MIME header + state. +--- a/src/detection-plugins/sp_byte_extract.c ++++ b/src/detection-plugins/sp_byte_extract.c +@@ -238,7 +238,7 @@ static int ByteExtractVerify(ByteExtract + + if (data->base && !data->data_string_convert_flag) + { +- ParseError("byte_extract rule option has a string converstion type " ++ ParseError("byte_extract rule option has a string convertion type " + "(\"dec\", \"hex\", or \"oct\") without the \"string\" " + "argument."); + } +--- a/src/dynamic-plugins/sf_engine/examples/3665.c ++++ b/src/dynamic-plugins/sf_engine/examples/3665.c +@@ -139,7 +139,7 @@ int rule3665eval(void *p) { + if (contentMatch(p, rule3665options[1]->option_u.content, &cursor_normal) > 0) { + // flowbits:set "mysql.server_greeting"; + if (processFlowbits(p, rule3665options[2]->option_u.flowBit) > 0) { +- printf("not alerting, but thats ok!\n"); ++ printf("not alerting, but that's ok!\n"); + // flowbits:noalert; + /* NOTE: Not including any further functions for testing! */ + return RULE_NOMATCH; +--- a/src/dynamic-plugins/sf_engine/examples/bug34427.c ++++ b/src/dynamic-plugins/sf_engine/examples/bug34427.c +@@ -1,5 +1,5 @@ + /* +- * MISC IBM Lotus Domino LDAP server invalide DN message buffer overflow attempt ++ * MISC IBM Lotus Domino LDAP server invalid DN message buffer overflow attempt + * + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved +@@ -126,7 +126,7 @@ Rule ruleDOMINO_LDAP_INVALID_DN = { + + "attempted-admin", /* classification, generic */ + 0, /* hardcoded priority XXX NOT PROVIDED BY GRAMMAR YET! */ +- "MISC IBM Lotus Domino LDAP server invalide DN message buffer overflow attempt", /* message */ ++ "MISC IBM Lotus Domino LDAP server invalid DN message buffer overflow attempt", /* message */ + ruleDOMINO_LDAP_INVALID_DNrefs, /* ptr to references */ + NULL /* Meta data */ + }, +--- a/src/dynamic-preprocessors/dcerpc2/dce2_config.c ++++ b/src/dynamic-preprocessors/dcerpc2/dce2_config.c +@@ -3649,7 +3649,7 @@ static void DCE2_ScPrintConfig(const DCE + if (i != DCE2_PORTS__MAX) + { + if (sc->smb_max_chain == 0) +- _dpd.logMsg(" Maximum SMB command chaining: Unlimitied\n"); ++ _dpd.logMsg(" Maximum SMB command chaining: Unlimited\n"); + else if (sc->smb_max_chain == 1) + _dpd.logMsg(" Maximum SMB command chaining: No chaining allowed\n"); + else +--- a/src/dynamic-preprocessors/dnp3/dnp3_roptions.c ++++ b/src/dynamic-preprocessors/dnp3/dnp3_roptions.c +@@ -90,7 +90,7 @@ int DNP3FuncInit(struct _SnortConfig *sc + if (params == NULL) + { + DynamicPreprocessorFatalMessage("%s(%d): dnp3_func requires a " +- "number beween 0 and 255, or a valid function name.\n", ++ "number between 0 and 255, or a valid function name.\n", + *_dpd.config_file, *_dpd.config_line); + } + +@@ -112,7 +112,7 @@ int DNP3FuncInit(struct _SnortConfig *sc + if ((func_code > 255) || (func_code < 0) || (*endptr != '\0')) + { + DynamicPreprocessorFatalMessage("%s(%d): dnp3_func requires a " +- "number beween 0 and 255, or a valid function name.\n", ++ "number between 0 and 255, or a valid function name.\n", + *_dpd.config_file, *_dpd.config_line); + } + } +@@ -123,7 +123,7 @@ int DNP3FuncInit(struct _SnortConfig *sc + if (func_code == -1) + { + DynamicPreprocessorFatalMessage("%s(%d): dnp3_func requires a " +- "number beween 0 and 255, or a valid function name.\n", ++ "number between 0 and 255, or a valid function name.\n", + *_dpd.config_file, *_dpd.config_line); + } + } +@@ -208,7 +208,7 @@ int DNP3IndInit(struct _SnortConfig *sc, + if (params == NULL) + { + DynamicPreprocessorFatalMessage("%s(%d): dnp3_ind requires a " +- "number beween 0 and 255, or a valid function name.\n", ++ "number between 0 and 255, or a valid function name.\n", + *_dpd.config_file, *_dpd.config_line); + } + +--- a/src/log.c ++++ b/src/log.c +@@ -1377,7 +1377,7 @@ void PrintICMPHeader(FILE * fp, Packet * + break; + + case ICMP_ROUTER_ADVERTISE: +- fprintf(fp, "ROUTER ADVERTISMENT: " ++ fprintf(fp, "ROUTER ADVERTISEMENT: " + "Num addrs: %d Addr entry size: %d Lifetime: %u", + p->icmph->s_icmp_num_addrs, p->icmph->s_icmp_wpa, + ntohs(p->icmph->s_icmp_lifetime)); +--- a/src/log_text.c ++++ b/src/log_text.c +@@ -1251,7 +1251,7 @@ void LogICMPHeader(TextLog* log, Packet + break; + + case ICMP_ROUTER_ADVERTISE: +- TextLog_Print(log, "ROUTER ADVERTISMENT: " ++ TextLog_Print(log, "ROUTER ADVERTISEMENT: " + "Num addrs: %d Addr entry size: %d Lifetime: %u", + p->icmph->s_icmp_num_addrs, p->icmph->s_icmp_wpa, + ntohs(p->icmph->s_icmp_lifetime)); +--- a/src/parser.c ++++ b/src/parser.c +@@ -1779,7 +1779,7 @@ static int ParsePortList(RuleTreeNode *r + DEBUG_WRAP(DebugMessage(DEBUG_PORTLISTS,"Rule-PortVar Parsed: %s \n",port_str);); + + /* !ports - port lists can be mixed 80:90,!82, +- * so the old NOT flag is depracated for port lists ++ * so the old NOT flag is deprecated for port lists + */ + + /* set up any any flags */ +@@ -4874,7 +4874,7 @@ int CheckRuleStates(SnortConfig *sc) + * + * Returns: void function + * +- * Notes: specialGID is depracated, uses sigInfo.shared flag ++ * Notes: specialGID is deprecated, uses sigInfo.shared flag + * + *****************************************************************************/ + void SetRuleStates(SnortConfig *sc) +--- a/src/preprocessors/snort_httpinspect.c ++++ b/src/preprocessors/snort_httpinspect.c +@@ -1951,7 +1951,7 @@ static int ProcessXFF_HeaderList(HTTPINS + if( (Precedence > XFF_MAX_PREC) || (Precedence < XFF_MIN_PREC) ) + { + SnortSnprintf(ErrorString, ErrStrLen, +- "illegal precendence value: %u", Precedence); ++ "illegal precedence value: %u", Precedence); + if( Field_Name ) + free(Field_Name); + return( -1 ); +@@ -2179,7 +2179,7 @@ static int ProcessDecompressionTypeList( + if(strcmp(START_PORT_LIST, pcToken)) + { + SnortSnprintf(ErrorString, ErrStrLen, +- "Must start an algotithm list with the '%s' token.", ++ "Must start an algorithm list with the '%s' token.", + START_PORT_LIST); + + return -1; +--- a/src/sfutil/mpse.c ++++ b/src/sfutil/mpse.c +@@ -4,7 +4,7 @@ + * mpse.c + * + * An abstracted interface to the Multi-Pattern Matching routines, +-* thats why we're passing 'void *' objects around. ++* that's why we're passing 'void *' objects around. + * + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2002-2013 Sourcefire, Inc. +--- a/src/sfutil/sfportobject.c ++++ b/src/sfutil/sfportobject.c +@@ -2555,7 +2555,7 @@ int PortTableConsistencyCheck( PortTable + parray = calloc(1,SFPO_MAX_PORTS); + if(!parray) + { +- FatalError("Memory eror in PortTableComopile\n"); ++ FatalError("Memory error in PortTableComopile\n"); + } + + /* Make sure each port is only in one composite port object */ +@@ -3446,7 +3446,7 @@ uint16_t POParserGetShort(POParser * pop + { + buffer[k++]=(char)c; + buffer[k] =0; +- if( k == sizeof(buffer)-1 ) break; /* thats all that fits */ ++ if( k == sizeof(buffer)-1 ) break; /* that's all that fits */ + } + else + { +--- a/src/target-based/sf_attribute_table_parser.c ++++ b/src/target-based/sf_attribute_table_parser.c +@@ -7853,7 +7853,7 @@ int ParseTargetMap(char *filename) + if (feof(sfatin)) + { + SnortSnprintf(sfat_error_message, STD_BUF, +- "%s(%d): Emtpy target-based attribute file: '%s'\n", ++ "%s(%d): Empty target-based attribute file: '%s'\n", + file_name, file_line, filename); + fclose(sfatin); + return ret; +--- a/src/target-based/sf_attribute_table_parser.l ++++ b/src/target-based/sf_attribute_table_parser.l +@@ -218,7 +218,7 @@ int ParseTargetMap(char *filename) + if (feof(yyin)) + { + SnortSnprintf(sfat_error_message, STD_BUF, +- "%s(%d): Emtpy target-based attribute file: '%s'\n", ++ "%s(%d): Empty target-based attribute file: '%s'\n", + file_name, file_line, filename); + fclose(yyin); + return ret; +--- a/src/fpcreate.c ++++ b/src/fpcreate.c +@@ -993,7 +993,7 @@ int fpSetDetectSearchMethod(FastPatternC + else if( !strcasecmp(method,"mwm") ) + { + fp->search_method = MPSE_LOWMEM; +- LogMessage(" Search-Method = Low-Mem (MWM depracated)\n"); ++ LogMessage(" Search-Method = Low-Mem (MWM deprecated)\n"); + } + else if( !strcasecmp(method,"lowmem-q") || + !strcasecmp(method,"lowmem") ) diff -Nru snort-2.9.15.1/debian/rules snort-2.9.20/debian/rules --- snort-2.9.15.1/debian/rules 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/rules 2023-02-18 13:40:27.000000000 +0000 @@ -15,6 +15,8 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +include /usr/share/dpkg/architecture.mk + # Enable all hardening features as Snort is a network "listener" of sorts export DEB_BUILD_MAINT_OPTIONS = hardening=+all export CONFFLAGS= \ @@ -40,6 +42,10 @@ ! [ -e debian/snort/etc/ppp/ip-up.d/snort.ip-up.d ] || mv debian/snort/etc/ppp/ip-up.d/snort.ip-up.d debian/snort/etc/ppp/ip-up.d/snort ! [ -e debian/snort/etc/ppp/ip-down.d/snort.ip-down.d ] || mv debian/snort/etc/ppp/ip-down.d/snort.ip-down.d debian/snort/etc/ppp/ip-down.d/snort +override_dh_installcron: + dh_installcron + ! [ -e debian/snort-common/etc/cron.daily/snort-common ] || mv debian/snort-common/etc/cron.daily/snort-common debian/snort-common/etc/cron.daily/0snort-common + override_dh_installdocs: dh_installdocs # Remove files in snort-doc which were present in older versions of snort @@ -55,7 +61,7 @@ override_dh_auto_configure: # Cannot use this as libdir is defined twice # dh_auto_configure -- $(CONFFLAGS) - ./configure --build=i686-linux-gnu --prefix=/usr --includedir=\$$\{prefix\}/include --mandir=\$$\{prefix\}/share/man --infodir=\$$\{prefix\}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --disable-perfprofiling $(CONFFLAGS) + ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --includedir=\$$\{prefix\}/include --mandir=\$$\{prefix\}/share/man --infodir=\$$\{prefix\}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --disable-perfprofiling $(CONFFLAGS) override_dh_clean: diff -Nru snort-2.9.15.1/debian/snort-common.postinst snort-2.9.20/debian/snort-common.postinst --- snort-2.9.15.1/debian/snort-common.postinst 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/snort-common.postinst 2023-02-18 13:40:27.000000000 +0000 @@ -40,6 +40,7 @@ # rename probably existing cron job with old name using dpkg-maintscript-helper if dpkg-maintscript-helper supports mv_conffile; then dpkg-maintscript-helper mv_conffile /etc/cron.daily/5snort /etc/cron.daily/snort-common 2.9.15.1-5~ snort-common -- "$@" + dpkg-maintscript-helper mv_conffile /etc/cron.daily/snort-common /etc/cron.daily/0snort-common 2.9.15.1-6~ snort-common -- "$@" fi # Handle old configuration file if dpkg-maintscript-helper supports rm_conffile; then diff -Nru snort-2.9.15.1/debian/snort-common.postrm snort-2.9.20/debian/snort-common.postrm --- snort-2.9.15.1/debian/snort-common.postrm 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/snort-common.postrm 2023-02-18 13:40:27.000000000 +0000 @@ -6,17 +6,6 @@ set -e test $DEBIAN_SCRIPT_DEBUG && set -v -x -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' overwrit>r> -# for details, see /usr/doc/packaging-manual/ - case "$1" in purge) @@ -33,27 +22,21 @@ rm -f /etc/snort/database.conf fi ;; - abort-install|abort-upgrade) +esac + # if installation was aborted then revert the rename of the cron job using dpkg-maintscript-helper if dpkg-maintscript-helper supports mv_conffile; then dpkg-maintscript-helper mv_conffile \ /etc/cron.daily/5snort /etc/cron.daily/snort-common 2.9.15.1-5~ snort-common -- "$@" + dpkg-maintscript-helper mv_conffile \ + /etc/cron.daily/snort-common /etc/cron.daily/0snort-common 2.9.15.1-6~ snort-common -- "$@" fi # Restore the old configuration file if dpkg-maintscript-helper supports rm_conffile; then dpkg-maintscript-helper rm_conffile /etc/snort/database.conf 2.9.3~ snort-common -- "$@" fi - ;; - remove|upgrade|failed-upgrade|abort-install|abort-upgrade) - # nothing - ;; -esac - - - # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# - diff -Nru snort-2.9.15.1/debian/snort-common.preinst snort-2.9.20/debian/snort-common.preinst --- snort-2.9.15.1/debian/snort-common.preinst 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/snort-common.preinst 2023-02-18 13:40:27.000000000 +0000 @@ -3,20 +3,9 @@ set -e test $DEBIAN_SCRIPT_DEBUG && set -v -x -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' - GENCONF="/etc/snort/snort.conf" # generic configuration file DBCONF="/etc/snort/database.conf" # deprecated -case "$1" in - install) - # Do nothing - ;; - upgrade) # versions previous to 2.9.3 created the /etc/snort/database.conf # file for configuration #if dpkg --compare-versions "$2" le "2.9.3" && [ -e "$DBCONF" ] && ! [ -s "$DBCONF" ] @@ -32,7 +21,9 @@ if dpkg-maintscript-helper supports rm_conffile; then dpkg-maintscript-helper rm_conffile $DBCONF 2.9.3~ snort-common -- "$@" else + if [ "$1" = "upgrade" ]; then rm -f $DBCONF + fi fi fi @@ -40,30 +31,25 @@ # try first to use dpkg-maintscript-helper if dpkg-maintscript-helper supports mv_conffile; then dpkg-maintscript-helper mv_conffile /etc/cron.daily/5snort /etc/cron.daily/snort-common 2.9.15.1-5~ snort-common -- "$@" + dpkg-maintscript-helper mv_conffile /etc/cron.daily/snort-common /etc/cron.daily/0snort-common 2.9.15.1-6~ snort-common -- "$@" else # Manually move the file, this will generate a dpkg prompt to # approve the changes if [ -e /etc/cron.daily/5snort ]; then + if [ "$1" = "upgrade" ]; then mv /etc/cron.daily/5snort /etc/cron.daily/snort-common + fi + fi + if [ -e /etc/cron.daily/snort-common ]; then + if [ "$1" = "upgrade" ]; then + mv /etc/cron.daily/snort-common /etc/cron.daily/0snort-common + fi fi fi - ;; - configure) - # Do nothing - ;; - abort-upgrade) - ;; - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 - diff -Nru snort-2.9.15.1/debian/snort-rules-default.README.Debian snort-2.9.20/debian/snort-rules-default.README.Debian --- snort-2.9.15.1/debian/snort-rules-default.README.Debian 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/snort-rules-default.README.Debian 2023-02-18 13:40:27.000000000 +0000 @@ -19,7 +19,7 @@ However, since providing a network IDS such as Snort without *any* ruleset makes it completely useless, for the benefit of those users with no Internet - connection, the Debian maintainer continued provided the the free (GPLv2) + connection, the Debian maintainer continued provided the free (GPLv2) ruleset that was provided with the Snort back in 2005. This ruleset was later increased with the rulese provided in "Community" ruleset later on (in 2007). diff -Nru snort-2.9.15.1/debian/snort-stat.8 snort-2.9.20/debian/snort-stat.8 --- snort-2.9.15.1/debian/snort-stat.8 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/snort-stat.8 2023-02-18 13:40:27.000000000 +0000 @@ -13,7 +13,7 @@ The output of this script is mailed to the user confgured in the /etc/snort/snort.debian.conf configuration file. -The cron script /etc/cron.daily/snort-common uses this script. +The cron script /etc/cron.daily/0snort-common uses this script. .Sh SEE ALSO .Xr snort 8 .Sh AUTHORS diff -Nru snort-2.9.15.1/debian/snort.lintian-overrides snort-2.9.20/debian/snort.lintian-overrides --- snort-2.9.15.1/debian/snort.lintian-overrides 2021-04-10 20:55:04.000000000 +0000 +++ snort-2.9.20/debian/snort.lintian-overrides 2023-02-18 13:40:27.000000000 +0000 @@ -1,3 +1,7 @@ # The maintainer script uses --no-create-home but this gets flagged # by lintian as an error when it is not. -snort: maintainer-script-should-not-use-adduser-system-without-home +snort: maintainer-script-lacks-home-in-adduser +# The INSTALL documentation contains some information relevant to using Snort +# (in the section "Potential Problem between a Network Interface Card (NIC) and +# Snort" +snort: package-contains-upstream-installation-documentation diff -Nru snort-2.9.15.1/debian/upstream/metadata snort-2.9.20/debian/upstream/metadata --- snort-2.9.15.1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/debian/upstream/metadata 2023-02-18 13:40:27.000000000 +0000 @@ -0,0 +1,10 @@ +Bug-Submit: https://www.snort.org/community#bugs +CPE: cpe:/a:snort:snort +FAQ: https://snort.org/faq +Documentation: https://snort.org/documents +Other-References: https://snort.org/resources +Registration: https://snort.org/users/sign_in +Repository: https://github.com/snort3/snort3.git +Repository-Browse: https://github.com/snort3/snort3 +Security-Contact: bugs@snort.org + diff -Nru snort-2.9.15.1/depcomp snort-2.9.20/depcomp --- snort-2.9.15.1/depcomp 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/depcomp 2022-05-23 15:42:32.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,9 +783,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru snort-2.9.15.1/doc/Makefile.in snort-2.9.20/doc/Makefile.in --- snort-2.9.15.1/doc/Makefile.in 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/doc/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,12 +89,12 @@ build_triplet = @build@ host_triplet = @host@ subdir = doc -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(dist_doc_DATA) AUTHORS INSTALL NEWS README TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -102,7 +112,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -140,6 +150,8 @@ am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(dist_doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS INSTALL NEWS README \ + TODO DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -185,6 +197,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -359,14 +372,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -411,7 +423,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -560,6 +575,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_docDATA +.PRECIOUS: Makefile + .tex.dvi: if [ -f /etc/centos-release ]; then \ diff -Nru snort-2.9.15.1/doc/README snort-2.9.20/doc/README --- snort-2.9.15.1/doc/README 2019-12-03 09:06:14.000000000 +0000 +++ snort-2.9.20/doc/README 2022-04-29 07:12:49.000000000 +0000 @@ -1,4 +1,4 @@ -Snort Version 2.9.15.1 +Snort Version 2.9.20 by Martin Roesch and The Snort Team (http://www.snort.org/contact#team) @@ -8,7 +8,7 @@ ****************************************************************************** COPYRIGHT -Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +Copyright (C) 2014-2021 Cisco and/or its affiliates. All rights reserved. Copyright (C) 2001-2013 Sourcefire Inc. Copyright (C) 1998-2001 Martin Roesch diff -Nru snort-2.9.15.1/doc/README.counts snort-2.9.20/doc/README.counts --- snort-2.9.15.1/doc/README.counts 2019-12-03 09:06:14.000000000 +0000 +++ snort-2.9.20/doc/README.counts 2022-04-20 14:15:07.000000000 +0000 @@ -167,28 +167,28 @@ * Replace = packets Snort modified, for example, due to normalization or replace rules. This can only happen in inline mode with a compatible DAQ. -* Whitelist = packets that caused Snort to allow a flow to pass w/o inspection - by any analysis program. Like blacklist, this is done by the DAQ or by Snort +* AllowFlow = packets that caused Snort to allow a flow to pass w/o inspection + by any analysis program. Like blocklist, this is done by the DAQ or by Snort on subsequent packets. -* Blacklist = packets that caused Snort to block a flow from passing. This is +* BlockFlow = packets that caused Snort to block a flow from passing. This is the case when a block TCP rule fires. If the DAQ supports this in hardware, no further packets will be seen by Snort for that session. If not, snort will block each packet and this count will be higher. * Ignore = packets that caused Snort to allow a flow to pass w/o inspection - by this instance of Snort. Like blacklist, this is done by the DAQ or by + by this instance of Snort. Like blocklist, this is done by the DAQ or by Snort on subsequent packets. -* Int Blklst = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that - are being blocked. These packets could get the Blacklist verdict if +* Int Blkflw = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that + are being blocked. These packets could get the BlockFlow verdict if config tunnel_verdicts was set for the given protocol. Note that these counts are output only if non-zero. Also, this count is incremented on the first packet in the flow that alerts. The alerting packet and all following packets on the flow will be counted under Block. -* Int Whtlst = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that - are being allowed. These packets could get the Whitelist verdict if +* Int Alwflw = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that + are being allowed. These packets could get the AllowFlow verdict if config tunnel_verdicts was set for the given protocol. Note that these counts are output only if non-zero. Also, this count is incremented for all packets on the flow starting with the alerting packet. @@ -210,8 +210,8 @@ Allow: 3716022 (100.000%) Block: 0 ( 0.000%) Replace: 0 ( 0.000%) - Whitelist: 0 ( 0.000%) - Blacklist: 0 ( 0.000%) + AllowFlow: 0 ( 0.000%) + BlockFlow: 0 ( 0.000%) Ignore: 0 ( 0.000%) =============================================================================== Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/doc/snort_manual.pdf and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/doc/snort_manual.pdf differ diff -Nru snort-2.9.15.1/doc/snort_manual.tex snort-2.9.20/doc/snort_manual.tex --- snort-2.9.15.1/doc/snort_manual.tex 2019-12-03 09:39:42.000000000 +0000 +++ snort-2.9.20/doc/snort_manual.tex 2022-05-23 15:44:18.000000000 +0000 @@ -101,7 +101,7 @@ \begin{document} -\title{SNORT\textsuperscript{\textregistered} Users Manual\\2.9.15.1} +\title{SNORT\textsuperscript{\textregistered} Users Manual\\2.9.20} \author{The Snort Project} @@ -115,7 +115,7 @@ Copyright \copyright 2003-2013 Sourcefire, Inc. -Copyright \copyright 2014-2019 Cisco and/or its affiliates. All rights reserved. +Copyright \copyright 2014-2021 Cisco and/or its affiliates. All rights reserved. \tableofcontents{} @@ -742,11 +742,11 @@ \item \texttt{Replace} packets Snort modified. -\item \texttt{Whitelist} +\item \texttt{AllowFlow} packets that caused Snort to allow a flow to pass w/o inspection by any analysis program. -\item \texttt{Blacklist} +\item \texttt{BlockFlow} packets that caused Snort to block a flow from passing. \item \texttt{Ignore} @@ -1136,28 +1136,28 @@ \item Replace = packets Snort modified, for example, due to normalization or replace rules. This can only happen in inline mode with a compatible DAQ. -\item Whitelist = packets that caused Snort to allow a flow to pass w/o -inspection by any analysis program. Like blacklist, this is done by the DAQ or +\item AllowFlow = packets that caused Snort to allow a flow to pass w/o +inspection by any analysis program. Like BlockFlow, this is done by the DAQ or by Snort on subsequent packets. -\item Blacklist = packets that caused Snort to block a flow from passing. This +\item BlockFlow = packets that caused Snort to block a flow from passing. This is the case when a block TCP rule fires. If the DAQ supports this in hardware, no further packets will be seen by Snort for that session. If not, snort will block each packet and this count will be higher. \item Ignore = packets that caused Snort to allow a flow to pass w/o inspection -by this instance of Snort. Like blacklist, this is done by the DAQ or by Snort +by this instance of Snort. Like BlockFlow, this is done by the DAQ or by Snort on subsequent packets. -\item Int Blklst = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that are -being blocked. These packets could get the Blacklist verdict if \texttt{config +\item Int Blkflw = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that are +being blocked. These packets could get the BlockFlow verdict if \texttt{config tunnel\_verdicts} was set for the given protocol. Note that these counts are output only if non-zero. Also, this count is incremented on the first packet in the flow that alerts. The alerting packet and all following packets on the flow will be counted under Block. -\item Int Whtlst = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that are -being allowed. These packets could get the Whitelist verdict if \texttt{config +\item Int Alwflw = packets that are GTP, Teredo, 6in4 or 4in6 encapsulated that are +being allowed. These packets could get the AllowFlow verdict if \texttt{config tunnel\_verdicts} was set for the given protocol. Note that these counts are output only if non-zero. Also, this count is incremented for all packets on the flow starting with the alerting packet. @@ -1181,8 +1181,8 @@ Allow: 3716022 (100.000%) Block: 0 ( 0.000%) Replace: 0 ( 0.000%) - Whitelist: 0 ( 0.000%) - Blacklist: 0 ( 0.000%) + AllowFlow: 0 ( 0.000%) + BlockFlow: 0 ( 0.000%) Ignore: 0 ( 0.000%) =============================================================================== \end{verbatim} @@ -2443,13 +2443,13 @@ \texttt{config disable\_replace} & Disables content replace option. Default behaviour is to replace content. \\ -\hline \texttt{config tunnel\_verdicts: gtp|teredo|6in4|4in6} & By default, whitelist -and blacklist verdicts are handled internally by Snort for GTP, Teredo, 6in4 and 4in6 +\hline \texttt{config tunnel\_verdicts: gtp|teredo|6in4|4in6} & By default, AllowFlow +and BlockFlow verdicts are handled internally by Snort for GTP, Teredo, 6in4 and 4in6 encapsulated traffic. This means Snort actually gives the DAQ a pass or block verdict instead. This is to workaround cases where the DAQ would apply the verdict to the whole tunnel instead of the individual session within the tunnel. If your DAQ decodes GTP, Teredo, 6in4 or 4in6 correctly, setting this config -will allow the whitelist or blacklist verdict to go to the DAQ. There is a +will allow the AllowFlow or BlockFlow verdict to go to the DAQ. There is a modest performance boost by doing this where possible since Snort won't see the remaining packets on the session. \\ @@ -4256,6 +4256,28 @@ \end{note} +\item \texttt{normalize\_random\_nulls\_in\_text} + +This option normalizes the text content with randomly encoded null bytes in 16LE,16BE,32LE and +32BE UTF encodings to UTF8 in the server response. It relies on file preprocessor to determine +if the content is text. Hence file preprocessor should be enabled and configured with prepackaged +file magics wihtout which this option is not effective. + +\begin {note} +This opton relies on file prepreprocessor to determine if content can safely be considered as text +before normalizing. However, it is possible that non text file types unknown to file preprocessor +may get normalized as this option treats file types unknown to file preprocessor as text. Such cases +may result in false positives or false negatives in detection. + +\end{note} + +\item \texttt{fast\_blocking} + +This option enables inspecting http data before the data is flushed. This enables early IPS rule +evaluation so that the block rules will take into effect and the connection is blocked at the earliest +instead of blocking later after flushing the data. This config will be effective only when inline +normalisation is enabled. + \item \texttt{disabled} This optional keyword is allowed with any policy to avoid packet processing. @@ -9399,7 +9421,7 @@ \subsection{Reputation Preprocessor} \label{sub:reputation} -Reputation preprocessor provides basic IP blacklist/whitelist capabilities, to +Reputation preprocessor provides basic IP block-list/do-not-block-list capabilities, to block/drop/pass traffic from IP addresses listed. In the past, we use standard Snort rules to implement Reputation-based IP blocking. This preprocessor will address the performance issue and make the IP reputation management easier. @@ -9423,11 +9445,11 @@ \hline \texttt{scan\_local} & NONE & NO & OFF\\ \hline -\texttt{blacklist} & \texttt{} & NO & NONE\\ +\texttt{BlockFlow} & \texttt{} & NO & NONE\\ \hline -\texttt{whitelist} & \texttt{} & NO & NONE\\ +\texttt{AllowFlow} & \texttt{} & NO & NONE\\ \hline -\texttt{priority} & [blacklist whitelist] & NO & \texttt{priority whitelist}\\ +\texttt{priority} & [BlockFlow AllowFlow] & NO & \texttt{priority AllowFlow}\\ \hline \texttt{nested\_ip} & [inner outer both] & NO & \texttt{nested\_ip inner}\\ \hline @@ -9458,11 +9480,11 @@ \end{itemize} \end{itemize} -\item[] \texttt{blacklist/whitelist} +\item[] \texttt{BlockFlow/AllowFlow} \begin{itemize} \item[] The IP lists are loaded from external files. It supports relative - paths for inclusion and \$variables for path. Multiple blacklists or - whitelists are supported. + paths for inclusion and \$variables for path. Multiple BlockFlows or + AllowFlows are supported. \item[] Note: if the same IP is redefined later, it will overwrite the previous one. In other words, IP lists always favors the last file or @@ -9471,15 +9493,15 @@ \item[] \texttt{priority} \begin{itemize} -\item[] Specify either blacklist or whitelist has higher priority when - source/destination is on blacklist while destination/source is on - whitelist. By default, whitelist has higher priority. In other words, +\item[] Specify either BlockFlow or AllowFlow has higher priority when + source/destination is on BlockFlow while destination/source is on + AllowFlow. By default, AllowFlow has higher priority. In other words, the packet will be passed when either source or destination is - whitelisted. + AllowFlowed. \item[] Note: this only defines priority when there is a decision conflict, during run-time. During initialization time, if the same IP address - is defined in whitelist and blacklist, whoever the last one defined + is defined in AllowFlow and BlockFlow, whoever the last one defined will be the final one. Priority does not work on this case. \end{itemize} @@ -9491,13 +9513,13 @@ \item[] \texttt{white} \begin{itemize} -\item[] Specify the meaning of whitelist. When white means unblack, it - unblacks IPs that are in blacklists; when white means trust, the +\item[] Specify the meaning of AllowFlow. When white means unblack, it + unblacks IPs that are in BlockFlows; when white means trust, the packet gets bypassed, without further detection by snort. You can only specify either unblack or trust. - \item[] Note: when white means unblack, whitelist always has higher priority - than blacklist. + \item[] Note: when white means unblack, AllowFlow always has higher priority + than BlockFlow. \end{itemize} \end{itemize} @@ -9506,26 +9528,26 @@ \footnotesize \begin{verbatim} preprocessor reputation:\ - blacklist /etc/snort/default.blacklist, \ - whitelist /etc/snort/default.whitelist + block-list /etc/snort/default.blacklist, \ + do-not-block-list /etc/snort/default.whitelist preprocessor reputation: \ nested_ip both, \ - blacklist /etc/snort/default.blacklist, \ - whitelist /etc/snort/default.whitelist + block-list /etc/snort/default.blacklist, \ + do-not-block-list /etc/snort/default.whitelist preprocessor reputation: \ memcap 4095, scan_local, nested_ip both, \ - priority whitelist, \ - blacklist /etc/snort/default.blacklist, \ - whitelist /etc/snort/default.whitelist, + priority do-not-block-list, \ + block-list /etc/snort/default.blacklist, \ + do-not-block-list /etc/snort/default.whitelist, white trust $REP_BLACK_FILE1 = ../dshield.list $REP_BLACK_FILE2 = ../snort.org.list preprocessor reputation: \ - blacklist $REP_BLACK_FILE1,\ - blacklist $REP_BLACK_FILE2 + block-list $REP_BLACK_FILE1,\ + block-list $REP_BLACK_FILE2 \end{verbatim} \normalsize @@ -9587,8 +9609,8 @@ \item[] \footnotesize \begin{verbatim} preprocessor reputation: \ - blacklist /etc/snort/default.blacklist - whitelist /etc/snort/default.whitelist + block-list /etc/snort/default.blacklist + do-not-block-list /etc/snort/default.whitelist In file "default.blacklist" # These two entries will match all ipv4 addresses @@ -9609,9 +9631,9 @@ \hline SID & Description\\ \hline - 1 & Packet is blacklisted. \\ + 1 & Packet is BlockFlowed. \\ \hline - 2 & Packet is whitelisted. \\ + 2 & Packet is AllowFlowed. \\ \hline 3 & Packet is inspected. \\ \hline @@ -9646,7 +9668,7 @@ memory. If this option isn't set, standard memory is used. This option must specify a path or directory where IP lists will be loaded in shared memory. One snort instance will create and maintain the shared IP lists. - We use instance ID 1, specified in the snort \texttt{-G} option to be the master snort. + We use instance ID 1, specified in the snort \texttt{-G} option to be the primary snort. All the other snort instances are clients (readers). \item[] \textit{Syntax} @@ -9694,8 +9716,8 @@ /user/reputation/iplists \end{verbatim} - In order to separate whitelist with blacklist, you need to specify - whitelist with \texttt{.wlf} extension and blacklist with \texttt{.blf} extension. + In order to separate AllowFlow with BlockFlow, you need to specify + AllowFlow with \texttt{.wlf} extension and BlockFlow with \texttt{.blf} extension. \item In snort config file, specify shared memory support with the path to IP files.\\ For example: @@ -9710,7 +9732,7 @@ shared_refresh 300 \end{verbatim} - \item Start shared memory master(writer) with \texttt{-G} 0 option. Note: only one master + \item Start shared memory primary(writer) with \texttt{-G} 0 option. Note: only one primary should be enabled. \item Start shared memory clients (readers) with \texttt{-G} 1 or other IDs. Note: for one ID, only one snort instance should be enabled. diff -Nru snort-2.9.15.1/etc/Makefile.in snort-2.9.20/etc/Makefile.in --- snort-2.9.15.1/etc/Makefile.in 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/etc/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = etc -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +119,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +165,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -262,14 +274,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign etc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign etc/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -293,7 +304,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -437,6 +451,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/etc/file_magic.conf snort-2.9.20/etc/file_magic.conf --- snort-2.9.15.1/etc/file_magic.conf 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/etc/file_magic.conf 2022-04-20 14:15:07.000000000 +0000 @@ -167,6 +167,6 @@ file type:PDF; id:288; category:PDF files; msg:"PDF file "; rev:1; content:| 25 50 44 46 2D 31 2E 36|; offset:0; ver:1.6; file type:PDF; id:289; category:PDF files; msg:"PDF file "; rev:1; content:| 25 50 44 46 2D 31 2E 37|; offset:0; ver:1.7; file type:RAR; id:290; category:Archive; msg:"WinRAR compressed archive file"; rev:1; content:| 52 61 72 21 1A 07 01 00 |; offset:0; -file type:ALZ; id:291; category:Archive; msg:"Archive file for Microsoft created using software ALZip"; rev:1; content:| 41 4C 5A 01 0A|; offset:0; +file type:ALZ; id:291; category:Archive; msg:"Archive file for Microsoft created using software ALZip"; rev:1; content:| 41 4C 5A 01|; offset:0; file type:EGG; id:292; category:Archive; msg:"Archive File for Microsoft created using software ALZip"; rev:1; content:| 45 47 47 41|; offset:0; file type:HWP; id:293; category:Archive; msg:"Word Document written in Hangul, a Korean language"; rev:1; content:| 48 57 50 20 44 6F 63 75 6D 65 6E 74 20 46 69 6C 65|; offset:0; diff -Nru snort-2.9.15.1/etc/gen-msg.map snort-2.9.20/etc/gen-msg.map --- snort-2.9.15.1/etc/gen-msg.map 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/etc/gen-msg.map 2022-04-20 14:15:07.000000000 +0000 @@ -167,6 +167,7 @@ 116 || 296 || snort_decoder: WARNING: IPv6 packet includes out-of-order extension headers 116 || 297 || snort_decoder: WARNING: Two or more GTP encapsulation layers are present 116 || 298 || snort_decoder: WARNING: GTP header length is invalid +116 || 300 || snort_decoder: WARNING: Too many levels for decoding 116 || 400 || snort_decoder: WARNING: XMAS Attack Detected 116 || 401 || snort_decoder: WARNING: Nmap XMAS Attack Detected 116 || 402 || snort_decoder: WARNING: DOS NAPTHA Vulnerability Detected @@ -269,6 +270,9 @@ 119 || 32 || http_inspect: SIMPLE REQUEST 119 || 33 || http_inspect: UNESCAPED SPACE IN HTTP URI 119 || 34 || http_inspect: TOO MANY PIPELINED REQUESTS +119 || 36 || http_inspect: INVALID RANGE UNIT FORMAT +119 || 37 || http_inspect: RANGE FIELD PRESENT IN NON GET METHOD +119 || 38 || http_inspect: ERROR IN RANGE FIELD OF REQUEST HEADER 120 || 1 || http_inspect: ANOMALOUS HTTP SERVER ON UNDEFINED HTTP PORT 120 || 2 || http_inspect: INVALID STATUS CODE IN HTTP RESPONSE 120 || 3 || http_inspect: NO CONTENT-LENGTH OR TRANSFER-ENCODING IN HTTP RESPONSE @@ -298,6 +302,9 @@ 120 || 27 || http_inspect: NO END OF HEADER IN HTTP RESPONSE 120 || 28 || http_inspect: INVALID CHUNK SIZE OR CHUNK SIZE FOLLOWED BY JUNK CHARACTERS 120 || 29 || http_inspect: INVALID VERSION IN HTTP RESPONSE HEADER +120 || 30 || http_inspect: INVALID CONTENT RANGE UNIT FORMAT +120 || 31 || http_inspect: ERROR IN RANGE FIELD OF RESPONSE HEADER +120 || 32 || http_inspect: RANGE FIELD NOT PRESENT IN GET METHOD, BUT RESPONSE WITH PARTIAL CONTENT 121 || 1 || flow-portscan: Fixed Scale Scanner Limit Exceeded 121 || 2 || flow-portscan: Sliding Scale Scanner Limit Exceeded 121 || 3 || flow-portscan: Fixed Scale Talker Limit Exceeded @@ -395,6 +402,7 @@ 129 || 18 || stream5: Data sent on stream after TCP Reset received 129 || 19 || stream5: TCP window closed before receiving data 129 || 20 || stream5: TCP session without 3-way handshake +129 || 21 || stream5: ACK with window size 0 received post FIN,ACK 130 || 1 || dcerpc: Maximum memory usage reached 131 || 1 || dns: Obsolete DNS RData Type 131 || 2 || dns: Experimental DNS RData Type diff -Nru snort-2.9.15.1/etc/snort.conf snort-2.9.20/etc/snort.conf --- snort-2.9.15.1/etc/snort.conf 2019-12-03 09:39:42.000000000 +0000 +++ snort-2.9.20/etc/snort.conf 2022-05-23 15:44:18.000000000 +0000 @@ -10,7 +10,7 @@ # Snort bugs: bugs@snort.org # # Compatible with Snort Versions: -# VERSIONS : 2.9.15.1 +# VERSIONS : 2.9.20 # # Snort build options: # OPTIONS : --enable-gre --enable-mpls --enable-targetbased --enable-ppm --enable-perfprofiling --enable-zlib --enable-active-response --enable-normalizer --enable-reload --enable-react --enable-flexresp3 diff -Nru snort-2.9.15.1/install-sh snort-2.9.20/install-sh --- snort-2.9.15.1/install-sh 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/install-sh 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -266,122 +271,113 @@ fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +387,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -450,8 +444,8 @@ else # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 @@ -472,15 +466,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +484,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 @@ -519,9 +510,9 @@ done # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru snort-2.9.15.1/ltmain.sh snort-2.9.20/ltmain.sh --- snort-2.9.15.1/ltmain.sh 2019-12-03 09:30:38.000000000 +0000 +++ snort-2.9.20/ltmain.sh 2022-05-23 15:42:26.000000000 +0000 @@ -1,9 +1,12 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.2 +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -23,881 +26,2112 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --no-warn don't display warning messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 -TIMESTAMP="" -package_revision=1.3337 +VERSION=2.4.6 +package_revision=2.4.6 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + : ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` -# Make sure we have an absolute path for reexecution: +# Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) - progdir=$func_dirname_result + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; *) - save_IFS="$IFS" + _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do - IFS="$save_IFS" + IFS=$_G_IFS test -x "$progdir/$progname" && break done - IFS="$save_IFS" + IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' - -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. -# Standard options: opt_dry_run=false -opt_help=false opt_quiet=false opt_verbose=false -opt_warning=: -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: } -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () { - $opt_verbose && func_echo ${1+"$@"} + $debug_cmd - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS } -# func_echo_all arg... + +# func_echo_all ARG... +# -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } -# func_error arg... + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} + $debug_cmd -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + $require_term_colors - # bash bug again: - : + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } -# func_fatal_error arg... + +# func_fatal_error ARG... +# ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { - func_error ${1+"$@"} - exit $EXIT_FAILURE -} + $debug_cmd -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" + func_error "$*" + exit $EXIT_FAILURE } -help="Try \`$progname --help' for more information." ## default -# func_grep expression filename +# func_grep EXPRESSION FILENAME +# ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { + $debug_cmd + $GREP "$1" "$2" >/dev/null 2>&1 } -# func_mkdir_p directory-path +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { - my_directory_path="$1" - my_dir_list= + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do + while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" + _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac + case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : + $MKDIR "$_G_dir" 2>/dev/null || : done - IFS="$save_mkdir_p_IFS" + IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi } -# func_mktempdir [string] +# func_mktempdir [BASENAME] +# ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. +# given, BASENAME is the basename for that directory. func_mktempdir () { - my_template="${TMPDIR-/tmp}/${1-$progname}" + $debug_cmd - if test "$opt_dry_run" = ":"; then + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" + _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - if test ! -d "$my_tmpdir"; then + if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + _G_tmpdir=$_G_template-${RANDOM-0}$$ - save_mktempdir_umask=`umask` + func_mktempdir_umask=`umask` umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi - $ECHO "$my_tmpdir" + $ECHO "$_G_tmpdir" } -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () { - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac + $debug_cmd - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. ;; *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : } -# func_quote_for_expand arg +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () +{ + $debug_cmd + + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done +} + + +# func_quote_for_expand ARG +# ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { + $debug_cmd + case $1 in *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) - my_arg="$1" ;; + _G_arg=$1 ;; esac - case $my_arg in + case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" + _G_arg=\"$_G_arg\" ;; esac - func_quote_for_expand_result="$my_arg" + func_quote_for_expand_result=$_G_arg } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" + $opt_quiet || { + func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } + # func_tr_sh +# ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac } -# func_version -# Echo version message to standard output and exit. -func_version () +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () { - $opt_debug + $debug_cmd - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? + $opt_verbose && func_echo "$*" + + : } -# func_usage -# Echo short help message to standard output and exit. -func_usage () + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" } -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. func_help () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi + func_usage_message + $ECHO "$long_help_message" + exit 0 } -# func_missing_arg argname + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - $opt_debug + $debug_cmd - func_error "missing argument for $1." + func_error "Missing argument for '$1'." exit_cmd=exit } -# func_split_short_opt shortopt +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () { - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + $debug_cmd - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () { - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' + $debug_cmd - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} -exit_cmd=: +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + exit $? +} -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () { - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation + $debug_cmd -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} -# func_arith arithmetic-term... -func_arith () +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () { - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation + $debug_cmd + $warning_func ${1+"$@"} +} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" -# func_lo2o object -func_lo2o () +# Additional text appended to 'usage_message' in response to '--help'. +func_help () { - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation + $debug_cmd + func_usage_message + $ECHO "$long_help_message -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation +MODE must be one of the following: + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' -# func_fatal_configuration arg... + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." + func_fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." } # func_config +# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -915,17 +2149,19 @@ exit $? } + # func_features +# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" @@ -934,314 +2170,350 @@ exit $? } -# func_enable_tag tagname + +# func_enable_tag TAGNAME +# ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { - # Global variable: - tagname="$1" + # Global variable: + tagname=$1 - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # func_check_version_match +# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - else - cat >&2 <<_LT_EOF + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + fi + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF - fi + fi - exit $EXIT_MISMATCH - fi + exit $EXIT_MISMATCH + fi } -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + nonopt= + preserve_args= -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + esac + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -func_append preserve_args " $opt" - ;; - --no-warning|--no-warn) - opt_warning=false -func_append preserve_args " $opt" - ;; - --no-verbose) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - # Validate options: +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - $opt_help || { - # Sanity checks first: - func_check_version_match + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } +func_add_hook func_validate_options libtool_validate_options +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + ## ----------- ## ## Main. ## ## ----------- ## +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -1249,13 +2521,13 @@ for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -1264,7 +2536,8 @@ # determined imposters. func_ltwrapper_script_p () { - func_lalib_p "$1" + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file @@ -1289,7 +2562,7 @@ { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file @@ -1308,11 +2581,13 @@ # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -1324,10 +2599,11 @@ # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1354,10 +2630,10 @@ # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case "$lt_sysroot:$1" in + case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" + func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. @@ -1374,7 +2650,8 @@ # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -1393,7 +2670,7 @@ for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. @@ -1418,7 +2695,7 @@ # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1434,15 +2711,15 @@ # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1450,7 +2727,7 @@ $opt_dry_run || { cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` + $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi @@ -1514,18 +2792,19 @@ # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { - $opt_debug + $debug_cmd + # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" + func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi @@ -1554,7 +2833,8 @@ # environment variable; do not put it in $PATH. func_cygpath () { - $opt_debug + $debug_cmd + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then @@ -1563,7 +2843,7 @@ fi else func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath @@ -1574,10 +2854,11 @@ # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { - $opt_debug + $debug_cmd + # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 @@ -1588,13 +2869,14 @@ # func_to_host_file_result to ARG1). func_convert_file_check () { - $opt_debug - if test -z "$2" && test -n "$1" ; then + $debug_cmd + + if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" - func_error " \`$1'" + func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: - func_to_host_file_result="$1" + func_to_host_file_result=$1 fi } # end func_convert_file_check @@ -1606,10 +2888,11 @@ # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { - $opt_debug + $debug_cmd + if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" - func_error " \`$3'" + func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. @@ -1618,7 +2901,7 @@ func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else - func_to_host_path_result="$3" + func_to_host_path_result=$3 fi fi } @@ -1630,9 +2913,10 @@ # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { - $opt_debug + $debug_cmd + case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" + $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in @@ -1646,7 +2930,7 @@ ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## -# invoked via `$to_host_file_cmd ARG' +# invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. @@ -1657,7 +2941,8 @@ # in func_to_host_file_result. func_to_host_file () { - $opt_debug + $debug_cmd + $to_host_file_cmd "$1" } # end func_to_host_file @@ -1669,7 +2954,8 @@ # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { - $opt_debug + $debug_cmd + case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 @@ -1687,7 +2973,7 @@ # Copy ARG to func_to_host_file_result. func_convert_file_noop () { - func_to_host_file_result="$1" + func_to_host_file_result=$1 } # end func_convert_file_noop @@ -1698,11 +2984,12 @@ # func_to_host_file_result. func_convert_file_msys_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1714,8 +3001,9 @@ # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. @@ -1731,11 +3019,12 @@ # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1747,12 +3036,13 @@ # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1765,13 +3055,14 @@ # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1781,7 +3072,7 @@ ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# -# invoked via `$to_host_path_cmd ARG' +# invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. @@ -1805,10 +3096,11 @@ to_host_path_cmd= func_init_to_host_path_cmd () { - $opt_debug + $debug_cmd + if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" + to_host_path_cmd=func_convert_path_$func_stripname_result fi } @@ -1818,7 +3110,8 @@ # in func_to_host_path_result. func_to_host_path () { - $opt_debug + $debug_cmd + func_init_to_host_path_cmd $to_host_path_cmd "$1" } @@ -1829,7 +3122,7 @@ # Copy ARG to func_to_host_path_result. func_convert_path_noop () { - func_to_host_path_result="$1" + func_to_host_path_result=$1 } # end func_convert_path_noop @@ -1840,8 +3133,9 @@ # func_to_host_path_result. func_convert_path_msys_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; @@ -1849,7 +3143,7 @@ func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1863,8 +3157,9 @@ # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" @@ -1883,14 +3178,15 @@ # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1904,15 +3200,16 @@ # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1927,8 +3224,9 @@ # func_to_host_file_result. func_convert_path_nix_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them @@ -1937,7 +3235,7 @@ func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1946,13 +3244,31 @@ # end func_convert_path_nix_to_cygwin +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1965,12 +3281,12 @@ case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1980,7 +3296,7 @@ case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; @@ -2009,12 +3325,12 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result @@ -2027,8 +3343,8 @@ # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; @@ -2043,13 +3359,13 @@ func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -2069,7 +3385,7 @@ case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -2078,8 +3394,8 @@ for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -2105,17 +3421,17 @@ func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -2127,16 +3443,16 @@ pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -2145,12 +3461,12 @@ # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -2158,7 +3474,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2180,11 +3496,11 @@ qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -2201,7 +3517,7 @@ func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2212,7 +3528,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2228,20 +3544,20 @@ fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then + if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi @@ -2250,7 +3566,7 @@ func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2261,7 +3577,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2281,7 +3597,7 @@ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -2291,7 +3607,7 @@ } $opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () @@ -2311,7 +3627,7 @@ Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -2330,16 +3646,16 @@ -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -2352,7 +3668,7 @@ -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -2371,7 +3687,7 @@ Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -2381,7 +3697,7 @@ Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -2407,7 +3723,7 @@ -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -2421,7 +3737,8 @@ -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information @@ -2441,20 +3758,20 @@ -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -2465,7 +3782,7 @@ Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -2473,17 +3790,17 @@ ;; *) - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo - $ECHO "Try \`$progname --help' for more information about other modes." + $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test "$opt_help" = :; then + if test : = "$opt_help"; then func_mode_help else { @@ -2491,7 +3808,7 @@ for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do @@ -2499,7 +3816,7 @@ func_mode_help done } | - sed '1d + $SED '1d /^When reporting/,/^Report/{ H d @@ -2516,16 +3833,17 @@ # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + || func_fatal_help "'$file' is not a file" dir= case $file in @@ -2535,7 +3853,7 @@ # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -2546,18 +3864,18 @@ if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -2565,18 +3883,18 @@ *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -2588,7 +3906,7 @@ # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= @@ -2601,12 +3919,12 @@ if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; esac @@ -2614,7 +3932,15 @@ func_append_quoted args "$file" done - if test "X$opt_dry_run" = Xfalse; then + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -2631,25 +3957,18 @@ done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug + $debug_cmd + libs= libdirs= admincmds= @@ -2663,11 +3982,11 @@ if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else - func_warning "\`$opt' is not a valid libtool archive" + func_warning "'$opt' is not a valid libtool archive" fi else - func_fatal_error "invalid argument \`$opt'" + func_fatal_error "invalid argument '$opt'" fi done @@ -2682,12 +4001,12 @@ # Remove sysroot references if $opt_dry_run; then for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done @@ -2712,7 +4031,7 @@ fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" @@ -2723,27 +4042,27 @@ echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" + $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo @@ -2762,18 +4081,20 @@ exit $EXIT_SUCCESS } -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -2800,7 +4121,7 @@ opts= prev= install_type= - isdir=no + isdir=false stripme= no_mode=: for arg @@ -2813,7 +4134,7 @@ fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg @@ -2831,7 +4152,7 @@ *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -2856,7 +4177,7 @@ func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else @@ -2878,19 +4199,19 @@ dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2899,7 +4220,7 @@ case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -2908,7 +4229,7 @@ # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -2928,7 +4249,7 @@ # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -2950,7 +4271,7 @@ fi func_dirname "$file" "/" "" - dir="$func_dirname_result" + dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then @@ -2964,7 +4285,7 @@ # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -2973,29 +4294,36 @@ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= ;; esac ;; @@ -3006,7 +4334,7 @@ if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -3017,14 +4345,14 @@ fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. @@ -3036,11 +4364,11 @@ # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -3050,11 +4378,11 @@ staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -3063,7 +4391,7 @@ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -3075,23 +4403,23 @@ *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -3119,19 +4447,19 @@ # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -3139,29 +4467,29 @@ func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { + $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else @@ -3198,10 +4526,10 @@ for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result @@ -3216,18 +4544,18 @@ done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$opt_mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -3235,16 +4563,17 @@ # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -3255,7 +4584,7 @@ "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -3263,34 +4592,36 @@ func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" @@ -3298,7 +4629,7 @@ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done @@ -3318,10 +4649,10 @@ # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -3331,7 +4662,7 @@ } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in @@ -3345,22 +4676,22 @@ fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" - name="$func_basename_result" + name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" + dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then + if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" + dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" @@ -3368,7 +4699,7 @@ fi fi $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then + if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" @@ -3424,6 +4755,11 @@ echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -3432,11 +4768,30 @@ void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -3478,9 +4833,7 @@ *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -3497,10 +4850,10 @@ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -3518,7 +4871,7 @@ esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -3532,6 +4885,32 @@ fi } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_win32_libid arg # return the library type of file 'arg' # @@ -3541,8 +4920,9 @@ # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -3552,16 +4932,29 @@ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -3593,7 +4986,8 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { - $opt_debug + $debug_cmd + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } @@ -3610,7 +5004,8 @@ # specified import library. func_cygming_dll_for_implib_fallback_core () { - $opt_debug + $debug_cmd + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ @@ -3646,8 +5041,8 @@ /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually @@ -3658,30 +5053,6 @@ $SED -e '/^\./d;/^.\./d;q' } -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified @@ -3695,16 +5066,17 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then + elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown - sharedlib_from_linklib_result="" + sharedlib_from_linklib_result= fi } @@ -3712,10 +5084,11 @@ # func_extract_an_archive dir oldlib func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -3724,7 +5097,7 @@ fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then + if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -3738,22 +5111,23 @@ # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -3765,7 +5139,7 @@ esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -3778,22 +5152,23 @@ cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do @@ -3815,7 +5190,7 @@ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } @@ -3830,7 +5205,7 @@ # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is +# will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -3841,7 +5216,7 @@ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -3898,9 +5273,9 @@ # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on +# /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match +# (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and @@ -3933,7 +5308,7 @@ # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } @@ -3944,7 +5319,7 @@ lt_dump_args_N=1; for lt_arg do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -3958,7 +5333,7 @@ *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -3968,7 +5343,7 @@ *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -4043,13 +5418,13 @@ test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -4066,7 +5441,7 @@ if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $ECHO \"\$relink_command_output\" >&2 + \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -4101,7 +5476,7 @@ fi # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" @@ -4121,7 +5496,7 @@ fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 @@ -4140,7 +5515,7 @@ cat < #include +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* declarations of non-ANSI functions */ -#if defined(__MINGW32__) +#if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined (other platforms) ... */ +/* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) +#if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) +#elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ +/* #elif defined other platforms ... */ #endif -#if defined(PATH_MAX) +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -4234,8 +5607,8 @@ # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -4268,10 +5641,10 @@ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#if defined(LT_DEBUGWRAPPER) +#if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; @@ -4300,11 +5673,16 @@ EOF cat < 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -5082,27 +6460,47 @@ # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $opt_debug + $debug_cmd + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -5146,10 +6544,11 @@ module=no no_install=no objs= + os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -5161,7 +6560,7 @@ vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -5169,15 +6568,15 @@ do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -5210,7 +6609,7 @@ # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result @@ -5227,21 +6626,21 @@ case $prev in bindir) - bindir="$arg" + bindir=$arg prev= continue ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -5249,9 +6648,9 @@ continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -5261,7 +6660,7 @@ continue ;; *) - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" @@ -5272,14 +6671,14 @@ esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -5297,7 +6696,13 @@ continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -5321,21 +6726,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5346,7 +6751,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5354,23 +6759,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5378,7 +6783,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5386,24 +6791,29 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -5415,7 +6825,7 @@ func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; @@ -5430,7 +6840,7 @@ continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; @@ -5470,7 +6880,7 @@ esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -5484,7 +6894,7 @@ -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -5516,7 +6926,7 @@ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -5550,9 +6960,9 @@ func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" @@ -5563,8 +6973,8 @@ *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in @@ -5599,7 +7009,7 @@ ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -5607,11 +7017,11 @@ ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework @@ -5620,16 +7030,16 @@ ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -5639,6 +7049,11 @@ continue ;; + -mllvm) + prev=mllvm + continue + ;; + -module) module=yes continue @@ -5668,7 +7083,7 @@ ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -5682,8 +7097,8 @@ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -5701,6 +7116,11 @@ continue ;; + -os2dllname) + prev=os2dllname + continue + ;; + -o) prev=output ;; -precious-files-regex) @@ -5788,14 +7208,14 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5804,15 +7224,15 @@ func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5835,7 +7255,7 @@ # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: @@ -5847,25 +7267,48 @@ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files + # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; *.$objext) @@ -5886,21 +7329,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5911,7 +7354,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5919,23 +7362,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5943,7 +7386,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5951,7 +7394,7 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; @@ -5967,11 +7410,11 @@ # A libtool-controlled library. func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= @@ -5986,7 +7429,7 @@ # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; esac # arg @@ -5998,9 +7441,9 @@ done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6009,20 +7452,23 @@ oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. @@ -6045,7 +7491,7 @@ # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6053,7 +7499,7 @@ func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -6085,7 +7531,7 @@ case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -6093,7 +7539,7 @@ prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -6105,29 +7551,29 @@ for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs @@ -6148,26 +7594,26 @@ esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6177,13 +7623,13 @@ continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -6191,31 +7637,22 @@ for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -6223,19 +7660,19 @@ old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -6244,15 +7681,25 @@ *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6265,18 +7712,18 @@ case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6287,13 +7734,13 @@ func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result @@ -6311,7 +7758,7 @@ lib=$func_resolve_sysroot_result ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -6322,21 +7769,26 @@ case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -6344,18 +7796,13 @@ echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6366,10 +7813,10 @@ esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" @@ -6382,22 +7829,20 @@ continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -6427,30 +7872,30 @@ done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6464,26 +7909,26 @@ # Get the name of the library we link against. linklib= if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do - linklib="$l" + linklib=$l done fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -6497,40 +7942,40 @@ # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then + if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi @@ -6539,11 +7984,11 @@ name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi - case "$host" in + case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both @@ -6587,9 +8032,9 @@ if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -6599,14 +8044,14 @@ fi - if test "$linkmode" = prog && test "$pass" != link; then + if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= @@ -6618,14 +8063,14 @@ ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6635,15 +8080,15 @@ continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac @@ -6672,9 +8117,9 @@ esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -6683,19 +8128,19 @@ link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc*) + *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then + if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi @@ -6705,24 +8150,24 @@ # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -6750,43 +8195,43 @@ # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc*) + *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -6794,58 +8239,58 @@ linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$opt_mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then + if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$absdir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6854,10 +8299,10 @@ ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -6865,7 +8310,7 @@ *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi @@ -6875,15 +8320,15 @@ *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; @@ -6892,33 +8337,33 @@ fi fi - if test "$linkmode" = prog || test "$opt_mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6927,10 +8372,10 @@ ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -6938,43 +8383,43 @@ test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then + if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -6987,11 +8432,11 @@ fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -7005,12 +8450,12 @@ *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do @@ -7020,7 +8465,7 @@ func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; @@ -7029,12 +8474,12 @@ func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result @@ -7042,12 +8487,12 @@ dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -7055,35 +8500,35 @@ case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -7095,23 +8540,23 @@ fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do @@ -7121,12 +8566,12 @@ esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -7184,62 +8629,93 @@ eval $var=\"$tmp_libs\" done # for var fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then + if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" + oldlibs=$output func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -7248,10 +8724,10 @@ eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -7265,8 +8741,8 @@ esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" @@ -7275,21 +8751,21 @@ fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -7298,20 +8774,20 @@ fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -7319,42 +8795,42 @@ case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|linux|osf|windows|none) + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -7362,30 +8838,30 @@ case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -7400,26 +8876,36 @@ # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -7430,69 +8916,74 @@ nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - func_append verstring ":${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -7506,42 +8997,45 @@ verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= else - versuffix=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" + func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= + test " " = "$libobjs" && libobjs= - if test "$opt_mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -7550,8 +9044,8 @@ case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue @@ -7567,11 +9061,11 @@ fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -7592,13 +9086,13 @@ *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in @@ -7608,7 +9102,7 @@ done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in @@ -7617,7 +9111,7 @@ esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -7641,7 +9135,7 @@ ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then + if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; @@ -7657,9 +9151,9 @@ # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -7688,20 +9182,20 @@ -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7731,20 +9225,20 @@ $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7781,24 +9275,24 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi - test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - if test "$want_nocaseglob" = yes; then + if test yes = "$want_nocaseglob"; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob @@ -7816,25 +9310,25 @@ # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7842,7 +9336,7 @@ echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7865,30 +9359,30 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test + potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7896,7 +9390,7 @@ echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7912,18 +9406,18 @@ done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" + newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test "X$deplibs_check_method" = "Xnone"; then + if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." @@ -7947,8 +9441,8 @@ ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then + if test yes = "$droppeddeps"; then + if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" @@ -7957,12 +9451,12 @@ if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7973,14 +9467,14 @@ echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then + if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -8026,7 +9520,7 @@ *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -8034,25 +9528,25 @@ dlname= # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Remove ${wl} instances when linking with ld. + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac - if test "$hardcode_into_libs" = yes; then + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8077,7 +9571,7 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then @@ -8091,8 +9585,8 @@ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -8102,19 +9596,19 @@ eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do @@ -8128,7 +9622,7 @@ delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi @@ -8137,31 +9631,31 @@ cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do - IFS="$save_ifs" + IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in @@ -8175,7 +9669,7 @@ try_normal_branch=no ;; esac - if test "$try_normal_branch" = yes \ + if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then @@ -8186,7 +9680,7 @@ output_la=$func_basename_result save_libobjs=$libobjs save_output=$output - output=${output_objdir}/${output_la}.nm + output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" @@ -8209,8 +9703,8 @@ break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -8218,16 +9712,16 @@ fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8246,11 +9740,11 @@ ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -8261,7 +9755,7 @@ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8270,18 +9764,18 @@ fi fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -8299,7 +9793,7 @@ fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -8332,8 +9826,8 @@ last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs @@ -8345,14 +9839,14 @@ func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi @@ -8367,7 +9861,7 @@ else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -8379,13 +9873,13 @@ func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -8395,10 +9889,10 @@ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -8410,9 +9904,9 @@ # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" @@ -8420,9 +9914,9 @@ output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -8431,16 +9925,16 @@ if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8448,7 +9942,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8457,7 +9951,7 @@ exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -8465,18 +9959,18 @@ fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8485,7 +9979,7 @@ export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - fi + } libobjs=$output # Restore the value of output. @@ -8499,7 +9993,7 @@ # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -8521,7 +10015,7 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -8529,11 +10023,12 @@ test "X$libobjs" = "X " && libobjs= fi - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -8541,7 +10036,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8550,10 +10045,10 @@ exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -8573,39 +10068,39 @@ done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -8613,7 +10108,7 @@ ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -8626,17 +10121,19 @@ # the extraction. reload_conv_objs= gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else - gentop="$output_objdir/${obj}x" + gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8645,12 +10142,12 @@ fi # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - output="$obj" + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -8662,7 +10159,7 @@ exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -8672,12 +10169,12 @@ # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -8694,16 +10191,14 @@ output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -8717,11 +10212,11 @@ *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" ;; esac fi @@ -8757,7 +10252,7 @@ *) func_append new_libs " $deplib" ;; esac done - compile_deplibs="$new_libs" + compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" @@ -8781,7 +10276,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8804,7 +10299,7 @@ fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; @@ -8821,10 +10316,10 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -8832,7 +10327,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8857,45 +10352,43 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no + wrappers_required=false ;; *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 @@ -8908,12 +10401,12 @@ fi # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -8943,9 +10436,9 @@ fi fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. @@ -8962,27 +10455,28 @@ exit $EXIT_SUCCESS fi - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -9039,8 +10533,8 @@ func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -9061,7 +10555,7 @@ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -9084,25 +10578,27 @@ # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs @@ -9110,13 +10606,13 @@ fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -9137,7 +10633,7 @@ : else echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs @@ -9146,7 +10642,7 @@ for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -9215,18 +10711,18 @@ else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -9243,7 +10739,7 @@ case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -9258,31 +10754,31 @@ fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" + name=$func_basename_result func_resolve_sysroot "$deplib" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) @@ -9298,23 +10794,23 @@ *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -9324,34 +10820,34 @@ # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin @@ -9367,10 +10863,9 @@ case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then + if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname + tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -9379,7 +10874,7 @@ esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -9393,7 +10888,7 @@ # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -9419,7 +10914,7 @@ # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -9434,27 +10929,29 @@ exit $EXIT_SUCCESS } -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; + -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac @@ -9467,18 +10964,18 @@ for file in $files; do func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - odir="$dir/$objdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then + if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; @@ -9493,11 +10990,11 @@ elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -9511,7 +11008,7 @@ done test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$opt_mode" in + case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; @@ -9522,12 +11019,12 @@ uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -9543,21 +11040,19 @@ func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then + if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then + if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$opt_mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -9584,12 +11079,12 @@ # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -9598,7 +11093,7 @@ func_show_eval "$RM $rmfiles" 'exit_status=1' done - # Try to remove the ${objdir}s in the directories where we deleted files + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -9608,16 +11103,17 @@ exit $exit_status } -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi test -z "$opt_mode" && { - help="$generic_help" + help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -9628,7 +11124,7 @@ # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -9651,5 +11147,3 @@ # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff -Nru snort-2.9.15.1/m4/Makefile.in snort-2.9.20/m4/Makefile.in --- snort-2.9.15.1/m4/Makefile.in 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/m4/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = m4 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +119,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +165,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -260,14 +272,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign m4/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -291,7 +302,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -435,6 +449,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/missing snort-2.9.20/missing --- snort-2.9.15.1/missing 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/missing 2022-05-23 15:42:29.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru snort-2.9.15.1/preproc_rules/Makefile.in snort-2.9.20/preproc_rules/Makefile.in --- snort-2.9.15.1/preproc_rules/Makefile.in 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/preproc_rules/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = preproc_rules -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +119,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +165,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -260,14 +272,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign preproc_rules/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign preproc_rules/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -291,7 +302,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -435,6 +449,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/preproc_rules/decoder.rules snort-2.9.20/preproc_rules/decoder.rules --- snort-2.9.15.1/preproc_rules/decoder.rules 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/preproc_rules/decoder.rules 2022-04-20 14:15:07.000000000 +0000 @@ -77,6 +77,7 @@ alert ( msg:"DECODE_IPV6_UNORDERED_EXTENSIONS"; sid:296; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode; ) alert ( msg:"DECODE_GTP_MULTIPLE_ENCAPSULATION"; sid:297; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode; ) alert ( msg:"DECODE_GTP_BAD_LEN_STR"; sid:298; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode; ) +alert ( msg:"DECODE_DECODING_DEPTH_EXCEEDED"; sid:300; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode; ) alert ( msg:"DECODE_BAD_MPLS"; sid:170; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode; ) alert ( msg:"DECODE_BAD_MPLS_LABEL0"; sid:171; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode; ) alert ( msg:"DECODE_BAD_MPLS_LABEL1"; sid:172; gid:116; rev:1; metadata:rule-type decode; classtype:protocol-command-decode; ) diff -Nru snort-2.9.15.1/preproc_rules/preprocessor.rules snort-2.9.20/preproc_rules/preprocessor.rules --- snort-2.9.15.1/preproc_rules/preprocessor.rules 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/preproc_rules/preprocessor.rules 2022-04-20 14:15:07.000000000 +0000 @@ -46,6 +46,9 @@ alert ( msg: "HI_CLIENT_UNESCAPED_SPACE_URI"; sid: 33; gid: 119; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) alert ( msg: "HI_CLIENT_PIPELINE_MAX "; sid: 34; gid: 119; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) alert ( msg: "HI_CLIENT_MULTIPLE_COLON_BETN_KEY_VALUE"; sid: 35; gid: 119; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) +alert ( msg: "HI_CLIENT_INVALID_RANGE_UNIT_FMT"; sid: 36; gid: 119; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) +alert ( msg: "HI_CLIENT_RANGE_NON_GET_METHOD"; sid: 37; gid: 119; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) +alert ( msg: "HI_CLIENT_RANGE_FIELD_ERROR"; sid: 38; gid: 119; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) alert ( msg: "HI_ANOM_SERVER_ALERT"; sid: 1; gid: 120; rev: 1; metadata: rule-type preproc, service http ; classtype:unknown; ) alert ( msg: "HI_SERVER_INVALID_STATCODE"; sid: 2; gid: 120; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) alert ( msg: "HI_SERVER_NO_CONTLEN"; sid: 3; gid: 120; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) @@ -75,6 +78,9 @@ alert ( msg: "HI_EO_SERVER_NO_RESP_HEADER_END"; sid: 27; gid: 120; rev: 1; metadata: rule-type preproc ; classtype:bad-unknown; ) alert ( msg: "HI_EO_SERVER_INVALID_CHUNK_SIZE"; sid: 28; gid: 120; rev: 1; metadata: rule-type preproc ; classtype:bad-unknown; ) drop ( msg: "HI_EO_SERVER_INVALID_VERSION_RESP_HEADER"; sid: 29; gid: 120; rev:1; metadata: rule-type preproc ; classtype:non-standard-protocol; ) +alert ( msg: "HI_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT"; sid: 30; gid: 120; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) +alert ( msg: "HI_SERVER_RANGE_FIELD_ERROR"; sid: 31; gid: 120; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) +alert ( msg: "HI_SERVER_NON_RANGE_GET_PARTIAL_METHOD"; sid: 32; gid: 120; rev: 1; metadata: rule-type preproc ; classtype:unknown; ) alert ( msg: "PSNG_TCP_PORTSCAN"; sid: 1; gid: 122; rev: 1; metadata: rule-type preproc ; classtype:attempted-recon; ) alert ( msg: "PSNG_TCP_DECOY_PORTSCAN"; sid: 2; gid: 122; rev: 1; metadata: rule-type preproc ; classtype:attempted-recon; ) alert ( msg: "PSNG_TCP_PORTSWEEP"; sid: 3; gid: 122; rev: 1; metadata: rule-type preproc ; classtype:attempted-recon; ) @@ -168,6 +174,7 @@ alert ( msg: "STREAM5_DATA_AFTER_RST_RCVD"; sid: 18; gid: 129; rev: 1; metadata: rule-type preproc ; classtype:bad-unknown; ) alert ( msg: "STREAM5_WINDOW_SLAM"; sid: 19; gid: 129; rev: 1; metadata: rule-type preproc ; classtype:bad-unknown; reference:cve,2013-0075; reference:url,technet.microsoft.com/en-us/security/bulletin/ms13-018; ) alert ( msg: "STREAM5_NO_3WHS"; sid: 20; gid: 129; rev: 1; metadata: rule-type preproc ; classtype:bad-unknown; ) +alert ( msg: "STREAM_WIN_SZ_0_TCP_FIN_WAIT_1"; sid: 21; gid: 129; rev: 1; metadata: rule-type preproc ; classtype:bad-unknown; ) alert ( msg: "DNS_EVENT_OBSOLETE_TYPES"; sid: 1; gid: 131; rev: 1; metadata: rule-type preproc, service dns ; classtype:protocol-command-decode; ) alert ( msg: "DNS_EVENT_EXPERIMENTAL_TYPES"; sid: 2; gid: 131; rev: 1; metadata: rule-type preproc, service dns ; classtype:protocol-command-decode; ) alert ( msg: "DNS_EVENT_RDATA_OVERFLOW"; sid: 3; gid: 131; rev: 1; metadata: rule-type preproc, service dns, policy security-ips drop ; classtype:attempted-admin; reference:cve,2006-3441; reference:url,www.microsoft.com/technet/security/bulletin/ms06-041.mspx; ) diff -Nru snort-2.9.15.1/rpm/Makefile.in snort-2.9.20/rpm/Makefile.in --- snort-2.9.15.1/rpm/Makefile.in 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/rpm/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = rpm -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +119,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +165,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -269,14 +281,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign rpm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign rpm/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -300,7 +311,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -444,6 +458,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/rpm/snort.spec snort-2.9.20/rpm/snort.spec --- snort-2.9.15.1/rpm/snort.spec 2019-12-03 09:39:42.000000000 +0000 +++ snort-2.9.20/rpm/snort.spec 2022-05-23 15:44:18.000000000 +0000 @@ -48,13 +48,13 @@ %if %{openappid} Name: %{realname}-openappid #FIXME: instead of pulling version here, add it in via the rpmbuild command. This will require documentation updates. -Version: 2.9.15.1 +Version: 2.9.20 Summary: An open source Network Intrusion Detection System (NIDS) with open AppId support Conflicts: %{realname} %else Name: %{realname} #FIXME: instead of pulling version here, add it in via the rpmbuild command. This will require documentation updates. -Version: 2.9.15.1 +Version: 2.9.20 Summary: An open source Network Intrusion Detection System (NIDS) Conflicts: %{realname}-openappid %endif diff -Nru snort-2.9.15.1/src/Makefile.am snort-2.9.20/src/Makefile.am --- snort-2.9.15.1/src/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/Makefile.am 2022-04-29 07:12:49.000000000 +0000 @@ -65,6 +65,7 @@ reload.c reload.h reload_api.h \ idle_processing.c idle_processing.h idle_processing_funcs.h \ appIdApi.h \ +smtp_api.h \ reg_test.h reg_test.c \ memory_stats.h memory_stats.c diff -Nru snort-2.9.15.1/src/Makefile.in snort-2.9.20/src/Makefile.in --- snort-2.9.15.1/src/Makefile.in 2019-12-03 09:30:42.000000000 +0000 +++ snort-2.9.20/src/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -88,11 +98,11 @@ @BUILD_SNORT_RELOAD_TRUE@am__append_4 = reload-adjust/libreload_adjust.a @BUILD_SNORT_RELOAD_TRUE@am__append_5 = reload-adjust subdir = src -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -119,8 +129,8 @@ pkt_tracer.c pkt_tracer.h obfuscation.c obfuscation.h \ rule_option_types.h sfdaq.c sfdaq.h reload.c reload.h \ reload_api.h idle_processing.c idle_processing.h \ - idle_processing_funcs.h appIdApi.h reg_test.h reg_test.c \ - memory_stats.h memory_stats.c dump.c dump.h + idle_processing_funcs.h appIdApi.h smtp_api.h reg_test.h \ + reg_test.c memory_stats.h memory_stats.c dump.c dump.h @BUILD_SNPRINTF_TRUE@am__objects_1 = snprintf.$(OBJEXT) @BUILD_CONTROL_SOCKET_TRUE@am__objects_2 = dump.$(OBJEXT) am_snort_OBJECTS = debug.$(OBJEXT) decode.$(OBJEXT) encode.$(OBJEXT) \ @@ -166,7 +176,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -207,7 +217,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -231,6 +241,7 @@ dynamic-plugins preprocessors parser dynamic-preprocessors \ dynamic-output target-based control file-process \ dynamic-examples side-channel reload-adjust +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -301,6 +312,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -412,8 +424,8 @@ pkt_tracer.c pkt_tracer.h obfuscation.c obfuscation.h \ rule_option_types.h sfdaq.c sfdaq.h reload.c reload.h \ reload_api.h idle_processing.c idle_processing.h \ - idle_processing_funcs.h appIdApi.h reg_test.h reg_test.c \ - memory_stats.h memory_stats.c $(am__append_1) + idle_processing_funcs.h appIdApi.h smtp_api.h reg_test.h \ + reg_test.c memory_stats.h memory_stats.c $(am__append_1) snort_LDADD = output-plugins/libspo.a detection-plugins/libspd.a \ dynamic-plugins/libdynamic.a \ dynamic-output/plugins/liboutput.a preprocessors/libspp.a \ @@ -444,14 +456,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -523,10 +534,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -636,7 +647,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -814,6 +828,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/active.c snort-2.9.20/src/active.c --- snort-2.9.15.1/src/active.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/active.c 2022-05-18 04:44:46.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/active.h snort-2.9.20/src/active.h --- snort-2.9.15.1/src/active.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/active.h 2022-05-18 04:44:47.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/appIdApi.h snort-2.9.20/src/appIdApi.h --- snort-2.9.15.1/src/appIdApi.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/appIdApi.h 2022-05-18 04:44:48.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/build.h snort-2.9.20/src/build.h --- snort-2.9.15.1/src/build.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/build.h 2022-05-18 04:44:49.000000000 +0000 @@ -1 +1 @@ -#define BUILD "15125" +#define BUILD "82" diff -Nru snort-2.9.15.1/src/byte_extract.c snort-2.9.20/src/byte_extract.c --- snort-2.9.15.1/src/byte_extract.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/byte_extract.c 2022-05-18 04:44:50.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** Chris Green ** diff -Nru snort-2.9.15.1/src/byte_extract.h snort-2.9.20/src/byte_extract.h --- snort-2.9.15.1/src/byte_extract.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/byte_extract.h 2022-05-18 04:44:51.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/checksum.h snort-2.9.20/src/checksum.h --- snort-2.9.15.1/src/checksum.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/checksum.h 2022-05-18 04:44:53.000000000 +0000 @@ -3,7 +3,7 @@ ** Copyright (C) 2000,2001 Christopher Cramer ** Snort is Copyright (C) 1998-2002 Martin Roesch ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** diff -Nru snort-2.9.15.1/src/control/Makefile.in snort-2.9.20/src/control/Makefile.in --- snort-2.9.15.1/src/control/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/control/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/control -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -314,14 +326,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/control/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/control/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -348,10 +359,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -414,7 +425,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -563,6 +577,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/control/sfcontrol.c snort-2.9.20/src/control/sfcontrol.c --- snort-2.9.15.1/src/control/sfcontrol.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/control/sfcontrol.c 2022-05-18 04:44:54.000000000 +0000 @@ -2,7 +2,7 @@ ** ** sfcontrol.c ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Ron Dempster ** diff -Nru snort-2.9.15.1/src/control/sfcontrol.h snort-2.9.20/src/control/sfcontrol.h --- snort-2.9.15.1/src/control/sfcontrol.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/control/sfcontrol.h 2022-05-18 04:44:56.000000000 +0000 @@ -2,7 +2,7 @@ ** ** sfcontrol.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Ron Dempster ** @@ -44,6 +44,8 @@ #define CS_TYPE_FLOWIP_START 0x000D #define CS_TYPE_FLOWIP_STOP 0x000E #define CS_TYPE_FLOWIP_SHOW 0x000F +#define CS_TYPE_MEM_STATS_CFG 0x0011 +#define CS_TYPE_MEM_STATS_SHOW 0x0012 #define CS_TYPE_MAX 0x1FFF #define CS_HEADER_VERSION 0x0001 #define CS_HEADER_SUCCESS 0x0000 diff -Nru snort-2.9.15.1/src/control/sfcontrol_funcs.h snort-2.9.20/src/control/sfcontrol_funcs.h --- snort-2.9.15.1/src/control/sfcontrol_funcs.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/control/sfcontrol_funcs.h 2022-05-18 04:44:57.000000000 +0000 @@ -2,7 +2,7 @@ ** ** sfcontrol.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Ron Dempster ** diff -Nru snort-2.9.15.1/src/cpuclock.h snort-2.9.20/src/cpuclock.h --- snort-2.9.15.1/src/cpuclock.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/cpuclock.h 2022-05-18 04:44:58.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/debug.c snort-2.9.20/src/debug.c --- snort-2.9.15.1/src/debug.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/debug.c 2022-05-18 04:44:59.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/decode.c snort-2.9.20/src/decode.c --- snort-2.9.15.1/src/decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/decode.c 2022-05-18 04:45:00.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -618,6 +618,8 @@ } } +static ThrottleInfo log_throttleInfo = {0, 60, 0, 100}; + // this must be called iff the layer is successfully decoded because, when // enabled, the normalizer assumes that the encoding is structurally sound static inline void PushLayer(PROTO_ID type, Packet* p, const uint8_t* hdr, uint32_t len) @@ -631,8 +633,17 @@ } else { - LogMessage("(snort_decoder) WARNING: decoder got too many layers;" - " next proto is %u.\n", type); + LogThrottledByTimeCount(&log_throttleInfo, + "(snort_decoder) WARNING: Too many levels for decoding;" + "next proto is %u.\n", type); + SnortEventqAdd(GENERATOR_SNORT_DECODE, + DECODE_DECODING_DEPTH_EXCEEDED, + 1, + 0, + 1, + DECODE_DECODING_DEPTH_EXCEEDED_STR, + NULL); + pc.alert_pkts++; } } @@ -1303,6 +1314,8 @@ iRet = ScMplsPayloadCheck(*(uint8_t *)tmpMplsHdr, iRet); #endif + p->non_ip_pkt = 1; + switch (iRet) { case MPLS_PAYLOADTYPE_IPV4: @@ -1835,6 +1848,7 @@ if (ntohs(p->eh->ether_type) != ETHERNET_TYPE_PPPoE_DISC) { PushLayer(PROTO_PPPOE, p, pkt, PPPOE_HEADER_LEN); + p->non_ip_pkt = 1; DecodePppPktEncapsulated(pkt + PPPOE_HEADER_LEN, len - PPPOE_HEADER_LEN, p); return; } @@ -2133,7 +2147,7 @@ { uint8_t msb_src, msb_dst; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId; uint16_t dAsId; @@ -2557,6 +2571,7 @@ pc.ip4ip4++; if ( ScTunnelBypassEnabled(TUNNEL_4IN4) ) Active_SetTunnelBypass(); + p->IPnIPencapsulated = 1; DecodeIP(pkt, len, p); return; #endif @@ -2784,30 +2799,36 @@ if (ScIpChecksums()) #endif { - /* routers drop packets with bad IP checksums, we don't really - * need to check them (should make this a command line/config - * option - */ - int16_t csum = in_chksum_ip((const unsigned short *)p->iph, hlen); - - if(csum) +#if defined(DAQ_VERSION) && DAQ_VERSION > 12 + if ((((const uint8_t *)p->inner_iph - p->pkt) > p->pkth->checksum_offset) || + p->pkth->checksum_error_flag) +#endif { - p->error_flags |= PKT_ERR_CKSUM_IP; - DEBUG_WRAP(DebugMessage(DEBUG_DECODE, "Bad IP checksum\n");); + /* routers drop packets with bad IP checksums, we don't really + * need to check them (should make this a command line/config + * option + */ + int16_t csum = in_chksum_ip((const unsigned short *)p->iph, hlen); + + if(csum) + { + p->error_flags |= PKT_ERR_CKSUM_IP; + DEBUG_WRAP(DebugMessage(DEBUG_DECODE, "Bad IP checksum\n");); #ifdef REG_TEST - if (getRegTestFlags() & REG_TEST_FLAG_STREAM_DECODE) - printf("Bad IP checksum | "); + if (getRegTestFlags() & REG_TEST_FLAG_STREAM_DECODE) + printf("Bad IP checksum | "); #endif - if ( ScIdsMode() ) - queueExecDrop(execIpChksmDrop, p); - } + if ( ScIdsMode() ) + queueExecDrop(execIpChksmDrop, p); + } #ifdef DEBUG_MSGS - else - { - DebugMessage(DEBUG_DECODE, "IP Checksum: OK\n"); - } + else + { + DebugMessage(DEBUG_DECODE, "IP Checksum: OK\n"); + } #endif /* DEBUG */ + } } PushLayer(PROTO_IP4, p, pkt, hlen); @@ -3570,7 +3591,7 @@ * that is not so here. The sfip_compare makes that assumption for * compatibility, but sfip_contains does not. Hence, sfip_contains * is used here in the interrim. */ -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId; uint16_t dAsId; @@ -3984,6 +4005,7 @@ if ( ScTunnelBypassEnabled(TUNNEL_4IN6) ) Active_SetTunnelBypass(); CheckIPv6ExtensionOrder(p); + p->IPnIPencapsulated = 1; DecodeIP(pkt, len, p); return; case IPPROTO_IPV6: @@ -4689,6 +4711,7 @@ switch (next_header) { case IPPROTO_IPIP: + p->IPnIPencapsulated = 1; DecodeIP(esp_payload, len, p); p->packet_flags &= ~PKT_UNSURE_ENCAP; break; @@ -4892,6 +4915,8 @@ return; } + p->GREencapsulated = 1; + /* Note: Since GRE doesn't have a field to indicate header length and * can contain a few options, we need to walk through the header to * figure out the length @@ -5387,15 +5412,19 @@ * 1) Fragmented, OR * 2) UDP header chksum value is 0. */ - if( !fragmented_udp_flag && p->udph->uh_chk ) + if(!fragmented_udp_flag && p->udph->uh_chk ) { - csum = in_chksum_udp(&ph, - (uint16_t *)(p->udph), uhlen); +#if defined(DAQ_VERSION) && DAQ_VERSION > 12 + if ((((const uint8_t *)p->inner_udph - p->pkt) > p->pkth->checksum_offset) || + (p->pkth->checksum_error_flag)) +#endif + csum = in_chksum_udp(&ph,(uint16_t *)(p->udph), uhlen); } else { - csum = 0; + csum = 0; } + } else { @@ -5420,8 +5449,11 @@ */ else if( !fragmented_udp_flag ) { - csum = in_chksum_udp6(&ph6, - (uint16_t *)(p->udph), uhlen); +#if defined(DAQ_VERSION) && DAQ_VERSION > 12 + if ((((const uint8_t *)p->inner_udph - p->pkt) > p->pkth->checksum_offset) || + (p->pkth->checksum_error_flag)) +#endif + csum = in_chksum_udp6(&ph6,(uint16_t *)(p->udph), uhlen); } else { @@ -5606,61 +5638,67 @@ if (ScTcpChecksums()) #endif { - uint16_t csum; - if(IS_IP4(p)) - { - pseudoheader ph; - ph.sip = p->iph->ip_src.s_addr; - ph.dip = p->iph->ip_dst.s_addr; - /* setup the pseudo header for checksum calculation */ - ph.zero = 0; - ph.protocol = GET_IPH_PROTO(p); - ph.len = htons((u_short)len); - - /* if we're being "stateless" we probably don't care about the TCP - * checksum, but it's not bad to keep around for shits and giggles */ - /* calculate the checksum */ - csum = in_chksum_tcp(&ph, (uint16_t *)(p->tcph), len); - } - /* IPv6 traffic */ - else - { - IP6RawHdr* hdr6 = (IP6RawHdr*)p->iph; - pseudoheader6 ph6; - COPY4(ph6.sip, hdr6->ip6_src.s6_addr32); - COPY4(ph6.dip, hdr6->ip6_dst.s6_addr32); - ph6.zero = 0; - ph6.protocol = GET_IPH_PROTO(p); - ph6.len = htons((u_short)len); +#if defined(DAQ_VERSION) && DAQ_VERSION > 12 + if ((((const uint8_t *)p->tcph - p->pkt) > p->pkth->checksum_offset) || + p->pkth->checksum_error_flag) +#endif + { + uint16_t csum; + if(IS_IP4(p)) + { + pseudoheader ph; + ph.sip = p->iph->ip_src.s_addr; + ph.dip = p->iph->ip_dst.s_addr; + /* setup the pseudo header for checksum calculation */ + ph.zero = 0; + ph.protocol = GET_IPH_PROTO(p); + ph.len = htons((u_short)len); + + /* if we're being "stateless" we probably don't care about the TCP + * checksum, but it's not bad to keep around for shits and giggles */ + /* calculate the checksum */ + csum = in_chksum_tcp(&ph, (uint16_t *)(p->tcph), len); + } + /* IPv6 traffic */ + else + { + IP6RawHdr* hdr6 = (IP6RawHdr*)p->iph; + pseudoheader6 ph6; + COPY4(ph6.sip, hdr6->ip6_src.s6_addr32); + COPY4(ph6.dip, hdr6->ip6_dst.s6_addr32); + ph6.zero = 0; + ph6.protocol = GET_IPH_PROTO(p); + ph6.len = htons((u_short)len); - csum = in_chksum_tcp6(&ph6, (uint16_t *)(p->tcph), len); - } + csum = in_chksum_tcp6(&ph6, (uint16_t *)(p->tcph), len); + } - if(csum) - { + if(csum) + { /* Don't drop the packet if this is encapuslated in Teredo or ESP. Just get rid of the TCP header and stop decoding. */ - if (p->packet_flags & PKT_UNSURE_ENCAP) - { - p->tcph = NULL; - return; - } + if (p->packet_flags & PKT_UNSURE_ENCAP) + { + p->tcph = NULL; + return; + } - p->error_flags |= PKT_ERR_CKSUM_TCP; - DEBUG_WRAP(DebugMessage(DEBUG_DECODE, "Bad TCP checksum\n", + p->error_flags |= PKT_ERR_CKSUM_TCP; + DEBUG_WRAP(DebugMessage(DEBUG_DECODE, "Bad TCP checksum\n", "0x%x versus 0x%x\n", csum, ntohs(p->tcph->th_sum));); #ifdef REG_TEST - if (getRegTestFlags() & REG_TEST_FLAG_STREAM_DECODE) - printf("Bad TCP checksum\n"); + if (getRegTestFlags() & REG_TEST_FLAG_STREAM_DECODE) + printf("Bad TCP checksum\n"); #endif - if ( ScIdsMode() ) - queueExecDrop(execTcpChksmDrop, p); - } - else - { - DEBUG_WRAP(DebugMessage(DEBUG_DECODE,"TCP Checksum: OK\n");); + if ( ScIdsMode() ) + queueExecDrop(execTcpChksmDrop, p); + } + else + { + DEBUG_WRAP(DebugMessage(DEBUG_DECODE,"TCP Checksum: OK\n");); + } } } @@ -6063,6 +6101,11 @@ &p->tcp_options[opt_count], &byte_skip); break; + case TCPOPT_TFO: + code = OptLenValidate(option_ptr, end_ptr, len_ptr, -1, + &p->tcp_options[opt_count], &byte_skip); + break; + case TCPOPT_TIMESTAMP: code = OptLenValidate(option_ptr, end_ptr, len_ptr, TCPOLEN_TIMESTAMP, &p->tcp_options[opt_count], &byte_skip); diff -Nru snort-2.9.15.1/src/decode.h snort-2.9.20/src/decode.h --- snort-2.9.15.1/src/decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/decode.h 2022-05-18 04:45:01.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -357,6 +357,8 @@ #define TCPOPT_AUTH 29 /* [RFC5925] - The TCP Authentication Option Intended to replace MD5 Signature Option [RFC2385] */ +#define TCPOPT_TFO 34 /* [RFC7413] - TCP Fast Open */ + #define TCP_OPT_TRUNC -1 #define TCP_OPT_BADLEN -2 @@ -665,6 +667,9 @@ #define PKT_PURGE 0x0100000000 /* Stream will not flush the data */ #define PKT_H1_ABORT 0x0200000000 /* Used by H1 and H2 paf */ #define PKT_UPGRADE_PROTO 0x0400000000 /* Used by H1 paf */ +#define PKT_PSEUDO_FLUSH 0x0800000000 +#define PKT_FAST_BLOCK 0x1000000000 /* pkt blocked by fast-blocking */ +#define PKT_EVAL_DROP 0x2000000000 /* Packet with PKT_EVAL_DROP is evaluated if it is needed to dropped */ #define PKT_PDU_FULL (PKT_PDU_HEAD | PKT_PDU_TAIL) @@ -1780,6 +1785,9 @@ uint8_t error_flags; /* flags indicate checksum errors, bad TTLs, etc. */ uint8_t encapsulated; uint8_t GTPencapsulated; + uint8_t GREencapsulated; + uint8_t IPnIPencapsulated; + uint8_t non_ip_pkt; uint8_t next_layer; /* index into layers for next encap */ #ifndef NO_NON_ETHER_DECODER @@ -1866,6 +1874,14 @@ #define PROTO_BIT__OTHER 0x8000 #define PROTO_BIT__ALL 0xffff +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if defined(DAQ_VERSION) && DAQ_VERSION > 10 +#define GET_OUTER_IPH_PROTOID(p, pkt_header) ((uint32_t)(p->pkt_header->carrier_id) ? p->pkt_header->carrier_id : 0 ) +#else +#define GET_OUTER_IPH_PROTOID(p, pkt_header) ((uint32_t)((p)->outer_iph ? (IS_IP6(p) ? ((p)->outer_ip6h.next) : ((p)->outer_ip4h.ip_proto)):0)) +#endif +#endif + #define IsIP(p) (IPH_IS_VALID(p)) #define IsTCP(p) (IsIP(p) && p->tcph) #define IsUDP(p) (IsIP(p) && p->udph) diff -Nru snort-2.9.15.1/src/detect.c snort-2.9.20/src/detect.c --- snort-2.9.15.1/src/detect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detect.c 2022-05-18 04:45:02.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* ** Copyright (C) 1998-2002 Martin Roesch -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** Marc Norton @@ -54,6 +54,7 @@ #include "session_api.h" #include "session_common.h" #include "stream_api.h" +#include "snort_stream_udp.h" #include "active.h" #include "signature.h" #include "ipv6_port.h" @@ -171,6 +172,13 @@ EnablePreprocessors( p, scb->enabled_pps ); pps_enabled_foo = scb->enabled_pps; } + + if( ( ppn->preproc_id == PP_FW_RULE_ENGINE ) && + ( ( IPH_IS_VALID( p ) ) && ( GET_IPH_PROTO( p ) == IPPROTO_UDP ) ) && + ( session_api->protocol_tracking_enabled( SESSION_PROTO_UDP ) ) ) + { + InspectPortFilterUdp( p ); + } } while ( ( p->cur_pp != NULL ) && !( p->packet_flags & PKT_PASS_RULE ) ); @@ -597,7 +605,8 @@ } if (stream_api && stream_api->is_session_http2(p->ssnptr) - && !(p->packet_flags & PKT_REBUILT_STREAM)) + && !(p->packet_flags & PKT_REBUILT_STREAM) + && !(p->packet_flags & PKT_PDU_TAIL)) { return 0; } diff -Nru snort-2.9.15.1/src/detect.h snort-2.9.20/src/detect.h --- snort-2.9.15.1/src/detect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detect.h 2022-05-18 04:45:03.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -105,6 +105,12 @@ do_detect = do_detect_content = 0; } +static inline void EnableContentPreprocDetection( Packet *p, PreprocEnableMask enabled_pps ) +{ + EnableContentDetect(); + EnablePreprocessors( p, enabled_pps ); +} + /* counter for number of times we evaluate rules. Used to * cache result of check for rule option tree nodes. */ extern uint64_t rule_eval_pkt_count; diff -Nru snort-2.9.15.1/src/detection-plugins/Makefile.in snort-2.9.20/src/detection-plugins/Makefile.in --- snort-2.9.15.1/src/detection-plugins/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,11 +92,11 @@ @BUILD_RESPOND3_TRUE@am__append_2 = sp_respond3.c sp_respond.h @FEAT_OPEN_APPID_TRUE@am__append_3 = sp_appid.c sp_appid.h subdir = src/detection-plugins -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -165,7 +175,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -214,6 +224,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -259,6 +270,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -441,14 +453,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/detection-plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/detection-plugins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -475,10 +486,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -541,7 +552,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -693,6 +707,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + sf_snort_plugin_hdropts.c: ../dynamic-plugins/sf_engine/sf_snort_plugin_hdropts.c @src_file=$?; dst_file=$@; $(sed_hdropts) diff -Nru snort-2.9.15.1/src/detection-plugins/detection_leaf_node.c snort-2.9.20/src/detection-plugins/detection_leaf_node.c --- snort-2.9.15.1/src/detection-plugins/detection_leaf_node.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/detection_leaf_node.c 2022-05-18 04:45:04.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -108,12 +108,14 @@ if (PacketUnknown (packet)) { +#ifdef TARGET_BASED if (OtnAndPorts (otn)) return (Leaf_Abort); - +#endif return (Leaf_CheckPorts); } +#ifdef TARGET_BASED for (i = 0; i < OtnServiceCount (otn); i++) { const uint16_t ordinal = otn->sigInfo.services[ i ].service_ordinal; @@ -122,19 +124,23 @@ service_match = true; } } +#endif if (service_match) { // identified service matches the rule +#ifdef TARGET_BASED if (OtnAndPorts (otn)) return (Leaf_CheckPorts); - +#endif return (Leaf_SkipPorts); } else { +#ifdef TARGET_BASED if (!OtnOrPorts (otn)) return (Leaf_Abort); +#endif } return (Leaf_CheckPorts); @@ -147,8 +153,11 @@ OptTreeNode *otn = (OptTreeNode*) node->option_data; Packet * packet = (Packet*) eval_data->p; - if (!IsAdaptiveConfigured()) + +#ifdef TARGET_BASED + if (!IsAdaptiveConfigured() || PacketService(packet) <= 0) return (Leaf_CheckPorts); +#endif return leaf_node_check_otn_service (otn, packet); } diff -Nru snort-2.9.15.1/src/detection-plugins/detection_options.c snort-2.9.20/src/detection-plugins/detection_options.c --- snort-2.9.15.1/src/detection-plugins/detection_options.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/detection_options.c 2022-05-18 04:45:05.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -1011,6 +1011,7 @@ pattern_size = pmd->pattern_size; // See "detection_leaf_node.c" (detection_leaf_node_eval). +#ifdef TARGET_BASED switch (detection_leaf_node_eval (node, eval_data)) { case Leaf_Abort: @@ -1027,6 +1028,7 @@ NODE_PROFILE_TMPSTART(node); break; } +#endif if (eval_rtn_result) { diff -Nru snort-2.9.15.1/src/detection-plugins/detection_options.h snort-2.9.20/src/detection-plugins/detection_options.h --- snort-2.9.15.1/src/detection-plugins/detection_options.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/detection_options.h 2022-05-18 04:45:06.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_appid.c snort-2.9.20/src/detection-plugins/sp_appid.c --- snort-2.9.15.1/src/detection-plugins/sp_appid.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_appid.c 2022-05-18 04:45:07.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/detection-plugins/sp_appid.h snort-2.9.20/src/detection-plugins/sp_appid.h --- snort-2.9.15.1/src/detection-plugins/sp_appid.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_appid.h 2022-05-18 04:45:09.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_asn1.c snort-2.9.20/src/detection-plugins/sp_asn1.c --- snort-2.9.15.1/src/detection-plugins/sp_asn1.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_asn1.c 2022-05-18 04:45:10.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author: Daniel Roelker ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_asn1.h snort-2.9.20/src/detection-plugins/sp_asn1.h --- snort-2.9.15.1/src/detection-plugins/sp_asn1.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_asn1.h 2022-05-18 04:45:11.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_asn1_detect.c snort-2.9.20/src/detection-plugins/sp_asn1_detect.c --- snort-2.9.15.1/src/detection-plugins/sp_asn1_detect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_asn1_detect.c 2022-05-18 04:45:12.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author: Daniel Roelker ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_asn1_detect.h snort-2.9.20/src/detection-plugins/sp_asn1_detect.h --- snort-2.9.15.1/src/detection-plugins/sp_asn1_detect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_asn1_detect.h 2022-05-18 04:45:13.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_base64_data.c snort-2.9.20/src/detection-plugins/sp_base64_data.c --- snort-2.9.15.1/src/detection-plugins/sp_base64_data.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_base64_data.c 2022-05-18 04:45:14.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_base64_data.h snort-2.9.20/src/detection-plugins/sp_base64_data.h --- snort-2.9.15.1/src/detection-plugins/sp_base64_data.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_base64_data.h 2022-05-18 04:45:16.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_base64_decode.c snort-2.9.20/src/detection-plugins/sp_base64_decode.c --- snort-2.9.15.1/src/detection-plugins/sp_base64_decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_base64_decode.c 2022-05-18 04:45:17.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_base64_decode.h snort-2.9.20/src/detection-plugins/sp_base64_decode.h --- snort-2.9.15.1/src/detection-plugins/sp_base64_decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_base64_decode.h 2022-05-18 04:45:18.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_check.c snort-2.9.20/src/detection-plugins/sp_byte_check.c --- snort-2.9.15.1/src/detection-plugins/sp_byte_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_check.c 2022-05-18 04:45:19.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author: Martin Roesch ** @@ -498,15 +498,10 @@ } else { - if ( bytemath_variable_name && (strcmp(bytemath_variable_name,toks[2]) == 0) ) + idx->cmp_value_var = find_value(toks[2]); + if ( idx->cmp_value_var == BYTE_EXTRACT_NO_VAR) { - idx->cmp_value_var= BYTE_MATH_VAR_INDEX; // 2 - } - else - { - idx->cmp_value_var = GetVarByName(toks[2]); - if ( idx->cmp_value_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_TEST_INVALID_ERR_FMT, "byte_test : value", toks[2]); + ParseError(BYTE_TEST_INVALID_ERR_FMT, "byte_test : value", toks[2]); } } @@ -529,15 +524,10 @@ } else { - if ( bytemath_variable_name && (strcmp(bytemath_variable_name,toks[3]) == 0) ) - { - idx->offset_var= BYTE_MATH_VAR_INDEX; // 2 - } - else + idx->offset_var = find_value(toks[3]); + if ( idx->offset_var == BYTE_EXTRACT_NO_VAR) { - idx->offset_var = GetVarByName(toks[3]); - if ( idx->offset_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_TEST_INVALID_ERR_FMT, "byte_test : offset", toks[3]); + ParseError(BYTE_TEST_INVALID_ERR_FMT, "byte_test : offset", toks[3]); } } @@ -707,13 +697,14 @@ { btd->cmp_value = (int32_t) bytemath_variable; } - else + else if(btd->cmp_value_var == COMMON_VAR_INDEX ) { - if (btd->cmp_value_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_cmp_value, btd->cmp_value_var); - btd->cmp_value = (int32_t) extract_cmp_value; - } + btd->cmp_value = (int32_t) common_var; + } + else if (btd->cmp_value_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_cmp_value, btd->cmp_value_var); + btd->cmp_value = (int32_t) extract_cmp_value; } } @@ -723,13 +714,14 @@ { btd->offset = (int32_t) bytemath_variable; } - else + else if(btd->offset_var == COMMON_VAR_INDEX ) { - if (btd->offset_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_offset, btd->offset_var); - btd->offset = (int32_t) extract_offset; - } + btd->offset = (int32_t) common_var; + } + else if (btd->offset_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_offset, btd->offset_var); + btd->offset = (int32_t) extract_offset; } } diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_check.h snort-2.9.20/src/detection-plugins/sp_byte_check.h --- snort-2.9.15.1/src/detection-plugins/sp_byte_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_check.h 2022-05-18 04:45:20.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_extract.c snort-2.9.20/src/detection-plugins/sp_byte_extract.c --- snort-2.9.15.1/src/detection-plugins/sp_byte_extract.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_extract.c 2022-05-18 04:45:21.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2010-2013 Sourcefire, Inc. ** Author: Ryan Jordan ** @@ -363,15 +363,9 @@ /* third: variable name */ if (token) { - if( bytemath_variable_name && (strcmp(bytemath_variable_name, token) == 0) ) - { - ParseError("byte_extract : variable name is already used in byte_math rule \n"); - } - else - data->name = SnortStrdup(token); - - isvalidstr(token,"byte_extract"); - token = strtok_r(NULL, ",", &saveptr); + data->name = SnortStrdup(token); + isvalidstr(token,"byte_extract"); + token = strtok_r(NULL, ",", &saveptr); } /* optional arguments */ @@ -785,6 +779,7 @@ /* this rule option always "matches" if the read is performed correctly */ PREPROC_PROFILE_END(byteExtractPerfStats); + common_var = *value; return DETECTION_OPTION_MATCH; } diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_extract.h snort-2.9.20/src/detection-plugins/sp_byte_extract.h --- snort-2.9.15.1/src/detection-plugins/sp_byte_extract.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_extract.h 2022-05-18 04:45:22.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2010-2013 Sourcefire, Inc. ** Author: Ryan Jordan ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_jump.c snort-2.9.20/src/detection-plugins/sp_byte_jump.c --- snort-2.9.15.1/src/detection-plugins/sp_byte_jump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_jump.c 2022-05-18 04:45:23.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author: Martin Roesch ** @@ -425,15 +425,10 @@ } else { - if ( bytemath_variable_name && (strcmp(bytemath_variable_name,toks[1]) == 0) ) + idx->offset_var = find_value(toks[1]); + if (idx->offset_var == BYTE_EXTRACT_NO_VAR) { - idx->offset_var= BYTE_MATH_VAR_INDEX; // 2 - } - else - { - idx->offset_var = GetVarByName(toks[1]); - if ( idx->offset_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_JUMP_INVALID_ERR_FMT, "byte_jump : offset", toks[1]); + ParseError(BYTE_JUMP_INVALID_ERR_FMT, "byte_jump : offset", toks[1]); } } @@ -535,15 +530,10 @@ } else { - if ( bytemath_variable_name && (strcmp(bytemath_variable_name,mval) == 0) ) + idx->postoffset_var = find_value(mval); + if ( idx->postoffset_var == BYTE_EXTRACT_NO_VAR) { - idx->postoffset_var= BYTE_MATH_VAR_INDEX; - } - else - { - idx->postoffset_var = GetVarByName(mval); - if ( idx->postoffset_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_JUMP_INVALID_ERR_FMT, "byte_jump : post_offset", mval); + ParseError(BYTE_JUMP_INVALID_ERR_FMT, "byte_jump : post_offset", mval); } } } @@ -680,7 +670,12 @@ { bjd->offset = (int32_t) bytemath_variable; } - if ( bjd->offset_var < NUM_BYTE_EXTRACT_VARS) + + else if(bjd->offset_var == COMMON_VAR_INDEX ) + { + bjd->offset = (int32_t) common_var; + } + else if ( bjd->offset_var < NUM_BYTE_EXTRACT_VARS) { GetByteExtractValue(&extract_offset, bjd->offset_var); bjd->offset = (int32_t) extract_offset; @@ -851,7 +846,12 @@ { bjd->post_offset = (int32_t) bytemath_variable; } - if (bjd->postoffset_var < NUM_BYTE_EXTRACT_VARS) + + else if(bjd->postoffset_var == COMMON_VAR_INDEX) + { + bjd->post_offset = (int32_t) common_var; + } + else if (bjd->postoffset_var < NUM_BYTE_EXTRACT_VARS) { GetByteExtractValue(&extract_postoffset, bjd->postoffset_var); bjd->post_offset = (int32_t) extract_postoffset; diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_jump.h snort-2.9.20/src/detection-plugins/sp_byte_jump.h --- snort-2.9.15.1/src/detection-plugins/sp_byte_jump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_jump.h 2022-05-18 04:45:25.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_math.c snort-2.9.20/src/detection-plugins/sp_byte_math.c --- snort-2.9.15.1/src/detection-plugins/sp_byte_math.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_math.c 2022-05-18 04:45:26.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -122,8 +122,36 @@ char *bytemath_variable_name = NULL; uint32_t bytemath_variable; +uint32_t common_var; +uint32_t find_value (char *token) +{ + if (token == NULL) + return BYTE_EXTRACT_NO_VAR; + uint32_t match_e = 0 ,match_b = 0; + /* check byte_math already has the same name */ + if ( bytemath_variable_name && (strcmp(bytemath_variable_name,token) == 0) ) + match_b = BYTE_MATH_VAR_INDEX; + + /* check byte_extract already has the same name */ + match_e = GetVarByName(token); + + /* if same name found in both pick the latest one else the matched one */ + if ( (match_e != BYTE_EXTRACT_NO_VAR) && (match_b == BYTE_MATH_VAR_INDEX) ) + { + return COMMON_VAR_INDEX; + } + else if ( (match_e != BYTE_EXTRACT_NO_VAR) && (match_b != BYTE_MATH_VAR_INDEX) ) + { + return match_e; + } + else if ( (match_e == BYTE_EXTRACT_NO_VAR) && (match_b == BYTE_MATH_VAR_INDEX) ) + { + return BYTE_MATH_VAR_INDEX; + } + return BYTE_EXTRACT_NO_VAR; +} uint32_t ByteMathHash(void *d) { @@ -432,10 +460,6 @@ continue; } - else - { - ParseError("byte_math option bytes_to_extract is already configured once\n"); - } } else if (!strncmp(cptr,"oper",4)) @@ -567,16 +591,9 @@ { cptr=ByteMath_tok_extract(cptr,"result"); /* set result variable */ - if ( GetVarByName(cptr) == BYTE_EXTRACT_NO_VAR ) - { - idx->result_var = SnortStrdup(cptr); - } - else - { - ParseError("byte_Math:: result variable name is already used in byte_extract rule \n"); - } - if (!idx->result_var) - ParseError("byte_Math::result_var malloc failure"); + idx->result_var = SnortStrdup(cptr); + if (!idx->result_var) + ParseError("byte_Math::result_var malloc failure"); if (idx->result_var && isdigit(idx->result_var[0])) { @@ -913,7 +930,9 @@ { case BM_PLUS: if ((UINT_MAX - *value) < btd->rvalue) { - LogMessage("Buffer Overflow\n"); + LogMessage("%s-%d > %s-%d Buffer Overflow during ADDITION\n", + inet_ntoa(GET_SRC_IP(p)),ntohs(p->tcph->th_sport), + inet_ntoa(GET_DST_IP(p)),ntohs(p->tcph->th_dport)); return DETECTION_OPTION_NO_MATCH; } else @@ -925,7 +944,9 @@ case BM_MINUS: if (*value < btd->rvalue) { - LogMessage("Buffer Underflow\n"); + LogMessage("%s-%d > %s-%d Buffer Underflow during SUBTRACTION\n", + inet_ntoa(GET_SRC_IP(p)),ntohs(p->tcph->th_sport), + inet_ntoa(GET_DST_IP(p)),ntohs(p->tcph->th_dport)); return DETECTION_OPTION_NO_MATCH; } else @@ -935,9 +956,19 @@ break; } - case BM_MULTIPLY: *value *= btd->rvalue; - success = 1; - break; + case BM_MULTIPLY: if ( (*value) && ((UINT_MAX/(*value)) < btd->rvalue)) + { + LogMessage("%s-%d > %s-%d Buffer Overflow during MULTIPLY\n", + inet_ntoa(GET_SRC_IP(p)),ntohs(p->tcph->th_sport), + inet_ntoa(GET_DST_IP(p)),ntohs(p->tcph->th_dport)); + return DETECTION_OPTION_NO_MATCH; + } + else + { + *value *= btd->rvalue; + success = 1; + break; + } case BM_DIVIDE: *value = (*value/ btd->rvalue); success = 1; @@ -958,6 +989,7 @@ if (success) { rval = DETECTION_OPTION_MATCH; + common_var = *value; } /* if the test isn't successful, this function *must* return 0 */ @@ -968,7 +1000,7 @@ void ByteMathFree(void *d) { ByteMathData *data = (ByteMathData *)d; - if (data) + if (data && data->result_var) { free(data->result_var); data->result_var=NULL; @@ -1002,19 +1034,7 @@ /* Given a variable name, retrieve its index. For use by other options.dynamic-plugin support */ int8_t GetVarByName_check(char *name) { - - if (name == NULL) - return BYTE_EXTRACT_NO_VAR; - - if (bytemath_variable_name && (!strcmp(bytemath_variable_name,name))) - { - return 0; - } - else - { - return (GetVarByName(name)); - } - return BYTE_EXTRACT_NO_VAR; + return (find_value(name)); } void AddVarName_Bytemath(ByteMathData *data) diff -Nru snort-2.9.15.1/src/detection-plugins/sp_byte_math.h snort-2.9.20/src/detection-plugins/sp_byte_math.h --- snort-2.9.15.1/src/detection-plugins/sp_byte_math.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_byte_math.h 2022-05-18 04:45:27.000000000 +0000 @@ -17,12 +17,14 @@ #define LITTLE 1 #define BYTE_MATH_VAR_INDEX 2 +#define COMMON_VAR_INDEX 3 #define MIN_RVAL 1 #define MAX_RVAL 4294967295 extern char *bytemath_variable_name; extern uint32_t bytemath_variable; +extern uint32_t common_var; typedef struct _ByteMathData { @@ -49,6 +51,6 @@ int ByteMathCompare(void *l, void *r); int ByteMath(void *, Packet *); void ByteMathFree(void *d); - +uint32_t find_value (char* ); #endif /* __SP_BYTE_MATH_H__ */ diff -Nru snort-2.9.15.1/src/detection-plugins/sp_clientserver.c snort-2.9.20/src/detection-plugins/sp_clientserver.c --- snort-2.9.15.1/src/detection-plugins/sp_clientserver.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_clientserver.c 2022-05-18 04:45:28.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author: Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_clientserver.h snort-2.9.20/src/detection-plugins/sp_clientserver.h --- snort-2.9.15.1/src/detection-plugins/sp_clientserver.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_clientserver.h 2022-05-18 04:45:29.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_cvs.c snort-2.9.20/src/detection-plugins/sp_cvs.c --- snort-2.9.15.1/src/detection-plugins/sp_cvs.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_cvs.c 2022-05-18 04:45:30.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_cvs.h snort-2.9.20/src/detection-plugins/sp_cvs.h --- snort-2.9.15.1/src/detection-plugins/sp_cvs.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_cvs.h 2022-05-18 04:45:31.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_dsize_check.c snort-2.9.20/src/detection-plugins/sp_dsize_check.c --- snort-2.9.15.1/src/detection-plugins/sp_dsize_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_dsize_check.c 2022-05-18 04:45:32.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_dsize_check.h snort-2.9.20/src/detection-plugins/sp_dsize_check.h --- snort-2.9.15.1/src/detection-plugins/sp_dsize_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_dsize_check.h 2022-05-18 04:45:33.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_file_data.c snort-2.9.20/src/detection-plugins/sp_file_data.c --- snort-2.9.15.1/src/detection-plugins/sp_file_data.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_file_data.c 2022-05-18 04:45:35.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_file_data.h snort-2.9.20/src/detection-plugins/sp_file_data.h --- snort-2.9.15.1/src/detection-plugins/sp_file_data.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_file_data.h 2022-05-18 04:45:36.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_file_type.c snort-2.9.20/src/detection-plugins/sp_file_type.c --- snort-2.9.15.1/src/detection-plugins/sp_file_type.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_file_type.c 2022-05-18 04:45:37.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_file_type.h snort-2.9.20/src/detection-plugins/sp_file_type.h --- snort-2.9.15.1/src/detection-plugins/sp_file_type.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_file_type.h 2022-05-18 04:45:38.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_flowbits.c snort-2.9.20/src/detection-plugins/sp_flowbits.c --- snort-2.9.15.1/src/detection-plugins/sp_flowbits.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_flowbits.c 2022-05-18 04:45:39.000000000 +0000 @@ -1,7 +1,7 @@ /* ** $Id$ - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -100,6 +100,10 @@ static void FlowBitsParse(struct _SnortConfig *, char *, FLOWBITS_OP *, OptTreeNode *); static void FlowBitsCleanExit(int, void *); +#ifdef SNORT_RELOAD +extern volatile bool reloadInProgress; +#endif + /**************************************************************************** * * Function: FlowBitsHashInit(void) @@ -1187,6 +1191,13 @@ static void FlowBitsCleanExit(int signal, void *data) { +#ifdef SNORT_RELOAD + if (reloadInProgress) + { + return; + } +#endif + if (flowbits_hash != NULL) { sfghash_delete(flowbits_hash); diff -Nru snort-2.9.15.1/src/detection-plugins/sp_flowbits.h snort-2.9.20/src/detection-plugins/sp_flowbits.h --- snort-2.9.15.1/src/detection-plugins/sp_flowbits.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_flowbits.h 2022-05-18 04:45:40.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ftpbounce.c snort-2.9.20/src/detection-plugins/sp_ftpbounce.c --- snort-2.9.15.1/src/detection-plugins/sp_ftpbounce.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ftpbounce.c 2022-05-18 04:45:41.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** Author: Steven Sturges ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ftpbounce.h snort-2.9.20/src/detection-plugins/sp_ftpbounce.h --- snort-2.9.15.1/src/detection-plugins/sp_ftpbounce.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ftpbounce.h 2022-05-18 04:45:42.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** Author: Steven Sturges ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_hdr_opt_wrap.c snort-2.9.20/src/detection-plugins/sp_hdr_opt_wrap.c --- snort-2.9.15.1/src/detection-plugins/sp_hdr_opt_wrap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_hdr_opt_wrap.c 2022-05-18 04:45:44.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_hdr_opt_wrap.h snort-2.9.20/src/detection-plugins/sp_hdr_opt_wrap.h --- snort-2.9.15.1/src/detection-plugins/sp_hdr_opt_wrap.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_hdr_opt_wrap.h 2022-05-18 04:45:45.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_code_check.c snort-2.9.20/src/detection-plugins/sp_icmp_code_check.c --- snort-2.9.15.1/src/detection-plugins/sp_icmp_code_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_code_check.c 2022-05-18 04:45:46.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_code_check.h snort-2.9.20/src/detection-plugins/sp_icmp_code_check.h --- snort-2.9.15.1/src/detection-plugins/sp_icmp_code_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_code_check.h 2022-05-18 04:45:47.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_id_check.c snort-2.9.20/src/detection-plugins/sp_icmp_id_check.c --- snort-2.9.15.1/src/detection-plugins/sp_icmp_id_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_id_check.c 2022-05-18 04:45:48.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_id_check.h snort-2.9.20/src/detection-plugins/sp_icmp_id_check.h --- snort-2.9.15.1/src/detection-plugins/sp_icmp_id_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_id_check.h 2022-05-18 04:45:49.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_seq_check.c snort-2.9.20/src/detection-plugins/sp_icmp_seq_check.c --- snort-2.9.15.1/src/detection-plugins/sp_icmp_seq_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_seq_check.c 2022-05-18 04:45:50.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_seq_check.h snort-2.9.20/src/detection-plugins/sp_icmp_seq_check.h --- snort-2.9.15.1/src/detection-plugins/sp_icmp_seq_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_seq_check.h 2022-05-18 04:45:51.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_type_check.c snort-2.9.20/src/detection-plugins/sp_icmp_type_check.c --- snort-2.9.15.1/src/detection-plugins/sp_icmp_type_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_type_check.c 2022-05-18 04:45:57.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_icmp_type_check.h snort-2.9.20/src/detection-plugins/sp_icmp_type_check.h --- snort-2.9.15.1/src/detection-plugins/sp_icmp_type_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_icmp_type_check.h 2022-05-18 04:45:59.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_fragbits.c snort-2.9.20/src/detection-plugins/sp_ip_fragbits.c --- snort-2.9.15.1/src/detection-plugins/sp_ip_fragbits.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_fragbits.c 2022-05-18 04:46:00.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_fragbits.h snort-2.9.20/src/detection-plugins/sp_ip_fragbits.h --- snort-2.9.15.1/src/detection-plugins/sp_ip_fragbits.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_fragbits.h 2022-05-18 04:46:01.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_id_check.c snort-2.9.20/src/detection-plugins/sp_ip_id_check.c --- snort-2.9.15.1/src/detection-plugins/sp_ip_id_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_id_check.c 2022-05-18 04:46:02.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_id_check.h snort-2.9.20/src/detection-plugins/sp_ip_id_check.h --- snort-2.9.15.1/src/detection-plugins/sp_ip_id_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_id_check.h 2022-05-18 04:46:03.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_proto.c snort-2.9.20/src/detection-plugins/sp_ip_proto.c --- snort-2.9.15.1/src/detection-plugins/sp_ip_proto.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_proto.c 2022-05-18 04:46:04.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_proto.h snort-2.9.20/src/detection-plugins/sp_ip_proto.h --- snort-2.9.15.1/src/detection-plugins/sp_ip_proto.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_proto.h 2022-05-18 04:46:06.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_same_check.c snort-2.9.20/src/detection-plugins/sp_ip_same_check.c --- snort-2.9.15.1/src/detection-plugins/sp_ip_same_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_same_check.c 2022-05-18 04:46:07.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2001 Phil Wood diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_same_check.h snort-2.9.20/src/detection-plugins/sp_ip_same_check.h --- snort-2.9.15.1/src/detection-plugins/sp_ip_same_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_same_check.h 2022-05-18 04:46:08.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2001 Phil Wood diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_tos_check.c snort-2.9.20/src/detection-plugins/sp_ip_tos_check.c --- snort-2.9.15.1/src/detection-plugins/sp_ip_tos_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_tos_check.c 2022-05-18 04:46:09.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ip_tos_check.h snort-2.9.20/src/detection-plugins/sp_ip_tos_check.h --- snort-2.9.15.1/src/detection-plugins/sp_ip_tos_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ip_tos_check.h 2022-05-18 04:46:11.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ipoption_check.c snort-2.9.20/src/detection-plugins/sp_ipoption_check.c --- snort-2.9.15.1/src/detection-plugins/sp_ipoption_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ipoption_check.c 2022-05-18 04:46:14.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ipoption_check.h snort-2.9.20/src/detection-plugins/sp_ipoption_check.h --- snort-2.9.15.1/src/detection-plugins/sp_ipoption_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ipoption_check.h 2022-05-18 04:46:15.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_isdataat.c snort-2.9.20/src/detection-plugins/sp_isdataat.c --- snort-2.9.15.1/src/detection-plugins/sp_isdataat.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_isdataat.c 2022-05-18 04:46:16.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -258,13 +258,10 @@ } else { - if (bytemath_variable_name && (strcmp(bytemath_variable_name,offset) == 0)) - idx->offset_var= BYTE_MATH_VAR_INDEX; - else + idx->offset_var = find_value(offset); + if (idx->offset_var == BYTE_EXTRACT_NO_VAR) { - idx->offset_var = GetVarByName(offset); - if (idx->offset_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "isdataat", toks[0]); + ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "isdataat", toks[0]); } } @@ -331,11 +328,16 @@ if (isdata->offset_var >= 0 ) { if(isdata->offset_var == BYTE_MATH_VAR_INDEX ) - isdata->offset = (int32_t) bytemath_variable; - else { - if (isdata->offset_var < NUM_BYTE_EXTRACT_VARS) - GetByteExtractValue(&(isdata->offset), isdata->offset_var); + isdata->offset = (int32_t) bytemath_variable; + } + else if(isdata->offset_var == COMMON_VAR_INDEX ) + { + isdata->offset = (int32_t) common_var; + } + else if (isdata->offset_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&(isdata->offset), isdata->offset_var); } } diff -Nru snort-2.9.15.1/src/detection-plugins/sp_isdataat.h snort-2.9.20/src/detection-plugins/sp_isdataat.h --- snort-2.9.15.1/src/detection-plugins/sp_isdataat.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_isdataat.h 2022-05-18 04:46:18.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** Brian Caswell diff -Nru snort-2.9.15.1/src/detection-plugins/sp_pattern_match.c snort-2.9.20/src/detection-plugins/sp_pattern_match.c --- snort-2.9.15.1/src/detection-plugins/sp_pattern_match.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_pattern_match.c 2022-05-18 04:46:19.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -584,14 +584,11 @@ } else { - if (bytemath_variable_name && (strcmp(bytemath_variable_name,data) == 0)) - pmd->offset_var= BYTE_MATH_VAR_INDEX; - else + pmd->offset_var = find_value(data); + if (pmd->offset_var == BYTE_EXTRACT_NO_VAR) { - pmd->offset_var = GetVarByName(data); - if (pmd->offset_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "offset", data); - } + ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "offset", data); + } } DEBUG_WRAP(DebugMessage(DEBUG_PARSER, "Pattern offset = %d\n", @@ -621,13 +618,10 @@ } else { - if (bytemath_variable_name && (strcmp(bytemath_variable_name,data) == 0)) - pmd->depth_var= BYTE_MATH_VAR_INDEX; - else + pmd->depth_var = find_value(data); + if (pmd->depth_var == BYTE_EXTRACT_NO_VAR) { - pmd->depth_var = GetVarByName(data); - if (pmd->depth_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "depth", data); + ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "depth", data); } } @@ -651,13 +645,10 @@ } else { - if (bytemath_variable_name && (strcmp(bytemath_variable_name,data) == 0)) - pmd->distance_var= BYTE_MATH_VAR_INDEX; - else + pmd->distance_var = find_value(data); + if (pmd->distance_var == BYTE_EXTRACT_NO_VAR) { - pmd->distance_var = GetVarByName(data); - if (pmd->distance_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "distance", data); + ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "distance", data); } } @@ -691,13 +682,10 @@ } else { - if (bytemath_variable_name && (strcmp(bytemath_variable_name,data) == 0)) - pmd->within_var= BYTE_MATH_VAR_INDEX; - else + pmd->within_var = find_value(data); + if (pmd->within_var == BYTE_EXTRACT_NO_VAR) { - pmd->within_var = GetVarByName(data); - if (pmd->within_var == BYTE_EXTRACT_NO_VAR) - ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "within", data); + ParseError(BYTE_EXTRACT_INVALID_ERR_FMT, "within", data); } } @@ -2061,28 +2049,34 @@ /* Get byte_math/byte_extract variables */ if (pmd->offset_var >= 0 ) { - if(pmd->offset_var == BYTE_MATH_VAR_INDEX ) - pmd->offset = (int32_t) bytemath_variable; - else + if(pmd->offset_var == BYTE_MATH_VAR_INDEX) { - if (pmd->offset_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_offset, pmd->offset_var); - pmd->offset = (int32_t) extract_offset; - } + pmd->offset = (int32_t) bytemath_variable; + } + else if(pmd->offset_var == COMMON_VAR_INDEX) + { + pmd->offset = (int32_t) common_var; + } + else if (pmd->offset_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_offset, pmd->offset_var); + pmd->offset = (int32_t) extract_offset; } } if (pmd->distance_var >= 0 ) { - if(pmd->distance_var == BYTE_MATH_VAR_INDEX ) - pmd->distance = (int32_t) bytemath_variable; - else + if(pmd->distance_var == BYTE_MATH_VAR_INDEX) { - if (pmd->distance_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_distance, pmd->distance_var); - pmd->distance = (int32_t) extract_distance; - } + pmd->distance = (int32_t) bytemath_variable; + } + else if(pmd->distance_var == COMMON_VAR_INDEX) + { + pmd->distance = (int32_t) common_var; + } + else if (pmd->distance_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_distance, pmd->distance_var); + pmd->distance = (int32_t) extract_distance; } } @@ -2276,56 +2270,68 @@ } /* Get byte_math/byte_extract variables */ - if (pmd->offset_var >= 0 ) + if (pmd->offset_var >= 0) { - if(pmd->offset_var == BYTE_MATH_VAR_INDEX ) - pmd->offset = (int32_t) bytemath_variable; - else + if(pmd->offset_var == BYTE_MATH_VAR_INDEX) { - if (pmd->offset_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_offset, pmd->offset_var); - pmd->offset = (int32_t) extract_offset; - } + pmd->offset = (int32_t) bytemath_variable; + } + else if(pmd->offset_var == COMMON_VAR_INDEX) + { + pmd->offset = (int32_t) common_var; + } + else if (pmd->offset_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_offset, pmd->offset_var); + pmd->offset = (int32_t) extract_offset; } } - if (pmd->depth_var >= 0 ) + if (pmd->depth_var >= 0) { - if(pmd->depth_var == BYTE_MATH_VAR_INDEX ) - pmd->depth = (int32_t) bytemath_variable; - else + if(pmd->depth_var == BYTE_MATH_VAR_INDEX) { - if (pmd->depth_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_depth, pmd->depth_var); - pmd->depth = (int32_t) extract_depth; - } + pmd->depth = (int32_t) bytemath_variable; + } + else if(pmd->depth_var == COMMON_VAR_INDEX) + { + pmd->depth = (int32_t) common_var; + } + else if (pmd->depth_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_depth, pmd->depth_var); + pmd->depth = (int32_t) extract_depth; } } - if (pmd->distance_var >= 0 ) + if (pmd->distance_var >= 0) { - if(pmd->distance_var == BYTE_MATH_VAR_INDEX ) - pmd->distance = (int32_t) bytemath_variable; - else + if(pmd->distance_var == BYTE_MATH_VAR_INDEX) + { + pmd->distance = (int32_t) bytemath_variable; + } + else if(pmd->distance == COMMON_VAR_INDEX) { - if (pmd->distance_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_distance, pmd->distance_var); - pmd->distance = (int32_t) extract_distance; - } + pmd->distance = (int32_t) common_var; + } + else if (pmd->distance_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_distance, pmd->distance_var); + pmd->distance = (int32_t) extract_distance; } } - if (pmd->within_var >= 0 ) + if (pmd->within_var >= 0) { - if(pmd->within_var == BYTE_MATH_VAR_INDEX ) - pmd->within = (int32_t) bytemath_variable; - else + if(pmd->within_var == BYTE_MATH_VAR_INDEX) { - if (pmd->within_var < NUM_BYTE_EXTRACT_VARS) - { - GetByteExtractValue(&extract_within, pmd->within_var); - pmd->within = (int32_t) extract_within; - } + pmd->within = (int32_t) bytemath_variable; + } + else if(pmd->within_var == COMMON_VAR_INDEX) + { + pmd->within = (int32_t) common_var; + } + else if (pmd->within_var < NUM_BYTE_EXTRACT_VARS) + { + GetByteExtractValue(&extract_within, pmd->within_var); + pmd->within = (int32_t) extract_within; } } diff -Nru snort-2.9.15.1/src/detection-plugins/sp_pattern_match.h snort-2.9.20/src/detection-plugins/sp_pattern_match.h --- snort-2.9.15.1/src/detection-plugins/sp_pattern_match.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_pattern_match.h 2022-05-18 04:46:20.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_pcre.c snort-2.9.20/src/detection-plugins/sp_pcre.c --- snort-2.9.15.1/src/detection-plugins/sp_pcre.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_pcre.c 2022-05-18 04:46:22.000000000 +0000 @@ -2,7 +2,7 @@ /* ** Copyright (C) 2003 Brian Caswell ** Copyright (C) 2003 Michael J. Pomraning -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_pcre.h snort-2.9.20/src/detection-plugins/sp_pcre.h --- snort-2.9.15.1/src/detection-plugins/sp_pcre.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_pcre.h 2022-05-18 04:46:23.000000000 +0000 @@ -1,7 +1,7 @@ /* ** Copyright (C) 2003 Brian Caswell ** Copyright (C) 2003 Michael J. Pomraning -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_pkt_data.c snort-2.9.20/src/detection-plugins/sp_pkt_data.c --- snort-2.9.15.1/src/detection-plugins/sp_pkt_data.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_pkt_data.c 2022-05-18 04:46:24.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_pkt_data.h snort-2.9.20/src/detection-plugins/sp_pkt_data.h --- snort-2.9.15.1/src/detection-plugins/sp_pkt_data.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_pkt_data.h 2022-05-18 04:46:25.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_react.c snort-2.9.20/src/detection-plugins/sp_react.c --- snort-2.9.15.1/src/detection-plugins/sp_react.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_react.c 2022-05-18 04:46:26.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -327,6 +327,10 @@ FatalError("react: %s(%d) can't stat react page file '%s'.\n", file_name, file_line, sc->react_page); + if ( fs.st_size < 2 ) + FatalError("react: react page %s size is not adequate.\n", + sc->react_page); + s_page = SnortAlloc(fs.st_size+1); fd = fopen(sc->react_page, "r"); @@ -342,6 +346,7 @@ file_name, file_line, sc->react_page); s_page[n] = '\0'; + msg = strstr(s_page, MSG_KEY); if ( msg ) strncpy(msg, "%s", 2); diff -Nru snort-2.9.15.1/src/detection-plugins/sp_react.h snort-2.9.20/src/detection-plugins/sp_react.h --- snort-2.9.15.1/src/detection-plugins/sp_react.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_react.h 2022-05-18 04:46:27.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_replace.c snort-2.9.20/src/detection-plugins/sp_replace.c --- snort-2.9.15.1/src/detection-plugins/sp_replace.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_replace.c 2022-05-18 04:46:28.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_replace.h snort-2.9.20/src/detection-plugins/sp_replace.h --- snort-2.9.15.1/src/detection-plugins/sp_replace.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_replace.h 2022-05-18 04:46:29.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_respond.h snort-2.9.20/src/detection-plugins/sp_respond.h --- snort-2.9.15.1/src/detection-plugins/sp_respond.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_respond.h 2022-05-18 04:46:30.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 1999,2000,2001 Christian Lademann diff -Nru snort-2.9.15.1/src/detection-plugins/sp_respond3.c snort-2.9.20/src/detection-plugins/sp_respond3.c --- snort-2.9.15.1/src/detection-plugins/sp_respond3.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_respond3.c 2022-05-18 04:46:31.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify it diff -Nru snort-2.9.15.1/src/detection-plugins/sp_rpc_check.c snort-2.9.20/src/detection-plugins/sp_rpc_check.c --- snort-2.9.15.1/src/detection-plugins/sp_rpc_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_rpc_check.c 2022-05-18 04:46:33.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_rpc_check.h snort-2.9.20/src/detection-plugins/sp_rpc_check.h --- snort-2.9.15.1/src/detection-plugins/sp_rpc_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_rpc_check.h 2022-05-18 04:46:38.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_session.c snort-2.9.20/src/detection-plugins/sp_session.c --- snort-2.9.15.1/src/detection-plugins/sp_session.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_session.c 2022-05-18 04:46:40.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -80,7 +80,7 @@ #include "snort.h" #include "profiler.h" #ifdef PERF_PROFILING -PreprocStats sessionPerfStats; +static PreprocStats sessionPerfStats; extern PreprocStats ruleOTNEvalPerfStats; #endif diff -Nru snort-2.9.15.1/src/detection-plugins/sp_session.h snort-2.9.20/src/detection-plugins/sp_session.h --- snort-2.9.15.1/src/detection-plugins/sp_session.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_session.h 2022-05-18 04:46:41.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_ack_check.c snort-2.9.20/src/detection-plugins/sp_tcp_ack_check.c --- snort-2.9.15.1/src/detection-plugins/sp_tcp_ack_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_ack_check.c 2022-05-18 04:46:42.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_ack_check.h snort-2.9.20/src/detection-plugins/sp_tcp_ack_check.h --- snort-2.9.15.1/src/detection-plugins/sp_tcp_ack_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_ack_check.h 2022-05-18 04:46:43.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_flag_check.c snort-2.9.20/src/detection-plugins/sp_tcp_flag_check.c --- snort-2.9.15.1/src/detection-plugins/sp_tcp_flag_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_flag_check.c 2022-05-18 04:46:44.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_flag_check.h snort-2.9.20/src/detection-plugins/sp_tcp_flag_check.h --- snort-2.9.15.1/src/detection-plugins/sp_tcp_flag_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_flag_check.h 2022-05-18 04:46:45.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_seq_check.c snort-2.9.20/src/detection-plugins/sp_tcp_seq_check.c --- snort-2.9.15.1/src/detection-plugins/sp_tcp_seq_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_seq_check.c 2022-05-18 04:46:46.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_seq_check.h snort-2.9.20/src/detection-plugins/sp_tcp_seq_check.h --- snort-2.9.15.1/src/detection-plugins/sp_tcp_seq_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_seq_check.h 2022-05-18 04:46:48.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_win_check.c snort-2.9.20/src/detection-plugins/sp_tcp_win_check.c --- snort-2.9.15.1/src/detection-plugins/sp_tcp_win_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_win_check.c 2022-05-18 04:46:49.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_tcp_win_check.h snort-2.9.20/src/detection-plugins/sp_tcp_win_check.h --- snort-2.9.15.1/src/detection-plugins/sp_tcp_win_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_tcp_win_check.h 2022-05-18 04:46:50.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ttl_check.c snort-2.9.20/src/detection-plugins/sp_ttl_check.c --- snort-2.9.15.1/src/detection-plugins/sp_ttl_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ttl_check.c 2022-05-18 04:46:51.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_ttl_check.h snort-2.9.20/src/detection-plugins/sp_ttl_check.h --- snort-2.9.15.1/src/detection-plugins/sp_ttl_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_ttl_check.h 2022-05-18 04:46:52.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection-plugins/sp_urilen_check.c snort-2.9.20/src/detection-plugins/sp_urilen_check.c --- snort-2.9.15.1/src/detection-plugins/sp_urilen_check.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_urilen_check.c 2022-05-18 04:46:53.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection-plugins/sp_urilen_check.h snort-2.9.20/src/detection-plugins/sp_urilen_check.h --- snort-2.9.15.1/src/detection-plugins/sp_urilen_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection-plugins/sp_urilen_check.h 2022-05-18 04:46:55.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection_filter.c snort-2.9.20/src/detection_filter.c --- snort-2.9.15.1/src/detection_filter.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection_filter.c 2022-05-18 04:46:56.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection_filter.h snort-2.9.20/src/detection_filter.h --- snort-2.9.15.1/src/detection_filter.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection_filter.h 2022-05-18 04:46:57.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/detection_util.c snort-2.9.20/src/detection_util.c --- snort-2.9.15.1/src/detection_util.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection_util.c 2022-05-18 04:46:58.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/detection_util.h snort-2.9.20/src/detection_util.h --- snort-2.9.15.1/src/detection_util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/detection_util.h 2022-05-18 04:46:59.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/dump.c snort-2.9.20/src/dump.c --- snort-2.9.15.1/src/dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dump.c 2022-05-18 04:47:00.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Ron Dempster ** diff -Nru snort-2.9.15.1/src/dump.h snort-2.9.20/src/dump.h --- snort-2.9.15.1/src/dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dump.h 2022-05-18 04:47:01.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Ron Dempster ** diff -Nru snort-2.9.15.1/src/dynamic-examples/Makefile.am snort-2.9.20/src/dynamic-examples/Makefile.am --- snort-2.9.15.1/src/dynamic-examples/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/Makefile.am 2022-04-29 07:12:49.000000000 +0000 @@ -53,7 +53,9 @@ include/idle_processing.h \ include/file_api.h \ include/mpse_methods.h \ - include/reload_api.h + include/reload_api.h \ + include/smtp_api.h \ + include/memory_stats.h sed_ipv6_headers = \ sed -e "s/->iph->ip_src/->ip4_header->source/" \ @@ -225,6 +227,9 @@ include/reload_api.h: $(srcdir)/../reload_api.h @src_header=$?; dst_header=$@; $(massage_headers) +include/smtp_api.h: $(srcdir)/../smtp_api.h + @src_header=$?; dst_header=$@; $(massage_headers) + # From dynamic-plugins include/sf_dynamic_common.h: $(srcdir)/../dynamic-plugins/sf_dynamic_common.h @src_header=$?; dst_header=$@; $(copy_headers) @@ -340,6 +345,9 @@ include/file_api.h: $(top_srcdir)/src/file-process/file_api.h @src_header=$?; dst_header=$@; $(copy_headers) +include/memory_stats.h: $(srcdir)/../memory_stats.h + @src_header=$?; dst_header=$@; $(copy_headers) + INCLUDES = @INCLUDES@ if BUILD_DYNAMIC_EXAMPLES diff -Nru snort-2.9.15.1/src/dynamic-examples/Makefile.in snort-2.9.20/src/dynamic-examples/Makefile.in --- snort-2.9.15.1/src/dynamic-examples/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-examples -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ @@ -123,7 +133,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -144,6 +154,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = dynamic-preprocessor dynamic-rule +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -214,6 +225,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -356,7 +368,9 @@ include/idle_processing.h \ include/file_api.h \ include/mpse_methods.h \ - include/reload_api.h + include/reload_api.h \ + include/smtp_api.h \ + include/memory_stats.h sed_ipv6_headers = \ sed -e "s/->iph->ip_src/->ip4_header->source/" \ @@ -496,14 +510,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-examples/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -620,7 +633,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -796,6 +812,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # From main src tree include/snort_debug.h: $(srcdir)/../snort_debug.h @@ -846,6 +864,9 @@ include/reload_api.h: $(srcdir)/../reload_api.h @src_header=$?; dst_header=$@; $(massage_headers) +include/smtp_api.h: $(srcdir)/../smtp_api.h + @src_header=$?; dst_header=$@; $(massage_headers) + # From dynamic-plugins include/sf_dynamic_common.h: $(srcdir)/../dynamic-plugins/sf_dynamic_common.h @src_header=$?; dst_header=$@; $(copy_headers) @@ -961,6 +982,9 @@ include/file_api.h: $(top_srcdir)/src/file-process/file_api.h @src_header=$?; dst_header=$@; $(copy_headers) +include/memory_stats.h: $(srcdir)/../memory_stats.h + @src_header=$?; dst_header=$@; $(copy_headers) + clean-local: rm -rf include build diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-preprocessor/Makefile.in snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/Makefile.in --- snort-2.9.15.1/src/dynamic-examples/dynamic-preprocessor/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/Makefile.in 2022-05-23 15:42:29.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-examples/dynamic-preprocessor -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -145,7 +155,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -190,6 +200,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -235,6 +246,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -359,14 +371,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-preprocessor/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-preprocessor/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -423,10 +434,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -489,7 +500,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -647,6 +661,8 @@ tags tags-am uninstall uninstall-am \ uninstall-noinst_dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + sf_dynamic_preproc_lib.c: ../include/sf_dynamic_preproc_lib.c cp $? $@ diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-preprocessor/sf_preproc_info.h snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/sf_preproc_info.h --- snort-2.9.15.1/src/dynamic-examples/dynamic-preprocessor/sf_preproc_info.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/sf_preproc_info.h 2022-05-18 04:47:02.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-preprocessor/spp_example.c snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/spp_example.c --- snort-2.9.15.1/src/dynamic-examples/dynamic-preprocessor/spp_example.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-preprocessor/spp_example.c 2022-05-18 04:47:03.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-rule/Makefile.in snort-2.9.20/src/dynamic-examples/dynamic-rule/Makefile.in --- snort-2.9.15.1/src/dynamic-examples/dynamic-rule/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-rule/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-examples/dynamic-rule -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -144,7 +154,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -189,6 +199,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -234,6 +245,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -362,14 +374,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-rule/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-examples/dynamic-rule/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -426,10 +437,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -492,7 +503,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -649,6 +663,8 @@ tags tags-am uninstall uninstall-am \ uninstall-noinst_libLTLIBRARIES +.PRECIOUS: Makefile + sfsnort_dynamic_detection_lib.c: ../include/sfsnort_dynamic_detection_lib.c cp $? $@ diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-rule/detection_lib_meta.h snort-2.9.20/src/dynamic-examples/dynamic-rule/detection_lib_meta.h --- snort-2.9.15.1/src/dynamic-examples/dynamic-rule/detection_lib_meta.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-rule/detection_lib_meta.h 2022-05-18 04:47:04.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-rule/rules.c snort-2.9.20/src/dynamic-examples/dynamic-rule/rules.c --- snort-2.9.15.1/src/dynamic-examples/dynamic-rule/rules.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-rule/rules.c 2022-05-18 04:47:05.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-rule/sid109.c snort-2.9.20/src/dynamic-examples/dynamic-rule/sid109.c --- snort-2.9.15.1/src/dynamic-examples/dynamic-rule/sid109.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-rule/sid109.c 2022-05-18 04:47:06.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-examples/dynamic-rule/sid637.c snort-2.9.20/src/dynamic-examples/dynamic-rule/sid637.c --- snort-2.9.15.1/src/dynamic-examples/dynamic-rule/sid637.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-examples/dynamic-rule/sid637.c 2022-05-18 04:47:08.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-output/Makefile.in snort-2.9.20/src/dynamic-output/Makefile.in --- snort-2.9.15.1/src/dynamic-output/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-output -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ @@ -123,7 +133,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -144,6 +154,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -214,6 +225,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -323,14 +335,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-output/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-output/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -447,7 +458,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -618,6 +632,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/dynamic-output/libs/Makefile.in snort-2.9.20/src/dynamic-output/libs/Makefile.in --- snort-2.9.15.1/src/dynamic-output/libs/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/libs/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,12 +91,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-output/libs -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/snort_output.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = snort_output.pc @@ -154,7 +163,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -202,6 +211,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/snort_output.pc.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -247,6 +257,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -388,14 +399,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-output/libs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-output/libs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -454,10 +464,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -565,7 +575,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -723,6 +736,8 @@ uninstall-nodist_outputlibincludeHEADERS \ uninstall-outputlibLTLIBRARIES uninstall-pkgconfigDATA +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/dynamic-output/libs/output_lib.c snort-2.9.20/src/dynamic-output/libs/output_lib.c --- snort-2.9.15.1/src/dynamic-output/libs/output_lib.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/libs/output_lib.c 2022-05-18 04:47:14.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-output/plugins/Makefile.in snort-2.9.20/src/dynamic-output/plugins/Makefile.in --- snort-2.9.15.1/src/dynamic-output/plugins/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/plugins/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-output/plugins -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -113,7 +123,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -328,14 +340,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-output/plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-output/plugins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -362,10 +373,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -440,7 +451,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -589,6 +603,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/dynamic-output/plugins/output.h snort-2.9.20/src/dynamic-output/plugins/output.h --- snort-2.9.15.1/src/dynamic-output/plugins/output.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/plugins/output.h 2022-05-18 04:47:15.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-output/plugins/output_api.h snort-2.9.20/src/dynamic-output/plugins/output_api.h --- snort-2.9.15.1/src/dynamic-output/plugins/output_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/plugins/output_api.h 2022-05-18 04:47:18.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-output/plugins/output_base.c snort-2.9.20/src/dynamic-output/plugins/output_base.c --- snort-2.9.15.1/src/dynamic-output/plugins/output_base.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/plugins/output_base.c 2022-05-18 04:47:19.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-output/plugins/output_common.h snort-2.9.20/src/dynamic-output/plugins/output_common.h --- snort-2.9.15.1/src/dynamic-output/plugins/output_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/plugins/output_common.h 2022-05-18 04:47:20.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-output/plugins/output_lib.h snort-2.9.20/src/dynamic-output/plugins/output_lib.h --- snort-2.9.15.1/src/dynamic-output/plugins/output_lib.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/plugins/output_lib.h 2022-05-18 04:47:27.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-output/plugins/output_plugin.c snort-2.9.20/src/dynamic-output/plugins/output_plugin.c --- snort-2.9.15.1/src/dynamic-output/plugins/output_plugin.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-output/plugins/output_plugin.c 2022-05-18 04:47:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/Makefile.in snort-2.9.20/src/dynamic-plugins/Makefile.in --- snort-2.9.15.1/src/dynamic-plugins/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-plugins -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -115,7 +125,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -160,7 +170,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -181,6 +191,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -251,6 +262,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -381,14 +393,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-plugins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -415,10 +426,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -528,7 +539,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -704,6 +718,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_convert_dynamic.c snort-2.9.20/src/dynamic-plugins/sf_convert_dynamic.c --- snort-2.9.15.1/src/dynamic-plugins/sf_convert_dynamic.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_convert_dynamic.c 2022-05-18 04:47:30.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_convert_dynamic.h snort-2.9.20/src/dynamic-plugins/sf_convert_dynamic.h --- snort-2.9.15.1/src/dynamic-plugins/sf_convert_dynamic.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_convert_dynamic.h 2022-05-18 04:47:32.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_decompression_define.h snort-2.9.20/src/dynamic-plugins/sf_decompression_define.h --- snort-2.9.15.1/src/dynamic-plugins/sf_decompression_define.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_decompression_define.h 2022-05-18 04:47:33.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_common.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_common.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_common.h 2022-05-18 04:47:34.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * */ @@ -90,6 +90,7 @@ VERDICT_REASON_SMB, VERDICT_REASON_FILE, VERDICT_REASON_IPS, + VERDICT_REASON_FASTBLOCK, MAX_VERDICT_REASON } Verdict_Reason; diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_decompression.c snort-2.9.20/src/dynamic-plugins/sf_dynamic_decompression.c --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_decompression.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_decompression.c 2022-05-18 04:47:35.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_decompression.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_decompression.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_decompression.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_decompression.h 2022-05-18 04:47:36.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_define.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_define.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_define.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_define.h 2022-05-18 04:47:37.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * Author: Russ Combs diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_detection.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_detection.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_detection.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_detection.h 2022-05-18 04:47:38.000000000 +0000 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_engine.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_engine.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_engine.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_engine.h 2022-05-18 04:47:39.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_meta.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_meta.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_meta.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_meta.h 2022-05-18 04:47:41.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges @@ -31,7 +31,7 @@ #endif #ifndef REQ_ENGINE_LIB_MINOR /* FIXTHIS need to update dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.c */ -#define REQ_ENGINE_LIB_MINOR 1 +#define REQ_ENGINE_LIB_MINOR 2 #endif #define REQ_ENGINE_LIB_NAME "SF_SNORT_DETECTION_ENGINE" diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_plugins.c snort-2.9.20/src/dynamic-plugins/sf_dynamic_plugins.c --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_plugins.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_plugins.c 2022-05-18 04:47:42.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges @@ -58,6 +58,7 @@ #endif /* !WIN32 */ #include +#include #if defined(FEAT_OPEN_APPID) #include @@ -75,6 +76,7 @@ #include "sf_dynamic_detection.h" #include "sf_dynamic_preprocessor.h" #include "sf_dynamic_decompression.h" +#include "smtp_api.h" #include "sp_dynamic.h" #include "sp_preprocopt.h" #include "sp_pcre.h" @@ -1127,10 +1129,15 @@ drsd = drsd->next; DynamicRuleDataFree(tmp->data); - DynamicRuleDataFree(tmp); + #ifdef SNORT_RELOAD ada_appdata_freed(ada, tmp); #endif + if (tmp->compression_data) + { + DynamicDecompressDestroy(tmp->compression_data); + } + DynamicRuleDataFree(tmp); } } @@ -1926,6 +1933,21 @@ return 0; } +static SetTlsHostAppIdFunc setTlsHostAppIdFnPtr; + +static void registerSetTlsHostAppId(SetTlsHostAppIdFunc fnptr) +{ + setTlsHostAppIdFnPtr = fnptr; +} + +static void setTlsHostAppId(void *ssnptr, const char *serverName, const char *commonName, + const char *orgName, const char *subjectAltName, bool isSniMismatch, + int32_t *serviceAppId, int32_t *clientAppId, int32_t *payloadAppId) +{ + if (setTlsHostAppIdFnPtr) + (setTlsHostAppIdFnPtr)(ssnptr, serverName, commonName, orgName, subjectAltName, isSniMismatch, serviceAppId, clientAppId, payloadAppId); +} + static GetAppIdFunc getAppIdFnPtr = NULL; static void registerGetAppId(GetAppIdFunc fnptr) @@ -1950,13 +1972,26 @@ static EndSSLSSnLogDataFunc endSSLSSnLogDataFnPtr; static GetSSLActualActionFunc getSSLActualActionFnPtr; static GetIntfDataFunc getIntfDataFnPtr; -static ReputationProcessExternalIpFunc reputationProcessExternalIpFnPtr = NULL; +static ReputationProcessExternalIpFunc reputationProcessExternalIpFnPtr; +static ReputationGetEntryCountFunc reputatinGetEntryCountFnPtr; + +void registerReputationGetEntryCount(ReputationGetEntryCountFunc entryCountFn) +{ + reputatinGetEntryCountFnPtr = entryCountFn; +} void registerReputationProcessExternal(ReputationProcessExternalIpFunc extProcessFn) { reputationProcessExternalIpFnPtr = extProcessFn; } +static int _reputation_get_entry_count(void) +{ + if(reputatinGetEntryCountFnPtr) + return (reputatinGetEntryCountFnPtr()); + return 0; +} + static bool _reputation_process_external_ip(void *p, sfaddr_t* ip) { if(reputationProcessExternalIpFnPtr) @@ -2525,6 +2560,34 @@ }; #endif /* defined(FEAT_OPEN_APPID) */ +int dummySmtpSessionExist (void *data) +{ + return 0; +} +int dummySmtpGetFileName (void *data, uint8_t **buf, uint32_t *len, uint32_t *type) +{ + return 0; +} +int dummySmtpGetMailFrom (void *data, uint8_t **buf, uint32_t *len, uint32_t *type) +{ + return 0; +} +int dummySmtpGetRecvTo (void *data, uint8_t **buf, uint32_t *len, uint32_t *type) +{ + return 0; +} +int dymmySmtpGetEmailHdr (void *data, uint8_t **buf, uint32_t *len, uint32_t *type) +{ + return 0; +} +SmtpAPI smtpApi = { + dummySmtpSessionExist, + dummySmtpGetFileName, + dummySmtpGetMailFrom, + dummySmtpGetRecvTo, + dymmySmtpGetEmailHdr +}; + static int GetSnortPerfIndicators( void *p ) { return( PerfIndicator_GetIndicators( (Perf_Indicator_Descriptor_p_t)p ) ); @@ -2563,6 +2626,19 @@ return setIPRepUpdateCount(count); } +static void ErrorMsgThrottled(void* tinfo, const char *format, ...) +{ + char buf[STD_BUF+1]; + va_list ap; + ThrottleInfo *throttleInfo = (ThrottleInfo *)tinfo; + + va_start(ap, format); + vsnprintf(buf, STD_BUF, format, ap); + va_end(ap); + + ErrorMessageThrottled(throttleInfo, "%s", buf); +} + int InitDynamicPreprocessors(void) { DynamicPreprocessorData preprocData; @@ -2578,6 +2654,7 @@ preprocData.errMsg = &ErrorMessage; preprocData.fatalMsg = &FatalError; preprocData.debugMsg = &DebugMessageFunc; + preprocData.errMsgThrottled = &ErrorMsgThrottled; #ifdef SF_WCHAR preprocData.debugWideMsg = &DebugWideMessageFunc; #endif @@ -2825,6 +2902,7 @@ preprocData.getPktTraceActionMsg = DynamicGetPktTraceActionMsg; preprocData.setIPRepUpdateCount = DynamicSetIPRepUpdateCount; + preprocData.getCapability = &DAQ_GetCapabilities; #if defined(DAQ_CAPA_CST_TIMEOUT) preprocData.canGetTimeout = DynamicCanGetTimeout; preprocData.registerGetDaqCapaTimeout = RegisterGetDaqCapaTimeout; @@ -2843,8 +2921,14 @@ preprocData.snortFree = SnortPreprocFree; preprocData.registerReputationProcessExternal = ®isterReputationProcessExternal; preprocData.reputation_process_external_ip = &_reputation_process_external_ip; + preprocData.registerReputationGetEntryCount = ®isterReputationGetEntryCount; + preprocData.reputation_get_entry_count = &_reputation_get_entry_count; preprocData.registerFtpmodeQuery = ®isterFtpModeQuery; preprocData.ftpGetMode = &ftpGetDataSessionMode; + + preprocData.setTlsHostAppId = &setTlsHostAppId; + preprocData.registerSetTlsHostAppId = ®isterSetTlsHostAppId; + preprocData.smtpApi = &smtpApi; return InitDynamicPreprocessorPlugins(&preprocData); } diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_preprocessor.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_preprocessor.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_preprocessor.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_preprocessor.h 2022-05-18 04:47:43.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges @@ -32,6 +32,7 @@ #include "sf_dynamic_meta.h" #include "ipv6_port.h" #include "obfuscation.h" +#include "memory_stats.h" /* specifies that a function does not return * used for quieting Visual Studio warnings @@ -55,7 +56,7 @@ #endif #endif -#define PREPROCESSOR_DATA_VERSION 25 +#define PREPROCESSOR_DATA_VERSION 29 #include "sf_dynamic_common.h" #include "sf_dynamic_engine.h" @@ -71,6 +72,7 @@ #include "idle_processing.h" #include "file_api.h" #include "reload_api.h" +#include "smtp_api.h" struct _PreprocStats; @@ -239,6 +241,7 @@ GetDaqCapaTimeOutFunc getDaqCapaTimeoutFnPtr; #endif +typedef uint32_t (*GetCapability)(void); typedef void (*DisableAllPoliciesFunc)(struct _SnortConfig *); typedef int (*ReenablePreprocBitFunc)(struct _SnortConfig *, unsigned int preproc_id); typedef int (*DynamicCheckValueInRangeFunc)(const char *, char *, @@ -280,6 +283,11 @@ int32_t *ingressZoneIndex, int32_t *egressZoneIndex) ; typedef void (*RegisterGetIntfDataFunc)(GetIntfDataFunc); +typedef void (*SetTlsHostAppIdFunc)(void *ssnptr, const char *serverName, const char *commonName, + const char *orgName, const char *subjectAltName, bool isSniMismatch, + int32_t *serviceAppId, int32_t *clientAppId, int32_t *payloadAppId); +typedef void (*RegisterSetTlsHostAppIdFunc)(SetTlsHostAppIdFunc); + // // SSL Callbacks // @@ -330,17 +338,23 @@ // IPrep Last update count typedef void (*IprepUpdateCountFunc)(uint8_t); -typedef int (*RegisterMemoryStatsFunc)(uint preproc, char* preproc_name, - int (*MemoryStatsDisplayFunc)(char *buffer)); +typedef int (*RegisterMemoryStatsFunc)(uint preproc, + int (*MemoryStatsDisplayFunc)(FILE *fd, + char *buffer, + PreprocMemInfo *meminfo)); -typedef void* (*SnortAllocFunc)(int num, unsigned long size, uint32_t preproc, bool data); +typedef void* (*SnortAllocFunc)(int num, unsigned long size, uint32_t preproc, uint32_t data); -typedef void (*SnortFreeFunc)(void * ptr, uint32_t size, uint32_t preproc, bool data); +typedef void (*SnortFreeFunc)(void * ptr, uint32_t size, uint32_t preproc, uint32_t data); typedef bool (*ReputationProcessExternalIpFunc)(void *p, sfaddr_t* ip); typedef void (*RegisterReputationProcessExternalFunc)(ReputationProcessExternalIpFunc); +typedef int (*ReputationGetEntryCountFunc)(void); +typedef void (*RegisterReputationGetEntryCountFunc)(ReputationGetEntryCountFunc); /* FTP data transfer mode */ typedef bool (*ftpGetModefunc)(void *ssnptr); typedef void (*RegisterFtpQueryModefunc)(ftpGetModefunc); +typedef void (*LogMsgThrottled)(void*, const char *, ...); + #define ENC_DYN_FWD 0x80000000 #define ENC_DYN_NET 0x10000000 @@ -366,6 +380,7 @@ LogMsgFunc errMsg; LogMsgFunc fatalMsg; DebugMsgFunc debugMsg; + LogMsgThrottled errMsgThrottled; PreprocRegisterFunc registerPreproc; #ifdef SNORT_RELOAD @@ -617,12 +632,18 @@ CanGetTimeout canGetTimeout; RegisterGetDaqCapaTimeoutFunc registerGetDaqCapaTimeout; #endif + GetCapability getCapability; + ReputationGetEntryCountFunc reputation_get_entry_count; + RegisterReputationGetEntryCountFunc registerReputationGetEntryCount; ReputationProcessExternalIpFunc reputation_process_external_ip; RegisterReputationProcessExternalFunc registerReputationProcessExternal; RegisterFtpQueryModefunc registerFtpmodeQuery; ftpGetModefunc ftpGetMode; - + + SetTlsHostAppIdFunc setTlsHostAppId; + RegisterSetTlsHostAppIdFunc registerSetTlsHostAppId; + SmtpAPI *smtpApi; } DynamicPreprocessorData; /* Function prototypes for Dynamic Preprocessor Plugins */ diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_side_channel.h snort-2.9.20/src/dynamic-plugins/sf_dynamic_side_channel.h --- snort-2.9.15.1/src/dynamic-plugins/sf_dynamic_side_channel.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_dynamic_side_channel.h 2022-05-18 04:47:44.000000000 +0000 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/Makefile.in snort-2.9.20/src/dynamic-plugins/sf_engine/Makefile.in --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-plugins/sf_engine -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -152,7 +162,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -193,7 +203,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -214,6 +224,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -284,6 +295,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -535,14 +547,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -599,10 +610,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -712,7 +723,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -897,6 +911,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicengineLTLIBRARIES +.PRECIOUS: Makefile + ipv6_port.h: ../../ipv6_port.h @src_header=$?; dst_header=$@; $(massage_ipv6_headers) diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/bmh.c snort-2.9.20/src/dynamic-plugins/sf_engine/bmh.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/bmh.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/bmh.c 2022-05-18 04:47:45.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Marc Norton diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/bmh.h snort-2.9.20/src/dynamic-plugins/sf_engine/bmh.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/bmh.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/bmh.h 2022-05-18 04:47:46.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Marc Norton diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1000.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1000.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1000.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1000.c 2022-05-18 04:47:47.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1001.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1001.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1001.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1001.c 2022-05-18 04:47:48.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/109.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/109.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/109.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/109.c 2022-05-18 04:47:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/12759.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/12759.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/12759.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/12759.c 2022-05-18 04:47:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1915.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1915.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1915.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1915.c 2022-05-18 04:47:52.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1939.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1939.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/1939.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/1939.c 2022-05-18 04:47:53.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2044.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2044.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2044.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2044.c 2022-05-18 04:47:54.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2313.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2313.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2313.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2313.c 2022-05-18 04:47:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2404.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2404.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2404.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2404.c 2022-05-18 04:47:56.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2486.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2486.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2486.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2486.c 2022-05-18 04:47:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2527.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2527.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2527.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2527.c 2022-05-18 04:47:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2528.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2528.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2528.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2528.c 2022-05-18 04:47:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2570.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2570.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/2570.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/2570.c 2022-05-18 04:48:00.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3036.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3036.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3036.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3036.c 2022-05-18 04:48:02.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3052.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3052.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3052.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3052.c 2022-05-18 04:48:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3099.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3099.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3099.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3099.c 2022-05-18 04:48:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/32694.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/32694.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/32694.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/32694.c 2022-05-18 04:48:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * openldap buffer overflow dos attempt * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/34408.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/34408.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/34408.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/34408.c 2022-05-18 04:48:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Altrium Software MERCUR IMAPD NTLMSSP Command Handling memory corruption attempt * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3665.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3665.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3665.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3665.c 2022-05-18 04:48:07.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/36733.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/36733.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/36733.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/36733.c 2022-05-18 04:48:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * Apache auth_ldap_log_reason format string vulnerabilty * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen, Sourcefire VRT diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/36734.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/36734.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/36734.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/36734.c 2022-05-18 04:48:10.000000000 +0000 @@ -1,7 +1,7 @@ /* * Linux Kernel ICMP Packet Handling Denial of Service * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Written by Patrick Mullen, Sourcefire VRT diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3682.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3682.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/3682.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/3682.c 2022-05-18 04:48:11.000000000 +0000 @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * */ diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/593.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/593.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/593.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/593.c 2022-05-18 04:48:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/637.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/637.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/637.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/637.c 2022-05-18 04:48:13.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/652.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/652.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/652.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/652.c 2022-05-18 04:48:14.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/Makefile.in snort-2.9.20/src/dynamic-plugins/sf_engine/examples/Makefile.in --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-plugins/sf_engine/examples -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -158,7 +168,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -203,6 +213,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -248,6 +259,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -428,14 +440,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-plugins/sf_engine/examples/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -492,10 +503,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -558,7 +569,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -710,6 +724,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug109059-builtin.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug109059-builtin.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug109059-builtin.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug109059-builtin.c 2022-05-18 04:48:15.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug109059-custom.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug109059-custom.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug109059-custom.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug109059-custom.c 2022-05-18 04:48:16.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug25673.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug25673.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug25673.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug25673.c 2022-05-18 04:48:18.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * Writen by Lurene Grenier & Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug26266.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug26266.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug26266.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug26266.c 2022-05-18 04:48:19.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug29818.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug29818.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug29818.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug29818.c 2022-05-18 04:48:20.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * Written by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug30013.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug30013.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug30013.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug30013.c 2022-05-18 04:48:21.000000000 +0000 @@ -1,7 +1,7 @@ /* * Winny P2P Application Detection * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Lurene Grenier & Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug31159.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug31159.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug31159.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug31159.c 2022-05-18 04:48:22.000000000 +0000 @@ -1,7 +1,7 @@ /* * SMTP RCPT-TO overflow detection * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug31842.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug31842.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug31842.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug31842.c 2022-05-18 04:48:23.000000000 +0000 @@ -1,7 +1,7 @@ /* * squid_ntlm_authentication buffer overflow exploit attempt * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug34427.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug34427.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug34427.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug34427.c 2022-05-18 04:48:24.000000000 +0000 @@ -1,7 +1,7 @@ /* * MISC IBM Lotus Domino LDAP server invalide DN message buffer overflow attempt * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug35218.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug35218.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/bug35218.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/bug35218.c 2022-05-18 04:48:25.000000000 +0000 @@ -1,7 +1,7 @@ /* * SNMP Microsoft Exchange Server MIME base64 decoding code execution attempt * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/dce_so_rule.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/dce_so_rule.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/dce_so_rule.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/dce_so_rule.c 2022-05-18 04:48:26.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2010-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/detection_lib_meta.h snort-2.9.20/src/dynamic-plugins/sf_engine/examples/detection_lib_meta.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/detection_lib_meta.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/detection_lib_meta.h 2022-05-18 04:48:27.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.c 2022-05-18 04:48:31.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base64 Decoding Routines * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.h snort-2.9.20/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/imap_base64_decode.h 2022-05-18 04:48:32.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base64 Decoding Routines * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_ber.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_ber.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_ber.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_ber.c 2022-05-18 04:48:33.000000000 +0000 @@ -1,7 +1,7 @@ /* * BER support functions * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_ber.h snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_ber.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_ber.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_ber.h 2022-05-18 04:48:34.000000000 +0000 @@ -1,7 +1,7 @@ /* * BER support functions * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_mozilla_sslv2_cmk.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_mozilla_sslv2_cmk.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_mozilla_sslv2_cmk.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_mozilla_sslv2_cmk.c 2022-05-18 04:48:35.000000000 +0000 @@ -1,7 +1,7 @@ /* * Mozilla Network Security Services SSLv2 Server Stack Overflow * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Written by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_mysql_com_table_dump.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_mysql_com_table_dump.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/misc_mysql_com_table_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/misc_mysql_com_table_dump.c 2022-05-18 04:48:36.000000000 +0000 @@ -1,7 +1,7 @@ /* * MySQL COM_TABLE_DUMP Function Stack Overflow * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Written by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/rule_http_buffers.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rule_http_buffers.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/rule_http_buffers.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rule_http_buffers.c 2022-05-18 04:48:41.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * */ diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/rule_relative_contents.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rule_relative_contents.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/rule_relative_contents.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rule_relative_contents.c 2022-05-18 04:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * */ diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/rules.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rules.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/rules.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/rules.c 2022-05-18 04:48:46.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.c 2022-05-18 04:48:47.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.h snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.h 2022-05-18 04:48:48.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid1026.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid1026.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid1026.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid1026.c 2022-05-18 04:48:49.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid1902.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid1902.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid1902.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid1902.c 2022-05-18 04:48:50.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2257.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2257.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2257.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2257.c 2022-05-18 04:48:52.000000000 +0000 @@ -2,7 +2,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * */ diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2489.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2489.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2489.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2489.c 2022-05-18 04:48:54.000000000 +0000 @@ -2,7 +2,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * */ diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2578.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2578.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2578.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2578.c 2022-05-18 04:48:56.000000000 +0000 @@ -2,7 +2,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * */ diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2922.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2922.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid2922.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid2922.c 2022-05-18 04:48:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid9999.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid9999.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/sid9999.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/sid9999.c 2022-05-18 04:49:00.000000000 +0000 @@ -1,7 +1,7 @@ /* * VRT RULES * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This file is autogenerated via rules2c, by Brian Caswell diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/web-client_test.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-client_test.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/web-client_test.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-client_test.c 2022-05-18 04:49:05.000000000 +0000 @@ -7,7 +7,7 @@ /* * Vuln Title: XXXX * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. All Rights Reserved * * Written by XXXX, Sourcefire VRT diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.c snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.c 2022-05-18 04:49:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base64 Decoding Routines * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.h snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/examples/web-misc_base64_decode.h 2022-05-18 04:49:07.000000000 +0000 @@ -1,7 +1,7 @@ /* * Base64 Decoding Routines * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. All Rights Reserved * * Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_decompression.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_decompression.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_decompression.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_decompression.c 2022-05-18 04:49:08.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_decompression.h snort-2.9.20/src/dynamic-plugins/sf_engine/sf_decompression.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_decompression.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_decompression.h 2022-05-18 04:49:09.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.c 2022-05-18 04:49:10.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.h snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_detection_engine.h 2022-05-18 04:49:11.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_packet.h snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_packet.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_packet.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_packet.h 2022-05-18 04:49:12.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges @@ -122,6 +122,14 @@ #define IP_HDR_LEN 20 +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if defined(DAQ_VERSION) && DAQ_VERSION > 10 +#define GET_SFOUTER_IPH_PROTOID(p, pkt_header) ((uint32_t)(p->pkt_header->carrier_id) ? p->pkt_header->carrier_id : 0 ) +#else +#define GET_SFOUTER_IPH_PROTOID(p, pkt_header) ((uint32_t)((p)->outer_ip4_header ? (IS_IP6(p) ? ((p)->outer_ip6h.next) : ((p)->outer_ip4h.ip_proto)):0)) +#endif +#endif + typedef struct _IPV4Header { uint8_t version_headerlength; @@ -514,6 +522,7 @@ // forward declaration for snort expected session created due to this packet. struct _ExpectNode; +// NOTE: Any modifcation to _SFSnortPacket, please bump up REQ_ENGINE_LIB_MINOR typedef struct _SFSnortPacket { const SFDAQ_PktHdr_t *pkt_header; /* Is this GPF'd? */ @@ -597,6 +606,9 @@ uint8_t invalid_flags; uint8_t encapsulated; uint8_t GTPencapsulated; + uint8_t GREencapsulated; + uint8_t IPnIPencapsulated; + uint8_t non_ip_pkt; uint8_t next_layer_index; #ifndef NO_NON_ETHER_DECODER @@ -752,6 +764,11 @@ #define FLAG_EARLY_REASSEMBLY 0x40000000 /* this packet. part of the expected stream, should have stream reassembly set */ #define FLAG_RETRANSMIT 0x80000000 /* this packet is identified as re-transmitted one */ #define FLAG_PURGE 0x0100000000 /* Stream will not flush the data */ +#define FLAG_H1_ABORT 0x0200000000 /* Used by H1 and H2 paf */ +#define FLAG_UPGRADE_PROTO 0x0400000000 /* Used by H1 paf */ +#define FLAG_PSEUDO_FLUSH 0x0800000000 +#define FLAG_FAST_BLOCK 0x1000000000 +#define FLAG_EVAL_DROP 0x2000000000 /* Packet with FLAG_EVAL_DROP is evaluated if it is needed to dropped */ #define FLAG_PDU_FULL (FLAG_PDU_HEAD | FLAG_PDU_TAIL) diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.c 2022-05-18 04:49:14.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.h snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.h --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_api.h 2022-05-18 04:49:15.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_byte.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_byte.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_byte.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_byte.c 2022-05-18 04:49:16.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_content.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_content.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_content.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_content.c 2022-05-18 04:49:17.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Marc Norton diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_hdropts.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_hdropts.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_hdropts.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_hdropts.c 2022-05-18 04:49:18.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_loop.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_loop.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_loop.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_loop.c 2022-05-18 04:49:19.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_pcre.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_pcre.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_pcre.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_pcre.c 2022-05-18 04:49:20.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steve Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_rc4.c snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_rc4.c --- snort-2.9.15.1/src/dynamic-plugins/sf_engine/sf_snort_plugin_rc4.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_engine/sf_snort_plugin_rc4.c 2022-05-18 04:49:21.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * Author: Lurene Grunier diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_preproc_example/Makefile.in snort-2.9.20/src/dynamic-plugins/sf_preproc_example/Makefile.in --- snort-2.9.15.1/src/dynamic-plugins/sf_preproc_example/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_preproc_example/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-plugins/sf_preproc_example -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +119,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +165,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -263,14 +275,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-plugins/sf_preproc_example/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-plugins/sf_preproc_example/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -294,7 +305,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -438,6 +452,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.c snort-2.9.20/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.c --- snort-2.9.15.1/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.c 2022-05-18 04:49:22.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.h snort-2.9.20/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.h --- snort-2.9.15.1/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.h 2022-05-18 04:49:23.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** Author: Steven Sturges ** diff -Nru snort-2.9.15.1/src/dynamic-plugins/sp_dynamic.c snort-2.9.20/src/dynamic-plugins/sp_dynamic.c --- snort-2.9.15.1/src/dynamic-plugins/sp_dynamic.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sp_dynamic.c 2022-05-18 04:49:29.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sp_dynamic.h snort-2.9.20/src/dynamic-plugins/sp_dynamic.h --- snort-2.9.15.1/src/dynamic-plugins/sp_dynamic.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sp_dynamic.h 2022-05-18 04:49:30.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sp_preprocopt.c snort-2.9.20/src/dynamic-plugins/sp_preprocopt.c --- snort-2.9.15.1/src/dynamic-plugins/sp_preprocopt.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sp_preprocopt.c 2022-05-18 04:49:31.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges diff -Nru snort-2.9.15.1/src/dynamic-plugins/sp_preprocopt.h snort-2.9.20/src/dynamic-plugins/sp_preprocopt.h --- snort-2.9.15.1/src/dynamic-plugins/sp_preprocopt.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-plugins/sp_preprocopt.h 2022-05-18 04:49:32.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Steven Sturges diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/Makefile.am snort-2.9.20/src/dynamic-preprocessors/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/Makefile.am 2022-04-29 07:12:50.000000000 +0000 @@ -89,7 +89,9 @@ include/mpse_methods.h \ include/file_api.h \ include/reload_api.h \ -include/reg_test.h +include/smtp_api.h \ +include/reg_test.h \ +include/memory_stats.h preproclib_LTLIBRARIES += libsf_dynamic_utils.la @@ -198,6 +200,7 @@ include/sip_common.h \ include/cip_common.h \ include/reload_api.h \ + include/smtp_api.h \ include/reg_test.h \ include/reg_test.c \ ssl_common/ssl.h \ @@ -211,7 +214,8 @@ ssl_common/ssl_ha.h \ ssl_common/ssl_ha.c \ libs/sfparser.c \ - libs/sfcommon.h + libs/sfcommon.h \ + include/memory_stats.h if FEAT_OPEN_APPID BUILT_SOURCES += include/appId.h include/appIdApi.h include/thirdparty_appid_types.h \ @@ -424,6 +428,9 @@ include/reload_api.h: $(srcdir)/../reload_api.h @src_header=$?; dst_header=$@; $(massage_headers) +include/smtp_api.h: $(srcdir)/../smtp_api.h + @src_header=$?; dst_header=$@; $(massage_headers) + include/reg_test.h: $(srcdir)/../reg_test.h @src_header=$?; dst_header=$@; $(copy_headers) @@ -704,11 +711,15 @@ @src_header=$?; dst_header=$@; $(copy_headers) endif +include/memory_stats.h: $(srcdir)/../memory_stats.h + @src_header=$?; dst_header=$@; $(copy_headers) + if FEAT_FILE_INSPECT FILE_INSPECT_DIR = file endif -SUBDIRS = . libs ftptelnet pop imap smtp ssh dns ssl dcerpc2 sdf sip reputation gtp modbus dnp3 $(FILE_INSPECT_DIR) +SUBDIRS = . libs ftptelnet pop imap smtp ssh dns ssl dcerpc2 sdf sip reputation gtp modbus dnp3 s7commplus $(FILE_INSPECT_DIR) + if FEAT_OPEN_APPID SUBDIRS += appid endif @@ -717,7 +728,9 @@ rm -rf include build EXTRA_DIST = \ +dynamic_preprocessors.vcxproj \ dynamic_preprocessors.dsp \ +sf_dynamic_initialize/sf_dynamic_initialize.vcxproj \ sf_dynamic_initialize/sf_dynamic_initialize.dsp \ treenodes.sed @@ -790,7 +803,8 @@ ssl_common/ssl_inspect.c \ ssl_common/ssl_ha.h \ ssl_common/ssl_ha.c \ -libs/sfparser.c +libs/sfparser.c \ +include/memory_stats.h if FEAT_OPEN_APPID exported_files += include/appId.h include/appIdApi.h include/thirdparty_appid_types.h \ diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/Makefile.in snort-2.9.20/src/dynamic-preprocessors/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/Makefile.in 2019-12-03 09:30:43.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -124,12 +134,12 @@ @BUILD_SNORT_RELOAD_TRUE@include/appdata_adjuster.c subdir = src/dynamic-preprocessors -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(am__preproc_HEADERS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__preproc_HEADERS_DIST) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -240,7 +250,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -287,7 +297,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -308,7 +318,8 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = . libs ftptelnet pop imap smtp ssh dns ssl dcerpc2 sdf \ - sip reputation gtp modbus dnp3 file appid + sip reputation gtp modbus dnp3 s7commplus file appid +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -379,6 +390,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -547,8 +559,9 @@ @SO_WITH_STATIC_LIB_TRUE@ include/mpse_methods.h \ @SO_WITH_STATIC_LIB_TRUE@ include/file_api.h \ @SO_WITH_STATIC_LIB_TRUE@ include/reload_api.h \ -@SO_WITH_STATIC_LIB_TRUE@ include/reg_test.h $(am__append_1) \ -@SO_WITH_STATIC_LIB_TRUE@ $(am__append_3) +@SO_WITH_STATIC_LIB_TRUE@ include/smtp_api.h include/reg_test.h \ +@SO_WITH_STATIC_LIB_TRUE@ include/memory_stats.h \ +@SO_WITH_STATIC_LIB_TRUE@ $(am__append_1) $(am__append_3) @SO_WITH_STATIC_LIB_TRUE@libsf_dynamic_utils_la_CFLAGS = -fPIC -DPIC -DDYNAMIC_PREPROC_CONTEXT @SO_WITH_STATIC_LIB_TRUE@libsf_dynamic_utils_la_LDFLAGS = -static @FEAT_OPEN_APPID_FALSE@@SO_WITH_STATIC_LIB_TRUE@nodist_libsf_dynamic_utils_la_SOURCES = include/sfmemcap.c \ @@ -599,13 +612,14 @@ include/sf_seqnums.h include/perf_indicators.h \ include/file_api.h include/file_mail_common.h \ include/mpse_methods.h include/sfdebug.h include/sip_common.h \ - include/cip_common.h include/reload_api.h include/reg_test.h \ - include/reg_test.c ssl_common/ssl.h ssl_common/ssl.c \ - ssl_common/ssl_include.h ssl_common/ssl_config.h \ - ssl_common/ssl_config.c ssl_common/ssl_session.h \ - ssl_common/ssl_inspect.h ssl_common/ssl_inspect.c \ - ssl_common/ssl_ha.h ssl_common/ssl_ha.c libs/sfparser.c \ - libs/sfcommon.h $(am__append_4) $(am__append_5) + include/cip_common.h include/reload_api.h include/smtp_api.h \ + include/reg_test.h include/reg_test.c ssl_common/ssl.h \ + ssl_common/ssl.c ssl_common/ssl_include.h \ + ssl_common/ssl_config.h ssl_common/ssl_config.c \ + ssl_common/ssl_session.h ssl_common/ssl_inspect.h \ + ssl_common/ssl_inspect.c ssl_common/ssl_ha.h \ + ssl_common/ssl_ha.c libs/sfparser.c libs/sfcommon.h \ + include/memory_stats.h $(am__append_4) $(am__append_5) sed_ipv6_headers = \ sed -e "s/->iph->ip_src/->ip4_header->source/" \ -e "s/->iph->ip_dst/->ip4_header->destination/" \ @@ -753,9 +767,12 @@ @FEAT_FILE_INSPECT_TRUE@FILE_INSPECT_DIR = file SUBDIRS = . libs ftptelnet pop imap smtp ssh dns ssl dcerpc2 sdf sip \ - reputation gtp modbus dnp3 $(FILE_INSPECT_DIR) $(am__append_6) + reputation gtp modbus dnp3 s7commplus $(FILE_INSPECT_DIR) \ + $(am__append_6) EXTRA_DIST = \ +dynamic_preprocessors.vcxproj \ dynamic_preprocessors.dsp \ +sf_dynamic_initialize/sf_dynamic_initialize.vcxproj \ sf_dynamic_initialize/sf_dynamic_initialize.dsp \ treenodes.sed @@ -792,8 +809,8 @@ ssl_common/ssl_config.h ssl_common/ssl_config.c \ ssl_common/ssl_session.h ssl_common/ssl_inspect.h \ ssl_common/ssl_inspect.c ssl_common/ssl_ha.h \ - ssl_common/ssl_ha.c libs/sfparser.c $(am__append_7) \ - $(am__append_8) + ssl_common/ssl_ha.c libs/sfparser.c include/memory_stats.h \ + $(am__append_7) $(am__append_8) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -811,14 +828,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -878,10 +894,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -1117,7 +1133,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1307,6 +1326,8 @@ uninstall-nodist_preprocHEADERS uninstall-preprocHEADERS \ uninstall-preproclibLTLIBRARIES +.PRECIOUS: Makefile + @SO_WITH_STATIC_LIB_TRUE@all-local: $(LTLIBRARIES) @SO_WITH_STATIC_LIB_TRUE@ $(MAKE) DESTDIR=`pwd`/build install-preproclibLTLIBRARIES @@ -1354,6 +1375,9 @@ include/reload_api.h: $(srcdir)/../reload_api.h @src_header=$?; dst_header=$@; $(massage_headers) +include/smtp_api.h: $(srcdir)/../smtp_api.h + @src_header=$?; dst_header=$@; $(massage_headers) + include/reg_test.h: $(srcdir)/../reg_test.h @src_header=$?; dst_header=$@; $(copy_headers) @@ -1627,6 +1651,9 @@ @BUILD_SNORT_RELOAD_TRUE@include/appdata_adjuster.h: $(srcdir)/../reload-adjust/appdata_adjuster.h @BUILD_SNORT_RELOAD_TRUE@ @src_header=$?; dst_header=$@; $(copy_headers) +include/memory_stats.h: $(srcdir)/../memory_stats.h + @src_header=$?; dst_header=$@; $(copy_headers) + clean-local: rm -rf include build diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/Makefile.in snort-2.9.20/src/dynamic-preprocessors/appid/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/appid/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,13 +88,12 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile_defs $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am subdir = src/dynamic-preprocessors/appid ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -239,7 +248,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -285,6 +294,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile_defs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -336,6 +346,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -607,16 +618,15 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/appid/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/appid/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; -$(srcdir)/Makefile_defs: +$(srcdir)/Makefile_defs $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -672,10 +682,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -1005,7 +1015,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1159,6 +1172,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appId.c snort-2.9.20/src/dynamic-preprocessors/appid/appId.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appId.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appId.c 2022-05-18 04:49:35.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appId.h snort-2.9.20/src/dynamic-preprocessors/appid/appId.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appId.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appId.h 2022-05-18 04:49:36.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -1007,6 +1007,7 @@ APP_ID_FTP_ACTIVE=4002, APP_ID_FTP_PASSIVE=4003, APP_ID_PSIPHON=4075, + APP_ID_DNS_OVER_TLS=4615, APP_ID_ENIP=5001, APP_ID_CIP=5002, APP_ID_CIP_UNKNOWN=5003, diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdApi.c snort-2.9.20/src/dynamic-preprocessors/appid/appIdApi.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdApi.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appIdApi.c 2022-05-18 04:49:39.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -99,9 +99,29 @@ return APP_ID_NONE; } char* getTlsHost(struct AppIdData *appIdData) -{ +{ if (appIdData && appIdData->tsession) - return appIdData->tsession->tls_host; + { + switch (appIdData->tsession->matched_tls_type) + { + case MATCHED_TLS_HOST: + return appIdData->tsession->tls_host; + case MATCHED_TLS_FIRST_SAN: + return appIdData->tsession->tls_first_san; + case MATCHED_TLS_CNAME: + return appIdData->tsession->tls_cname; + default: + /*tls_orgUnit is intentionally avoided from being + returned as an URL here, even if its the matching one*/ + if (appIdData->tsession->tls_host) + return appIdData->tsession->tls_host; + else if (appIdData->tsession->tls_first_san) + return appIdData->tsession->tls_first_san; + else if (appIdData->tsession->tls_cname) + return appIdData->tsession->tls_cname; + return NULL; + } + } return NULL; } SFGHASH* getFwMultiPayloadList(struct AppIdData *appIdData) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdConfig.c snort-2.9.20/src/dynamic-preprocessors/appid/appIdConfig.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdConfig.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appIdConfig.c 2022-05-18 04:49:40.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -77,7 +77,8 @@ memset (appidSC, 0, sizeof(*appidSC)); #ifdef SIDE_CHANNEL - if (NULL == (appidSC->appId_ss_config = (AppIdSSConfig *)calloc(1, sizeof(AppIdSSConfig)))) + if (NULL == (appidSC->appId_ss_config = (AppIdSSConfig *)_dpd.snortAlloc(1, + sizeof(*appidSC->appId_ss_config), PP_APP_ID, PP_MEM_CATEGORY_CONFIG))) { _dpd.fatalMsg("Appid failed to allocate memory for state sharing configuration\n"); } @@ -343,11 +344,12 @@ { tAppidGenericConfigItem *pConfigItem; - if (!(pConfigItem = malloc(sizeof(*pConfigItem))) || + if (!(pConfigItem = (tAppidGenericConfigItem*)_dpd.snortAlloc(1, + sizeof(*pConfigItem), PP_APP_ID, PP_MEM_CATEGORY_CONFIG)) || !(pConfigItem->name = strdup(name))) { if (pConfigItem) - free(pConfigItem); + _dpd.snortFree(pConfigItem, sizeof(*pConfigItem), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); _dpd.errMsg("Failed to allocate a config item."); return; } @@ -386,7 +388,7 @@ if (strcmp(pConfigItem->name, name) == 0) { free(pConfigItem->name); - free(pConfigItem); + _dpd.snortFree(pConfigItem, sizeof(*pConfigItem), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); sflist_remove_node(&pConfig->genericConfigList, pNode); break; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdConfig.h snort-2.9.20/src/dynamic-preprocessors/appid/appIdConfig.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdConfig.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appIdConfig.h 2022-05-18 04:49:41.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -199,6 +199,10 @@ unsigned host_port_app_cache_lookup_interval; unsigned host_port_app_cache_lookup_range; unsigned multipayload_max_packets; + unsigned http_tunnel_detect; + uint64_t max_bytes_before_service_fail; + uint16_t max_packet_before_service_fail; + uint16_t max_packet_service_fail_ignore_bytes; bool http2_detection_enabled; // internal HTTP/2 detection bool is_host_port_app_cache_runtime; bool check_host_port_app_cache; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdStats.c snort-2.9.20/src/dynamic-preprocessors/appid/appIdStats.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdStats.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appIdStats.c 2022-05-18 04:49:42.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ /*#include "session_record.h" */ #include #include "appIdStats.h" +#include "common_util.h" #include "sf_dynamic_preprocessor.h" #include "fw_appid.h" #include "appInfoTable.h" @@ -105,7 +106,8 @@ static void deleteRecord(void* record) { - free(record); + _dpd.snortFree(record, sizeof(struct AppIdStatRecord), + PP_APP_ID, PP_MEM_CATEGORY_MISC); } void appIdStatsUpdate(tAppIdData* session) @@ -145,7 +147,7 @@ app_id = web_app_id; if(!(record = fwAvlLookup(app_id, bucket->appsTree))) { - record = calloc(1, sizeof(struct AppIdStatRecord)); + record = _dpd.snortAlloc(1, sizeof(*record), PP_APP_ID, PP_MEM_CATEGORY_MISC); if(record) { if (fwAvlInsert(app_id, record, bucket->appsTree) == 0) @@ -159,7 +161,7 @@ } else { - free(record); + _dpd.snortFree(record, sizeof(*record), PP_APP_ID, PP_MEM_CATEGORY_MISC); record = NULL; } } @@ -180,7 +182,7 @@ if(!(record = fwAvlLookup(app_id, bucket->appsTree))) { - record = calloc(1, sizeof(struct AppIdStatRecord)); + record = _dpd.snortAlloc(1, sizeof(*record), PP_APP_ID, PP_MEM_CATEGORY_MISC); if(record) { if (fwAvlInsert(app_id, record, bucket->appsTree) == 0) @@ -194,7 +196,7 @@ } else { - free(record); + _dpd.snortFree(record, sizeof(*record), PP_APP_ID, PP_MEM_CATEGORY_MISC); record = NULL; } } @@ -216,7 +218,7 @@ if(!(record = fwAvlLookup(app_id, bucket->appsTree))) { - record = calloc(1, sizeof(struct AppIdStatRecord)); + record = _dpd.snortAlloc(1, sizeof(*record), PP_APP_ID, PP_MEM_CATEGORY_MISC); if(record) { if (fwAvlInsert(app_id, record, bucket->appsTree) == 0) @@ -230,7 +232,7 @@ } else { - free(record); + _dpd.snortFree(record, sizeof(*record), PP_APP_ID, PP_MEM_CATEGORY_MISC); record = NULL; } } @@ -351,7 +353,8 @@ } else if(startTime < lBucket->startTime) { - bucket = (struct StatsBucket*) calloc(1, sizeof(struct StatsBucket)); + bucket = (struct StatsBucket*)_dpd.snortAlloc(1, sizeof(*bucket), + PP_APP_ID, PP_MEM_CATEGORY_MISC); if(bucket != NULL) { bucket->startTime = startTime; @@ -369,7 +372,8 @@ if(lNode == NULL) { - bucket = (struct StatsBucket*) calloc(1, sizeof(struct StatsBucket)); + bucket = (struct StatsBucket*)_dpd.snortAlloc(1, sizeof(*bucket), + PP_APP_ID, PP_MEM_CATEGORY_MISC); if(bucket != NULL) { bucket->startTime = startTime; @@ -523,7 +527,7 @@ free(buffer); } fwAvlDeleteTree(bucket->appsTree, deleteRecord); - free(bucket); + _dpd.snortFree(bucket, sizeof(*bucket), PP_APP_ID, PP_MEM_CATEGORY_MISC); } } @@ -544,7 +548,7 @@ while((bucket = (struct StatsBucket*) sflist_remove_head(currBuckets)) != NULL) { fwAvlDeleteTree(bucket->appsTree, deleteRecord); - free(bucket); + _dpd.snortFree(bucket, sizeof(*bucket), PP_APP_ID, PP_MEM_CATEGORY_MISC); } free(currBuckets); if(logBuckets) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdStats.h snort-2.9.20/src/dynamic-preprocessors/appid/appIdStats.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appIdStats.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appIdStats.h 2022-05-18 04:49:43.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appId_ss.c snort-2.9.20/src/dynamic-preprocessors/appid/appId_ss.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appId_ss.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appId_ss.c 2022-05-18 04:49:37.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -36,6 +36,7 @@ #include "appId_ss.h" #include "appIdConfig.h" +#include "common_util.h" #include "hostPortAppCache.h" #include "profiler.h" #include @@ -98,7 +99,8 @@ free(appId_ss_config->runtime_output_file); #endif - free(appId_ss_config); + _dpd.snortFree(appId_ss_config, sizeof(*appId_ss_config), + PP_APP_ID, PP_MEM_CATEGORY_CONFIG); } static int ConsumeAppIdSSMsg(uint32_t type, const uint8_t *msg, uint32_t msglen) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appId_ss.h snort-2.9.20/src/dynamic-preprocessors/appid/appId_ss.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appId_ss.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appId_ss.h 2022-05-18 04:49:38.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appInfoTable.c snort-2.9.20/src/dynamic-preprocessors/appid/appInfoTable.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appInfoTable.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appInfoTable.c 2022-05-18 04:49:44.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ #include #include "appId.h" #include "appInfoTable.h" +#include "common_util.h" #include "Unified2_common.h" #define APP_MAPPING_FILE "appMapping.data" @@ -49,7 +50,9 @@ #define MAX_HOST_PORT_APP_CACHE_LOOKUP_INTERVAL 1000000 #define MIN_HOST_PORT_APP_CACHE_LOOKUP_RANGE 1 #define MAX_HOST_PORT_APP_CACHE_LOOKUP_RANGE 1000000 - +#define MIN_MAX_BYTES_BEFORE_SERVICE_FAIL 4096 +#define MIN_MAX_PACKET_BEFORE_SERVICE_FAIL 5 +#define MIN_MAX_PACKET_BEFORE_SERVICE_FAIL_IGNORE_BYTES 15 struct DynamicArray { void **table; @@ -65,7 +68,7 @@ { struct DynamicArray *array; - if ((array = calloc(1, sizeof(*array)))) + if ((array = _dpd.snortAlloc(1, sizeof(*array), PP_APP_ID, PP_MEM_CATEGORY_CONFIG))) { array->stepSize = 1; array->indexStart = indexStart; @@ -84,11 +87,11 @@ { entry = array->table[i]; free(entry->appName); - free(entry); + _dpd.snortFree(entry, sizeof(*entry), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); } free(array->table); - free(array); + _dpd.snortFree(array, sizeof(*array), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); } static inline void dynamicArraySetIndex(struct DynamicArray *array, unsigned index, void* data) @@ -281,7 +284,7 @@ return NULL; } - if ((entry = calloc(1, sizeof(*entry)))) + if ((entry = _dpd.snortAlloc(1, sizeof(*entry), PP_APP_ID, PP_MEM_CATEGORY_CONFIG))) { entry->appId = appId; entry->serviceId = entry->appId; @@ -291,7 +294,7 @@ if (!entry->appName) { _dpd.errMsg("failed to allocate appName"); - free(entry); + _dpd.snortFree(entry, sizeof(*entry), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); return NULL; } @@ -316,7 +319,7 @@ tAppId appId; uint32_t clientId, serviceId, payloadId; char filepath[PATH_MAX]; - char *appName; + char *appName=NULL; char *snortName=NULL; pConfig->AppInfoTableDyn = dynamicArrayCreate(SF_APPID_DYNAMIC_MIN); @@ -400,8 +403,7 @@ } } - - entry = calloc(1, sizeof(*entry)); + entry = _dpd.snortAlloc(1, sizeof(*entry), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); if (!entry) { _dpd.errMsg("AppInfoTable: Memory allocation failure\n"); @@ -415,9 +417,11 @@ if (snortName) { +#ifdef TARGET_BASED entry->snortId = _dpd.addProtocolReference(snortName); free(snortName); snortName = NULL; +#endif } entry->appName = appName; @@ -460,7 +464,10 @@ appidSC->send_state_sharing_updates = 1; appidSC->allow_port_wildcard_host_cache = 0; appidSC->recheck_for_portservice_appid = 0; - + appidSC->max_packet_before_service_fail = MIN_MAX_PACKET_BEFORE_SERVICE_FAIL; + appidSC->max_bytes_before_service_fail = MIN_MAX_BYTES_BEFORE_SERVICE_FAIL; + appidSC->max_packet_service_fail_ignore_bytes = MIN_MAX_PACKET_BEFORE_SERVICE_FAIL_IGNORE_BYTES; + appidSC->http_tunnel_detect = HTTP_TUNNEL_DETECT_RESTART; snprintf(filepath, sizeof(filepath), "%s/odp/%s", appidSC->app_id_detector_path, APP_CONFIG_FILE); appIdConfLoad (appidSC, filepath); snprintf(filepath, sizeof(filepath), "%s/../%s", appidSC->app_id_detector_path, USR_CONFIG_FILE); @@ -474,8 +481,9 @@ while ((entry = pConfig->AppInfoList)) { pConfig->AppInfoList = entry->next; - free(entry->appName); - free(entry); + if (entry->appName) + free(entry->appName); + _dpd.snortFree(entry, sizeof(*entry), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); } dynamicArrayDestroy(pConfig->AppInfoTableDyn); @@ -804,6 +812,45 @@ continue; } } + else if (!(strcasecmp(conf_key, "max_bytes_before_service_fail"))) + { + uint64_t max_bytes_before_service_fail = atoi(conf_val); + if (max_bytes_before_service_fail < MIN_MAX_BYTES_BEFORE_SERVICE_FAIL) + { + DEBUG_WRAP(DebugMessage(DEBUG_APPID, "AppId: invalid max_bytes_before_service_fail %"PRIu64" must be greater than %u\n.", max_bytes_before_service_fail, MIN_MAX_BYTES_BEFORE_SERVICE_FAIL );); + } + else + appidSC->max_bytes_before_service_fail = max_bytes_before_service_fail; + } + else if (!(strcasecmp(conf_key, "max_packet_before_service_fail"))) + { + uint16_t max_packet_before_service_fail = atoi(conf_val); + if (max_packet_before_service_fail < MIN_MAX_PACKET_BEFORE_SERVICE_FAIL) + { + DEBUG_WRAP(DebugMessage(DEBUG_APPID, "AppId: invalid max_packet_before_service_fail %"PRIu16", must be greater than %u \n.", max_packet_before_service_fail, MIN_MAX_PACKET_BEFORE_SERVICE_FAIL);); + } + else + appidSC->max_packet_before_service_fail = max_packet_before_service_fail; + } + else if (!(strcasecmp(conf_key, "max_packet_service_fail_ignore_bytes"))) + { + uint16_t max_packet_service_fail_ignore_bytes = atoi(conf_val); + if (max_packet_service_fail_ignore_bytes < MIN_MAX_PACKET_BEFORE_SERVICE_FAIL_IGNORE_BYTES) + { + DEBUG_WRAP(DebugMessage(DEBUG_APPID, "AppId: invalid max_packet_service_fail_ignore_bytes %"PRIu16", must be greater than %u\n.", max_packet_service_fail_ignore_bytes, MIN_MAX_PACKET_BEFORE_SERVICE_FAIL_IGNORE_BYTES);); + } + else + appidSC->max_packet_service_fail_ignore_bytes= max_packet_service_fail_ignore_bytes; + } + else if (!(strcasecmp(conf_key, "http_tunnel_detect"))) + { + if (!(strcasecmp(conf_val, "restart_and_reset"))) + { + DEBUG_WRAP(DebugMessage(DEBUG_APPID, "AppId: HTTP tunnel detect set to restart and reset.\n");); + appidSC->http_tunnel_detect = HTTP_TUNNEL_DETECT_RESTART_AND_RESET; + continue; + } + } /* App Priority bit set*/ else if (!(strcasecmp(conf_key, "app_priority"))) { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/appInfoTable.h snort-2.9.20/src/dynamic-preprocessors/appid/appInfoTable.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/appInfoTable.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/appInfoTable.h 2022-05-18 04:49:46.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -28,6 +28,8 @@ #include "service_api.h" #define APP_PRIORITY_DEFAULT 2 +#define HTTP_TUNNEL_DETECT_RESTART 0 +#define HTTP_TUNNEL_DETECT_RESTART_AND_RESET 1 typedef enum { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/app_forecast.c snort-2.9.20/src/dynamic-preprocessors/appid/app_forecast.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/app_forecast.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/app_forecast.c 2022-05-18 04:49:33.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/app_forecast.h snort-2.9.20/src/dynamic-preprocessors/appid/app_forecast.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/app_forecast.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/app_forecast.h 2022-05-18 04:49:34.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/attribute.h snort-2.9.20/src/dynamic-preprocessors/appid/attribute.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/attribute.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/attribute.h 2022-05-18 04:49:47.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/clientAppConfig.h snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/clientAppConfig.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/clientAppConfig.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/clientAppConfig.h 2022-05-18 04:50:07.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.c 2022-05-18 04:49:48.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.h snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_aim.h 2022-05-18 04:49:49.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_api.h snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_api.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_api.h 2022-05-18 04:49:50.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_base.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_base.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_base.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_base.c 2022-05-18 04:49:51.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_base.h snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_base.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_base.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_base.h 2022-05-18 04:49:52.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_bit.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_bit.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_bit.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_bit.c 2022-05-18 04:49:53.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_bit_tracker.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_bit_tracker.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_bit_tracker.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_bit_tracker.c 2022-05-18 04:49:54.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.c 2022-05-18 04:49:55.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.h snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_msn.h 2022-05-18 04:49:56.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_rtp.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_rtp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_rtp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_rtp.c 2022-05-18 04:49:57.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_ssh.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ssh.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_ssh.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ssh.c 2022-05-18 04:50:00.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_timbuktu.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_timbuktu.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_timbuktu.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_timbuktu.c 2022-05-18 04:50:01.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_tns.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_tns.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_tns.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_tns.c 2022-05-18 04:50:02.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_vnc.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_vnc.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_vnc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_vnc.c 2022-05-18 04:50:03.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.c snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.c 2022-05-18 04:50:04.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.h snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/client_plugins/client_app_ym.h 2022-05-18 04:50:05.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/commonAppMatcher.c snort-2.9.20/src/dynamic-preprocessors/appid/commonAppMatcher.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/commonAppMatcher.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/commonAppMatcher.c 2022-05-18 04:50:08.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -1039,7 +1039,8 @@ int AppIdCommonInit(tAppidStaticConfig *appidSC) { - if (!(pAppidActiveConfig = (tAppIdConfig *)calloc(1, sizeof(*pAppidActiveConfig)))) + if (!(pAppidActiveConfig = (tAppIdConfig *)_dpd.snortAlloc(1, + sizeof(*pAppidActiveConfig), PP_APP_ID, PP_MEM_CATEGORY_CONFIG))) { _dpd.errMsg("Config: Failed to allocate memory for AppIdConfig"); return -1; @@ -1124,7 +1125,8 @@ service_dns_host_clean(&pAppidActiveConfig->serviceDnsConfig); CipClean(); rnaFwConfigState = RNA_FW_CONFIG_STATE_UNINIT; - free(pAppidActiveConfig); + _dpd.snortFree(pAppidActiveConfig, sizeof(*pAppidActiveConfig), + PP_APP_ID, PP_MEM_CATEGORY_CONFIG); pAppidActiveConfig = NULL; pAppidPassiveConfig = NULL; return 0; @@ -1134,7 +1136,8 @@ int AppIdCommonReload(tAppidStaticConfig* appidSC, void **new_context) { - tAppIdConfig *pNewConfig = (tAppIdConfig *) calloc(1, sizeof(*pNewConfig)); + tAppIdConfig *pNewConfig = (tAppIdConfig *)_dpd.snortAlloc(1, + sizeof(*pNewConfig), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); if (!pNewConfig) { _dpd.fatalMsg("AppID failed to allocate memory for reload AppIdConfig"); @@ -1233,7 +1236,7 @@ service_ssl_clean(&pOldConfig->serviceSslConfig); service_dns_host_clean(&pOldConfig->serviceDnsConfig); - free(pOldConfig); + _dpd.snortFree(pOldConfig, sizeof(*pOldConfig), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); pAppidPassiveConfig = NULL; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/commonAppMatcher.h snort-2.9.20/src/dynamic-preprocessors/appid/commonAppMatcher.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/commonAppMatcher.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/commonAppMatcher.h 2022-05-18 04:50:09.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_api.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_api.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_api.h 2022-05-18 04:50:10.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_base.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_base.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_base.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_base.c 2022-05-18 04:50:11.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_base.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_base.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_base.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_base.h 2022-05-18 04:50:12.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.c 2022-05-18 04:50:13.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_cip.h 2022-05-18 04:50:14.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c 2022-05-18 04:50:16.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -230,7 +230,7 @@ *len_valid = 0; lbl_ptr = (DNSLabelPtr *)lbl; *offset += offsetof(DNSLabelPtr, data); - if (*offset >= size) return SERVICE_NOMATCH; + if (*offset > size) return SERVICE_NOMATCH; tmp = (uint16_t)(ntohs(lbl_ptr->position) & 0x3FFF); if (tmp > size - offsetof(DNSLabel, name)) return SERVICE_NOMATCH; @@ -239,7 +239,8 @@ *offset += offsetof(DNSLabel, name); if (!lbl->len) { - (*len)--; // take off the extra '.' at the end + if (*len > 0) + (*len)--; // take off the extra '.' at the end return SERVICE_SUCCESS; } *offset += lbl->len; @@ -277,6 +278,7 @@ uint16_t host_offset; DNSQueryFixed *query; uint16_t record_type; + bool root_query = false; host = data + *offset; host_offset = *offset; @@ -288,7 +290,9 @@ if (host_reporting) { record_type = ntohs(query->QType); - if ((host_len == 0) || (!host_len_valid)) + if (!host_len && host_len_valid) + root_query = true; + else if ((host_len == 0) || (!host_len_valid)) { host = NULL; host_len = 0; @@ -304,11 +308,11 @@ case PATTERN_MX_REC: case PATTERN_SOA_REC: case PATTERN_NS_REC: - case PATTERN_ANY_REC: - dns_service_mod.api->add_dns_query_info(flowp, id, host, host_len, host_offset, record_type, *offset); + case PATTERN_ANY_REC: + dns_service_mod.api->add_dns_query_info(flowp, id, host, host_len, host_offset, record_type, *offset, root_query); break; case PATTERN_PTR_REC: - dns_service_mod.api->add_dns_query_info(flowp, id, NULL, 0, 0, record_type, *offset); + dns_service_mod.api->add_dns_query_info(flowp, id, NULL, 0, 0, record_type, *offset, false); break; default: break; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_dns.h 2022-05-18 04:50:17.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_http.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_http.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_http.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_http.c 2022-05-18 04:50:18.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -27,6 +27,7 @@ #include #include "str_search.h" #include "appInfoTable.h" +#include "common_util.h" #include "detector_api.h" #include "httpCommon.h" #include "http_url_patterns.h" @@ -1562,7 +1563,8 @@ break; if (!hsession->fflow) { - if (!(hsession->fflow = (fflow_info*)calloc(1,sizeof(fflow_info)))) + if (!(hsession->fflow = (fflow_info*)_dpd.snortAlloc(1, + sizeof(fflow_info), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) { appidStaticConfig->chp_fflow_disabled = 1; break; @@ -1576,7 +1578,8 @@ break; if (!hsession->fflow) { - if (!(hsession->fflow = (fflow_info*)calloc(1,sizeof(fflow_info)))) + if (!(hsession->fflow = (fflow_info*)_dpd.snortAlloc(1, + sizeof(fflow_info), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) { appidStaticConfig->chp_fflow_disabled = 1; break; @@ -1590,7 +1593,8 @@ break; if (!hsession->fflow) { - if (!(hsession->fflow = (fflow_info*)calloc(1,sizeof(fflow_info)))) + if (!(hsession->fflow = (fflow_info*)_dpd.snortAlloc(1, + sizeof(fflow_info), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) { appidStaticConfig->chp_fflow_disabled = 1; break; @@ -1604,7 +1608,8 @@ break; if (!hsession->fflow) { - if (!(hsession->fflow = (fflow_info*)calloc(1,sizeof(fflow_info)))) + if (!(hsession->fflow = (fflow_info*)_dpd.snortAlloc(1, + sizeof(fflow_info), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) { appidStaticConfig->chp_fflow_disabled = 1; break; @@ -1618,7 +1623,8 @@ break; if (!hsession->fflow) { - if (!(hsession->fflow = (fflow_info*)calloc(1,sizeof(fflow_info)))) + if (!(hsession->fflow = (fflow_info*)_dpd.snortAlloc(1, + sizeof(fflow_info), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) { appidStaticConfig->chp_fflow_disabled = 1; break; @@ -1632,7 +1638,8 @@ break; if (!hsession->fflow) { - if (!(hsession->fflow = (fflow_info*)calloc(1,sizeof(fflow_info)))) + if (!(hsession->fflow = (fflow_info*)_dpd.snortAlloc(1, + sizeof(fflow_info), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) { appidStaticConfig->chp_fflow_disabled = 1; break; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_http.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_http.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_http.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_http.h 2022-05-18 04:50:19.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c 2022-05-18 04:50:20.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -518,7 +518,7 @@ if ((id->pos < (sizeof(id->tagValue)-1)) && (isImapTagChar(*data))) { - id->tagValue[id->pos] = *data; + id->tagValue[id->pos++] = *data; } else { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_kerberos.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_kerberos.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_kerberos.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_kerberos.c 2022-05-18 04:50:21.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.c 2022-05-18 04:50:22.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pattern.h 2022-05-18 04:50:23.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c 2022-05-18 04:50:24.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -468,14 +468,18 @@ } else { - service_mod.api->add_user(flowp, dd->client.username, APP_ID_POP3, 1); - free(dd->client.username); - dd->client.username = NULL; - dd->need_continue = 0; - clearAppIdFlag(flowp, APPID_SESSION_CLIENT_GETS_SERVER_PACKETS); - dd->client.got_user = 1; - if (dd->client.detected) - setAppIdFlag(flowp, APPID_SESSION_CLIENT_DETECTED); + if (dd->client.state == POP3_CLIENT_STATE_TRANS) + { + service_mod.api->add_user(flowp, dd->client.username, APP_ID_POP3, 1); + free(dd->client.username); + dd->client.username = NULL; + dd->need_continue = 0; + clearAppIdFlag(flowp, APPID_SESSION_CLIENT_GETS_SERVER_PACKETS); + if (dd->client.detected) + setAppIdFlag(flowp, APPID_SESSION_CLIENT_DETECTED); + } + else + dd->client.got_user = 1; } } if (server && begin) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.c 2022-05-18 04:50:25.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_sip.h 2022-05-18 04:50:26.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_smtp.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_smtp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/detector_smtp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/detector_smtp.c 2022-05-18 04:50:32.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -1062,6 +1062,7 @@ case 220: case 500: case 501: + case 502: case 504: break; case 421: @@ -1101,7 +1102,7 @@ case 501: case 502: case 550: - goto success; + goto not_compatible; } case SMTP_SERVICE_STATE_CONNECTION_ERROR: default: @@ -1125,4 +1126,9 @@ smtp_service_mod.api->fail_service(flowp, args->pkt, args->dir, &svc_element, smtp_service_mod.flow_data_index, args->pConfig, NULL); return SERVICE_NOMATCH; + +not_compatible: + smtp_service_mod.api->incompatible_data(flowp, args->pkt, args->dir, &svc_element, + smtp_service_mod.flow_data_index, args->pConfig, NULL); + return SERVICE_NOT_COMPATIBLE; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.c snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.c 2022-05-18 04:50:34.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.h snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/detector_plugins/http_url_patterns.h 2022-05-18 04:50:35.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/dns_defs.h snort-2.9.20/src/dynamic-preprocessors/appid/dns_defs.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/dns_defs.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/dns_defs.h 2022-05-18 04:50:36.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/flow.c snort-2.9.20/src/dynamic-preprocessors/appid/flow.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/flow.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/flow.c 2022-05-18 04:50:37.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -21,6 +21,7 @@ #include #include +#include "common_util.h" #include "flow.h" #include "service_api.h" #include "fw_appid.h" @@ -38,6 +39,7 @@ tmp_fd->fd_free(tmp_fd->fd_data); tmp_fd->next = fd_free_list; fd_free_list = tmp_fd; + app_id_flow_data_free_list_count++; } } void AppIdFlowdataFini() @@ -47,7 +49,8 @@ while ((tmp_fd = fd_free_list)) { fd_free_list = fd_free_list->next; - free(tmp_fd); + app_id_flow_data_free_list_count--; + _dpd.snortFree(tmp_fd, sizeof(*tmp_fd), PP_APP_ID, PP_MEM_CATEGORY_SESSION); } } @@ -70,6 +73,7 @@ *pfd = fd->next; fd->next = fd_free_list; fd_free_list = fd; + app_id_flow_data_free_list_count++; return fd->fd_data; } return NULL; @@ -88,6 +92,7 @@ fd->fd_free(fd->fd_data); fd->next = fd_free_list; fd_free_list = fd; + app_id_flow_data_free_list_count++; } } @@ -107,6 +112,7 @@ fd->fd_free(fd->fd_data); fd->next = fd_free_list; fd_free_list = fd; + app_id_flow_data_free_list_count++; } else { @@ -123,8 +129,9 @@ { tmp_fd = fd_free_list; fd_free_list = tmp_fd->next; + app_id_flow_data_free_list_count--; } - else if (!(tmp_fd = malloc(sizeof(*tmp_fd)))) + else if (!(tmp_fd = _dpd.snortAlloc(1, sizeof(*tmp_fd), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) return -1; tmp_fd->fd_id = id; tmp_fd->fd_data = data; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/flow.h snort-2.9.20/src/dynamic-preprocessors/appid/flow.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/flow.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/flow.h 2022-05-18 04:50:38.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -110,6 +110,8 @@ #define SCAN_HTTP_XWORKINGWITH_FLAG (1<<7) #define SCAN_HTTP_CONTENT_TYPE_FLAG (1<<8) #define SCAN_HTTP_URI_FLAG (1<<9) +#define SCAN_CERTVIZ_ENABLED_FLAG (1<<10) +#define SCAN_SPOOFED_SNI_FLAG (1<<11) typedef struct _fflow_info { @@ -136,55 +138,55 @@ typedef struct _httpSession { char *host; - uint16_t host_buflen; char *url; char *uri; + uint16_t host_buflen; uint16_t uri_buflen; + uint16_t useragent_buflen; + uint16_t response_code_buflen; char *via; char *useragent; - uint16_t useragent_buflen; char *response_code; - uint16_t response_code_buflen; char *referer; uint16_t referer_buflen; - char *cookie; uint16_t cookie_buflen; - char *content_type; uint16_t content_type_buflen; - char *location; uint16_t location_buflen; + char *cookie; + char *content_type; + char *location; char *body; uint16_t body_buflen; - char *req_body; uint16_t req_body_buflen; + int total_found; + char *req_body; char *server; char *x_working_with; char *new_field[HTTP_FIELD_MAX+1]; - uint16_t new_field_len[HTTP_FIELD_MAX+1]; + uint16_t new_field_len[HTTP_FIELD_MAX+1]; uint16_t fieldOffset[HTTP_FIELD_MAX+1]; uint16_t fieldEndOffset[HTTP_FIELD_MAX+1]; + bool new_field_contents; + bool skip_simple_detect; // Flag to indicate if simple detection of client ID, payload ID, etc + // should be skipped fflow_info *fflow; - bool new_field_contents; int chp_finished; tAppId chp_candidate; tAppId chp_alt_candidate; int chp_hold_flow; int ptype_req_counts[NUMBER_OF_PTYPES]; - int total_found; unsigned app_type_flags; + int get_offsets_from_rebuilt; int num_matches; int num_scans; - int get_offsets_from_rebuilt; - bool skip_simple_detect; // Flag to indicate if simple detection of client ID, payload ID, etc - // should be skipped + int numXffFields; sfaddr_t* xffAddr; char** xffPrecedence; - int numXffFields; - tunnelDest *tunDest; + bool is_tunnel; #if RESPONSE_CODE_PACKET_THRESHHOLD unsigned response_code_packets; @@ -204,21 +206,34 @@ uint16_t id; // DNS msg ID uint16_t host_offset; // for host uint16_t record_type; // query: QTYPE + uint16_t options_offset; // offset at which DNS options such as EDNS begin in DNS query uint32_t ttl; // response: TTL char *host; // host (usually query, but could be response for reverse lookup) - uint16_t options_offset; // offset at which DNS options such as EDNS begin in DNS query } dnsSession; struct _RNAServiceSubtype; +typedef enum +{ + MATCHED_TLS_NONE = 0, + MATCHED_TLS_HOST, + MATCHED_TLS_FIRST_SAN, + MATCHED_TLS_CNAME, + MATCHED_TLS_ORG_UNIT +} MATCHED_TLS_TYPE; + typedef struct _tlsSession { char *tls_host; int tls_host_strlen; - char *tls_cname; int tls_cname_strlen; + char *tls_cname; char *tls_orgUnit; int tls_orgUnit_strlen; + int tls_first_san_strlen; + char *tls_first_san; + MATCHED_TLS_TYPE matched_tls_type; + bool tls_handshake_done; } tlsSession; typedef struct AppIdData @@ -232,6 +247,8 @@ uint16_t service_port; uint8_t proto; uint8_t previous_tcp_flags; + bool tried_reverse_service; + uint8_t tpReinspectByInitiator; AppIdFlowData *flowData; @@ -241,10 +258,10 @@ /**RNAServiceElement for identifying detector*/ const struct RNAServiceElement *serviceData; RNA_INSPECTION_STATE rnaServiceState; + FLOW_SERVICE_ID_STATE search_state; char *serviceVendor; char *serviceVersion; struct _RNAServiceSubtype *subtype; - FLOW_SERVICE_ID_STATE search_state; char *netbios_name; SF_LIST * candidate_service_list; int got_incompatible_services; @@ -252,13 +269,12 @@ /**AppId matching client side */ tAppId clientAppId; tAppId clientServiceAppId; + RNA_INSPECTION_STATE rnaClientState; char *clientVersion; /**RNAClientAppModule for identifying client detector*/ const struct RNAClientAppModule *clientData; - RNA_INSPECTION_STATE rnaClientState; SF_LIST * candidate_client_list; unsigned int num_candidate_clients_tried; - bool tried_reverse_service; /**AppId matching payload*/ tAppId payloadAppId; @@ -272,9 +288,9 @@ char *username; tAppId usernameService; + uint32_t flowId; char *netbiosDomain; - uint32_t flowId; httpSession *hsession; tlsSession *tsession; @@ -292,14 +308,25 @@ void *tpsession; uint16_t init_tpPackets; uint16_t resp_tpPackets; - uint8_t tpReinspectByInitiator; - char *payloadVersion; uint16_t session_packet_count; + uint16_t initiatorPcketCountWithoutReply; + char *payloadVersion; + uint64_t initiatorBytesWithoutServerReply; int16_t snortId; /* Length-based detectors. */ tLengthKey length_sequence; + bool is_http2; + //appIds picked from encrypted session. + struct { + tAppId serviceAppId; + tAppId clientAppId; + tAppId payloadAppId; + tAppId miscAppId; + tAppId referredAppId; + } encrypted; + // New fields introduced for DNS Blacklisting struct { @@ -313,28 +340,21 @@ struct AppIdData *expectedFlow; //struct FwEarlyData *fwData; - //appIds picked from encrypted session. - struct { - tAppId serviceAppId; - tAppId clientAppId; - tAppId payloadAppId; - tAppId miscAppId; - tAppId referredAppId; - } encrypted; - // New fields introduced for DNS Blacklisting dnsSession *dsession; void * firewallEarlyData; tAppId pastIndicator; tAppId pastForecast; - bool is_http2; SEARCH_SUPPORT_TYPE search_support_type; uint16_t hostCacheVersion; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t serviceAsId; //This is specific to VRF #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierId; +#endif } tAppIdData; /** * Mark a flow with a particular flag diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/flow_error.h snort-2.9.20/src/dynamic-preprocessors/appid/flow_error.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/flow_error.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/flow_error.h 2022-05-18 04:50:39.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/fw_appid.c snort-2.9.20/src/dynamic-preprocessors/appid/fw_appid.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/fw_appid.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/fw_appid.c 2022-05-18 04:50:40.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -68,8 +68,13 @@ #define MAX_ATTR_LEN 1024 #define HTTP_PREFIX "http://" +#define HTTPS_PREFIX "https://" #define MULTI_BUF_SIZE 1024 +#define MAX_HOSTNAME 255 + +#define HTTP_PREFIX_LEN 7 +#define HTTPS_PREFIX_LEN 8 #define APP_MAPPING_FILE "appMapping.data" @@ -93,9 +98,17 @@ #define HTTP_PATTERN_MAX_LEN 1024 #define PORT_MAX 65535 +unsigned long app_id_ongoing_session = 0; +unsigned long app_id_total_alloc = 0; unsigned long app_id_raw_packet_count = 0; unsigned long app_id_processed_packet_count = 0; unsigned long app_id_ignored_packet_count = 0; +unsigned long app_id_flow_data_free_list_count = 0; +unsigned long app_id_data_free_list_count = 0; +unsigned long app_id_tmp_free_list_count = 0; +unsigned long app_id_session_heap_alloc_count = 0; +unsigned long app_id_session_freelist_alloc_count = 0; + static tAppIdData *app_id_free_list; static tTmpAppIdData *tmp_app_id_free_list; static uint32_t snortInstance; @@ -111,12 +124,14 @@ { sharedData->next = app_id_free_list; app_id_free_list = sharedData; + app_id_data_free_list_count++; } static inline void appTmpSharedDataFree(tTmpAppIdData * sharedData) { sharedData->next = tmp_app_id_free_list; tmp_app_id_free_list = sharedData; + app_id_tmp_free_list_count++; } static inline void appHttpFieldClear (httpSession *hsession) @@ -194,7 +209,8 @@ for (i = 0; i < hsession->numXffFields; i++) free(hsession->xffPrecedence[i]); - free(hsession->xffPrecedence); + _dpd.snortFree(hsession->xffPrecedence, hsession->numXffFields*sizeof(char*), + PP_APP_ID, PP_MEM_CATEGORY_SESSION); hsession->xffPrecedence = NULL; } } @@ -220,7 +236,8 @@ } if (hsession->fflow) { - free(hsession->fflow); + _dpd.snortFree(hsession->fflow, sizeof(*hsession->fflow), + PP_APP_ID, PP_MEM_CATEGORY_SESSION); hsession->fflow = NULL; } if (hsession->via) @@ -244,7 +261,7 @@ hsession->tunDest = NULL; } - free(hsession); + _dpd.snortFree(hsession, sizeof(*hsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION); } static inline void appDNSSessionDataFree(dnsSession *dsession) @@ -255,7 +272,7 @@ free(dsession->host); dsession->host = NULL; } - free(dsession); + _dpd.snortFree(dsession, sizeof(*dsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION); } static inline void appTlsSessionDataFree (tlsSession *tsession) @@ -268,7 +285,9 @@ free(tsession->tls_cname); if (tsession->tls_orgUnit) free(tsession->tls_orgUnit); - free(tsession); + if (tsession->tls_first_san) + free(tsession->tls_first_san); + _dpd.snortFree(tsession, sizeof(*tsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION); } #ifdef REG_TEST @@ -313,6 +332,7 @@ #endif fprintf(SF_DEBUG_FILE, "Deleting session %p\n", sharedData); #endif + app_id_ongoing_session--; #ifdef REG_TEST if (appidStaticConfig->appid_reg_test_mode) appIdRegTestDumpEndOfSession(sharedData); @@ -378,18 +398,21 @@ static uint32_t gFlowId; tAppIdData *data; + app_id_ongoing_session++; if (app_id_free_list) { data = app_id_free_list; app_id_free_list = data->next; memset(data, 0, sizeof(*data)); + app_id_data_free_list_count--; + app_id_session_freelist_alloc_count++; } - else if (!(data = calloc(1, sizeof(*data)))) + else if (!(data = _dpd.snortAlloc(1, sizeof(*data), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate tAppIdData data"); + else + app_id_session_heap_alloc_count++; - if (thirdparty_appid_module) - if (!(data->tpsession = thirdparty_appid_module->session_create())) - DynamicPreprocessorFatalMessage("Could not allocate tAppIdData->tpsession data"); + app_id_total_alloc++; data->flowId = ++gFlowId; data->common.fsf_type.flow_type = APPID_SESSION_TYPE_NORMAL; @@ -470,9 +493,12 @@ session->rnaServiceState = RNA_STATE_NONE; session->serviceData = NULL; AppIdFlowdataDeleteAllByMask(session, APPID_SESSION_DATA_SERVICE_MODSTATE_BIT); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) session->serviceAsId = 0xFF; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + session->carrierId = 0; +#endif } //client @@ -511,13 +537,15 @@ while ((app_id = app_id_free_list)) { app_id_free_list = app_id->next; - free(app_id); + app_id_data_free_list_count--; + _dpd.snortFree(app_id, sizeof(*app_id), PP_APP_ID, PP_MEM_CATEGORY_SESSION); } while ((tmp_app_id = tmp_app_id_free_list)) { tmp_app_id_free_list = tmp_app_id->next; - free(tmp_app_id); + app_id_tmp_free_list_count--; + _dpd.snortFree(tmp_app_id, sizeof(*tmp_app_id), PP_APP_ID, PP_MEM_CATEGORY_SESSION); } AppIdFlowdataFini(); #endif @@ -639,7 +667,7 @@ uint16_t dport; char sipstr[INET6_ADDRSTRLEN]; char dipstr[INET6_ADDRSTRLEN]; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId; uint16_t dAsId; #endif @@ -653,7 +681,7 @@ dip = (const struct in6_addr*)key->ip_h; sport = key->port_l; dport = key->port_h; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) sAsId = key->addressSpaceId_l; dAsId = key->addressSpaceId_h; #endif @@ -664,7 +692,7 @@ dip = (const struct in6_addr*)key->ip_l; sport = key->port_h; dport = key->port_l; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) sAsId = key->addressSpaceId_h; dAsId = key->addressSpaceId_l; #endif @@ -676,7 +704,7 @@ dip = (const struct in6_addr*)key->ip_h; sport = key->port_l; dport = key->port_h; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) sAsId = key->addressSpaceId_l; dAsId = key->addressSpaceId_h; #endif @@ -687,7 +715,7 @@ dip = (const struct in6_addr*)key->ip_l; sport = key->port_h; dport = key->port_l; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) sAsId = key->addressSpaceId_h; dAsId = key->addressSpaceId_l; #endif @@ -699,7 +727,7 @@ dip = (const struct in6_addr*)key->ip_h; sport = key->port_l; dport = key->port_h; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) sAsId = key->addressSpaceId_l; dAsId = key->addressSpaceId_h; #endif @@ -728,8 +756,29 @@ offset = 12; } inet_ntop(af, &dip->s6_addr[offset], dipstr, sizeof(dipstr)); +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = key->carrierId; +#ifdef HAVE_DAQ_ADDRESS_SPACE_ID +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + snprintf(debug_session, FW_DEBUG_SESSION_ID_SIZE, "%s-%u -> %s-%u %u%s AS %u-%u I %u CID %u", + sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)key->protocol, + (direction == APP_ID_FROM_INITIATOR) ? "":" R", + sAsId, dAsId, (unsigned)snortInstance, (unsigned)cid); +#else + snprintf(debug_session, FW_DEBUG_SESSION_ID_SIZE, "%s-%u -> %s-%u %u%s AS %u I %u CID %u", + sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)key->protocol, + (direction == APP_ID_FROM_INITIATOR) ? "":" R", + (unsigned)key->addressSpaceId, (unsigned)snortInstance, (unsigned)cid); +#endif +#else + snprintf(debug_session, FW_DEBUG_SESSION_ID_SIZE, "%s-%u -> %s-%u %u%s I %u CID %u", + sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)key->protocol, + (direction == APP_ID_FROM_INITIATOR) ? "":" R", (unsigned)snortInstance, + (unsigned)cid ); +#endif +#else /* No carrierid support */ #ifdef HAVE_DAQ_ADDRESS_SPACE_ID -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) snprintf(debug_session, FW_DEBUG_SESSION_ID_SIZE, "%s-%u -> %s-%u %u%s AS %u-%u I %u", sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)key->protocol, (direction == APP_ID_FROM_INITIATOR) ? "":" R", @@ -745,6 +794,7 @@ sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)key->protocol, (direction == APP_ID_FROM_INITIATOR) ? "":" R", (unsigned)snortInstance); #endif +#endif return true; } } @@ -1200,6 +1250,12 @@ } } } +static inline bool svcTakingTooMuchTime(tAppIdData* session) +{ + return ((session->initiatorPcketCountWithoutReply > appidStaticConfig-> max_packet_service_fail_ignore_bytes) || + (session->initiatorPcketCountWithoutReply > appidStaticConfig->max_packet_before_service_fail && + session->initiatorBytesWithoutServerReply > appidStaticConfig->max_bytes_before_service_fail)); +} static inline void setServiceAppIdData(SFSnortPacket *p, APPID_SESSION_DIRECTION direction, tAppIdData *session, tAppId serviceAppId, char *vendor, char **version) { @@ -1758,7 +1814,8 @@ { finalizeFflow(http_session->fflow, http_session->app_type_flags, (http_session->fflow->appId ? http_session->fflow->appId : chp_final), p); - free(http_session->fflow); + _dpd.snortFree(http_session->fflow, sizeof(*http_session->fflow), + PP_APP_ID, PP_MEM_CATEGORY_SESSION); http_session->fflow = NULL; } if (*version) @@ -1829,6 +1886,34 @@ } } +static int getHttpHostFromUri(char** host, const char* uri) +{ + char buff[MAX_HOSTNAME + 1]; + int len = 0; + int offset = 0; + + if (!uri) + return 0; + + memset(buff, 0, sizeof(buff)); + if (!strncmp(uri, HTTP_PREFIX, HTTP_PREFIX_LEN)) + { + offset = HTTP_PREFIX_LEN; + } + else if (!strncmp(uri, HTTPS_PREFIX, HTTPS_PREFIX_LEN)) + { + offset = HTTPS_PREFIX_LEN; + } + + while(len < MAX_HOSTNAME && uri[offset] != '/' && uri[offset] != '\0') + buff[len++] = uri[offset++]; + + if (len) + *host = strdup(buff); + + return len; +} + STATIC INLINE int processHTTPPacket(SFSnortPacket *p, tAppIdData *session, APPID_SESSION_DIRECTION direction, HttpParsedHeaders *const headers, const tAppIdConfig *pConfig) { #define RESPONSE_CODE_LENGTH 3 @@ -2121,7 +2206,7 @@ ip = GET_DST_IP(p); session->service_ip = *ip; session->service_port = p->dst_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) session->serviceAsId = p->pkt_header->address_space_id_dst; #endif } @@ -2130,11 +2215,16 @@ ip = GET_SRC_IP(p); session->service_ip = *ip; session->service_port = p->src_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) session->serviceAsId = p->pkt_header->address_space_id_src; #endif } session->rnaServiceState = RNA_STATE_FINISHED; + +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + session->carrierId = GET_SFOUTER_IPH_PROTOID(p, pkt_header); +#endif + if ((TPIsAppIdAvailable(session->tpsession) || getAppIdFlag(session, APPID_SESSION_NO_TPI)) && session->payloadAppId == APP_ID_NONE) session->payloadAppId = APP_ID_UNKNOWN; @@ -2209,7 +2299,8 @@ static inline void checkRestartTunnelDetection(tAppIdData *session) { - if (session->tpPayloadAppId == APP_ID_HTTP_TUNNEL && !getAppIdFlag(session, APPID_SESSION_HTTP_TUNNEL)) + if ((session->hsession && session->hsession->is_tunnel) || + (session->tpPayloadAppId == APP_ID_HTTP_TUNNEL && !getAppIdFlag(session, APPID_SESSION_HTTP_TUNNEL))) { if (app_id_debug_session_flag) _dpd.logMsg("AppIdDbg %s Found HTTP Tunnel, restarting app Detection\n", app_id_debug_session); @@ -2232,9 +2323,13 @@ session->service_port = 0; session->rnaServiceState = RNA_STATE_NONE; session->serviceData = NULL; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) session->serviceAsId = 0xFF; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + session->carrierId = 0; +#endif + AppIdFlowdataDeleteAllByMask(session, APPID_SESSION_DATA_SERVICE_MODSTATE_BIT); // Client @@ -2254,6 +2349,15 @@ session->scan_flags &= ~SCAN_HTTP_HOST_URL_FLAG; clearAppIdFlag(session, APPID_SESSION_SERVICE_DETECTED | APPID_SESSION_CLIENT_DETECTED | APPID_SESSION_HTTP_SESSION | APPID_SESSION_HTTP_CONNECT); + if (session->hsession && session->hsession->is_tunnel) + { + session->hsession->is_tunnel = false; + if (appidStaticConfig->http_tunnel_detect == HTTP_TUNNEL_DETECT_RESTART_AND_RESET && thirdparty_appid_module) + { + thirdparty_appid_module->session_delete(session->tpsession, 0); + session->tpsession = NULL; + } + } setAppIdFlag(session, APPID_SESSION_HTTP_TUNNEL); } @@ -2314,55 +2418,89 @@ } } -static inline void ExamineSslMetadata(SFSnortPacket *p, APPID_SESSION_DIRECTION direction, tAppIdData *session, tAppIdConfig *pConfig) +/* + * Desc: This function does AppId detection corresponding to the SSL params + * The order of processing is: + * Valid SNI: SNI->first_SAN->CN->OU + * No SNI/Mismatched SNI: first_SAN->CN->OU + */ +static int scanSslParamsLookupAppId(tAppIdData *session, const char *serverName, + bool isSniMismatch, const char *subjectAltName, const char *commonName, + const char *orgName, tAppId *clientAppId, tAppId *payloadAppId) { - size_t size; - int ret; - tAppId clientAppId = 0; - tAppId payloadAppId = 0; + int ret = 0; - if ((session->scan_flags & SCAN_SSL_HOST_FLAG) && session->tsession->tls_host) + if ((session->scan_flags & SCAN_SSL_HOST_FLAG) && serverName && !isSniMismatch) { - size = strlen(session->tsession->tls_host); - if ((ret = ssl_scan_hostname((const u_int8_t *)session->tsession->tls_host, size, &clientAppId, &payloadAppId, &pConfig->serviceSslConfig))) - { - if (session->clientAppId == APP_ID_NONE || - session->clientAppId == APP_ID_SSL_CLIENT) - setClientAppIdData(p, direction, session, clientAppId, NULL); - setPayloadAppIdData(p, direction, session, payloadAppId, NULL); - setSSLSquelch(p, ret, (ret == 1 ? payloadAppId : clientAppId)); - } + ret = ssl_scan_hostname((const uint8_t *)serverName, strlen(serverName), + clientAppId, payloadAppId, &pAppidActiveConfig->serviceSslConfig); + session->tsession->matched_tls_type = MATCHED_TLS_HOST; session->scan_flags &= ~SCAN_SSL_HOST_FLAG; - // ret = 0; } - if ((session->scan_flags & SCAN_SSL_CERTIFICATE_FLAG) && session->tsession->tls_cname) + + if (subjectAltName && (APP_ID_NONE == *clientAppId) && (APP_ID_NONE == *payloadAppId)) { - size = strlen(session->tsession->tls_cname); - if ((ret = ssl_scan_cname((const u_int8_t *)session->tsession->tls_cname, size, &clientAppId, &payloadAppId, &pConfig->serviceSslConfig))) - { - if (session->clientAppId == APP_ID_NONE || - session->clientAppId == APP_ID_SSL_CLIENT) - setClientAppIdData(p, direction, session, clientAppId, NULL); - setPayloadAppIdData(p, direction, session, payloadAppId, NULL); - setSSLSquelch(p, ret, (ret == 1 ? payloadAppId : clientAppId)); - } + ret = ssl_scan_hostname((const uint8_t *)subjectAltName, strlen(subjectAltName), + clientAppId, payloadAppId, &pAppidActiveConfig->serviceSslConfig); + session->tsession->matched_tls_type = MATCHED_TLS_FIRST_SAN; + } + + if ((session->scan_flags & SCAN_SSL_CERTIFICATE_FLAG) && commonName && + (APP_ID_NONE == *clientAppId) && (APP_ID_NONE == *payloadAppId)) + { + ret = ssl_scan_cname((const uint8_t *)commonName, strlen(commonName), + clientAppId, payloadAppId, &pAppidActiveConfig->serviceSslConfig); + session->tsession->matched_tls_type = MATCHED_TLS_CNAME; session->scan_flags &= ~SCAN_SSL_CERTIFICATE_FLAG; - // ret = 0; } + + if (orgName && (APP_ID_NONE == *clientAppId) && (APP_ID_NONE == *payloadAppId)) + { + ret = ssl_scan_cname((const uint8_t *)orgName, strlen(orgName), + clientAppId, payloadAppId, &pAppidActiveConfig->serviceSslConfig); + session->tsession->matched_tls_type = MATCHED_TLS_ORG_UNIT; + } + + if ((APP_ID_NONE == *clientAppId) && (APP_ID_NONE == *payloadAppId)) + session->tsession->matched_tls_type = MATCHED_TLS_NONE; + + return ret; +} + +static inline void ExamineSslMetadata(SFSnortPacket *p, APPID_SESSION_DIRECTION direction, tAppIdData *session, tAppIdConfig *pConfig) +{ + int ret = 0; + tAppId clientAppId = 0; + tAppId payloadAppId = 0; + + /* TLS params already scanned, skip scanning again */ + if ((session->scan_flags & SCAN_CERTVIZ_ENABLED_FLAG)) + return; + + ret = scanSslParamsLookupAppId(session, (const char*)session->tsession->tls_host, + false, NULL, (const char*)session->tsession->tls_cname, + (const char*)session->tsession->tls_orgUnit, &clientAppId, &payloadAppId); + + if (session->clientAppId == APP_ID_NONE || + session->clientAppId == APP_ID_SSL_CLIENT) + setClientAppIdData(p, direction, session, clientAppId, NULL); + setPayloadAppIdData(p, direction, session, payloadAppId, NULL); + setSSLSquelch(p, ret, (ret == 1 ? payloadAppId : clientAppId)); + if (session->tsession->tls_orgUnit) { - size = strlen(session->tsession->tls_orgUnit); - if ((ret = ssl_scan_cname((const u_int8_t *)session->tsession->tls_orgUnit, size, &clientAppId, &payloadAppId, &pConfig->serviceSslConfig))) - { - if (session->clientAppId == APP_ID_NONE) - setClientAppIdData(p, direction, session, clientAppId, NULL); - setPayloadAppIdData(p, direction, session, payloadAppId, NULL); - setSSLSquelch(p, ret, (ret == 1 ? payloadAppId : clientAppId)); - } free(session->tsession->tls_orgUnit); session->tsession->tls_orgUnit = NULL; - // ret = 0; } + + if (session->tsession->tls_handshake_done && + session->payloadAppId == APP_ID_NONE) + { + if (app_id_debug_session_flag) + _dpd.logMsg("AppIdDbg %s End of SSL/TLS handshake detected with no payloadAppId, so setting to unknown\n", app_id_debug_session); + session->payloadAppId = APP_ID_UNKNOWN; + } + } static inline int RunClientDetectors(tAppIdData *session, @@ -2474,7 +2612,9 @@ if (app_id_debug_session_flag) if (tempSnortId == snortId_for_http2) _dpd.logMsg("AppIdDbg %s Telling Snort that it's HTTP/2\n", app_id_debug_session); +#ifdef TARGET_BASED _dpd.sessionAPI->set_application_protocol_id(p->stream_session, tempSnortId); +#endif p->application_protocol_ordinal = tempSnortId; } } @@ -2830,7 +2970,8 @@ if (host) { - tunnelDest *tDest = malloc(sizeof(*tDest)); + tunnelDest *tDest = _dpd.snortAlloc(1, sizeof(*tDest), PP_APP_ID, + PP_MEM_CATEGORY_SESSION); if (!tDest) { _dpd.errMsg("AppId: Unable to allocate memory for HTTP tunnel information\n"); @@ -2843,7 +2984,7 @@ if (inet_pton(AF_INET, host, &(tDest->ip).ip.s6_addr32[3]) <= 0) { free(host); - free(tDest); + _dpd.snortFree(tDest, sizeof(*tDest), PP_APP_ID, PP_MEM_CATEGORY_SESSION); return 1; } (tDest->ip).ip.s6_addr32[0] = (tDest->ip).ip.s6_addr32[1] = 0; @@ -2856,7 +2997,7 @@ if (inet_pton(AF_INET6, host, &(tDest->ip).ip) <= 0) { free(host); - free(tDest); + _dpd.snortFree(tDest, sizeof(*tDest), PP_APP_ID, PP_MEM_CATEGORY_SESSION); return 1; } family = AF_INET6; @@ -2958,9 +3099,11 @@ void fwAppIdInit(void) { /* init globals for snortId compares etc. */ +#ifdef TARGET_BASED snortId_for_unsynchronized = _dpd.addProtocolReference("unsynchronized"); snortId_for_ftp_data = _dpd.findProtocolReference("ftp-data"); snortId_for_http2 = _dpd.findProtocolReference("http2"); +#endif snortInstance = _dpd.getSnortInstance(); } @@ -3046,7 +3189,16 @@ getAppIdFlag(session, APPID_SESSION_SSL_SESSION) && !(session->scan_flags & SCAN_SSL_HOST_FLAG)) { - setSSLSquelch(p, 1, tpAppId); + if (!(session->scan_flags & SCAN_SPOOFED_SNI_FLAG)) + { + setSSLSquelch(p, 1, tpAppId); + } + else + { + if (app_id_debug_session_flag) + _dpd.logMsg("AppIdDbg %s Ignored 3rd party returned %d, SNI is spoofed\n", + app_id_debug_session, tpAppId); + } } if (entryFlags & APPINFO_FLAG_IGNORE) @@ -3077,14 +3229,14 @@ { thirdparty_appid_module->disable_flags(session->tpsession, TP_SESSION_FLAG_ATTRIBUTE | TP_SESSION_FLAG_TUNNELING | TP_SESSION_FLAG_FUTUREFLOW); } - +#ifdef TARGET_BASED if(tpAppId == APP_ID_SSL && (_dpd.sessionAPI->get_application_protocol_id(p->stream_session) == snortId_for_ftp_data)) { // If we see SSL on an FTP data channel set tpAppId back // to APP_ID_NONE so the FTP preprocessor picks up the flow. tpAppId = APP_ID_NONE; } - +#endif if (tpAppId > APP_ID_NONE && (!getAppIdFlag(session, APPID_SESSION_APP_REINSPECT) || session->payloadAppId > APP_ID_NONE)) { #ifdef TARGET_BASED @@ -3120,12 +3272,15 @@ setAppIdFlag(session, APPID_SESSION_CLIENT_DETECTED | APPID_SESSION_SERVICE_DETECTED); session->rnaServiceState = RNA_STATE_FINISHED; clearAppIdFlag(session, APPID_SESSION_CONTINUE); +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + session->carrierId = GET_SFOUTER_IPH_PROTOID(p, pkt_header); +#endif if (direction == APP_ID_FROM_INITIATOR) { ip = GET_DST_IP(p); session->service_ip = *ip; session->service_port = p->dst_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) session->serviceAsId = p->pkt_header->address_space_id_dst; #endif } @@ -3134,7 +3289,7 @@ ip = GET_SRC_IP(p); session->service_ip = *ip; session->service_port = p->src_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) session->serviceAsId = p->pkt_header->address_space_id_src; #endif } @@ -3163,7 +3318,16 @@ } else { - setTPPayloadAppIdData(p, direction, session, tpAppId); + if (!(session->scan_flags & SCAN_SPOOFED_SNI_FLAG)) + { + setTPPayloadAppIdData(p, direction, session, tpAppId); + } + else + { + if (app_id_debug_session_flag) + _dpd.logMsg("AppIdDbg %s Ignoring 3rd party returned %d, SNI is spoofed\n", + app_id_debug_session, tpAppId); + } tpAppId = portAppId; if (app_id_debug_session_flag) _dpd.logMsg("AppIdDbg %s SSL is %d\n", app_id_debug_session, tpAppId); @@ -3222,6 +3386,12 @@ } } + else if (session->hsession && (direction == APP_ID_FROM_RESPONDER) && + getAppIdFlag(session, APPID_SESSION_HTTP_CONNECT)) + { + if ((p->payload_size >= 13) && !strncasecmp((char *)p->payload, "HTTP/1.1 200 ", 13)) + session->hsession->is_tunnel = true; + } if (session->tpReinspectByInitiator && checkThirdPartyReinspect(p, session)) { if (*isTpAppidDiscoveryDone) @@ -3316,7 +3486,23 @@ dipstr[0] = 0; ip = GET_DST_IP(p); inet_ntop(sfaddr_family(ip), (void *)sfaddr_get_ptr(ip), dipstr, sizeof(dipstr)); -#ifdef DAQ_CAPA_VRF + +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_SFOUTER_IPH_PROTOID(p, pkt_header); + +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + uint16_t sAsId = p->pkt_header->address_space_id_src; + uint16_t dAsId = p->pkt_header->address_space_id_dst; + + fprintf(SF_DEBUG_FILE, "%s-%u -> %s-%u AS %u-%u CID %u %u\n", sipstr, + (unsigned)p->src_port, dipstr, (unsigned)p->dst_port, + sAsId, dAsId, (unsigned)cid, (unsigned)protocol); +#else + fprintf(SF_DEBUG_FILE, "%s-%u -> %s-%u CID %u %u\n", sipstr, (unsigned)p->src_port, dipstr, (unsigned)p->dst_port, (unsigned)cid, + (unsigned)protocol); +#endif /* No Carrierid support*/ +#else +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId = p->pkt_header->address_space_id_src; uint16_t dAsId = p->pkt_header->address_space_id_dst; fprintf(SF_DEBUG_FILE, "%s-%u -> %s-%u AS %u-%u %u\n", sipstr, @@ -3325,6 +3511,8 @@ #else fprintf(SF_DEBUG_FILE, "%s-%u -> %s-%u %u\n", sipstr, (unsigned)p->src_port, dipstr, (unsigned)p->dst_port, (unsigned)protocol); #endif +#endif + /*DumpHex(SF_DEBUG_FILE, p->payload, p->payload_size); */ } #endif @@ -3382,8 +3570,9 @@ { tmp_session = tmp_app_id_free_list; tmp_app_id_free_list = tmp_session->next; + app_id_tmp_free_list_count--; } - else if (!(tmp_session = malloc(sizeof(*tmp_session)))) + else if (!(tmp_session = _dpd.snortAlloc(1, sizeof(*tmp_session), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate tTmpAppIdData data"); tmp_session->common.fsf_type.flow_type = APPID_SESSION_TYPE_TMP; tmp_session->common.flags = flow_flags; @@ -3430,10 +3619,23 @@ session->session_packet_count++; if (direction == APP_ID_FROM_INITIATOR) + { session->stats.initiatorBytes += p->pkt_header->pktlen; + if ( p->payload_size) + { + session->initiatorPcketCountWithoutReply ++; + session->initiatorBytesWithoutServerReply += p->payload_size; + } + } else + { session->stats.responderBytes += p->pkt_header->pktlen; - + if(p->payload_size) + { + session->initiatorPcketCountWithoutReply = 0; + session->initiatorBytesWithoutServerReply = 0; + } + } session->common.flags = flow_flags; session->common.policyId = appIdPolicyId; @@ -3497,47 +3699,74 @@ if ((p->tcp_header->flags & TCPHEADER_RST) && session->previous_tcp_flags == TCPHEADER_SYN) { AppIdServiceIDState *id_state; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t asId; #endif - +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = 0; +#endif setAppIdFlag(session, APPID_SESSION_SYN_RST); if (sfaddr_is_set(&session->service_ip)) { ip = &session->service_ip; port = session->service_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = session->serviceAsId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + cid = session->carrierId; +#endif } else { ip = GET_SRC_IP(p); port = p->src_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = p->pkt_header->address_space_id_src; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + cid = GET_SFOUTER_IPH_PROTOID(p, pkt_header); +#endif } -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, IPPROTO_TCP, port, - AppIdServiceDetectionLevel(session), - asId); + AppIdServiceDetectionLevel(session), asId, cid); #else - id_state = AppIdGetServiceIDState(ip, IPPROTO_TCP, port, AppIdServiceDetectionLevel(session)); + id_state = AppIdGetServiceIDState(ip, IPPROTO_TCP, port, AppIdServiceDetectionLevel(session), cid); #endif +#else /* No Carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, IPPROTO_TCP, port, + AppIdServiceDetectionLevel(session), asId); +#else + id_state = AppIdGetServiceIDState(ip, IPPROTO_TCP, port, AppIdServiceDetectionLevel(session)); +#endif +#endif if (id_state) { if (!id_state->reset_time) id_state->reset_time = GetPacketRealTime; else if ((GetPacketRealTime - id_state->reset_time) >= 60) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) AppIdRemoveServiceIDState(ip, IPPROTO_TCP, port, AppIdServiceDetectionLevel(session), + asId, cid); +#else + AppIdRemoveServiceIDState(ip, IPPROTO_TCP, port, AppIdServiceDetectionLevel(session), cid); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + AppIdRemoveServiceIDState(ip, IPPROTO_TCP, port, + AppIdServiceDetectionLevel(session), asId); #else + AppIdRemoveServiceIDState(ip, IPPROTO_TCP, port, AppIdServiceDetectionLevel(session)); #endif +#endif setAppIdFlag(session, APPID_SESSION_SERVICE_DELETED); } } @@ -3693,6 +3922,7 @@ { //tp has positively identified appId, Dig deeper only if sourcefire detector //identifies additional information or flow is UDP reveresed. +#ifdef TARGET_BASED if ((entry = appInfoEntryGet(tpAppId, pConfig)) && entry->svrValidator && ((entry->flags & APPINFO_FLAG_SERVICE_ADDITIONAL) || @@ -3722,6 +3952,7 @@ { stopRnaServiceInspection(p, session, direction); } +#endif } else session->rnaServiceState = RNA_STATE_STATEFUL; @@ -3737,6 +3968,7 @@ TPIsAppIdAvailable(session->tpsession) && tpAppId > APP_ID_NONE && tpAppId < SF_APPID_MAX) { +#ifdef TARGET_BASED entry = appInfoEntryGet(tpAppId, pConfig); if (entry && entry->svrValidator && !(entry->flags & APPINFO_FLAG_SERVICE_ADDITIONAL)) @@ -3745,6 +3977,7 @@ _dpd.logMsg("AppIdDbg %s Stopping service detection\n", app_id_debug_session); stopRnaServiceInspection(p, session, direction); } +#endif } // Check to see if we want to stop any detectors for SIP/RTP. @@ -3795,8 +4028,12 @@ session->payloadAppId == APP_ID_NONE) session->payloadAppId = APP_ID_UNKNOWN; } - - if(session->serviceAppId == APP_ID_DNS && appidStaticConfig->dns_host_reporting && session->dsession && session->dsession->host ) + if (session->rnaServiceState == RNA_STATE_STATEFUL && session->serviceAppId == APP_ID_NONE && svcTakingTooMuchTime(session)) + { + stopRnaServiceInspection(p, session, direction); + session->serviceAppId = APP_ID_UNKNOWN; + } + else if(session->serviceAppId == APP_ID_DNS && appidStaticConfig->dns_host_reporting && session->dsession && session->dsession->host ) { size = session->dsession->host_len; dns_host_scan_hostname((const u_int8_t *)session->dsession->host , size, &clientAppId, &payloadAppId, &pConfig->serviceDnsConfig); @@ -3838,6 +4075,7 @@ session->rnaClientState = RNA_STATE_FINISHED; else if (TPIsAppIdAvailable(session->tpsession) && (tpAppId = session->tpAppId) > APP_ID_NONE && tpAppId < SF_APPID_MAX) { +#ifdef TARGET_BASED if ((entry = appInfoEntryGet(tpAppId, pConfig)) && entry->clntValidator && ((entry->flags & APPINFO_FLAG_CLIENT_ADDITIONAL) || ((entry->flags & APPINFO_FLAG_CLIENT_USER) && @@ -3853,6 +4091,7 @@ setAppIdFlag(session, APPID_SESSION_CLIENT_DETECTED); session->rnaClientState = RNA_STATE_FINISHED; } +#endif } else if (getAppIdFlag(session, APPID_SESSION_HTTP_SESSION)) session->rnaClientState = RNA_STATE_FINISHED; @@ -3868,6 +4107,7 @@ TPIsAppIdAvailable(session->tpsession) && tpAppId > APP_ID_NONE && tpAppId < SF_APPID_MAX) { +#ifdef TARGET_BASED entry = appInfoEntryGet(tpAppId, pConfig); if (!(entry && entry->clntValidator && entry->clntValidator == session->clientData && (entry->flags & (APPINFO_FLAG_CLIENT_ADDITIONAL|APPINFO_FLAG_CLIENT_USER)))) @@ -3875,6 +4115,7 @@ session->rnaClientState = RNA_STATE_FINISHED; setAppIdFlag(session, APPID_SESSION_CLIENT_DETECTED); } +#endif } if (session->rnaClientState == RNA_STATE_DIRECT) @@ -4017,7 +4258,7 @@ { if (session->hsession->tunDest) { - free(session->hsession->tunDest); + _dpd.snortFree(session->hsession->tunDest, sizeof(tunnelDest), PP_APP_ID, PP_MEM_CATEGORY_SESSION); session->hsession->tunDest = NULL; } getIpPortFromHttpTunnel(session->hsession->uri, session->hsession->uri_buflen, &session->hsession->tunDest); @@ -4159,7 +4400,8 @@ appIdSession->hsession->numXffFields = sizeof(defaultXffPrecedence) / sizeof(defaultXffPrecedence[0]); } - appIdSession->hsession->xffPrecedence = malloc(appIdSession->hsession->numXffFields * sizeof(char*)); + appIdSession->hsession->xffPrecedence = _dpd.snortAlloc(appIdSession->hsession->numXffFields, + sizeof(char*), PP_APP_ID, PP_MEM_CATEGORY_SESSION); if(!appIdSession->hsession->xffPrecedence) { DynamicPreprocessorFatalMessage("pickHttpXffAddress: " @@ -4220,7 +4462,9 @@ tAppId payloadAppId = 0; tAppId referredPayloadAppId = 0; tAppIdConfig *pConfig = appIdActiveConfigGet(); +#ifdef TARGET_BASED AppInfoTableEntry *entry = NULL; +#endif if (!appIdSession->payloadAppId && ThirdPartyAppIDFoundProto(APP_ID_EXCHANGE, proto_list)) appIdSession->payloadAppId = APP_ID_EXCHANGE; @@ -4239,8 +4483,10 @@ { if (!appIdSession->serviceData) { +#ifdef TARGET_BASED entry = appInfoEntryGet(APP_ID_SSL, pConfig); appIdSession->serviceData = entry->svrValidator; +#endif } if (getAppIdFlag(appIdSession, APPID_SESSION_HTTP_SESSION | APPID_SESSION_SPDY_SESSION)) clearAppIdFlag(appIdSession, APPID_SESSION_HTTP_SESSION | APPID_SESSION_SPDY_SESSION); @@ -4252,7 +4498,7 @@ { if (!appIdSession->hsession) { - if (!(appIdSession->hsession = calloc(1, sizeof(*appIdSession->hsession)))) + if (!(appIdSession->hsession = _dpd.snortAlloc(1, sizeof(*appIdSession->hsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate httpSession data"); memset(ptype_scan_counts, 0, 7 * sizeof(ptype_scan_counts[0])); } @@ -4405,7 +4651,16 @@ appIdSession->hsession->fieldOffset[REQ_URI_FID] = attribute_data->httpRequestUriOffset; appIdSession->hsession->fieldEndOffset[REQ_URI_FID] = attribute_data->httpRequestUriEndOffset; appIdSession->scan_flags |= SCAN_HTTP_URI_FLAG; + + /* Extract host from URI if it is not available */ + if (appIdSession->hsession->host == NULL) + { + appIdSession->hsession->host_buflen = getHttpHostFromUri(&appIdSession->hsession->host, + appIdSession->hsession->uri); + appIdSession->scan_flags |= SCAN_HTTP_HOST_URL_FLAG; + } attribute_data->httpRequestUri = NULL; + if (app_id_debug_session_flag) _dpd.logMsg("AppIdDbg %s HTTP URI (%u-%u) is %s\n", app_id_debug_session, appIdSession->hsession->fieldOffset[REQ_URI_FID], appIdSession->hsession->fieldEndOffset[REQ_URI_FID], appIdSession->hsession->uri); } @@ -4623,7 +4878,7 @@ { if (!appIdSession->hsession) { - if (!(appIdSession->hsession = calloc(1, sizeof(*appIdSession->hsession)))) + if (!(appIdSession->hsession = _dpd.snortAlloc(1, sizeof(*appIdSession->hsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate httpSession data"); } if (!appIdSession->hsession->url) @@ -4711,7 +4966,7 @@ if (!appIdSession->tsession) { - if (!(appIdSession->tsession = calloc(1, sizeof(*appIdSession->tsession)))) + if (!(appIdSession->tsession = _dpd.snortAlloc(1, sizeof(*appIdSession->tsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate tlsSession data"); } @@ -4722,30 +4977,57 @@ if (attribute_data->tlsHost) { - if (appIdSession->tsession->tls_host) - free(appIdSession->tsession->tls_host); - appIdSession->tsession->tls_host = attribute_data->tlsHost; - attribute_data->tlsHost = NULL; - if (reInspectSSLAppId) - appIdSession->scan_flags |= SCAN_SSL_HOST_FLAG; + /* This flag is to avoid NAVL overwritting SSL provided SNI */ + if (!(appIdSession->scan_flags & SCAN_CERTVIZ_ENABLED_FLAG)) + { + if (appIdSession->tsession->tls_host) + free(appIdSession->tsession->tls_host); + appIdSession->tsession->tls_host = attribute_data->tlsHost; + attribute_data->tlsHost = NULL; + if (reInspectSSLAppId) + appIdSession->scan_flags |= SCAN_SSL_HOST_FLAG; + } + else + { + free(attribute_data->tlsHost); + attribute_data->tlsHost = NULL; + } } if (attribute_data->tlsCname) { - if (appIdSession->tsession->tls_cname) - free(appIdSession->tsession->tls_cname); - appIdSession->tsession->tls_cname = attribute_data->tlsCname; - attribute_data->tlsCname = NULL; - if (reInspectSSLAppId) - appIdSession->scan_flags |= SCAN_SSL_CERTIFICATE_FLAG; + /* This flag is to avoid NAVL overwritting SSL provided CN */ + if (!(appIdSession->scan_flags & SCAN_CERTVIZ_ENABLED_FLAG)) + { + if (appIdSession->tsession->tls_cname) + free(appIdSession->tsession->tls_cname); + appIdSession->tsession->tls_cname = attribute_data->tlsCname; + attribute_data->tlsCname = NULL; + if (reInspectSSLAppId) + appIdSession->scan_flags |= SCAN_SSL_CERTIFICATE_FLAG; + } + else + { + free(attribute_data->tlsCname); + attribute_data->tlsCname = NULL; + } } if (reInspectSSLAppId) { if (attribute_data->tlsOrgUnit) { - if (appIdSession->tsession->tls_orgUnit) - free(appIdSession->tsession->tls_orgUnit); - appIdSession->tsession->tls_orgUnit = attribute_data->tlsOrgUnit; - attribute_data->tlsOrgUnit = NULL; + /* This flag is to avoid NAVL overwritting SSL provided ORG */ + if (!(appIdSession->scan_flags & SCAN_CERTVIZ_ENABLED_FLAG)) + { + if (appIdSession->tsession->tls_orgUnit) + free(appIdSession->tsession->tls_orgUnit); + appIdSession->tsession->tls_orgUnit = attribute_data->tlsOrgUnit; + attribute_data->tlsOrgUnit = NULL; + } + else + { + free(attribute_data->tlsOrgUnit); + attribute_data->tlsOrgUnit = NULL; + } } } } @@ -4765,6 +5047,7 @@ void appSetServiceDetectorCallback(RNAServiceCallbackFCN fcn, tAppId appId, struct _Detector *userdata, tAppIdConfig *pConfig) { +#ifdef TARGET_BASED AppInfoTableEntry* entry; if ((entry = appInfoEntryGet(appId, pConfig))) @@ -4781,11 +5064,13 @@ entry->flags |= APPINFO_FLAG_SERVICE_DETECTOR_CALLBACK; } } +#endif return; } void appSetClientDetectorCallback(RNAClientAppCallbackFCN fcn, tAppId appId, struct _Detector *userdata, tAppIdConfig *pConfig) { +#ifdef TARGET_BASED AppInfoTableEntry* entry; if ((entry = appInfoEntryGet(appId, pConfig))) @@ -4802,6 +5087,7 @@ entry->flags |= APPINFO_FLAG_CLIENT_DETECTOR_CALLBACK; } } +#endif return; } @@ -4828,6 +5114,7 @@ void appSetLuaServiceValidator(RNAServiceValidationFCN fcn, tAppId appId, unsigned extractsInfo, struct _Detector *data) { +#ifdef TARGET_BASED AppInfoTableEntry *entry; tAppIdConfig *pConfig = appIdNewConfigGet(); @@ -4853,6 +5140,7 @@ { _dpd.errMsg("Invalid direct service AppId, %d, for %p %p\n",appId, fcn, data); } +#endif } void appSetClientValidator(RNAClientAppFCN fcn, tAppId appId, unsigned extractsInfo, tAppIdConfig *pConfig) @@ -4922,11 +5210,11 @@ void AppIdAddDnsQueryInfo(tAppIdData *flow, uint16_t id, const uint8_t *host, uint8_t host_len, uint16_t host_offset, - uint16_t record_type, uint16_t options_offset) + uint16_t record_type, uint16_t options_offset, bool root_query) { if (!flow->dsession) { - if (!(flow->dsession = calloc(1, sizeof(*flow->dsession)))) + if (!(flow->dsession = _dpd.snortAlloc(1, sizeof(*flow->dsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate dnsSession data"); } else if ((flow->dsession->state != 0) && (flow->dsession->id != id)) @@ -4943,11 +5231,18 @@ if (!flow->dsession->host) { - if ((host != NULL) && (host_len > 0) && (host_offset > 0)) + if (root_query && !host_len) { - flow->dsession->host_len = host_len; - flow->dsession->host_offset = host_offset; - flow->dsession->host = dns_parse_host(host, host_len); + flow->dsession->host_len = 1; + flow->dsession->host_offset = 0; + flow->dsession->host = strdup("."); + flow->dsession->options_offset = options_offset; + } + else if ((host != NULL) && (host_len > 0) && (host_offset > 0)) + { + flow->dsession->host_len = host_len; + flow->dsession->host_offset = host_offset; + flow->dsession->host = dns_parse_host(host, host_len); flow->dsession->options_offset = options_offset; } } @@ -4960,7 +5255,7 @@ { if (!flow->dsession) { - if (!(flow->dsession = calloc(1, sizeof(*flow->dsession)))) + if (!(flow->dsession = _dpd.snortAlloc(1, sizeof(*flow->dsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate dnsSession data"); } else if ((flow->dsession->state != 0) && (flow->dsession->id != id)) @@ -5089,6 +5384,95 @@ return 0; } +/* + * In TLS 1.3, certificates come encrypted, hence SSL module does the + * certificate decryption and provides the SNI/first-SAN/CN/ON to AppId module. + * This API does the following: + * 1. AppIds detection corresponding to the SNI/first-SAN/CN/ON + * 2. Store the AppIds and SNI/first-SAN/CN/ON in AppID session struct. + * 3. To make sure the SSL provided SNI/first-SAN/CN/ON are not further overwritten + * by NAVL, appropriate flags are set. + * Note: + * Valid SNI: SNI->first_SAN->CN->OU + * No SNI/Mismatched SNI: first_SAN->CN->OU + */ +void setTlsHost(void *ssnptr, const char *serverName, const char *commonName, + const char *orgName, const char *subjectAltName, bool isSniMismatch, + tAppId *serviceAppId, tAppId *clientAppId, tAppId *payloadAppId) +{ + tAppIdData *session; + *serviceAppId = *clientAppId = *payloadAppId = APP_ID_NONE; + + if (app_id_debug_session_flag) + _dpd.logMsg("Received serverName=%s, commonName=%s, orgName=%s, subjectAltName=%s, isSniMismatch=%s, from SSL\n", + serverName, commonName, orgName, subjectAltName, isSniMismatch?"true":"false"); + + if (ssnptr && (session = getAppIdData(ssnptr))) + { + if (!session->tsession) + session->tsession = _dpd.snortAlloc(1, sizeof(*session->tsession), + PP_APP_ID, PP_MEM_CATEGORY_SESSION); + + session->scan_flags |= SCAN_SSL_HOST_FLAG; + session->scan_flags |= SCAN_SSL_CERTIFICATE_FLAG; + session->scan_flags |= SCAN_CERTVIZ_ENABLED_FLAG; + if (isSniMismatch) + session->scan_flags |= SCAN_SPOOFED_SNI_FLAG; + + if (serverName && (*serverName != '\0') && !isSniMismatch) + { + if (session->tsession->tls_host) + free(session->tsession->tls_host); + session->tsession->tls_host = strdup(serverName); + session->tsession->tls_host_strlen = strlen(serverName); + } + + if (subjectAltName && (*subjectAltName != '\0')) + { + if (session->tsession->tls_first_san) + free(session->tsession->tls_first_san); + session->tsession->tls_first_san = strdup(subjectAltName); + session->tsession->tls_first_san_strlen = strlen(subjectAltName); + } + + if (commonName && (*commonName != '\0')) + { + if (session->tsession->tls_cname) + free(session->tsession->tls_cname); + session->tsession->tls_cname = strdup(commonName); + session->tsession->tls_cname_strlen = strlen(commonName); + } + + if (orgName && (*orgName != '\0')) + { + if (session->tsession->tls_orgUnit) + free(session->tsession->tls_orgUnit); + session->tsession->tls_orgUnit = strdup(orgName); + session->tsession->tls_orgUnit_strlen = strlen(orgName); + } + + (void)scanSslParamsLookupAppId(session, (const char*)session->tsession->tls_host, + isSniMismatch, (const char*)session->tsession->tls_first_san, + (const char*)session->tsession->tls_cname, + (const char*)session->tsession->tls_orgUnit, clientAppId, payloadAppId); + + *serviceAppId = pickServiceAppId(session); + if (APP_ID_NONE == *clientAppId) + *clientAppId = pickClientAppId(session); + + if (APP_ID_NONE == *payloadAppId) + *payloadAppId = pickPayloadId(session); + + session->serviceAppId = *serviceAppId; + session->clientAppId = *clientAppId; + session->payloadAppId = *payloadAppId; + + if (app_id_debug_session_flag) + _dpd.logMsg("serviceAppId %d, clientAppId %d, payloadAppId %d\n", + session->serviceAppId, session->clientAppId, session->payloadAppId); + } +} + void httpHeaderCallback (SFSnortPacket *p, HttpParsedHeaders *const headers) { tAppIdData *session; @@ -5121,7 +5505,7 @@ if (!session->hsession) { - if (!(session->hsession = calloc(1, sizeof(*session->hsession)))) + if (!(session->hsession = _dpd.snortAlloc(1, sizeof(*session->hsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate httpSession data"); } @@ -5219,7 +5603,7 @@ if (!appIdSession->hsession) { - if (!(appIdSession->hsession = calloc(1, sizeof(*appIdSession->hsession)))) + if (!(appIdSession->hsession = _dpd.snortAlloc(1, sizeof(*appIdSession->hsession), PP_APP_ID, PP_MEM_CATEGORY_SESSION))) DynamicPreprocessorFatalMessage("Could not allocate httpSession data"); } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/fw_appid.h snort-2.9.20/src/dynamic-preprocessors/appid/fw_appid.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/fw_appid.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/fw_appid.h 2022-05-18 04:50:41.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -87,7 +87,7 @@ void AppIdAddDnsQueryInfo(tAppIdData *flow, uint16_t id, const uint8_t *host, uint8_t host_len, uint16_t host_offset, - uint16_t record_type, uint16_t options_offset); + uint16_t record_type, uint16_t options_offset, bool root_query); void AppIdAddDnsResponseInfo(tAppIdData *flow, uint16_t id, const uint8_t *host, uint8_t host_len, uint16_t host_offset, @@ -107,9 +107,12 @@ void appSetClientValidator(RNAClientAppFCN fcn, tAppId appId, unsigned extractsInfo, tAppIdConfig *pConfig); void appSetLuaClientValidator(RNAClientAppFCN fcn, tAppId appId, unsigned extractsInfo, struct _Detector *data); int sslAppGroupIdLookup(void *ssnptr, const char * serverName, const char * commonName, tAppId *serviceAppId, tAppId *clientAppId, tAppId *payloadAppId); -tAppId getAppId(void *ssnptr); +tAppId getAppId(void *ssnptr); void CheckDetectorCallback(const SFSnortPacket *p, tAppIdData *session, APPID_SESSION_DIRECTION direction, tAppId appId, const tAppIdConfig *pConfig); +void setTlsHost(void *ssnptr, const char *serverName, const char *commonName, + const char *orgName, const char *subjectAltName, bool isSniMismatch, + tAppId *serviceAppId, tAppId *clientAppId, tAppId *payloadAppId); #ifdef FW_TRACKER_DEBUG void logAppIdInfo(SFSnortPacket *p, char *message, tAppId id); @@ -132,9 +135,17 @@ #endif extern unsigned dhcp_fp_table_size; +extern unsigned long app_id_ongoing_session; +extern unsigned long app_id_total_alloc; extern unsigned long app_id_raw_packet_count; extern unsigned long app_id_processed_packet_count; extern unsigned long app_id_ignored_packet_count; +extern unsigned long app_id_session_heap_alloc_count; +extern unsigned long app_id_session_freelist_alloc_count; +extern unsigned long app_id_flow_data_free_list_count; +extern unsigned long app_id_data_free_list_count; +extern unsigned long app_id_tmp_free_list_count; + extern int app_id_debug; extern unsigned isIPv4HostMonitored(uint32_t ip4, int32_t zone); extern void checkSandboxDetection(tAppId appId); @@ -290,6 +301,26 @@ return APP_ID_NONE; } +static inline bool isSvcHttpType(tAppId app_id) +{ + switch(app_id) + { + case APP_ID_HTTP: + case APP_ID_HTTPS: + case APP_ID_FTPS: + case APP_ID_IMAPS: + case APP_ID_IRCS: + case APP_ID_LDAPS: + case APP_ID_NNTPS: + case APP_ID_POP3S: + case APP_ID_SMTPS: + case APP_ID_SSHELL: + case APP_ID_SSL: + return true; + } + return false; +} + static inline tAppId pickPayloadId(tAppIdData *flow) { if (!flow || flow->common.fsf_type.flow_type != APPID_SESSION_TYPE_NORMAL) @@ -299,11 +330,14 @@ // we are not worried about the APP_ID_UNKNOWN case here if (appInfoEntryFlagGet(flow->tpPayloadAppId, APPINFO_FLAG_DEFER_PAYLOAD, appIdActiveConfigGet())) return flow->tpPayloadAppId; - else if (flow->payloadAppId > APP_ID_NONE) + if (flow->payloadAppId > APP_ID_NONE) return flow->payloadAppId; - else if (flow->tpPayloadAppId > APP_ID_NONE) + if (flow->tpPayloadAppId > APP_ID_NONE) return flow->tpPayloadAppId; - + /* APP_ID_UNKNOWN is valid only for HTTP type services */ + if (flow->payloadAppId == APP_ID_UNKNOWN && + isSvcHttpType(flow->serviceAppId)) + return APP_ID_UNKNOWN; return APP_ID_NONE; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/hostPortAppCache.c snort-2.9.20/src/dynamic-preprocessors/appid/hostPortAppCache.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/hostPortAppCache.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/hostPortAppCache.c 2022-05-18 04:50:42.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/hostPortAppCache.h snort-2.9.20/src/dynamic-preprocessors/appid/hostPortAppCache.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/hostPortAppCache.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/hostPortAppCache.h 2022-05-18 04:50:43.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/httpCommon.h snort-2.9.20/src/dynamic-preprocessors/appid/httpCommon.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/httpCommon.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/httpCommon.h 2022-05-18 04:50:44.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/lengthAppCache.c snort-2.9.20/src/dynamic-preprocessors/appid/lengthAppCache.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/lengthAppCache.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/lengthAppCache.c 2022-05-18 04:50:45.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/lengthAppCache.h snort-2.9.20/src/dynamic-preprocessors/appid/lengthAppCache.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/lengthAppCache.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/lengthAppCache.h 2022-05-18 04:50:46.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorApi.c snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorApi.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorApi.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorApi.c 2022-05-18 04:50:48.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -67,6 +67,7 @@ } LUA_LOG_LEVELS; /*static const char * LuaLogLabel = "luaDetectorApi"; */ +static ThrottleInfo error_throttleInfo = {0,30,0}; #ifdef PERF_PROFILING PreprocStats luaDetectorsPerfStats; @@ -299,7 +300,9 @@ if ((!callbackFn) || !(lua_checkstack(myLuaState, 1))) { - _dpd.errMsg("Detector %s: invalid LUA %s\n", detectorName, lua_tostring(myLuaState, -1)); + _dpd.errMsgThrottled(&error_throttleInfo, + "Detector %s: invalid LUA %s\n", + detectorName, lua_tostring(myLuaState, -1)); detector->validateParams.pkt = NULL; pthread_mutex_unlock(&detector->luaReloadMutex); PREPROC_PROFILE_END((*pPerfStats2)); @@ -782,7 +785,9 @@ pthread_mutex_lock(&detector->luaReloadMutex); if ((!detector->packageInfo.server.validateFunctionName) || !(lua_checkstack(myLuaState, 1))) { - _dpd.errMsg("server %s: invalid LUA %s\n",serverName, lua_tostring(myLuaState, -1)); + _dpd.errMsgThrottled(&error_throttleInfo, + "server %s: invalid LUA %s\n", + serverName, lua_tostring(myLuaState, -1)); detector->validateParams.pkt = NULL; pthread_mutex_unlock(&detector->luaReloadMutex); PREPROC_PROFILE_END((*pPerfStats2)); @@ -1701,7 +1706,9 @@ pthread_mutex_lock(&detector->luaReloadMutex); if ((!validateFn) || !(lua_checkstack(myLuaState, 1))) { - _dpd.errMsg("client %s: invalid LUA %s\n",clientName, lua_tostring(myLuaState, -1)); + _dpd.errMsgThrottled(&error_throttleInfo, + "client %s: invalid LUA %s\n", + clientName, lua_tostring(myLuaState, -1)); detector->validateParams.pkt = NULL; pthread_mutex_unlock(&detector->luaReloadMutex); PREPROC_PROFILE_END((*pPerfStats2)); @@ -3078,6 +3085,7 @@ else if (!(pathPattern = (u_int8_t *)strdup(tmpString))) { _dpd.errMsg( "Failed to duplicate path pattern: %s, service_id %u; client_id %u; payload_id %u\n.",tmpString, service_id, client_id, payload_id); + free(hostPattern); return 0; } @@ -3095,6 +3103,8 @@ else if (!(schemePattern = (u_int8_t*) strdup(tmpString))) { _dpd.errMsg( "Failed to duplicate scheme pattern: %s, service_id %u; client_id %u; payload_id %u\n.",tmpString, service_id, client_id, payload_id); + free(pathPattern); + free(hostPattern); return 0; } @@ -3225,6 +3235,7 @@ else if (!(pathPattern = (u_int8_t *)strdup(tmpString))) { _dpd.errMsg( "Failed to duplicate path pattern: %s, service_id %u; client_id %u; payload_id %u\n.",tmpString, service_id, client_id, payload_id); + free(hostPattern); return 0; } @@ -3242,6 +3253,8 @@ else if (!(schemePattern = (u_int8_t*) strdup(tmpString))) { _dpd.errMsg( "Failed to duplicate scheme pattern: %s, service_id %u; client_id %u; payload_id %u\n.",tmpString, service_id, client_id, payload_id); + free(pathPattern); + free(hostPattern); return 0; } @@ -3646,6 +3659,7 @@ else if (!(pathPattern = (u_int8_t *)strdup(tmpString))) { _dpd.errMsg( "Failed to duplicate path pattern: %s, service_id %u; client_id %u; payload %u\n.",tmpString, service_id, client_id, payload_id); + free(hostPattern); return 0; } @@ -3663,6 +3677,8 @@ else if (!(schemePattern = (u_int8_t*) strdup(tmpString))) { _dpd.errMsg( "Failed to duplicate scheme pattern: %s, service_id %u; client_id %u; payload_id %u\n.",tmpString, service_id, client_id, payload_id); + free(pathPattern); + free(hostPattern); return 0; } @@ -4155,6 +4171,80 @@ return 0; } +/* Check if traffic is going through an HTTP proxy */ +static int isHttpTunnel(lua_State *L) +{ + DetectorUserData *detectorUserData = NULL; + + detectorUserData = checkDetectorUserData(L, 1); + + /*check inputs and whether this function is called in context of a packet */ + if (!detectorUserData || !detectorUserData->pDetector->validateParams.pkt) + return -1; + + httpSession *hsession = detectorUserData->pDetector->validateParams.flowp->hsession; + if (hsession) + { + tunnelDest *tunDest = hsession->tunDest; + if (tunDest) + { + lua_pushboolean(L, 1); + return 1; + } + } + + lua_pushboolean(L, 0); + return 0; +} + +/* Get destination IP tunneled through a proxy */ +static int getHttpTunneledIp(lua_State* L) +{ + DetectorUserData *detectorUserData = NULL; + + detectorUserData = checkDetectorUserData(L, 1); + + /*check inputs and whether this function is called in context of a packet */ + if (!detectorUserData || !detectorUserData->pDetector->validateParams.pkt) + return -1; + + httpSession *hsession = detectorUserData->pDetector->validateParams.flowp->hsession; + if (hsession) + { + tunnelDest *tunDest = hsession->tunDest; + if (!tunDest) + lua_pushnumber(L, 0); + else + lua_pushnumber(L, sfaddr_get_ip4_value(&(tunDest->ip))); + } + + return 1; +} + +/* Get port tunneled through a proxy */ +static int getHttpTunneledPort(lua_State* L) +{ + DetectorUserData *detectorUserData = NULL; + + detectorUserData = checkDetectorUserData(L, 1); + + /*check inputs and whether this function is called in context of a packet */ + if (!detectorUserData || !detectorUserData->pDetector->validateParams.pkt) + return -1; + + httpSession *hsession = detectorUserData->pDetector->validateParams.flowp->hsession; + if (hsession) + { + tunnelDest *tunDest = hsession->tunDest; + if (!tunDest) + lua_pushnumber(L, 0); + else + lua_pushnumber(L, tunDest->port); + } + + return 1; +} + /*Lua should inject patterns in format. */ static int Detector_addCipConnectionClass(lua_State *L) { @@ -4436,6 +4526,10 @@ {"createFutureFlow", createFutureFlow}, {"isMidStreamSession", isMidStreamSession}, + { "isHttpTunnel", isHttpTunnel }, + { "getHttpTunneledIp", getHttpTunneledIp }, + { "getHttpTunneledPort", getHttpTunneledPort }, + {0, 0} }; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorApi.h snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorApi.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorApi.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorApi.h 2022-05-18 04:50:49.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorFlowApi.c snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorFlowApi.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorFlowApi.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorFlowApi.c 2022-05-18 04:50:50.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -183,7 +183,8 @@ #endif memset(pLuaData, 0, sizeof(*pLuaData)); - if ((pLuaData->pDetectorFlow = (DetectorFlow *)calloc(1, sizeof(DetectorFlow))) == NULL) + if ((pLuaData->pDetectorFlow = (DetectorFlow *)_dpd.snortAlloc(1, + sizeof(*pDetectorFlow), PP_APP_ID, PP_MEM_CATEGORY_SESSION)) == NULL) { lua_pop(L, -1); @@ -330,7 +331,7 @@ #ifdef LUA_DETECTOR_DEBUG _dpd.debugMsg(DEBUG_LOG,"DetectorFlow %p: freeing\n\n",pDetectorFlow); #endif - free(pDetectorFlow); + _dpd.snortFree(pDetectorFlow, sizeof(*pDetectorFlow), PP_APP_ID, PP_MEM_CATEGORY_SESSION); } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorFlowApi.h snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorFlowApi.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorFlowApi.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorFlowApi.h 2022-05-18 04:50:51.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorModule.c snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorModule.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorModule.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorModule.c 2022-05-18 04:50:52.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorModule.h snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorModule.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/luaDetectorModule.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/luaDetectorModule.h 2022-05-18 04:50:53.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/dcerpc.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/dcerpc.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/dcerpc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/dcerpc.c 2022-05-18 04:50:54.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/dcerpc.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/dcerpc.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/dcerpc.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/dcerpc.h 2022-05-18 04:50:55.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/serviceConfig.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/serviceConfig.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/serviceConfig.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/serviceConfig.h 2022-05-18 04:52:07.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.c 2022-05-18 04:51:25.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_MDNS.h 2022-05-18 04:51:26.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_api.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_api.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_api.h 2022-05-18 04:50:57.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -163,7 +163,7 @@ typedef void (*AddDnsQueryInfo)(tAppIdData *flow, uint16_t id, const uint8_t *host, uint8_t host_len, uint16_t host_offset, - uint16_t record_type, uint16_t options_offset); + uint16_t record_type, uint16_t options_offset, bool root_query); typedef void (*AddDnsResponseInfo)(tAppIdData *flow, uint16_t id, const uint8_t *host, uint8_t host_len, uint16_t host_offset, diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_base.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_base.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_base.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_base.c 2022-05-18 04:50:58.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -1170,7 +1170,18 @@ static void AppIdAddHostInfo(tAppIdData *flow, SERVICE_HOST_INFO_CODE code, const void *info) { + if (code == SERVICE_HOST_INFO_NETBIOS_NAME) + { + if (flow->netbios_name) + { + if (strcmp(flow->netbios_name,(char *)info) == 0) + return; + free(flow->netbios_name); + } + flow->netbios_name = strdup((char *)info); + } } + void AppIdFreeDhcpData(DhcpFPData *dd) { free(dd); @@ -1299,13 +1310,17 @@ uint16_t port; sfaddr_t *ip; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_SFOUTER_IPH_PROTOID(pkt, pkt_header); +#endif + if (!flow || !pkt || !svc_element) { _dpd.errMsg("Invalid arguments to absinthe_add_appId"); return SERVICE_EINVALID; } -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t asId; #endif @@ -1345,7 +1360,7 @@ { ip = GET_DST_IP(pkt); port = pkt->dst_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = pkt->pkt_header->address_space_id_dst; #endif } @@ -1353,7 +1368,7 @@ { ip = GET_SRC_IP(pkt); port = pkt->src_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = pkt->pkt_header->address_space_id_src; #endif } @@ -1366,7 +1381,7 @@ { ip = GET_SRC_IP(pkt); port = pkt->src_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = pkt->pkt_header->address_space_id_src; #endif } @@ -1374,37 +1389,62 @@ { ip = GET_DST_IP(pkt); port = pkt->dst_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = pkt->pkt_header->address_space_id_dst; #endif } } if (!id_state) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, flow->proto, port, + AppIdServiceDetectionLevel(flow), + asId, cid); +#else + id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), cid); +#endif +#else /* No carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), asId); #else id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow)); #endif - } -#ifdef DAQ_CAPA_VRF +#endif + } + +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) if (!id_state && !(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), + asId, cid))) +#else + if (!id_state && !(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), cid))) +#endif +#else /* No carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + if (!id_state && !(id_state = AppIdAddServiceIDState(ip, flow->proto, port, + AppIdServiceDetectionLevel(flow), asId))) #else if (!id_state && !(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow)))) #endif +#endif { _dpd.errMsg("Add service failed to create state"); return SERVICE_ENOMEM; } flow->service_ip = *ip; flow->service_port = port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) flow->serviceAsId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + flow->carrierId = cid; +#endif + id_state->reset_time = 0; if (id_state->state != SERVICE_ID_VALID) { @@ -1426,7 +1466,17 @@ ipstr[0] = 0; inet_ntop(sfaddr_family(&flow->service_ip), (void *)sfaddr_get_ptr(&flow->service_ip), ipstr, sizeof(ipstr)); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + fprintf(SF_DEBUG_FILE, "Valid: %s:%u:%u AS %u CID:%u %p %d\n", ipstr, + (unsigned)flow->proto, (unsigned)flow->service_port, + asId, (unsigned)cid, id_state, (int)id_state->state); +#else + fprintf(SF_DEBUG_FILE, "Valid: %s:%u:%u CID:%u %p %d\n", ipstr, (unsigned)flow->proto, + (unsigned)flow->service_port, (unsigned)cid, id_state, (int)id_state->state); +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fprintf(SF_DEBUG_FILE, "Valid: %s:%u:%u AS %u %p %d\n", ipstr, (unsigned)flow->proto, (unsigned)flow->service_port, asId, id_state, (int)id_state->state); @@ -1434,6 +1484,7 @@ fprintf(SF_DEBUG_FILE, "Valid: %s:%u:%u %p %d\n", ipstr, (unsigned)flow->proto, (unsigned)flow->service_port, id_state, (int)id_state->state); #endif +#endif } #endif @@ -1453,7 +1504,18 @@ if (pkt->dst_port == SERVICE_DEBUG_PORT || pkt->src_port == SERVICE_DEBUG_PORT) #endif { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) AS %u CID %u is valid\n", + (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, asId, (unsigned) cid); +#else + fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) CID %u is valid\n", + (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, (unsigned) cid); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) AS %u is valid\n", (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port, asId); @@ -1462,6 +1524,7 @@ (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port); #endif +#endif } #endif return SERVICE_SUCCESS; @@ -1480,15 +1543,27 @@ if (pkt->dst_port == SERVICE_DEBUG_PORT || pkt->src_port == SERVICE_DEBUG_PORT) #endif { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) AS %u CID %u is valid, but skipped\n", + (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId, (unsigned)flow->carrierId); +#else + fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) CID %u is valid, but skipped\n", + (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, (unsigned)flow->carrierId); +#endif +#else /* No carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) AS %u is valid, but skipped\n", (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, - (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId); + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId); #else fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) is valid, but skipped\n", (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port); #endif +#endif } #endif return SERVICE_SUCCESS; @@ -1511,7 +1586,18 @@ if (pkt->dst_port == SERVICE_DEBUG_PORT || pkt->src_port == SERVICE_DEBUG_PORT) #endif { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) AS %u CID %u is valid, but skipped\n", + (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId, (unsigned)flow->carrierId); +#else + fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) CID %u is valid, but skipped\n", + (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, (unsigned)flow->carrierId); +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fprintf(SF_DEBUG_FILE, "Service %d for protocol %u on port %u (%u->%u) AS %u is valid, but skipped\n", (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId); @@ -1520,6 +1606,7 @@ (int)appId, (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port); #endif +#endif } #endif return SERVICE_SUCCESS; @@ -1575,20 +1662,35 @@ ip = GET_SRC_IP(pkt); flow->service_ip = *ip; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) flow->serviceAsId = pkt->pkt_header->address_space_id_src; #endif if (!flow->service_port) flow->service_port = pkt->src_port; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + flow->carrierId = GET_SFOUTER_IPH_PROTOID(pkt, pkt_header); +#endif } #ifdef SERVICE_DEBUG #if SERVICE_DEBUG_PORT if (pkt->dst_port == SERVICE_DEBUG_PORT || pkt->src_port == SERVICE_DEBUG_PORT) #endif { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + fprintf(SF_DEBUG_FILE, "Service for protocol %u on port %u is in process (%u->%u) AS %u CID %u, %p %s", + (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, + (unsigned)pkt->dst_port, flow->serviceAsId, (unsigned)flow->carrierId, + svc_element->validate, svc_element->name ? :"UNKNOWN"); +#else + fprintf(SF_DEBUG_FILE, "Service for protocol %u on port %u is in process (%u->%u) CID %u, %p %s", + (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port, + (unsigned)flow->carrierId, svc_element->validate, svc_element->name ? :"UNKNOWN"); +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fprintf(SF_DEBUG_FILE, "Service for protocol %u on port %u is in process (%u->%u) AS %u, %p %s", - (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, + (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId, svc_element->validate, svc_element->name ? :"UNKNOWN"); #else @@ -1596,6 +1698,8 @@ (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port, svc_element->validate, svc_element->name ? :"UNKNOWN"); #endif +#endif + } #endif @@ -1650,30 +1754,53 @@ sfaddr_t *ip; ip = GET_SRC_IP(pkt); port = flow->service_port ? flow->service_port : pkt->src_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t asId = pkt->pkt_header->address_space_id_src; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_SFOUTER_IPH_PROTOID(pkt, pkt_header); +#endif if (!id_state) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, flow->proto, port, + AppIdServiceDetectionLevel(flow), + asId, cid); +#else + id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), cid); +#endif +#else /* No carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), asId); #else id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow)); #endif +#endif } if (!id_state) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), + asId, cid))) +#else + if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), cid))) +#endif +#else /* No carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, + AppIdServiceDetectionLevel(flow), asId))) #else if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow)))) #endif +#endif { _dpd.errMsg("Incompatible service failed to create state"); return SERVICE_ENOMEM; @@ -1686,16 +1813,32 @@ } flow->service_ip = *ip; flow->service_port = port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) flow->serviceAsId = asId; #endif - +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + flow->carrierId = cid; +#endif #ifdef SERVICE_DEBUG #if SERVICE_DEBUG_PORT if (pkt->dst_port == SERVICE_DEBUG_PORT || pkt->src_port == SERVICE_DEBUG_PORT) #endif { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + fprintf(SF_DEBUG_FILE, "service_IC: State %s for protocol %u on port %u (%u->%u) AS %u CID %u, count %u, %s\n", + serviceIdStateName[id_state->state], (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, asId, (unsigned)flow->carrierId, + id_state->invalid_client_count, + (id_state->svc && id_state->svc->name) ? id_state->svc->name:"UNKNOWN"); +#else + fprintf(SF_DEBUG_FILE, "service_IC: State %s for protocol %u on port %u (%u->%u) CID %u, count %u, %s\n", + serviceIdStateName[id_state->state], (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, (unsigned) flow->carrierId, id_state->invalid_client_count, + (id_state->svc && id_state->svc->name) ? id_state->svc->name:"UNKNOWN"); +#endif +#else /* No carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fprintf(SF_DEBUG_FILE, "service_IC: State %s for protocol %u on port %u (%u->%u) AS %u, count %u, %s\n", serviceIdStateName[id_state->state], (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port, asId, @@ -1707,6 +1850,7 @@ (unsigned)pkt->src_port, (unsigned)pkt->dst_port, id_state->invalid_client_count, (id_state->svc && id_state->svc->name) ? id_state->svc->name:"UNKNOWN"); #endif +#endif } #endif @@ -1772,30 +1916,52 @@ port = flow->service_port ? flow->service_port : pkt->src_port; flow->service_ip = *ip; flow->service_port = port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) flow->serviceAsId = pkt->pkt_header->address_space_id_src; #endif - +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + flow->carrierId = GET_SFOUTER_IPH_PROTOID(pkt, pkt_header); +#endif if (!id_state) - { -#ifdef DAQ_CAPA_VRF + { +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, flow->proto, port, + AppIdServiceDetectionLevel(flow), + flow->serviceAsId, flow->carrierId); +#else + id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), flow->carrierId); +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), flow->serviceAsId); #else id_state = AppIdGetServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow)); #endif +#endif } if (!id_state) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, + AppIdServiceDetectionLevel(flow), + flow->serviceAsId, flow->carrierId))) +#else + if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), flow->carrierId))) +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow), flow->serviceAsId))) #else if (!(id_state = AppIdAddServiceIDState(ip, flow->proto, port, AppIdServiceDetectionLevel(flow)))) #endif +#endif { _dpd.errMsg("Fail service failed to create state"); return SERVICE_ENOMEM; @@ -1809,7 +1975,21 @@ if (pkt->dst_port == SERVICE_DEBUG_PORT || pkt->src_port == SERVICE_DEBUG_PORT) #endif { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + fprintf(SF_DEBUG_FILE, "service_fail: State %s for protocol %u on port %u (%u->%u) AS %u CID %u, count %u, valid count %u, currSvc %s\n", + serviceIdStateName[id_state->state], (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId, (unsigned)flow->carrierId, + id_state->invalid_client_count, id_state->valid_count, + (svc_element && svc_element->name) ? svc_element->name:"UNKNOWN"); +#else + fprintf(SF_DEBUG_FILE, "service_fail: State %s for protocol %u on port %u (%u->%u) CID %u, count %u, valid count %u, currSvc %s\n", + serviceIdStateName[id_state->state], (unsigned)flow->proto, (unsigned)flow->service_port, + (unsigned)pkt->src_port, (unsigned)pkt->dst_port, (unsigned)flow->carrierId, id_state->invalid_client_count, id_state->valid_count, + (svc_element && svc_element->name) ? svc_element->name:"UNKNOWN"); +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fprintf(SF_DEBUG_FILE, "service_fail: State %s for protocol %u on port %u (%u->%u) AS %u, count %u, valid count %u, currSvc %s\n", serviceIdStateName[id_state->state], (unsigned)flow->proto, (unsigned)flow->service_port, (unsigned)pkt->src_port, (unsigned)pkt->dst_port, flow->serviceAsId, @@ -1821,6 +2001,7 @@ (unsigned)pkt->src_port, (unsigned)pkt->dst_port, id_state->invalid_client_count, id_state->valid_count, (svc_element && svc_element->name) ? svc_element->name:"UNKNOWN"); #endif +#endif } #endif @@ -1871,13 +2052,14 @@ id_state->valid_count = 0; id_state->detract_count = 0; IP_CLEAR(id_state->last_detract); + id_state->svc = NULL; } else { id_state->valid_count--; id_state->last_invalid_client = *client_ip; id_state->invalid_client_count = 0; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state->asId = flowp->serviceAsId; #endif } @@ -1891,7 +2073,7 @@ else { id_state->last_detract = *client_ip; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state->asId = flowp->serviceAsId; #endif } @@ -1906,6 +2088,7 @@ id_state->valid_count = 0; id_state->detract_count = 0; IP_CLEAR(id_state->last_detract); + id_state->svc = NULL; } else id_state->valid_count--; @@ -1938,17 +2121,29 @@ if (getAppIdFlag(flowp, APPID_SESSION_SERVICE_DETECTED|APPID_SESSION_UDP_REVERSED)) return; - -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(&flowp->service_ip, flowp->proto, flowp->service_port, AppIdServiceDetectionLevel(flowp), + flowp->serviceAsId, flowp->carrierId); +#else + id_state = AppIdGetServiceIDState(&flowp->service_ip, flowp->proto, + flowp->service_port, + AppIdServiceDetectionLevel(flowp), flowp->carrierId); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(&flowp->service_ip, flowp->proto, + flowp->service_port, + AppIdServiceDetectionLevel(flowp), flowp->serviceAsId); #else id_state = AppIdGetServiceIDState(&flowp->service_ip, flowp->proto, flowp->service_port, AppIdServiceDetectionLevel(flowp)); #endif +#endif #ifdef SERVICE_DEBUG #if SERVICE_DEBUG_PORT @@ -1973,9 +2168,11 @@ id_state->invalid_client_count += STATE_ID_INCONCLUSIVE_SERVICE_WEIGHT; +#ifdef TARGET_BASED tmp_ip = _dpd.sessionAPI->get_session_ip_address(flowp->ssn, SSN_DIR_FROM_SERVER); if (sfip_fast_eq6(tmp_ip, &flowp->service_ip)) tmp_ip = _dpd.sessionAPI->get_session_ip_address(flowp->ssn, SSN_DIR_FROM_CLIENT); +#endif HandleFailure(flowp, id_state, tmp_ip, 0); @@ -2038,13 +2235,25 @@ const tRNAServiceElement * reverse_service = NULL; sfaddr_t * reverse_ip = GET_SRC_IP(p); rnaData->tried_reverse_service = true; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_SFOUTER_IPH_PROTOID(p, pkt_header); +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) if((reverse_id_state = AppIdGetServiceIDState(reverse_ip, proto, p->src_port, AppIdServiceDetectionLevel(rnaData), + p->pkt_header->address_space_id_src, cid))) +#else + if ((reverse_id_state = AppIdGetServiceIDState(reverse_ip, proto, p->src_port, AppIdServiceDetectionLevel(rnaData), + cid))) +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + if((reverse_id_state = AppIdGetServiceIDState(reverse_ip, proto, p->src_port, + AppIdServiceDetectionLevel(rnaData), p->pkt_header->address_space_id_src))) #else if ((reverse_id_state = AppIdGetServiceIDState(reverse_ip, proto, p->src_port, AppIdServiceDetectionLevel(rnaData)))) #endif +#endif { reverse_service = reverse_id_state->svc; } @@ -2094,18 +2303,24 @@ bool appIdFailServiceDone = false; sfaddr_t *ip; uint16_t port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = 0; +#endif /* Get packet info. */ if (sfaddr_is_set(&rnaData->service_ip)) { ip = &rnaData->service_ip; port = rnaData->service_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = rnaData->serviceAsId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + cid = rnaData->carrierId; +#endif } else { @@ -2113,7 +2328,7 @@ { ip = GET_SRC_IP(p); port = p->src_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = p->pkt_header->address_space_id_src; #endif } @@ -2121,15 +2336,18 @@ { ip = GET_DST_IP(p); port = p->dst_port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) asId = p->pkt_header->address_space_id_dst; #endif } rnaData->service_ip = *ip; rnaData->service_port = port; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) rnaData->serviceAsId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + rnaData->carrierId = GET_SFOUTER_IPH_PROTOID(p, pkt_header); +#endif } /* When a new flow was initialized, rnaData->search_state = 0 (SERVICE_ID_START) */ @@ -2137,22 +2355,40 @@ { rnaData->search_state = SERVICE_ID_PORT; // Also ensures this block to be executed once per flow /* Get host tracker state. */ -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), + asId, cid); +#else + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), cid); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), asId); #else id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData)); -#endif +#endif +#endif /* Create it if it doesn't exist yet. */ if (id_state == NULL) { /* New one is memset to 0, hence id_state->state = 0 (SERVICE_ID_NEW) */ -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) if (!(id_state = AppIdAddServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), - asId))) + asId, cid))) #else + if (!(id_state = AppIdAddServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), cid))) +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + if (!(id_state = AppIdAddServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), + asId))) +#else if (!(id_state = AppIdAddServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData)))) #endif +#endif { _dpd.errMsg("Discover service failed to create state"); return SERVICE_ENOMEM; @@ -2286,12 +2522,21 @@ { if (!id_state) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), + asId, cid); +#else + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), cid); +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), asId); #else id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData)); #endif +#endif } AppIdServiceFailService(rnaData, p, dir, NULL, APPID_SESSION_DATA_NONE, pConfig, id_state); appIdFailServiceDone = true; @@ -2309,12 +2554,21 @@ { if (!id_state) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), + asId, cid); +#else + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), cid); +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), asId); #else id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData)); #endif +#endif } AppIdServiceFailService(rnaData, p, dir, NULL, APPID_SESSION_DATA_NONE, pConfig, id_state); appIdFailServiceDone = true; @@ -2336,12 +2590,21 @@ { if (!id_state) { -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), + asId, cid); +#else + id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), cid); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData), asId); #else id_state = AppIdGetServiceIDState(ip, proto, port, AppIdServiceDetectionLevel(rnaData)); #endif +#endif } if (id_state && id_state->invalid_client_count < STATE_ID_INVALID_CLIENT_THRESHOLD) { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_base.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_base.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_base.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_base.h 2022-05-18 04:50:59.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.c 2022-05-18 04:51:00.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_battle_field.h 2022-05-18 04:51:01.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bgp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bgp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bgp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bgp.c 2022-05-18 04:51:02.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bgp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bgp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bgp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bgp.h 2022-05-18 04:51:03.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bit.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bit.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bit.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bit.c 2022-05-18 04:51:09.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bootp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bootp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bootp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bootp.c 2022-05-18 04:51:10.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bootp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bootp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_bootp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_bootp.h 2022-05-18 04:51:11.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.c 2022-05-18 04:51:12.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_dcerpc.h 2022-05-18 04:51:13.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.c 2022-05-18 04:51:14.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_direct_connect.h 2022-05-18 04:51:15.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_flap.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_flap.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_flap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_flap.c 2022-05-18 04:51:16.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_flap.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_flap.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_flap.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_flap.h 2022-05-18 04:51:17.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ftp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ftp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ftp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ftp.c 2022-05-18 04:51:18.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -126,7 +126,9 @@ static int ftp_init(const InitServiceAPI * const init_api) { +#ifdef TARGET_BASED ftp_data_app_id = init_api->dpd->addProtocolReference("ftp-data"); +#endif init_api->RegisterPattern(&ftp_validate, IPPROTO_TCP, (uint8_t *)FTP_PATTERN1, sizeof(FTP_PATTERN1)-1, 0, "ftp", init_api->pAppidConfig); init_api->RegisterPattern(&ftp_validate, IPPROTO_TCP, (uint8_t *)FTP_PATTERN2, sizeof(FTP_PATTERN2)-1, 0, "ftp", init_api->pAppidConfig); diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ftp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ftp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ftp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ftp.h 2022-05-18 04:51:20.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_irc.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_irc.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_irc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_irc.c 2022-05-18 04:51:21.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_irc.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_irc.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_irc.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_irc.h 2022-05-18 04:51:22.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_lpr.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_lpr.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_lpr.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_lpr.c 2022-05-18 04:51:23.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_lpr.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_lpr.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_lpr.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_lpr.h 2022-05-18 04:51:24.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_mysql.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_mysql.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_mysql.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_mysql.c 2022-05-18 04:51:27.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_mysql.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_mysql.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_mysql.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_mysql.h 2022-05-18 04:51:28.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_netbios.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_netbios.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_netbios.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_netbios.c 2022-05-18 04:51:29.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_netbios.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_netbios.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_netbios.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_netbios.h 2022-05-18 04:51:31.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_nntp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_nntp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_nntp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_nntp.c 2022-05-18 04:51:32.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_nntp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_nntp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_nntp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_nntp.h 2022-05-18 04:51:33.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ntp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ntp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ntp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ntp.c 2022-05-18 04:51:34.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ntp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ntp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ntp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ntp.h 2022-05-18 04:51:35.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_radius.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_radius.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_radius.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_radius.c 2022-05-18 04:51:36.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_radius.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_radius.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_radius.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_radius.h 2022-05-18 04:51:37.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rexec.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rexec.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rexec.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rexec.c 2022-05-18 04:51:38.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -91,7 +91,7 @@ static int rexec_init(const InitServiceAPI * const init_api) { unsigned i; - +#ifdef TARGET_BASED app_id = init_api->dpd->addProtocolReference("rexec"); for (i=0; i < sizeof(appIdRegistry)/sizeof(*appIdRegistry); i++) @@ -99,6 +99,7 @@ _dpd.debugMsg(DEBUG_LOG,"registering appId: %d\n",appIdRegistry[i].appId); init_api->RegisterAppId(&rexec_validate, appIdRegistry[i].appId, appIdRegistry[i].additionalInfo, init_api->pAppidConfig); } +#endif return 0; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rexec.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rexec.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rexec.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rexec.h 2022-05-18 04:51:39.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rfb.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rfb.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rfb.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rfb.c 2022-05-18 04:51:40.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rfb.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rfb.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rfb.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rfb.h 2022-05-18 04:51:41.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.c 2022-05-18 04:51:43.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rlogin.h 2022-05-18 04:51:44.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c 2022-05-18 04:51:45.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -232,7 +232,9 @@ struct rpcent *rpc; RPCProgram *prog; +#ifdef TARGET_BASED app_id = init_api->dpd->addProtocolReference("sunrpc"); +#endif if (!rpc_programs) { @@ -403,8 +405,8 @@ dip = GET_DST_IP(pkt); sip = GET_SRC_IP(pkt); tmp = ntohl(pmr->port); - pf = rpc_service_mod.api->flow_new(flowp, pkt, dip, 0, sip, (uint16_t)tmp, (uint8_t)ntohl(rd->proto), app_id, - APPID_EARLY_SESSION_FLAG_FW_RULE); +#ifdef TARGET_BASED + pf = rpc_service_mod.api->flow_new(flowp, pkt, dip, 0, sip, (uint16_t)tmp, (uint8_t)ntohl(rd->proto), app_id, 0); if (pf) { rpc_service_mod.api->data_add_id(pf, (uint16_t)tmp, @@ -420,6 +422,7 @@ APPID_SESSION_DISCOVER_APP | APPID_SESSION_DISCOVER_USER)); } +#endif } break; default: diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rpc.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rpc.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rpc.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rpc.h 2022-05-18 04:51:46.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rshell.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rshell.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rshell.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rshell.c 2022-05-18 04:51:47.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -90,8 +90,9 @@ static int rshell_init(const InitServiceAPI * const init_api) { unsigned i; - +#ifdef TARGET_BASED app_id = init_api->dpd->addProtocolReference("rsh-error"); +#endif for (i=0; i < sizeof(appIdRegistry)/sizeof(*appIdRegistry); i++) { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rshell.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rshell.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rshell.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rshell.h 2022-05-18 04:51:48.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rsync.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rsync.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rsync.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rsync.c 2022-05-18 04:51:49.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rsync.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rsync.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rsync.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rsync.h 2022-05-18 04:51:50.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.c 2022-05-18 04:51:51.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_rtmp.h 2022-05-18 04:51:52.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_snmp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_snmp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_snmp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_snmp.c 2022-05-18 04:51:53.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -68,7 +68,8 @@ SNMP_PDU_TRAP, SNMP_PDU_GET_BULK_REQUEST, SNMP_PDU_INFORM_REQUEST, - SNMP_PDU_TRAPV2 + SNMP_PDU_TRAPV2, + SNMP_PDU_REPORT } SNMPPDUType; #pragma pack(1) @@ -126,7 +127,9 @@ static int snmp_init(const InitServiceAPI * const init_api) { +#ifdef TARGET_BASED app_id = init_api->dpd->addProtocolReference("snmp"); +#endif init_api->RegisterPattern(&snmp_validate, IPPROTO_UDP, SNMP_PATTERN_2, sizeof(SNMP_PATTERN_2), 2, "snmp", init_api->pAppidConfig); init_api->RegisterPattern(&snmp_validate, IPPROTO_UDP, SNMP_PATTERN_3, sizeof(SNMP_PATTERN_3), 2, "snmp", init_api->pAppidConfig); @@ -487,7 +490,7 @@ } break; case SNMP_STATE_RESPONSE: - if (pdu == SNMP_PDU_GET_RESPONSE) + if (pdu == SNMP_PDU_GET_RESPONSE || pdu == SNMP_PDU_REPORT) { if (dir == APP_ID_FROM_RESPONDER) goto success; goto fail; @@ -503,7 +506,7 @@ if (dir == APP_ID_FROM_INITIATOR) goto fail; break; case SNMP_STATE_R_RESPONSE: - if (pdu == SNMP_PDU_GET_RESPONSE) + if (pdu == SNMP_PDU_GET_RESPONSE || pdu == SNMP_PDU_REPORT) { if (dir == APP_ID_FROM_INITIATOR) goto success; goto fail; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_snmp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_snmp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_snmp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_snmp.h 2022-05-18 04:51:54.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssh.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssh.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssh.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssh.c 2022-05-18 04:51:56.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssh.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssh.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssh.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssh.h 2022-05-18 04:51:57.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssl.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssl.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssl.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssl.c 2022-05-18 04:51:58.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ #include "service_ssl.h" #include "fw_appid.h" #include "serviceConfig.h" +#include "thirdparty_appid_utils.h" #define SSL_PORT 443 @@ -49,6 +50,7 @@ #define SSL_SERVER_KEY_XCHG 12 #define SSL_SERVER_CERT_REQ 13 #define SSL_SERVER_HELLO_DONE 14 +#define SSL_CERTIFICATE_STATUS 22 #define SSL2_SERVER_HELLO 4 #define PCT_SERVER_HELLO 2 @@ -69,8 +71,7 @@ { SSL_STATE_INITIATE, /* Client initiates. */ SSL_STATE_CONNECTION, /* Server responds... */ - SSL_STATE_HEADER, - SSL_STATE_DONE + SSL_STATE_HEADER } SSLState; typedef struct _SERVICE_SSL_DATA @@ -90,8 +91,8 @@ /* Data collected from certificates afterwards: */ char *common_name; int common_name_strlen; - char *org_name; int org_name_strlen; + char *org_name; } ServiceSSLData; typedef struct _SERVICE_SSL_CERTIFICATE @@ -272,6 +273,7 @@ {&ssl_validate, 614, IPPROTO_TCP}, {&ssl_validate, 636, IPPROTO_TCP}, {&ssl_validate, 636, IPPROTO_UDP}, + {&ssl_validate, 853, IPPROTO_TCP}, {&ssl_validate, 989, IPPROTO_TCP}, {&ssl_validate, 990, IPPROTO_TCP}, {&ssl_validate, 992, IPPROTO_TCP}, @@ -576,7 +578,8 @@ { ss->state = SSL_STATE_CONNECTION; - if (dir == APP_ID_FROM_INITIATOR) + if (!(flowp->scan_flags & SCAN_CERTVIZ_ENABLED_FLAG) && + dir == APP_ID_FROM_INITIATOR) { parse_client_initiation(data, size, ss); goto inprocess; @@ -591,33 +594,29 @@ switch (ss->state) { case SSL_STATE_CONNECTION: - ss->state = SSL_STATE_DONE; pct = (ServiceSSLPCTHdr *)data; hdr2 = (ServiceSSLV2Hdr *)data; hdr3 = (ServiceSSLV3Hdr *)data; + /* SSL PCT header? */ if (size >= sizeof(ServiceSSLPCTHdr) && pct->len >= 0x80 && pct->type == PCT_SERVER_HELLO && ntohs(pct->version) == 0x8001) { goto success; } + /* SSL v2 header? */ if (size >= sizeof(ServiceSSLV2Hdr) && hdr2->len >= 0x80 && hdr2->type == SSL2_SERVER_HELLO && !(hdr2->cert & 0xFE)) { - switch (ntohs(hdr2->version)) + uint16_t h2v = ntohs(hdr2->version); + if ((h2v == 0x0002 || h2v == 0x0300 || + h2v == 0x0301 || h2v == 0x0303) && + !(hdr2->cipher_len % 3)) { - case 0x0002: - case 0x0300: - case 0x0301: - case 0x0303: - break; - default: - goto not_v2; + goto success; } - if (hdr2->cipher_len % 3) goto not_v2; - - goto success; -not_v2:; } + /* it is probably an SSLv3, TLS 1.2, or TLS 1.3 header. + First record must be a handshake (type 22). */ if (size < sizeof(ServiceSSLV3Hdr) || hdr3->type != SSL_HANDSHAKE || (ntohs(hdr3->version) != 0x0300 && @@ -643,7 +642,6 @@ ss->tot_length = ntohs(hdr3->len); ss->length = ntohs(rec->length) + offsetof(ServiceSSLV3Record, version); - if (size == ss->length) goto success; /* Just a Server Hello. */ if (ss->tot_length < ss->length) goto fail; ss->tot_length -= ss->length; if (size < ss->length) goto fail; @@ -653,7 +651,6 @@ ss->pos = 0; /* fall through */ case SSL_STATE_HEADER: - ss->state = SSL_STATE_DONE; while (size > 0) { if (!ss->pos) @@ -665,7 +662,9 @@ hdr3 = (ServiceSSLV3Hdr *)data; ver = ntohs(hdr3->version); if (size < sizeof(ServiceSSLV3Hdr) || - hdr3->type != SSL_HANDSHAKE || + (hdr3->type != SSL_HANDSHAKE && + hdr3->type != SSL_CHANGE_CIPHER && + hdr3->type != SSL_APPLICATION_DATA) || (ver != 0x0300 && ver != 0x0301 && ver != 0x0302 && @@ -676,11 +675,17 @@ data += sizeof(ServiceSSLV3Hdr); size -= sizeof(ServiceSSLV3Hdr); ss->tot_length = ntohs(hdr3->len); + if (hdr3->type == SSL_CHANGE_CIPHER || + hdr3->type == SSL_APPLICATION_DATA) + { + goto success; + } } rec = (ServiceSSLV3Record *)data; - if (size < offsetof(ServiceSSLV3Record, version) || - rec->length_msb) + if ( rec->type != SSL_SERVER_HELLO_DONE && + ( size < offsetof(ServiceSSLV3Record, version) || + rec->length_msb) ) { goto fail; } @@ -708,15 +713,15 @@ ss->in_certs = 0; ss->certs_curr_len = ss->certs_len; memcpy(ss->certs_data, data + sizeof(ServiceSSLV3CertsRecord), ss->certs_curr_len); - goto success; /* We got everything we need. */ + break; } } /* fall through */ + case SSL_CERTIFICATE_STATUS: case SSL_SERVER_KEY_XCHG: case SSL_SERVER_CERT_REQ: ss->length = ntohs(rec->length) + offsetof(ServiceSSLV3Record, version); - if (size == ss->length) goto success; if (ss->tot_length < ss->length) goto fail; ss->tot_length -= ss->length; if (size < ss->length) @@ -730,9 +735,12 @@ size -= ss->length; ss->pos = 0; } - ss->state = SSL_STATE_HEADER; break; case SSL_SERVER_HELLO_DONE: + if (size < offsetof(ServiceSSLV3Record, version)) + { + goto success; + } if (rec->length) goto fail; if (ss->tot_length != offsetof(ServiceSSLV3Record, version)) goto fail; @@ -759,7 +767,6 @@ memcpy(ss->certs_data + ss->certs_curr_len, data, ss->certs_len - ss->certs_curr_len); ss->in_certs = 0; ss->certs_curr_len = ss->certs_len; - goto success; /* We got everything we need. */ } } @@ -774,7 +781,6 @@ size -= ss->length - ss->pos; ss->pos = 0; } - ss->state = SSL_STATE_HEADER; } } break; @@ -800,7 +806,8 @@ success: if (ss->certs_data && ss->certs_len) { - if (!parse_certificates(ss)) + if (!(flowp->scan_flags & SCAN_CERTVIZ_ENABLED_FLAG) && + !thirdparty_appid_module && !parse_certificates(ss)) { goto fail; } @@ -858,6 +865,7 @@ } ss->host_name = ss->common_name = ss->org_name = NULL; + flowp->tsession->tls_handshake_done = true; } ssl_service_mod.api->add_service(flowp, args->pkt, dir, &svc_element, getSslServiceAppId(args->pkt->src_port), NULL, NULL, NULL, NULL); @@ -885,6 +893,8 @@ return APP_ID_SSHELL; case 636: return APP_ID_LDAPS; + case 853: + return APP_ID_DNS_OVER_TLS; case 989: return APP_ID_FTPSDATA; case 990: diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssl.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssl.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_ssl.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_ssl.h 2022-05-18 04:51:59.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_telnet.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_telnet.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_telnet.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_telnet.c 2022-05-18 04:52:00.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_telnet.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_telnet.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_telnet.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_telnet.h 2022-05-18 04:52:01.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_tftp.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tftp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_tftp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tftp.c 2022-05-18 04:52:02.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -100,7 +100,7 @@ static int tftp_init(const InitServiceAPI * const init_api) { unsigned i; - +#ifdef TARGET_BASED app_id = init_api->dpd->addProtocolReference("tftp"); for (i=0; i < sizeof(appIdRegistry)/sizeof(*appIdRegistry); i++) @@ -108,6 +108,7 @@ _dpd.debugMsg(DEBUG_LOG,"registering appId: %d\n",appIdRegistry[i].appId); init_api->RegisterAppId(&tftp_validate, appIdRegistry[i].appId, appIdRegistry[i].additionalInfo, init_api->pAppidConfig); } +#endif return 0; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_tftp.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tftp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_tftp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tftp.h 2022-05-18 04:52:03.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_timbuktu.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_timbuktu.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_timbuktu.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_timbuktu.c 2022-05-18 04:52:04.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_tns.c snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tns.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_tns.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_tns.c 2022-05-18 04:52:05.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_util.h snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_util.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_plugins/service_util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_plugins/service_util.h 2022-05-18 04:52:06.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_state.c snort-2.9.20/src/dynamic-preprocessors/appid/service_state.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_state.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_state.c 2022-05-18 04:52:08.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -166,13 +166,21 @@ serviceStateCache6 = NULL; } } - -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) +void AppIdRemoveServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, + uint16_t asId, uint32_t cid) +#else +void AppIdRemoveServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint32_t cid) +#endif +#else /* No carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) void AppIdRemoveServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint16_t asId) #else void AppIdRemoveServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level) #endif +#endif { AppIdServiceStateKey k; SFXHASH *cache; @@ -183,9 +191,12 @@ k.key6.port = port; memcpy(k.key6.ip, sfaddr_get_ip6_ptr(ip), sizeof(k.key6.ip)); k.key6.level = level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) k.key6.asId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + k.key6.cid = cid; +#endif cache = serviceStateCache6; } else @@ -194,9 +205,12 @@ k.key4.port = port; k.key4.ip = sfaddr_get_ip4_value(ip); k.key4.level = level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) k.key4.asId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + k.key4.cid = cid; +#endif cache = serviceStateCache4; } if (sfxhash_remove(cache, &k) != SFXHASH_OK) @@ -205,21 +219,40 @@ ipstr[0] = 0; inet_ntop(sfaddr_family(ip), (void *)sfaddr_get_ptr(ip), ipstr, sizeof(ipstr)); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + _dpd.errMsg("Failed to remove from hash: %s:%u:%u:%u:%u\n", ipstr, (unsigned)proto, + (unsigned)port, asId, cid); +#else + _dpd.errMsg("Failed to remove from hash: %s:%u:%u:%u\n",ipstr, (unsigned)proto, (unsigned)port, cid); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) _dpd.errMsg("Failed to remove from hash: %s:%u:%u:%u\n", ipstr, (unsigned)proto, (unsigned)port, asId); #else _dpd.errMsg("Failed to remove from hash: %s:%u:%u\n",ipstr, (unsigned)proto, (unsigned)port); #endif +#endif } } -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) +AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, + uint32_t level, uint16_t asId, uint32_t cid) +#else +AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint32_t cid) +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint16_t asId) #else AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level) #endif +#endif + { AppIdServiceStateKey k; SFXHASH *cache; @@ -231,9 +264,12 @@ k.key6.port = port; memcpy(k.key6.ip, sfaddr_get_ip6_ptr(ip), sizeof(k.key6.ip)); k.key6.level = level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) k.key6.asId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + k.key6.cid = cid; +#endif cache = serviceStateCache6; } else @@ -242,9 +278,12 @@ k.key4.port = port; k.key4.ip = sfaddr_get_ip4_value(ip); k.key4.level = level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) k.key4.asId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + k.key4.cid = cid; +#endif cache = serviceStateCache4; } ss = sfxhash_find(cache, &k); @@ -254,15 +293,26 @@ ipstr[0] = 0; inet_ntop(sfaddr_family(ip), (void *)sfaddr_get_ptr(ip), ipstr, sizeof(ipstr)); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + _dpd.logMsg("ServiceState: Read from hash: %s:%u:%u:%u:%u:%u %p %u %p\n", + ipstr, (unsigned)proto, (unsigned)port, level, asId, cid + ss, ss ? ss->state:0, ss ? ss->svc:NULL); +#else + _dpd.logMsg("ServiceState: Read from hash: %s:%u:%u:%u:%u %p %u %p\n",ipstr, + (unsigned)proto, (unsigned)port, level, cid, ss, ss ? ss->state:0, ss ? ss->svc:NULL); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) _dpd.logMsg("ServiceState: Read from hash: %s:%u:%u:%u:%u %p %u %p\n", ipstr, (unsigned)proto, (unsigned)port, level, asId, ss, ss ? ss->state:0, ss ? ss->svc:NULL); -#else +#else _dpd.logMsg("ServiceState: Read from hash: %s:%u:%u:%u %p %u %p\n",ipstr, (unsigned)proto, (unsigned)port, level, ss, ss ? ss->state:0, ss ? ss->svc:NULL); #endif #endif +#endif if (ss && ss->svc && !ss->svc->ref_count) { @@ -272,13 +322,21 @@ return ss; } - -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) AppIdServiceIDState* AppIdAddServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, - uint32_t level, uint16_t asId) + uint32_t level, uint16_t asId, uint32_t cid) +#else +AppIdServiceIDState* AppIdAddServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint32_t cid) +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) +AppIdServiceIDState* AppIdAddServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, + uint32_t level, uint16_t asId) #else AppIdServiceIDState* AppIdAddServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level) #endif +#endif { AppIdServiceStateKey k; AppIdServiceIDState *ss = NULL; @@ -291,9 +349,12 @@ k.key6.port = port; memcpy(k.key6.ip, sfaddr_get_ip6_ptr(ip), sizeof(k.key6.ip)); k.key6.level = level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) k.key6.asId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + k.key6.cid = cid; +#endif cache = serviceStateCache6; } else @@ -302,9 +363,12 @@ k.key4.port = port; k.key4.ip = sfaddr_get_ip4_value(ip); k.key4.level = level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) k.key4.asId = asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + k.key4.cid = cid; +#endif cache = serviceStateCache4; } #ifdef DEBUG_SERVICE_STATE @@ -315,17 +379,27 @@ { ipstr[0] = 0; inet_ntop(sfaddr_family(ip), (void *)sfaddr_get_ptr(ip), ipstr, sizeof(ipstr)); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + _dpd.errMsg("ServiceState: Failed to add to hash: %s:%u:%u:%u:%u:%u\n",ipstr, + (unsigned)proto, (unsigned)port, level, asId, cid); +#else _dpd.errMsg("ServiceState: Failed to add to hash: %s:%u:%u:%u:%u\n",ipstr, + (unsigned)proto, (unsigned)port, level, cid); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + _dpd.errMsg("ServiceState: Failed to add to hash: %s:%u:%u:%u:%u\n",ipstr, (unsigned)proto, (unsigned)port, level, asId); #else - _dpd.errMsg("ServiceState: Failed to add to hash: %s:%u:%u:%u\n",ipstr, + _dpd.errMsg("ServiceState: Failed to add to hash: %s:%u:%u:%u\n",ipstr, (unsigned)proto, (unsigned)port, level); #endif +#endif return NULL; } #ifdef DEBUG_SERVICE_STATE -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) _dpd.logMsg("ServiceState: Added to hash: %s:%u:%u:%u:%u %p\n", ipstr, (unsigned)proto, (unsigned)port, level, ss, asId); #else diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/service_state.h snort-2.9.20/src/dynamic-preprocessors/appid/service_state.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/service_state.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/service_state.h 2022-05-18 04:52:09.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -110,7 +110,7 @@ */ sfaddr_t last_invalid_client; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t asId; #endif @@ -127,9 +127,12 @@ uint16_t proto; uint32_t ip; uint32_t level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid; +#endif } AppIdServiceStateKey4; typedef struct @@ -138,9 +141,12 @@ uint16_t proto; uint8_t ip[16]; uint32_t level; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t asId; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid; +#endif } AppIdServiceStateKey6; typedef union @@ -152,8 +158,22 @@ bool AppIdServiceStateReloadAdjust(bool idle, unsigned long memcap); int AppIdServiceStateInit(unsigned long memcap); void AppIdServiceStateCleanup(void); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) void AppIdRemoveServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, + uint32_t level, uint16_t asId, uint32_t cid); +AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, + uint32_t level, uint16_t asId, uint32_t cid); +AppIdServiceIDState* AppIdAddServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, + uint32_t level, uint16_t asId, uint32_t cid); +#else +void AppIdRemoveServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint32_t cid); +AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint32_t cid); +AppIdServiceIDState* AppIdAddServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint32_t cid); +#endif +#else /* No carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) +void AppIdRemoveServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint16_t asId); AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level, uint16_t asId); @@ -164,6 +184,7 @@ AppIdServiceIDState* AppIdGetServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level); AppIdServiceIDState* AppIdAddServiceIDState(sfaddr_t *ip, uint16_t proto, uint16_t port, uint32_t level); #endif +#endif void AppIdServiceStateDumpStats(void); #endif diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/spp_appid.c snort-2.9.20/src/dynamic-preprocessors/appid/spp_appid.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/spp_appid.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/spp_appid.c 2022-05-18 04:52:11.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -50,6 +50,7 @@ #include "cip_common.h" #include "detector_cip.h" +#include "memory_stats.h" #ifdef PERF_PROFILING PreprocStats appMatchPerfStats; @@ -127,7 +128,7 @@ if (appidSC->newAppIdConfig) AppIdCommonUnload(appidSC->newAppIdConfig); - free(appidSC); + _dpd.snortFree(appidSC, sizeof(*appidSC), PP_APP_ID, PP_MEM_CATEGORY_CONFIG); } } @@ -206,7 +207,8 @@ if (*new_config == NULL) { tAppidStaticConfig* newConfig; - if (NULL == (newConfig = (tAppidStaticConfig*)malloc(sizeof(*newConfig)))) + if (NULL == (newConfig = (tAppidStaticConfig*)_dpd.snortAlloc(1, + sizeof(*newConfig), PP_APP_ID, PP_MEM_CATEGORY_CONFIG))) { _dpd.fatalMsg("AppID failed to allocate memory for new configuration\n"); } @@ -374,6 +376,14 @@ _dpd.logMsg(" Total packets received : %lu\n", app_id_raw_packet_count); _dpd.logMsg(" Total packets processed : %lu\n", app_id_processed_packet_count); _dpd.logMsg(" Total packets ignored : %lu\n", app_id_ignored_packet_count); + _dpd.logMsg(" Total ongoing AppId sessions : %lu\n", app_id_ongoing_session); + _dpd.logMsg(" Total AppId sessions allocated : %lu\n", app_id_total_alloc); + _dpd.logMsg(" AppId session size : %lu\n", sizeof(tAppIdData)); + _dpd.logMsg(" Total AppId sessions allocated from heap : %lu\n", app_id_session_heap_alloc_count); + _dpd.logMsg("Total AppId sessions allocated from AppID Memory Pool : %lu\n", app_id_session_freelist_alloc_count); + _dpd.logMsg(" AppID session Memory Pool free count : %lu\n", app_id_flow_data_free_list_count); + _dpd.logMsg(" Flow-data Memory Pool free count : %lu\n", app_id_data_free_list_count); + _dpd.logMsg(" Tmp Memory Pool free count : %lu\n", app_id_tmp_free_list_count); if (exit_flag == 0) // Snort's SigDumpStatsHandler dumping stats intentionally { if (thirdparty_appid_module) @@ -396,6 +406,13 @@ app_id_raw_packet_count = 0; app_id_processed_packet_count = 0; app_id_ignored_packet_count = 0; + app_id_ongoing_session = 0; + app_id_total_alloc = 0; + app_id_session_heap_alloc_count = 0; + app_id_session_freelist_alloc_count = 0; + app_id_flow_data_free_list_count = 0; + app_id_data_free_list_count = 0; + app_id_tmp_free_list_count = 0; if (thirdparty_appid_module) thirdparty_appid_module->reset_stats(); #ifdef SIDE_CHANNEL @@ -423,11 +440,77 @@ return 0; } +int AppId_Print_Mem_Stats(FILE *fd, char *buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time = time(NULL); + int len = 0; + + if (fd) + { + len = fprintf(fd, ",%lu,%lu,%lu,%lu" + ",%lu,%lu,%lu" + ",%lu,%lu,%lu" + ",%lu,%lu,%lu" + ",%lu,%u,%u" + ",%lu,%u,%u" + ",%lu,%u,%u" + ",%lu,%u,%u" + , app_id_total_alloc, app_id_ongoing_session, app_id_session_freelist_alloc_count, app_id_session_heap_alloc_count + , app_id_data_free_list_count, app_id_data_free_list_count*sizeof(tAppIdData) + , app_id_flow_data_free_list_count, app_id_flow_data_free_list_count*sizeof(AppIdFlowData) + , app_id_tmp_free_list_count, app_id_tmp_free_list_count*sizeof(tTmpAppIdData) + , app_id_raw_packet_count, app_id_processed_packet_count, app_id_ignored_packet_count + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory, meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc, meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory, meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc, meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_MISC].used_memory, meminfo[PP_MEM_CATEGORY_MISC].num_of_alloc, meminfo[PP_MEM_CATEGORY_MISC].num_of_free + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + meminfo[PP_MEM_CATEGORY_MISC].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + meminfo[PP_MEM_CATEGORY_MISC].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + meminfo[PP_MEM_CATEGORY_MISC].num_of_free); + } + else if (buffer) + { + /* + * Old buffer output for control socket comm, + * like via, "show snort preprocessor-memory-usage" + * There are no support for the preproc APPID here, + * Hence keeping this block as empty + */ + } + else + { + _dpd.logMsg("\n"); + _dpd.logMsg("\n"); + _dpd.logMsg("Memory Statistics of AppID on: %s\n", ctime(&curr_time)); + _dpd.logMsg(" AppID Session Statistics:\n"); + _dpd.logMsg(" Total Sessions seen: %14lu\n", app_id_total_alloc); + _dpd.logMsg(" Current Active sessions: %14lu\n", app_id_ongoing_session); + _dpd.logMsg("Total allocs from MemPool-AppID session: %14lu\n", app_id_session_freelist_alloc_count); + _dpd.logMsg(" Total allocs from Heap: %14lu\n", app_id_session_heap_alloc_count); + _dpd.logMsg(" AppID Memory Pool Statistics:\n"); + _dpd.logMsg(" Memory Pool-AppID session:\n"); + _dpd.logMsg(" Free count: %14lu\n", app_id_data_free_list_count); + _dpd.logMsg(" Free size: %14lu bytes\n", app_id_data_free_list_count*sizeof(tAppIdData)); + _dpd.logMsg(" Memory Pool-Flow data:\n"); + _dpd.logMsg(" Free count: %14lu\n", app_id_flow_data_free_list_count); + _dpd.logMsg(" Free size: %14lu bytes\n", app_id_flow_data_free_list_count*sizeof(AppIdFlowData)); + _dpd.logMsg(" Memory Pool-Tmp:\n"); + _dpd.logMsg(" Free count: %14lu \n", app_id_tmp_free_list_count); + _dpd.logMsg(" Free size: %14lu bytes\n", app_id_tmp_free_list_count*sizeof(tTmpAppIdData)); + _dpd.logMsg(" AppID Packet Statistics:\n"); + _dpd.logMsg(" Total packets received: %14lu\n", app_id_raw_packet_count); + _dpd.logMsg(" Total packets processed: %14lu\n", app_id_processed_packet_count); + _dpd.logMsg(" Total packets ignored: %14lu\n", app_id_ignored_packet_count); + } + return len; +} + static void AppIdInit(struct _SnortConfig *sc, char *args) { static int once = 0; tSfPolicyId policy_id = _dpd.getParserPolicy(sc); + _dpd.registerMemoryStatsFunc(PP_APP_ID, AppId_Print_Mem_Stats); + if (!once) { _dpd.addPreprocExit(AppIdCleanExit, NULL, PRIORITY_LAST, PP_APP_ID); @@ -444,7 +527,8 @@ # endif appid_preproc_status_bit = _dpd.sessionAPI->get_preprocessor_status_bit(); - if (NULL == (appidStaticConfig = (tAppidStaticConfig*)malloc(sizeof(*appidStaticConfig)))) + if (NULL == (appidStaticConfig = (tAppidStaticConfig*)_dpd.snortAlloc(1, + sizeof(*appidStaticConfig), PP_APP_ID, PP_MEM_CATEGORY_CONFIG))) { _dpd.fatalMsg("AppID failed to allocate memory for the configuration\n"); } @@ -475,6 +559,8 @@ if (_dpd.streamAPI->service_event_subscribe(PP_CIP, CIP_EVENT_TYPE_CIP_DATA, CipSessionSnortCallback) == false) DynamicPreprocessorFatalMessage("failed to subscribe to CIP_EVENT_TYPE_CIP_DATA\n"); + + _dpd.registerSetTlsHostAppId(setTlsHost); appIdApiInit(_dpd.appIdApi); #ifdef SIDE_CHANNEL diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/spp_appid.h snort-2.9.20/src/dynamic-preprocessors/appid/spp_appid.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/spp_appid.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/spp_appid.h 2022-05-18 04:52:12.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_api.h snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_api.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_api.h 2022-05-18 04:52:13.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_types.h snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_types.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_types.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_types.h 2022-05-18 04:52:14.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_utils.c snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_utils.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_utils.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_utils.c 2022-05-18 04:52:15.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2015-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2015-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2011 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_utils.h snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_utils.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/thirdparty_appid_utils.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/thirdparty_appid_utils.h 2022-05-18 04:52:16.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/NetworkSet.c snort-2.9.20/src/dynamic-preprocessors/appid/util/NetworkSet.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/NetworkSet.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/NetworkSet.c 2022-05-18 04:52:23.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/NetworkSet.h snort-2.9.20/src/dynamic-preprocessors/appid/util/NetworkSet.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/NetworkSet.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/NetworkSet.h 2022-05-18 04:52:25.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/OutputFile.c snort-2.9.20/src/dynamic-preprocessors/appid/util/OutputFile.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/OutputFile.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/OutputFile.c 2022-05-18 04:52:26.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/OutputFile.h snort-2.9.20/src/dynamic-preprocessors/appid/util/OutputFile.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/OutputFile.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/OutputFile.h 2022-05-18 04:52:27.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/common_util.c snort-2.9.20/src/dynamic-preprocessors/appid/util/common_util.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/common_util.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/common_util.c 2022-05-18 04:52:17.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/common_util.h snort-2.9.20/src/dynamic-preprocessors/appid/util/common_util.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/common_util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/common_util.h 2022-05-18 04:52:18.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -51,6 +51,17 @@ #define MAX_LINE 2048 #define MAX_TOKS 256 +/* This structure should be same as struct define in util.h */ +typedef struct _ThrottleInfo +{ + time_t lastUpdate; + /*Within this duration (in seconds), maximal one distinct message is logged*/ + uint32_t duration_to_log; + uint64_t count; + /*Till the message count reaches to count_to_log, maximal one distinct message is logged*/ + uint64_t count_to_log; +}ThrottleInfo; + extern time_t packetTimeOffset; extern time_t packetTime; extern int packetTimeOffsetSet; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/fw_avltree.c snort-2.9.20/src/dynamic-preprocessors/appid/util/fw_avltree.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/fw_avltree.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/fw_avltree.c 2022-05-18 04:52:19.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/fw_avltree.h snort-2.9.20/src/dynamic-preprocessors/appid/util/fw_avltree.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/fw_avltree.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/fw_avltree.h 2022-05-18 04:52:20.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/ip_funcs.c snort-2.9.20/src/dynamic-preprocessors/appid/util/ip_funcs.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/ip_funcs.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/ip_funcs.c 2022-05-18 04:52:21.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/ip_funcs.h snort-2.9.20/src/dynamic-preprocessors/appid/util/ip_funcs.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/ip_funcs.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/ip_funcs.h 2022-05-18 04:52:22.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_mlmp.c snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_mlmp.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_mlmp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_mlmp.c 2022-05-18 04:52:28.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_mlmp.h snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_mlmp.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_mlmp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_mlmp.h 2022-05-18 04:52:29.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_multi_mpse.c snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_multi_mpse.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_multi_mpse.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_multi_mpse.c 2022-05-18 04:52:30.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_multi_mpse.h snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_multi_mpse.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sf_multi_mpse.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/sf_multi_mpse.h 2022-05-18 04:52:31.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sfutil.c snort-2.9.20/src/dynamic-preprocessors/appid/util/sfutil.c --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sfutil.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/sfutil.c 2022-05-18 04:52:34.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sfutil.h snort-2.9.20/src/dynamic-preprocessors/appid/util/sfutil.h --- snort-2.9.15.1/src/dynamic-preprocessors/appid/util/sfutil.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/appid/util/sfutil.h 2022-05-18 04:52:36.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/Makefile.am snort-2.9.20/src/dynamic-preprocessors/dcerpc2/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -74,6 +74,7 @@ EXTRA_DIST = \ +sf_dce2.vcxproj \ sf_dce2.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/Makefile.in snort-2.9.20/src/dynamic-preprocessors/dcerpc2/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -85,11 +95,11 @@ @BUILD_BUFFER_DUMP_TRUE@dcerpc2_buffer_dump.h subdir = src/dynamic-preprocessors/dcerpc2 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -177,7 +187,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -223,6 +233,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -268,6 +279,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -381,6 +393,7 @@ dce2_cl.h dce2_http.c dce2_http.h dce2_paf.c dce2_paf.h \ $(am__append_3) EXTRA_DIST = \ +sf_dce2.vcxproj \ sf_dce2.dsp all: all-am @@ -399,14 +412,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/dcerpc2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/dcerpc2/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -463,10 +475,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -562,7 +574,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -716,6 +731,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_cl.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_cl.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_cl.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_cl.c 2022-05-18 04:52:37.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_cl.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_cl.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_cl.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_cl.h 2022-05-18 04:52:38.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_co.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_co.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_co.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_co.c 2022-05-18 04:52:39.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_co.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_co.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_co.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_co.h 2022-05-18 04:52:40.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_config.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_config.c 2022-05-18 04:52:41.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_config.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_config.h 2022-05-18 04:52:42.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_debug.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_debug.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_debug.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_debug.c 2022-05-18 04:52:43.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_debug.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_debug.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_debug.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_debug.h 2022-05-18 04:52:44.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_event.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_event.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_event.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_event.c 2022-05-18 04:52:45.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_event.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_event.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_event.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_event.h 2022-05-18 04:52:46.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_http.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_http.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_http.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_http.c 2022-05-18 04:52:47.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_http.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_http.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_http.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_http.h 2022-05-18 04:52:48.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_list.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_list.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_list.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_list.c 2022-05-18 04:52:54.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_list.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_list.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_list.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_list.h 2022-05-18 04:52:55.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -76,10 +76,10 @@ DCE2_ListType type; DCE2_MemType mtype; uint32_t num_nodes; + int flags; DCE2_ListKeyCompare compare; DCE2_ListDataFree data_free; DCE2_ListKeyFree key_free; - int flags; struct _DCE2_ListNode *head; struct _DCE2_ListNode *tail; struct _DCE2_ListNode *current; @@ -141,10 +141,10 @@ DCE2_MemType mtype; DCE2_CQueueDataFree data_free; int size; + int cur_idx; void **queue; int head_idx; int tail_idx; - int cur_idx; } DCE2_CQueue; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_memory.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_memory.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_memory.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_memory.c 2022-05-18 04:52:56.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -30,6 +30,7 @@ #include "dce2_utils.h" #include "dce2_config.h" #include "dce2_event.h" +#include "memory_stats.h" #include #include #include @@ -444,6 +445,42 @@ return DCE2_MEMCAP_OK; } +uint32_t check_memory_category (DCE2_MemType mtype) +{ + switch (mtype) + { + case DCE2_MEM_TYPE__CONFIG: + case DCE2_MEM_TYPE__ROPTION: + return PP_MEM_CATEGORY_CONFIG; + case DCE2_MEM_TYPE__RT: + return PP_MEM_CATEGORY_MISC; + case DCE2_MEM_TYPE__INIT: + return PP_MEM_CATEGORY_CONFIG; + case DCE2_MEM_TYPE__SMB_SSN: + case DCE2_MEM_TYPE__SMB_SEG: + case DCE2_MEM_TYPE__SMB_UID: + case DCE2_MEM_TYPE__SMB_TID: + case DCE2_MEM_TYPE__SMB_FID: + case DCE2_MEM_TYPE__SMB_FILE: + case DCE2_MEM_TYPE__SMB_REQ: + case DCE2_MEM_TYPE__TCP_SSN: + case DCE2_MEM_TYPE__CO_SEG: + case DCE2_MEM_TYPE__CO_FRAG: + case DCE2_MEM_TYPE__CO_CTX: + case DCE2_MEM_TYPE__UDP_SSN: + case DCE2_MEM_TYPE__CL_ACT: + case DCE2_MEM_TYPE__CL_FRAG: + case DCE2_MEM_TYPE__HTTP_SSN: + return PP_MEM_CATEGORY_SESSION; + default: + DCE2_Log(DCE2_LOG_TYPE__ERROR, + "%s(%d) Invalid memory type: %d", + __FILE__, __LINE__, mtype); + return PP_MEM_MAX_CATEGORY; + } + +} + /******************************************************************** * Function: * @@ -461,7 +498,7 @@ if (DCE2_CheckMemcap(size, mtype) != DCE2_MEMCAP_OK) return NULL; - mem = calloc(1, (size_t)size); + mem = _dpd.snortAlloc(1, (size_t)size, PP_DCE2, check_memory_category(mtype)); if (mem == NULL) { DCE2_Die("%s(%d) Out of memory!", __FILE__, __LINE__); @@ -488,7 +525,8 @@ return; DCE2_UnRegMem(size, mtype); - free(mem); + + _dpd.snortFree(mem, (size_t)size, PP_DCE2, check_memory_category(mtype)); } /******************************************************************** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_memory.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_memory.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_memory.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_memory.h 2022-05-18 04:52:57.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_paf.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_paf.c 2022-05-18 04:52:58.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -142,7 +142,7 @@ { uint8_t type = (uint8_t)(nb_hdr >> 24); uint8_t bit = (uint8_t)((nb_hdr & 0x00ff0000) >> 16); - bool is_smb1 = ( SmbId(nt_hdr) == DCE2_SMB2_ID ) ? false : true; + uint32_t smb_id = nt_hdr ? SmbId(nt_hdr): 0; uint32_t nbs_hdr = 0; if (junk) @@ -168,17 +168,17 @@ /*The bit should be checked only for SMB1, because the length in NetBIOS header should not exceed 0x1FFFF. See [MS-SMB] 2.1 Transport * There is no such limit for SMB2 or SMB3 */ - if(is_smb1) + if (smb_id == DCE2_SMB_ID) { if ((bit != 0x00) && (bit != 0x01)) return false; } nbs_hdr = htonl(nb_hdr); - if(is_smb1) - *nb_len = NbssLen((const NbssHdr *)&nbs_hdr); - else + if(smb_id == DCE2_SMB2_ID) *nb_len = NbssLen2((const NbssHdr *)&nbs_hdr); + else + *nb_len = NbssLen((const NbssHdr *)&nbs_hdr); return true; } @@ -274,7 +274,10 @@ case DCE2_PAF_SMB_STATES__3: DCE2_SMB_PAF_SHIFT(ss->nb_hdr, data[n]); /*(data + n + 1) points to the SMB header protocol identifier (0xFF,'SMB' or 0xFE,'SMB'), which follows the NetBIOS header*/ - nt_hdr = (SmbNtHdr *)(data + n + 1); + if ( len >= (DCE2_SMB_ID_SIZE + n + 1)) + { + nt_hdr = (SmbNtHdr *)(data + n + 1); + } if (DCE2_PafSmbIsValidNetbiosHdr((uint32_t)ss->nb_hdr, false, nt_hdr, &nb_len)) { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_paf.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_paf.h 2022-05-18 04:53:00.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_roptions.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_roptions.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_roptions.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_roptions.c 2022-05-18 04:53:01.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_roptions.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_roptions.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_roptions.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_roptions.h 2022-05-18 04:53:02.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_session.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_session.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_session.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_session.h 2022-05-18 04:53:03.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb.c 2022-05-18 04:53:04.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -40,6 +40,8 @@ #include "smb.h" #include "sf_snort_packet.h" #include "sf_types.h" +#include "stream_api.h" +#include "session_api.h" #include "profiler.h" #include "snort_debug.h" #include "sf_dynamic_preprocessor.h" @@ -95,6 +97,8 @@ } DCE2_SmbComInfo; +unsigned smb_upload_ret_cb_id = 0; + // Inline accessor functions for DCE2_SmbComInfo static inline bool DCE2_ComInfoIsResponse(const DCE2_SmbComInfo *com_info) @@ -705,7 +709,7 @@ const uint16_t); static DCE2_SmbFileTracker * DCE2_SmbFindFileTracker(DCE2_SmbSsnData *, const uint16_t, const uint16_t, const uint16_t); -static void DCE2_SmbRemoveFileTracker(DCE2_SmbSsnData *, DCE2_SmbFileTracker *); +static DCE2_Ret DCE2_SmbRemoveFileTracker(DCE2_SmbSsnData *, DCE2_SmbFileTracker *); static inline void DCE2_SmbCleanFileTracker(DCE2_SmbFileTracker *); static inline void DCE2_SmbCleanTransactionTracker(DCE2_SmbTransactionTracker *); static inline void DCE2_SmbCleanRequestTracker(DCE2_SmbRequestTracker *); @@ -720,7 +724,7 @@ static inline void DCE2_Update_Ftracker_from_ReqTracker(DCE2_SmbFileTracker *ftracker, DCE2_SmbRequestTracker *cur_rtracker); static inline void DCE2_SmbResetFileChunks(DCE2_SmbFileTracker *); static inline void DCE2_SmbAbortFileAPI(DCE2_SmbSsnData *); -static inline void DCE2_SmbFinishFileAPI(DCE2_SmbSsnData *); +static inline DCE2_SmbRetransmitPending DCE2_SmbFinishFileAPI(DCE2_SmbSsnData *); static inline void DCE2_SmbSetNewFileAPIFileTracker(DCE2_SmbSsnData *); static int DCE2_SmbFileOffsetCompare(const void *, const void *); static void DCE2_SmbFileChunkFree(void *); @@ -898,6 +902,9 @@ memset(&smb_wcts, 0, sizeof(smb_wcts)); memset(&smb_bccs, 0, sizeof(smb_bccs)); + if (!smb_upload_ret_cb_id) + smb_upload_ret_cb_id = _dpd.streamAPI->register_event_handler(DCE2_Process_Retransmitted); + // Sets up the function to call for the command and valid word and byte // counts for the command. Ensuring valid word and byte counts is very // important to processing the command as it will assume the command is @@ -1816,6 +1823,7 @@ ssd->rtracker.mid = DCE2_SENTINEL; ssd->smbfound = false; ssd->max_file_depth = _dpd.fileAPI->get_max_file_depth(_dpd.getCurrentSnortConfig(), false); + ssd->smbretransmit = false; DCE2_ResetRopts(&ssd->sd.ropts); @@ -3442,6 +3450,10 @@ && (ssd->cur_rtracker->writeraw_remaining != 0)) return; break; + /*This is to handle packet that got verdict as pending & will be put in retry queue */ + case SMB_COM_CLOSE: + if (status == DCE2_RET__NOT_INSPECTED) + return; default: break; } @@ -4087,7 +4099,7 @@ } else { - DCE2_SmbRemoveFileTracker(ssd, ssd->cur_rtracker->ftracker); + return DCE2_SmbRemoveFileTracker(ssd, ssd->cur_rtracker->ftracker); } return DCE2_RET__SUCCESS; @@ -8234,12 +8246,12 @@ * Returns: * ********************************************************************/ -static void DCE2_SmbRemoveFileTracker(DCE2_SmbSsnData *ssd, DCE2_SmbFileTracker *ftracker) +static DCE2_Ret DCE2_SmbRemoveFileTracker(DCE2_SmbSsnData *ssd, DCE2_SmbFileTracker *ftracker) { PROFILE_VARS; if (ftracker == NULL) - return; + return DCE2_RET__ERROR; PREPROC_PROFILE_START(dce2_pstat_smb_fid); @@ -8247,7 +8259,19 @@ "Removing file tracker with Fid: 0x%04X\n", ftracker->fid_v1)); if (ssd->fapi_ftracker == ftracker) - DCE2_SmbFinishFileAPI(ssd); + { + /* If the finish API returns pending set , we return from here + * with not inspected and do not remove the file & request + * trackers for upcoming retry packet. + */ + + DCE2_SmbRetransmitPending flag = DCE2_SmbFinishFileAPI(ssd); + if (flag == DCE2_SMB_RETRANSMIT_PENDING__SET) + { + PREPROC_PROFILE_END(dce2_pstat_smb_fid); + return DCE2_RET__NOT_INSPECTED; + } + } #ifdef ACTIVE_RESPONSE if (ssd->fb_ftracker == ftracker) @@ -8262,6 +8286,7 @@ DCE2_SmbRemoveFileTrackerFromRequestTrackers(ssd, ftracker); PREPROC_PROFILE_END(dce2_pstat_smb_fid); + return DCE2_RET__SUCCESS; } /******************************************************************** @@ -9462,7 +9487,7 @@ SmbNtHdr *smb_hdr = (SmbNtHdr *)((uint8_t *)nb_hdr + sizeof(*nb_hdr)); SmbDeleteReq *del_req = (SmbDeleteReq *)((uint8_t *)smb_hdr + sizeof(*smb_hdr)); uint8_t *del_req_fmt = (uint8_t *)del_req + sizeof(*del_req); - uint16_t smb_flg2 = 0x4001; + uint16_t smb_flg2 = 0xc843; uint16_t search_attrs = 0x0006; memset(dce2_smb_delete_pdu, 0, sizeof(dce2_smb_delete_pdu)); @@ -9500,9 +9525,11 @@ smb_hdr->smb_tid = SmbHtons(&ftracker->tid_v1); smb_hdr->smb_uid = SmbHtons(&ftracker->uid_v1); del_req->smb_bcc = 1 + file_name_len; - memcpy(del_filename, ftracker->file_name, file_name_len); - - _dpd.activeInjectData((void *)ssd->sd.wire_pkt, 0, (uint8_t *)nb_hdr, len); + if (SmbUnicode(smb_hdr)) + memcpy(del_filename, ftracker->file_name + UTF_16_LE_BOM_LEN, file_name_len - UTF_16_LE_BOM_LEN); + else + memcpy(del_filename, ftracker->file_name, file_name_len); + _dpd.activeInjectData((void *)ssd->sd.wire_pkt, 0, (uint8_t *)nb_hdr, len); } static void DCE2_SmbFinishFileBlockVerdict(DCE2_SmbSsnData *ssd) @@ -9549,7 +9576,7 @@ } #endif -static inline void DCE2_SmbFinishFileAPI(DCE2_SmbSsnData *ssd) +static inline DCE2_SmbRetransmitPending DCE2_SmbFinishFileAPI(DCE2_SmbSsnData *ssd) { void *ssnptr = ssd->sd.wire_pkt->stream_session; void *p = (void *)ssd->sd.wire_pkt; @@ -9558,12 +9585,38 @@ PROFILE_VARS; if (ftracker == NULL) - return; + return DCE2_SMB_RETRANSMIT_PENDING__UNSET; PREPROC_PROFILE_START(dce2_pstat_smb_file); upload = _dpd.fileAPI->get_file_direction(ssnptr); + /*This is a case of retrasmitted packet in upload sceanrio with Pending verdict*/ + if ((ssd->smbretransmit)) + { + ssd->smbretransmit = false; + _dpd.fileAPI->file_signature_lookup(p, true); + File_Verdict verdict = _dpd.fileAPI->get_file_verdict(ssnptr); + if ((verdict == FILE_VERDICT_BLOCK) || (verdict == FILE_VERDICT_REJECT)) + { + ssd->fb_ftracker = ftracker; + ssd->fapi_ftracker = NULL; + PREPROC_PROFILE_END(dce2_pstat_smb_file); + return DCE2_SMB_RETRANSMIT_PENDING__UNSET; + } + else if (verdict == FILE_VERDICT_PENDING) + { + PREPROC_PROFILE_END(dce2_pstat_smb_file_api); + return DCE2_SMB_RETRANSMIT_PENDING__SET; + } + else /*if we get some other verdict , clean up*/ + { + ssd->fapi_ftracker = NULL; + PREPROC_PROFILE_END(dce2_pstat_smb_file); + return DCE2_SMB_RETRANSMIT_PENDING__UNSET; + } + } + if (_dpd.fileAPI->get_file_processed_size(ssnptr) != 0) { // Never knew the size of the file so never knew when to tell the @@ -9585,6 +9638,13 @@ if ((verdict == FILE_VERDICT_BLOCK) || (verdict == FILE_VERDICT_REJECT)) ssd->fb_ftracker = ftracker; + + else if ((verdict == FILE_VERDICT_PENDING) && (smb_upload_ret_cb_id != 0)) + { + _dpd.streamAPI->set_event_handler(ssnptr, smb_upload_ret_cb_id, SE_REXMIT); + PREPROC_PROFILE_END(dce2_pstat_smb_file_api); + return DCE2_SMB_RETRANSMIT_PENDING__SET; + } } } #else @@ -9600,6 +9660,7 @@ ssd->fapi_ftracker = NULL; PREPROC_PROFILE_END(dce2_pstat_smb_file); + return DCE2_SMB_RETRANSMIT_PENDING__UNSET; } static inline bool DCE2_SmbIsVerdictSuspend(bool upload, FilePosition position) @@ -10115,3 +10176,15 @@ cur_rtracker->file_name_len = 0; return; } + +void DCE2_Process_Retransmitted(SFSnortPacket *p) +{ + DCE2_SsnData *sd = (DCE2_SsnData *)DCE2_SsnGetAppData(p); + if (sd != NULL) + { + sd->wire_pkt = p; + DCE2_SmbSsnData *ssd = (DCE2_SmbSsnData *)sd; + ssd->smbretransmit = true; + DCE2_SmbRemoveFileTracker(ssd, &(ssd->ftracker)); + } +} diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb.h 2022-05-18 04:53:05.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -46,6 +46,7 @@ // instead of a string compare. #define DCE2_SMB_ID 0xff534d42 /* \xffSMB */ #define DCE2_SMB2_ID 0xfe534d42 /* \xfeSMB */ +#define DCE2_SMB_ID_SIZE 4 // MS-FSCC Section 2.1.5 - Pathname #define DCE2_SMB_MAX_PATH_LEN 32760 @@ -97,6 +98,14 @@ } DCE2_SmbFileDirection; +/* This structure is to maintain that we have received a pending veridct in case of upload & we will not delete the trackers*/ +typedef enum _DCE2_SmbRetransmitPending +{ + DCE2_SMB_RETRANSMIT_PENDING__UNSET = 0, + DCE2_SMB_RETRANSMIT_PENDING__SET + +} DCE2_SmbRetransmitPending; + /******************************************************************** * Structures ********************************************************************/ @@ -135,8 +144,8 @@ bool is_ipc; bool is_smb2; - uint8_t *file_name; uint16_t file_name_len; + uint8_t *file_name; union { struct @@ -245,6 +254,7 @@ // For WriteRaw bool writeraw_writethrough; uint32_t writeraw_remaining; + uint16_t file_name_len; // For Transaction/Transaction2/NtTransact DCE2_SmbTransactionTracker ttracker; @@ -259,7 +269,6 @@ // Used for requests to cache data that will ultimately end up in // the file tracker upon response. uint8_t *file_name; - uint16_t file_name_len; uint64_t file_size; uint64_t file_offset; bool sequential_only; @@ -295,8 +304,6 @@ // For tracking requests / responses DCE2_SmbRequestTracker rtracker; DCE2_Queue *rtrackers; - uint16_t max_outstanding_requests; - uint16_t outstanding_requests; // The current pid/mid node for this request/response DCE2_SmbRequestTracker *cur_rtracker; @@ -321,6 +328,9 @@ #endif bool smbfound; + bool smbretransmit; + uint16_t max_outstanding_requests; + uint16_t outstanding_requests; // Maximum file depth as returned from file API int64_t max_file_depth; @@ -356,7 +366,7 @@ #ifdef ACTIVE_RESPONSE void DCE2_SmbInitDeletePdu(void); #endif - +void DCE2_Process_Retransmitted(SFSnortPacket *); /********************************************************************* * Function: DCE2_SmbAutodetect() * diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb2.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb2.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb2.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb2.c 2022-05-18 04:53:06.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb2.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb2.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_smb2.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_smb2.h 2022-05-18 04:53:07.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_stats.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_stats.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_stats.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_stats.c 2022-05-18 04:53:08.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_stats.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_stats.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_stats.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_stats.h 2022-05-18 04:53:09.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -34,6 +34,7 @@ typedef struct _DCE2_Stats { uint64_t sessions; + uint64_t sessions_active; uint64_t sessions_autodetected; uint64_t sessions_aborted; uint64_t bad_autodetects; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_tcp.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_tcp.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_tcp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_tcp.c 2022-05-18 04:53:10.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_tcp.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_tcp.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_tcp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_tcp.h 2022-05-18 04:53:11.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_udp.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_udp.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_udp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_udp.c 2022-05-18 04:53:13.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_udp.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_udp.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_udp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_udp.h 2022-05-18 04:53:14.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_utils.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_utils.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_utils.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_utils.c 2022-05-18 04:53:15.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_utils.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_utils.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dce2_utils.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dce2_utils.h 2022-05-18 04:53:16.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.c 2022-05-18 04:53:17.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/dcerpc2_buffer_dump.h 2022-05-18 04:53:18.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/includes/dcerpc.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/includes/dcerpc.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/includes/dcerpc.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/includes/dcerpc.h 2022-05-18 04:53:19.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/includes/smb.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/includes/smb.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/includes/smb.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/includes/smb.h 2022-05-18 04:53:20.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj snort-2.9.20/src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/sf_dce2.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,343 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {30A90482-54E5-49E1-8FD3-4AB70F049D07} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + .\includes;..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + true + .\Release\sf_dce2.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_dce2.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_dce2.bsc + + + true + true + Console + .\Release\sf_dce2.dll + .\Release\sf_dce2.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + .\includes;..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + true + .\Release\sf_dce2.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_dce2.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_dce2.bsc + + + true + true + Console + .\Release\sf_dce2.dll + .\Release\sf_dce2.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + .\includes;..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + true + .\Debug\sf_dce2.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_dce2.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_dce2.bsc + + + true + true + true + Console + .\Debug\sf_dce2.dll + .\Debug\sf_dce2.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + .\includes;..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + true + .\Debug\sf_dce2.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_dce2.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_dce2.bsc + + + true + true + true + Console + .\Debug\sf_dce2.dll + .\Debug\sf_dce2.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/snort_dce2.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/snort_dce2.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/snort_dce2.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/snort_dce2.c 2022-05-18 04:53:21.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -160,6 +160,7 @@ #endif dce2_stats.sessions++; + dce2_stats.sessions_active++; DEBUG_WRAP(DCE2_DebugMsg(DCE2_DEBUG__MAIN, "Created (%p)\n", (void *)sd)); sd->trans = trans; @@ -1350,5 +1351,6 @@ } } #endif + dce2_stats.sessions_active--; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/snort_dce2.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/snort_dce2.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/snort_dce2.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/snort_dce2.h 2022-05-18 04:53:22.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/spp_dce2.c snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/spp_dce2.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c 2022-05-18 04:53:23.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -27,6 +27,7 @@ #include #include +#include #include "sf_types.h" #include "spp_dce2.h" @@ -167,6 +168,7 @@ static bool dce2_ada_was_enabled = false; static bool dce2_ada_is_enabled = false; #endif +int dce_print_mem_stats(FILE *, char *, PreprocMemInfo *); /******************************************************************** * Function: DCE2_RegisterPreprocessor() @@ -193,7 +195,7 @@ #ifdef DUMP_BUFFER _dpd.registerBufferTracer(getDCERPC2Buffers, DCERPC2_BUFFER_DUMP_FUNC); #endif - + _dpd.registerMemoryStatsFunc(PP_DCE2, dce_print_mem_stats); } /********************************************************************* @@ -579,6 +581,7 @@ _dpd.logMsg("dcerpc2 Preprocessor Statistics\n"); _dpd.logMsg(" Total sessions: "STDu64"\n", dce2_stats.sessions); + _dpd.logMsg(" Active sessions: "STDu64"\n", dce2_stats.sessions_active); if (dce2_stats.sessions > 0) { if (dce2_stats.sessions_autodetected > 0) @@ -724,7 +727,6 @@ } } -#ifdef DEBUG_MSGS _dpd.logMsg(" Memory stats (bytes)\n"); _dpd.logMsg(" Current total: %u\n", dce2_memory.smb_total); _dpd.logMsg(" Maximum total: %u\n", dce2_memory.smb_total_max); @@ -742,7 +744,6 @@ _dpd.logMsg(" Maximum file tracking: %u\n", dce2_memory.smb_file_max); _dpd.logMsg(" Current request tracking: %u\n", dce2_memory.smb_req); _dpd.logMsg(" Maximum request tracking: %u\n", dce2_memory.smb_req_max); -#endif /* SMB2 stats */ if (!exiting) { @@ -768,13 +769,11 @@ _dpd.logMsg(" Total sessions: "STDu64"\n", dce2_stats.tcp_sessions); _dpd.logMsg(" Packet stats\n"); _dpd.logMsg(" Packets: "STDu64"\n", dce2_stats.tcp_pkts); -#ifdef DEBUG_MSGS _dpd.logMsg(" Memory stats (bytes)\n"); _dpd.logMsg(" Current total: %u\n", dce2_memory.tcp_total); _dpd.logMsg(" Maximum total: %u\n", dce2_memory.tcp_total_max); _dpd.logMsg(" Current session data: %u\n", dce2_memory.tcp_ssn); _dpd.logMsg(" Maximum session data: %u\n", dce2_memory.tcp_ssn_max); -#endif } if (dce2_stats.udp_sessions > 0) @@ -783,13 +782,11 @@ _dpd.logMsg(" Total sessions: "STDu64"\n", dce2_stats.udp_sessions); _dpd.logMsg(" Packet stats\n"); _dpd.logMsg(" Packets: "STDu64"\n", dce2_stats.udp_pkts); -#ifdef DEBUG_MSGS _dpd.logMsg(" Memory stats (bytes)\n"); _dpd.logMsg(" Current total: %u\n", dce2_memory.udp_total); _dpd.logMsg(" Maximum total: %u\n", dce2_memory.udp_total_max); _dpd.logMsg(" Current session data: %u\n", dce2_memory.udp_ssn); _dpd.logMsg(" Maximum session data: %u\n", dce2_memory.udp_ssn_max); -#endif } if ((dce2_stats.http_server_sessions > 0) || (dce2_stats.http_proxy_sessions > 0)) @@ -804,13 +801,11 @@ _dpd.logMsg(" Server packets: "STDu64"\n", dce2_stats.http_server_pkts); if (dce2_stats.http_proxy_sessions > 0) _dpd.logMsg(" Proxy packets: "STDu64"\n", dce2_stats.http_proxy_pkts); -#ifdef DEBUG_MSGS _dpd.logMsg(" Memory stats (bytes)\n"); _dpd.logMsg(" Current total: %u\n", dce2_memory.http_total); _dpd.logMsg(" Maximum total: %u\n", dce2_memory.http_total_max); _dpd.logMsg(" Current session data: %u\n", dce2_memory.http_ssn); _dpd.logMsg(" Maximum session data: %u\n", dce2_memory.http_ssn_max); -#endif } if ((dce2_stats.co_pdus > 0) || (dce2_stats.cl_pkts > 0)) @@ -875,7 +870,6 @@ dce2_stats.co_cli_seg_reassembled); _dpd.logMsg(" Server PDU segmented reassembled: "STDu64"\n", dce2_stats.co_srv_seg_reassembled); -#ifdef DEBUG_MSGS _dpd.logMsg(" Memory stats (bytes)\n"); _dpd.logMsg(" Current segmentation buffering: %u\n", dce2_memory.co_seg); _dpd.logMsg(" Maximum segmentation buffering: %u\n", dce2_memory.co_seg_max); @@ -883,7 +877,6 @@ _dpd.logMsg(" Maximum fragment tracker: %u\n", dce2_memory.co_frag_max); _dpd.logMsg(" Current context tracking: %u\n", dce2_memory.co_ctx); _dpd.logMsg(" Maximum context tracking: %u\n", dce2_memory.co_ctx_max); -#endif } if (dce2_stats.cl_pkts > 0) @@ -925,13 +918,11 @@ _dpd.logMsg(" Reassembled: "STDu64"\n", dce2_stats.cl_frag_reassembled); if (dce2_stats.cl_max_seqnum > 0) _dpd.logMsg(" Max seq num: "STDu64"\n", dce2_stats.cl_max_seqnum); -#ifdef DEBUG_MSGS _dpd.logMsg(" Memory stats (bytes)\n"); _dpd.logMsg(" Current activity tracker: %u\n", dce2_memory.cl_act); _dpd.logMsg(" Maximum activity tracker: %u\n", dce2_memory.cl_act_max); _dpd.logMsg(" Current fragment tracker: %u\n", dce2_memory.cl_frag); _dpd.logMsg(" Maximum fragment tracker: %u\n", dce2_memory.cl_frag_max); -#endif } } } @@ -941,7 +932,6 @@ if (exiting) DCE2_StatsFree(); -#ifdef DEBUG_MSGS _dpd.logMsg("\n"); _dpd.logMsg(" Memory stats (bytes)\n"); _dpd.logMsg(" Current total: %u\n", dce2_memory.total); @@ -956,7 +946,191 @@ _dpd.logMsg(" Maximum routing table total: %u\n", dce2_memory.rt_max); _dpd.logMsg(" Current initialization total: %u\n", dce2_memory.init); _dpd.logMsg(" Maximum initialization total: %u\n", dce2_memory.init_max); -#endif +} + +uint32_t dce_total_memcap(void) +{ + DCE2_Config *pDefaultPolicyConfig = NULL; + if (dce2_config) + { + pDefaultPolicyConfig = (DCE2_Config *)sfPolicyUserDataGetDefault(dce2_config); + return pDefaultPolicyConfig->gconfig->memcap; + } + return 0; +} + +uint32_t dce_free_total_memcap(void) +{ + if (dce2_config) + { + return dce_total_memcap() - dce2_memory.total; + } + return 0; +} + +int dce_print_mem_stats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time = time(NULL); + int len = 0; + size_t total_heap_memory = meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + + meminfo[PP_MEM_CATEGORY_MISC].used_memory; + if (fd) + { + len = fprintf(fd, ","STDu64","STDu64","STDu64"" + ",%u,%u,%u,%u" + ","STDu64",%u,%u,%u,%u" + ","STDu64",%u,%u,%u,%u" + ","STDu64","STDu64",%u,%u,%u,%u" + ",%lu,%u,%u" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu" + , dce2_stats.sessions + , dce2_stats.sessions_active + , dce2_stats.smb_sessions + , dce2_memory.smb_total + , dce2_memory.smb_total_max + , dce2_memory.smb_ssn + , dce2_memory.smb_ssn_max + , dce2_stats.tcp_sessions + , dce2_memory.tcp_total + , dce2_memory.tcp_total_max + , dce2_memory.tcp_ssn + , dce2_memory.tcp_ssn_max + , dce2_stats.udp_sessions + , dce2_memory.udp_total + , dce2_memory.udp_total_max + , dce2_memory.udp_ssn + , dce2_memory.udp_ssn_max + , dce2_stats.http_server_sessions + , dce2_stats.http_proxy_sessions + , dce2_memory.http_total + , dce2_memory.http_total_max + , dce2_memory.http_ssn + , dce2_memory.http_ssn_max + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_MISC].used_memory + , meminfo[PP_MEM_CATEGORY_MISC].num_of_alloc + , meminfo[PP_MEM_CATEGORY_MISC].num_of_free + , total_heap_memory); + return len; + } + + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics for DCE at: %s\n" + "dcerpc2 Preprocessor Statistics:\n" + " Total sessions : "STDu64"\n" + " Active sessions : "STDu64"\n" + " Total SMB sessions : "STDu64"\n" + " Total TCP sessions : "STDu64"\n" + " Total UDP sessions : "STDu64"\n" + " Total HTTP server sessions : "STDu64"\n" + " Total HTTP proxy sessions : "STDu64"\n" + "\nTotal Memory stats :\n" + " Current memory : %u\n" + " Maximum memory : %u\n" + " Total memcap : %u\n" + " Free memory : %u\n" + "\nSMB Memory stats :\n" + " Current memory : %u\n" + " Maximum memory : %u\n" + " Current session data : %u\n" + " Maximum session data : %u\n" + " Current segmentation buffering : %u\n" + " Maximum segmentation buffering : %u\n" + "\nTCP Memory stats :\n" + " Current memory : %u\n" + " Maximum memory : %u\n" + " Current session data : %u\n" + " Maximum session data : %u\n" + "\nUDP Memory stats :\n" + " Current memory : %u\n" + " Maximum memory : %u\n" + " Current session data : %u\n" + " Maximum session data : %u\n" + "\nHTTP Memory stats :\n" + " Current memory : %u\n" + " Maximum memory : %u\n" + " Current session data : %u\n" + " Maximum session data : %u\n" + , ctime(&curr_time) + , dce2_stats.sessions + , dce2_stats.sessions_active + , dce2_stats.smb_sessions + , dce2_stats.tcp_sessions + , dce2_stats.udp_sessions + , dce2_stats.http_server_sessions + , dce2_stats.http_proxy_sessions + , dce2_memory.total + , dce2_memory.total_max + , dce_total_memcap() + , dce_free_total_memcap() + , dce2_memory.smb_total + , dce2_memory.smb_total_max + , dce2_memory.smb_ssn + , dce2_memory.smb_ssn_max + , dce2_memory.smb_seg + , dce2_memory.smb_seg_max + , dce2_memory.tcp_total + , dce2_memory.tcp_total_max + , dce2_memory.tcp_ssn + , dce2_memory.tcp_ssn_max + , dce2_memory.udp_total + , dce2_memory.udp_total_max + , dce2_memory.udp_ssn + , dce2_memory.udp_ssn_max + , dce2_memory.http_total + , dce2_memory.http_total_max + , dce2_memory.http_ssn + , dce2_memory.http_ssn_max); + } + else + { + _dpd.logMsg("\n"); + _dpd.logMsg("Memory Statistics of DCE at: %s\n",ctime(&curr_time)); + _dpd.logMsg("dcerpc2 Preprocessor Statistics:\n"); + _dpd.logMsg(" Total sessions : "STDu64"\n", dce2_stats.sessions); + _dpd.logMsg(" Active sessions : "STDu64"\n", dce2_stats.sessions_active); + _dpd.logMsg(" Total SMB sessions : "STDu64"\n", dce2_stats.smb_sessions); + _dpd.logMsg(" Total TCP sessions : "STDu64"\n", dce2_stats.tcp_sessions); + _dpd.logMsg(" Total UDP sessions : "STDu64"\n", dce2_stats.udp_sessions); + _dpd.logMsg(" Total HTTP server sessions : "STDu64"\n", dce2_stats.http_server_sessions); + _dpd.logMsg(" Total HTTP proxy sessions : "STDu64"\n", dce2_stats.http_proxy_sessions); + _dpd.logMsg("Total Memory stats :\n"); + _dpd.logMsg(" Current total : %u\n", dce2_memory.total); + _dpd.logMsg(" Maximum total : %u\n", dce2_memory.total_max); + _dpd.logMsg(" Total memcap : %u\n", dce_total_memcap()); + _dpd.logMsg(" Free total : %u\n", dce_free_total_memcap()); + _dpd.logMsg("SMB Memory stats :\n"); + _dpd.logMsg(" Current total : %u\n", dce2_memory.smb_total); + _dpd.logMsg(" Maximum total : %u\n", dce2_memory.smb_total_max); + _dpd.logMsg(" Current session data : %u\n", dce2_memory.smb_ssn); + _dpd.logMsg(" Maximum session data : %u\n", dce2_memory.smb_ssn_max); + _dpd.logMsg(" Current segmentation buffer : %u\n", dce2_memory.smb_seg); + _dpd.logMsg(" Maximum segmentation buffer : %u\n", dce2_memory.smb_seg_max); + _dpd.logMsg("TCP Memory stats :\n"); + _dpd.logMsg(" Current total : %u\n", dce2_memory.tcp_total); + _dpd.logMsg(" Maximum total : %u\n", dce2_memory.tcp_total_max); + _dpd.logMsg(" Current session data : %u\n", dce2_memory.tcp_ssn); + _dpd.logMsg(" Maximum session data : %u\n", dce2_memory.tcp_ssn_max); + _dpd.logMsg("UDP Memory stats :\n"); + _dpd.logMsg(" Current total : %u\n", dce2_memory.udp_total); + _dpd.logMsg(" Maximum total : %u\n", dce2_memory.udp_total_max); + _dpd.logMsg(" Current session data : %u\n", dce2_memory.udp_ssn); + _dpd.logMsg(" Maximum session data : %u\n", dce2_memory.udp_ssn_max); + _dpd.logMsg("HTTP Memory stats :\n"); + _dpd.logMsg(" Current total : %u\n", dce2_memory.http_total); + _dpd.logMsg(" Maximum total : %u\n", dce2_memory.http_total_max); + _dpd.logMsg(" Current session data : %u\n", dce2_memory.http_ssn); + _dpd.logMsg(" Maximum session data : %u\n", dce2_memory.http_ssn_max); + } + return len; } /****************************************************************** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/spp_dce2.h snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.h --- snort-2.9.15.1/src/dynamic-preprocessors/dcerpc2/spp_dce2.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.h 2022-05-18 04:53:24.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/Makefile.am snort-2.9.20/src/dynamic-preprocessors/dnp3/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -44,6 +44,7 @@ EXTRA_DIST = \ +sf_dnp3.vcxproj \ sf_dnp3.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/Makefile.in snort-2.9.20/src/dynamic-preprocessors/dnp3/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -85,11 +95,11 @@ @BUILD_BUFFER_DUMP_TRUE@dnp3_buffer_dump.h subdir = src/dynamic-preprocessors/dnp3 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -168,7 +178,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -214,6 +224,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -259,6 +270,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -367,6 +379,7 @@ dnp3_paf.h dnp3_reassembly.c dnp3_reassembly.h dnp3_roptions.c \ dnp3_roptions.h dnp3_map.c dnp3_map.h $(am__append_3) EXTRA_DIST = \ +sf_dnp3.vcxproj \ sf_dnp3.dsp all: all-am @@ -385,14 +398,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/dnp3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/dnp3/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -449,10 +461,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -545,7 +557,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -699,6 +714,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.c 2022-05-18 04:53:25.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_buffer_dump.h 2022-05-18 04:53:26.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_map.c snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_map.c --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_map.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_map.c 2022-05-18 04:53:28.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_map.h snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_map.h --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_map.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_map.h 2022-05-18 04:53:29.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_paf.c snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_paf.c 2022-05-18 04:53:30.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_paf.h snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_paf.h 2022-05-18 04:53:31.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_reassembly.c snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_reassembly.c --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_reassembly.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_reassembly.c 2022-05-18 04:53:32.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_reassembly.h snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_reassembly.h --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_reassembly.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_reassembly.h 2022-05-18 04:53:33.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_roptions.c snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_roptions.c --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_roptions.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_roptions.c 2022-05-18 04:53:34.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_roptions.h snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_roptions.h --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/dnp3_roptions.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/dnp3_roptions.h 2022-05-18 04:53:35.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj snort-2.9.20/src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/sf_dnp3.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,312 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {682D5F1B-D537-43F5-8D3E-90FD4926019E} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_dnp3.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_dnp3.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_dnp3.bsc + + + true + true + true + Console + .\Debug\sf_dnp3.dll + .\Debug\sf_dnp3.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_dnp3.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_dnp3.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_dnp3.bsc + + + true + true + true + Console + .\Debug\sf_dnp3.dll + .\Debug\sf_dnp3.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_dnp3.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_dnp3.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_dnp3.bsc + + + true + true + Console + .\Release\sf_dnp3.dll + .\Release\sf_dnp3.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_dnp3.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_dnp3.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_dnp3.bsc + + + true + true + Console + .\Release\sf_dnp3.dll + .\Release\sf_dnp3.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/spp_dnp3.c snort-2.9.20/src/dynamic-preprocessors/dnp3/spp_dnp3.c --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/spp_dnp3.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/spp_dnp3.c 2022-05-18 04:53:36.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dnp3/spp_dnp3.h snort-2.9.20/src/dynamic-preprocessors/dnp3/spp_dnp3.h --- snort-2.9.15.1/src/dynamic-preprocessors/dnp3/spp_dnp3.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dnp3/spp_dnp3.h 2022-05-18 04:53:37.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dns/Makefile.am snort-2.9.20/src/dynamic-preprocessors/dns/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/dns/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dns/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -27,6 +27,7 @@ endif EXTRA_DIST = \ +sf_dns.vcxproj \ sf_dns.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dns/Makefile.in snort-2.9.20/src/dynamic-preprocessors/dns/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/dns/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dns/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@dns_buffer_dump.h subdir = src/dynamic-preprocessors/dns -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -154,7 +164,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -200,6 +210,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -245,6 +256,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -345,6 +357,7 @@ libsf_dns_preproc_la_SOURCES = spp_dns.c spp_dns.h $(am__append_1) EXTRA_DIST = \ +sf_dns.vcxproj \ sf_dns.dsp all: all-am @@ -363,14 +376,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/dns/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/dns/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -427,10 +439,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -499,7 +511,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -653,6 +668,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dns/dns_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/dns/dns_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/dns/dns_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dns/dns_buffer_dump.c 2022-05-18 04:53:38.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dns/dns_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/dns/dns_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/dns/dns_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dns/dns_buffer_dump.h 2022-05-18 04:53:40.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dns/sf_dns.vcxproj snort-2.9.20/src/dynamic-preprocessors/dns/sf_dns.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/dns/sf_dns.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dns/sf_dns.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,298 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {A3CA91AD-6A00-4A8E-978D-17BC7DBC6117} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_dns.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_dns.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_dns.bsc + + + true + true + Console + .\Release\sf_dns.dll + .\Release\sf_dns.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_dns.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_dns.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_dns.bsc + + + true + true + Console + .\Release\sf_dns.dll + .\Release\sf_dns.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_dns.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_dns.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_dns.bsc + + + true + true + true + Console + .\Debug\sf_dns.dll + .\Debug\sf_dns.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_dns.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_dns.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_dns.bsc + + + true + true + true + Console + .\Debug\sf_dns.dll + .\Debug\sf_dns.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dns/spp_dns.c snort-2.9.20/src/dynamic-preprocessors/dns/spp_dns.c --- snort-2.9.15.1/src/dynamic-preprocessors/dns/spp_dns.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dns/spp_dns.c 2022-05-18 04:53:41.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** @@ -58,6 +58,7 @@ #endif #include #include +#include #include "profiler.h" #ifdef PERF_PROFILING @@ -109,6 +110,7 @@ static void DNSFreeConfig(tSfPolicyUserContextId config); static int DNSCheckConfig(struct _SnortConfig *); static void DNSCleanExit(int, void *); +int dns_print_mem_stats(FILE *fd, char* buffer, PreprocMemInfo *meminfo); /* Ultimately calls SnortEventqAdd */ /* Arguments are: gid, sid, rev, classification, priority, message, rule_info */ @@ -155,6 +157,7 @@ #ifdef DUMP_BUFFER _dpd.registerBufferTracer(getDNSBuffers, DNS_BUFFER_DUMP_FUNC); #endif + _dpd.registerMemoryStatsFunc(PP_DNS, dns_print_mem_stats); } #ifdef REG_TEST @@ -229,7 +232,8 @@ "be configured once.\n", *(_dpd.config_file), *(_dpd.config_line)); } - pPolicyConfig = (DNSConfig *)calloc(1, sizeof(DNSConfig)); + pPolicyConfig = (DNSConfig *)_dpd.snortAlloc(1, sizeof(DNSConfig), + PP_DNS, PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { DynamicPreprocessorFatalMessage("Could not allocate memory for " @@ -405,6 +409,46 @@ _dpd.logMsg("\n"); } +int dns_print_mem_stats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time = time(NULL); + int len = 0; + size_t total_heap_memory = meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory; + if (fd) + { + len = fprintf(fd, ",%lu,%u,%u,%lu,%u,%u,%lu" + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , total_heap_memory); + return len; + } + if (buffer) + { + /* + * No stats apart from the one by the Infra + */ + len = snprintf(buffer, CS_STATS_BUF_SIZE, + "\n\nMemory Statistics for DNS at: %s\n" + "DNS Preprocessor Statistics:\n" + , ctime(&curr_time)); + } + else + { + /* + * No stats apart from the one by the Infra + */ + _dpd.logMsg("\n"); + _dpd.logMsg("Memory Statistics of DNS at: %s\n", + ctime(&curr_time)); + } + return len; +} + /* Retrieves the DNS data block registered with the stream * session associated w/ the current packet. If none exists, * allocates it and registers it with the stream API. @@ -460,7 +504,8 @@ return NULL; } - dnsSessionData = calloc( 1, sizeof( DNSSessionData )); + dnsSessionData = _dpd.snortAlloc(1, sizeof(DNSSessionData), + PP_DNS, PP_MEM_CATEGORY_SESSION); if ( !dnsSessionData ) return NULL; @@ -488,7 +533,8 @@ DNSSessionData* dnsSessionData = (DNSSessionData*)application_data; if ( dnsSessionData ) { - free( dnsSessionData ); + _dpd.snortFree(dnsSessionData, sizeof(DNSSessionData), + PP_DNS, PP_MEM_CATEGORY_SESSION); } } @@ -1687,7 +1733,8 @@ //do any housekeeping before freeing DnsConfig sfPolicyUserDataClear (config, policyId); - free(pPolicyConfig); + _dpd.snortFree(pPolicyConfig, sizeof(DNSConfig), + PP_DNS, PP_MEM_CATEGORY_CONFIG); return 0; } @@ -1767,7 +1814,8 @@ "be configured once.\n", *(_dpd.config_file), *(_dpd.config_line)); } - pPolicyConfig = (DNSConfig *)calloc(1,sizeof(DNSConfig)); + pPolicyConfig = (DNSConfig *)_dpd.snortAlloc(1, sizeof(DNSConfig), + PP_DNS, PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { DynamicPreprocessorFatalMessage("Could not allocate memory for " diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dns/spp_dns.h snort-2.9.20/src/dynamic-preprocessors/dns/spp_dns.h --- snort-2.9.15.1/src/dynamic-preprocessors/dns/spp_dns.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dns/spp_dns.h 2022-05-18 04:53:42.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/dynamic_preprocessors.vcxproj snort-2.9.20/src/dynamic-preprocessors/dynamic_preprocessors.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/dynamic_preprocessors.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/dynamic_preprocessors.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,189 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MakeFileProj + {062B5218-2264-461D-B182-860D8A8F2E7D} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + + + + .\Release\ + .\Release\ + + + .\Release\ + .\Release\ + + + + .\Debug\dynamic_preprocessors.tlb + + + + + .\Debug\dynamic_preprocessors.tlb + + + + + .\Release\dynamic_preprocessors.tlb + + + + + .\Release\dynamic_preprocessors.tlb + + + + + {30a90482-54e5-49e1-8fd3-4ab70f049d07} + false + + + {682d5f1b-d537-43f5-8d3e-90fd4926019e} + false + + + {a3ca91ad-6a00-4a8e-978d-17bc7dbc6117} + false + + + {2304868a-4dc4-46bf-98e8-00c8a41a7511} + false + + + {70a5ab00-59ea-490c-9dbb-4fc3249f44c4} + false + + + {4cc650af-8110-4ed8-92a4-cf5a34be99d6} + false + + + {442239f3-eb5e-4499-9078-ca1ee69d0055} + false + + + {584e267e-2e58-4388-b56c-3bf198680af3} + false + + + {27ac2703-100a-4534-9ec4-9dba758152fc} + false + + + {f0f86116-a76f-4a8f-b416-9baa2da4d16e} + false + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + {e8b8a0a4-51a2-4d42-87c9-8aa65bea6940} + false + + + {1b63b2e7-af61-4248-83c5-1b1f0d237d2d} + false + + + {967a437f-57a3-4c85-a273-c70c75df16cc} + false + + + {6ba82e34-a6fb-4900-90fe-d88bf7aeb001} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/Makefile.in snort-2.9.20/src/dynamic-preprocessors/file/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/file/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-preprocessors/file -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -149,7 +159,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -195,6 +205,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -240,6 +251,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -394,14 +406,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/file/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/file/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -458,10 +469,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -536,7 +547,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -694,6 +708,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + include/output_lib.c: ${top_srcdir}/src/dynamic-output/libs/output_lib.c @src_header=$?; dst_header=$@; $(copy_headers) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_agent.c snort-2.9.20/src/dynamic-preprocessors/file/file_agent.c --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_agent.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_agent.c 2022-05-18 04:53:43.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -190,7 +190,7 @@ if (file) { _dpd.fileAPI->release_file(file->file_mem); - free(file); + _dpd.snortFree(file, sizeof(FileInfo), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); } } } @@ -333,7 +333,7 @@ return -1; } - finfo = calloc(1, sizeof (*finfo)); + finfo = _dpd.snortAlloc(1, sizeof(FileInfo), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); if (!finfo) { @@ -344,7 +344,7 @@ if (!sha256) { - free(finfo); + _dpd.snortFree(finfo, sizeof(FileInfo), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); return -1; } @@ -354,10 +354,10 @@ pthread_mutex_lock(&file_list_mutex); - if(cbuffer_write(file_list, finfo)) + if (cbuffer_write(file_list, finfo)) { pthread_mutex_unlock(&file_list_mutex); - free(finfo); + _dpd.snortFree(finfo, sizeof(FileInfo), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); return -1; } @@ -464,7 +464,7 @@ if (filename_len >= FILE_NAME_LEN ) { - free(file); + _dpd.snortFree(file, sizeof(FileInfo), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); return -1; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_agent.h snort-2.9.20/src/dynamic-preprocessors/file/file_agent.h --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_agent.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_agent.h 2022-05-18 04:53:44.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_event_log.c snort-2.9.20/src/dynamic-preprocessors/file/file_event_log.c --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_event_log.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_event_log.c 2022-05-18 04:53:45.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_event_log.h snort-2.9.20/src/dynamic-preprocessors/file/file_event_log.h --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_event_log.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_event_log.h 2022-05-18 04:53:46.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_inspect_config.c snort-2.9.20/src/dynamic-preprocessors/file/file_inspect_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_inspect_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_inspect_config.c 2022-05-18 04:53:47.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** @@ -207,7 +207,7 @@ if (!strlen(linebuf)) continue; - sha256 = malloc(SHA256_HASH_SIZE); + sha256 = _dpd.snortAlloc(1, SHA256_HASH_SIZE, PP_FILE_INSPECT, PP_MEM_CATEGORY_CONFIG); if (!sha256) { @@ -229,7 +229,7 @@ if (old_info) { - free(sha256); + _dpd.snortFree(sha256, SHA256_HASH_SIZE, PP_FILE_INSPECT, PP_MEM_CATEGORY_CONFIG); _dpd.errMsg("%s(%d) => signature redefined at file: %s (%d), \n" "signature: %s\n", *(_dpd.config_file), *(_dpd.config_line), diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_inspect_config.h snort-2.9.20/src/dynamic-preprocessors/file/file_inspect_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_inspect_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_inspect_config.h 2022-05-18 04:53:49.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_sha.c snort-2.9.20/src/dynamic-preprocessors/file/file_sha.c --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_sha.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_sha.c 2022-05-18 04:53:50.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** @@ -30,6 +30,9 @@ #include "sf_types.h" #include "file_sha.h" +#include "memory_stats.h" +#include "preprocids.h" +#include "sf_dynamic_preprocessor.h" #include #include #include @@ -47,18 +50,19 @@ */ ShaHash *sha_table_new(char sha_bytes) { - ShaHash *table = malloc(sizeof(*table)); + ShaHash *table = _dpd.snortAlloc(1, sizeof(ShaHash), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); if (!table) return NULL; table->nrows = SHA_TABLE_ROWS; - table->entries = calloc(table->nrows, sizeof(*(table->entries))); - + table->entries = _dpd.snortAlloc(table->nrows, sizeof(*(table->entries)), PP_FILE_INSPECT, + PP_MEM_CATEGORY_SESSION); + if (!table->entries) { - free(table); + _dpd.snortFree(table, sizeof(ShaHash), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); return NULL; } @@ -151,7 +155,7 @@ index = *(ShaKeyType *)sha; oldNode = (ShaHashNode *)table->entries[index]; - newNode = calloc(1, sizeof (*newNode)); + newNode = _dpd.snortAlloc(1, sizeof (*newNode), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); if (!newNode) return SHAHASH_NOMEM; @@ -188,12 +192,13 @@ { old = node; node = node->next; - free(old->sha); - free(old); + _dpd.snortFree(old->sha, SHA256_HASH_SIZE, PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); + _dpd.snortFree(old, sizeof(ShaHashNode), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); } } - free(table->entries); - free(table); + _dpd.snortFree(table->entries, sizeof(ShaHashNode) * table->count, PP_FILE_INSPECT, + PP_MEM_CATEGORY_SESSION); + _dpd.snortFree(table, sizeof(ShaHash), PP_FILE_INSPECT, PP_MEM_CATEGORY_SESSION); } static void init_char_to_hex_array(void) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/file_sha.h snort-2.9.20/src/dynamic-preprocessors/file/file_sha.h --- snort-2.9.15.1/src/dynamic-preprocessors/file/file_sha.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/file_sha.h 2022-05-18 04:53:51.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/include/circular_buffer.c snort-2.9.20/src/dynamic-preprocessors/file/include/circular_buffer.c --- snort-2.9.15.1/src/dynamic-preprocessors/file/include/circular_buffer.c 2019-12-03 09:39:31.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/include/circular_buffer.c 2022-05-21 02:38:21.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/include/output_lib.c snort-2.9.20/src/dynamic-preprocessors/file/include/output_lib.c --- snort-2.9.15.1/src/dynamic-preprocessors/file/include/output_lib.c 2019-12-03 09:39:31.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/include/output_lib.c 2022-05-21 02:38:20.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/spp_file.c snort-2.9.20/src/dynamic-preprocessors/file/spp_file.c --- snort-2.9.15.1/src/dynamic-preprocessors/file/spp_file.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/spp_file.c 2022-05-18 04:53:52.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** @@ -49,6 +49,7 @@ #include #include #endif +#include #include #include #include "file_agent.h" @@ -74,7 +75,7 @@ static int FileCheckConfig(struct _SnortConfig *); static void FileCleanExit(int, void *); static void FileUpdateConfig(FileInspectConf *, tSfPolicyUserContextId); - +int FileInspectPrintMemStats(FILE *fd, char* buffer, PreprocMemInfo *meminfo); /** File configuration per Policy */ @@ -141,6 +142,7 @@ _dpd.addPreprocConfCheck(sc, FileCheckConfig); _dpd.registerPreprocStats(FILE_PREPROC_NAME, print_file_stats); + _dpd.registerMemoryStatsFunc(PP_FILE_INSPECT, FileInspectPrintMemStats); _dpd.addPreprocExit(FileCleanExit, NULL, PRIORITY_LAST, PP_FILE_INSPECT); } @@ -153,7 +155,8 @@ "configured once.\n"); } - pPolicyConfig = (FileInspectConf *)calloc(1, sizeof(FileInspectConf)); + pPolicyConfig = (FileInspectConf *)_dpd.snortAlloc(1, sizeof(FileInspectConf), PP_FILE_INSPECT, + PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { DynamicPreprocessorFatalMessage("Could not allocate memory for " @@ -210,7 +213,7 @@ //do any housekeeping before freeing FileInspectConf file_config_free(pPolicyConfig); sfPolicyUserDataClear (config, policyId); - free(pPolicyConfig); + _dpd.snortFree(pPolicyConfig, sizeof(FileInspectConf), PP_FILE_INSPECT, PP_MEM_CATEGORY_CONFIG); return 0; } @@ -289,7 +292,8 @@ "configured once.\n"); } - pPolicyConfig = (FileInspectConf *)calloc(1, sizeof(FileInspectConf)); + pPolicyConfig = (FileInspectConf *)_dpd.snortAlloc(1, sizeof(FileInspectConf), PP_FILE_INSPECT, + PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { DynamicPreprocessorFatalMessage("Could not allocate memory for " @@ -352,7 +356,7 @@ if (pPolicyConfig->ref_count == 0) { sfPolicyUserDataClear (config, policyId); - free(pPolicyConfig); + _dpd.snortFree(pPolicyConfig, sizeof(FileInspectConf), PP_FILE_INSPECT, PP_MEM_CATEGORY_CONFIG); } return 0; } @@ -426,3 +430,52 @@ } + +int FileInspectPrintMemStats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time = time(NULL); + int len = 0; + + size_t total_heap_memory = meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory; + + if (fd) + { + len = fprintf(fd, ",%lu,%u,%u" + ",%lu,%u,%u" + ",%lu" + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , total_heap_memory); + return len; + } + + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics for File Inspect at: %s\n" + "Total file data saved to disk: "FMTu64("-10")"bytes\n" + "Total file capture max: "FMTu64("-10")" \n" + "Total file capture memcap: "FMTu64("-10")" \n" + ,ctime(&curr_time) + ,file_inspect_stats.file_data_to_disk + ,file_inspect_stats.file_capture_max + ,file_inspect_stats.file_capture_memcap); + } + else + { + _dpd.logMsg("\n"); + _dpd.logMsg("Memory Statistics for File Inspect at: %s\n", ctime(&curr_time)); + _dpd.logMsg("Total file data saved to disk: "FMTu64("-10")" bytes\n", + file_inspect_stats.file_data_to_disk); + _dpd.logMsg("Total file capture max: "FMTu64("-10")" \n", + file_inspect_stats.file_capture_max); + _dpd.logMsg("Total file capture memcap: "FMTu64("-10")" \n", + file_inspect_stats.file_capture_memcap); + } + + return len; +} diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/file/spp_file.h snort-2.9.20/src/dynamic-preprocessors/file/spp_file.h --- snort-2.9.15.1/src/dynamic-preprocessors/file/spp_file.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/file/spp_file.h 2022-05-18 04:53:53.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/Makefile.am snort-2.9.20/src/dynamic-preprocessors/ftptelnet/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -66,6 +66,7 @@ EXTRA_DIST = \ +sf_ftptelnet.vcxproj \ sf_ftptelnet.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/Makefile.in snort-2.9.20/src/dynamic-preprocessors/ftptelnet/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@ftptelnet_buffer_dump.h subdir = src/dynamic-preprocessors/ftptelnet -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -173,7 +183,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -219,6 +229,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -264,6 +275,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -382,6 +394,7 @@ snort_ftptelnet.h spp_ftptelnet.c spp_ftptelnet.h \ $(am__append_1) EXTRA_DIST = \ +sf_ftptelnet.vcxproj \ sf_ftptelnet.dsp all: all-am @@ -400,14 +413,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/ftptelnet/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/ftptelnet/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -464,10 +476,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -560,7 +572,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -714,6 +729,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.c 2022-05-18 04:53:54.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftp_bounce_lookup.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_bounce_lookup.h 2022-05-18 04:53:55.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftp_bounce_lookup.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_client.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_client.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_client.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_client.h 2022-05-18 04:53:56.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftp_client.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.c 2022-05-18 04:53:57.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftp_cmd_lookup.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_cmd_lookup.h 2022-05-18 04:53:58.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftp_cmd_lookup.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_server.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_server.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftp_server.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftp_server.h 2022-05-18 04:54:00.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftp_server.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo.h 2022-05-18 04:54:01.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_eo.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo_events.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_events.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo_events.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_events.h 2022-05-18 04:54:03.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_eo_events.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.c 2022-05-18 04:54:04.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_eo_log.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_eo_log.h 2022-05-18 04:54:05.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_eo_log.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_include.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_include.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_include.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_include.h 2022-05-18 04:54:06.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_include.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_return_codes.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_return_codes.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_return_codes.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_return_codes.h 2022-05-18 04:54:07.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_return_codes.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_si.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_si.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_si.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_si.c 2022-05-18 04:54:08.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_si.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker @@ -57,10 +57,12 @@ #include "ftpp_ui_client_lookup.h" #include "ftpp_ui_server_lookup.h" #include "ftpp_si.h" +#include "spp_ftptelnet.h" #include "stream_api.h" #include "snort_ftptelnet.h" #include "sfPolicyUserData.h" #include "ssl_include.h" +#include "memory_stats.h" #ifndef WIN32 # include @@ -126,7 +128,11 @@ } } - free(ssn); + ftp_telnet_stats.telnet_sessions--; + ftp_telnet_stats.heap_memory -= sizeof(TELNET_SESSION); + + _dpd.snortFree(ssn, sizeof(TELNET_SESSION), + PP_FTPTELNET, PP_MEM_CATEGORY_SESSION); } /* @@ -183,7 +189,17 @@ { if (p->stream_session) { - TELNET_SESSION *NewSession = (TELNET_SESSION *)calloc(1, sizeof(TELNET_SESSION)); + TELNET_SESSION *NewSession = (TELNET_SESSION *)_dpd.snortAlloc(1, + sizeof(TELNET_SESSION), + PP_FTPTELNET, + PP_MEM_CATEGORY_SESSION); + + ftp_telnet_stats.telnet_sessions++; + if (ftp_telnet_stats.telnet_sessions > ftp_telnet_stats.max_telnet_sessions) + ftp_telnet_stats.max_telnet_sessions = ftp_telnet_stats.telnet_sessions; + + ftp_telnet_stats.heap_memory += sizeof(TELNET_SESSION); + tSfPolicyId policy_id = _dpd.getNapRuntimePolicy(); if (NewSession == NULL) @@ -683,16 +699,23 @@ if (ssn->filename) { - free(ssn->filename); + ftp_telnet_stats.heap_memory -= (strlen(ssn->filename) + 1); + _dpd.snortFree(ssn->filename, (strlen(ssn->filename) + 1), + PP_FTPTELNET, PP_MEM_CATEGORY_SESSION); } if ( ssl_cb ) ssl_cb->session_free(ssn->flow_id); + ftp_telnet_stats.ftp_sessions--; + ftp_telnet_stats.heap_memory -= sizeof(FTP_SESSION); +#ifdef TARGET_BASED FTP_DATA_SESSION *datassn = ssn->datassn; if(datassn && (ssn == datassn->ftpssn)) datassn->ftpssn = NULL; - free(ssn); + _dpd.snortFree(ssn, sizeof(FTP_SESSION), + PP_FTPTELNET, PP_MEM_CATEGORY_SESSION); +#endif } #ifdef TARGET_BASED @@ -702,7 +725,8 @@ */ FTP_DATA_SESSION * FTPDataSessionNew(SFSnortPacket *p) { - FTP_DATA_SESSION *ftpdata = calloc(1, sizeof *ftpdata); + FTP_DATA_SESSION *ftpdata = _dpd.snortAlloc(1, sizeof *ftpdata, + PP_FTPTELNET, PP_MEM_CATEGORY_SESSION); if (!ftpdata) return NULL; @@ -715,10 +739,18 @@ if (!ftpdata->ftp_key) { - free(ftpdata); + _dpd.snortFree(ftpdata, sizeof *ftpdata, + PP_FTPTELNET, PP_MEM_CATEGORY_SESSION); ftpdata = NULL; + return ftpdata; } + ftp_telnet_stats.ftp_data_sessions++; + if (ftp_telnet_stats.ftp_data_sessions > ftp_telnet_stats.max_ftp_data_sessions) + ftp_telnet_stats.max_ftp_data_sessions = ftp_telnet_stats.ftp_data_sessions; + + ftp_telnet_stats.heap_memory += (sizeof (*ftpdata) + sizeof(StreamSessionKey)); + return ftpdata; } @@ -742,18 +774,26 @@ /* ftp-data key shouldn't exist without this but */ if (ssn->ftp_key) { - free(ssn->ftp_key); + // This Key is accounted in Stream during alloc + _dpd.snortFree(ssn->ftp_key, sizeof(StreamSessionKey), + PP_STREAM, PP_MEM_CATEGORY_SESSION); } if (ssn->filename) { - free(ssn->filename); + ftp_telnet_stats.heap_memory -= (strlen(ssn->filename) + 1); + _dpd.snortFree(ssn->filename, (strlen(ssn->filename) + 1), + PP_FTPTELNET, PP_MEM_CATEGORY_SESSION); } if ( ssl_cb ) ssl_cb->session_free(ssn->flow_id); - free(ssn); + ftp_telnet_stats.ftp_data_sessions--; + ftp_telnet_stats.heap_memory -= sizeof(FTP_DATA_SESSION); + + _dpd.snortFree(ssn, sizeof(FTP_DATA_SESSION), + PP_FTPTELNET, PP_MEM_CATEGORY_SESSION); } /* Function: FTPDataDirection @@ -859,7 +899,17 @@ if (*piInspectMode) { - FTP_SESSION *NewSession = (FTP_SESSION *)calloc(1, sizeof(FTP_SESSION)); + FTP_SESSION *NewSession = (FTP_SESSION *)_dpd.snortAlloc(1, + sizeof(FTP_SESSION), + PP_FTPTELNET, + PP_MEM_CATEGORY_SESSION); + + ftp_telnet_stats.ftp_sessions++; + if (ftp_telnet_stats.ftp_sessions > ftp_telnet_stats.max_ftp_sessions) + ftp_telnet_stats.max_ftp_sessions = ftp_telnet_stats.ftp_sessions; + + ftp_telnet_stats.heap_memory += sizeof(FTP_SESSION); + tSfPolicyId policy_id = _dpd.getNapRuntimePolicy(); if (NewSession == NULL) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_si.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_si.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_si.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_si.h 2022-05-18 04:54:09.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_si.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker @@ -137,6 +137,7 @@ typedef struct s_FTP_SESSION { FTP_TELNET_SESSION ft_ssn; + tSfPolicyId policy_id; /* The client construct contains all the info associated with a * client request. */ @@ -153,7 +154,6 @@ FTP_SERVER_PROTO_CONF *server_conf; /* The global configuration for this session */ - tSfPolicyId policy_id; tSfPolicyUserContextId global_conf; /* The data channel info */ @@ -166,6 +166,8 @@ uint16_t serverPort; uint32_t ftp_cmd_pipe_index; uint32_t rest_cmd_offset; + uint16_t control_clientPort; + uint16_t control_serverPort; /* A file is being transfered on ftp-data channel */ char *filename; @@ -174,6 +176,7 @@ /* Command/data channel encryption */ bool encr_state_chello; + unsigned char flags; int encr_state; uint32_t flow_id; @@ -182,9 +185,6 @@ void *datassn; sfaddr_t control_clientIP; sfaddr_t control_serverIP; - uint16_t control_clientPort; - uint16_t control_serverPort; - unsigned char flags; } FTP_SESSION; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.c 2022-05-18 04:54:10.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_ui_client_lookup.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker @@ -48,6 +48,7 @@ #include "ftpp_return_codes.h" #include "snort_ftptelnet.h" #include "sfrt.h" +#include "memory_stats.h" static void clientConfFree(void *pData); @@ -305,7 +306,8 @@ if (clientConf->referenceCount == 0) { FTPTelnetCleanupFTPClientConf((void *)clientConf); - free(clientConf); + _dpd.snortFree(clientConf, sizeof(FTP_CLIENT_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } } } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_client_lookup.h 2022-05-18 04:54:11.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_ui_client_lookup.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.c 2022-05-18 04:54:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_ui_config.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker @@ -53,6 +53,7 @@ #include "ftp_cmd_lookup.h" #include "ftp_bounce_lookup.h" #include "ftpp_ui_config.h" +#include "memory_stats.h" /* * Function: ftpp_ui_config_init_global_conf(FTPTELNET_GLOBAL_CONF *GlobalConf) @@ -199,9 +200,12 @@ if (DateFmt->format_string) { - free(DateFmt->format_string); + _dpd.snortFree(DateFmt->format_string, + (strlen(DateFmt->format_string) + 1), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } - free(DateFmt); + _dpd.snortFree(DateFmt, sizeof(FTP_DATE_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } /* @@ -227,7 +231,9 @@ { ftpp_ui_config_reset_ftp_cmd_format(ThisFmt->choices[i]); } - free(ThisFmt->choices); + _dpd.snortFree(ThisFmt->choices, + (ThisFmt->numChoices * sizeof(FTP_PARAM_FMT *)), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } if (ThisFmt->next_param_fmt) @@ -245,11 +251,14 @@ } if (ThisFmt->type == e_literal) { - free (ThisFmt->format.literal); + _dpd.snortFree(ThisFmt->format.literal, + (strlen(ThisFmt->format.literal) + 1), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } memset(ThisFmt, 0, sizeof(FTP_PARAM_FMT)); - free(ThisFmt); + _dpd.snortFree(ThisFmt, sizeof(FTP_PARAM_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } /* diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_config.h 2022-05-18 04:54:14.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_ui_config.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.c 2022-05-18 04:54:15.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_ui_server_lookup.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Kevin Liu @@ -45,6 +45,7 @@ #include "ftpp_ui_config.h" #include "ftpp_return_codes.h" #include "snort_ftptelnet.h" +#include "memory_stats.h" static void serverConfFree(void *pData); @@ -326,7 +327,8 @@ if (serverConf->referenceCount == 0) { FTPTelnetCleanupFTPServerConf((void *)serverConf); - free(serverConf); + _dpd.snortFree(serverConf, sizeof(FTP_SERVER_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } } } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftpp_ui_server_lookup.h 2022-05-18 04:54:16.000000000 +0000 @@ -1,7 +1,7 @@ /* * ftpp_ui_server_lookup.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Kevin Liu diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.c 2022-05-18 04:54:18.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/ftptelnet_buffer_dump.h 2022-05-18 04:54:19.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.c 2022-05-18 04:54:21.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -75,9 +75,9 @@ /* * */ -static void s_free( void * p ) +static void s_free( void * p , int n) { - if( p ) xfree( p ); + if( p ) xfree( p , n ); } /* * @@ -113,7 +113,7 @@ { if( k->key ) { - s_free( k->key ); + s_free( k->key , k->nkey ); } if( km->userfree && k->userdata ) { @@ -121,7 +121,7 @@ } kold = k; k = k->next; - s_free(kold); + s_free(kold, sizeof(KEYNODE)); } return 0; @@ -141,7 +141,7 @@ KMapFreeNode( km, r->child ); } - s_free( r ); + s_free( r , sizeof(KMAPNODE) ); } /* * Free the KMAP and all of it's memory and nodes @@ -164,7 +164,7 @@ /* Free the node list */ KMapFreeNodeList( km ); - s_free(km); + s_free(km, sizeof(KMAP)); } /* diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_kmap.h 2022-05-18 04:54:22.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.c 2022-05-18 04:54:23.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -32,6 +32,8 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "ftpp_include.h" +#include "memory_stats.h" //#define MDEBUG @@ -40,13 +42,13 @@ void * xmalloc(size_t byteSize) { #ifdef MDEBUG - int * data = (int*) malloc( byteSize + 4 ); + int * data = (int*)_dpd.snortAlloc(1, byteSize+4, + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); unsigned m = msize; - if(data)memset(data,0,byteSize+4); #else - int * data = (int*) malloc( byteSize ); - if(data)memset(data,0,byteSize); + int * data = (int*)_dpd.snortAlloc(1, byteSize, + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); #endif if( data == NULL ) @@ -74,7 +76,7 @@ #endif } -void xfree( void * p ) +void xfree( void * p , int n ) { #ifdef MDEBUG unsigned m = msize; @@ -82,11 +84,11 @@ q--; msize -= *q; - free(q); + _dpd.snortFree(q, n+4, PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); #else - free(p); + _dpd.snortFree(p, n, PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); #endif diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/hi_util_xmalloc.h 2022-05-18 04:54:24.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * */ @@ -37,6 +37,6 @@ void *xmalloc(size_t byteSize); char *xstrdup(const char *str); void xshowmem(void); -void xfree( void * ); +void xfree( void * , int ); #endif diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_ftp.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_ftp.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_ftp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_ftp.c 2022-05-18 04:54:25.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2004-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -66,6 +66,7 @@ #include "ftpp_return_codes.h" #include "ftp_cmd_lookup.h" #include "ftp_bounce_lookup.h" +#include "spp_ftptelnet.h" //#include "decode.h" #include "snort_debug.h" #include "stream_api.h" @@ -84,6 +85,7 @@ #ifdef DUMP_BUFFER #include "ftptelnet_buffer_dump.h" #endif +#include "memory_stats.h" #define DEFAULT_MEM_ALLOC 512 @@ -1259,9 +1261,11 @@ Session->data_xfer_index = 0; if (rsp_code == 350) { +#ifdef TARGET_BASED FTP_DATA_SESSION *ftpdata = Session->datassn; if(ftpdata) ftpdata->flags |= FTPDATA_FLG_REST; +#endif } else Session->rest_cmd_offset= 0; @@ -1361,7 +1365,9 @@ FTPTELNET_GLOBAL_CONF *global_conf = (FTPTELNET_GLOBAL_CONF *)sfPolicyUserDataGet(ftpssn->global_conf, ftpssn->policy_id); FTP_CLIENT_REQ *req; FTP_CMD_CONF *CmdConf = NULL; +#ifdef TARGET_BASED FTP_DATA_SESSION *datassn; +#endif const unsigned char *read_ptr; const unsigned char *end = p->payload + p->payload_size; @@ -1854,7 +1860,10 @@ * FTP_DATA_SESSION for tracking. */ if (ftpssn->filename) { - free(ftpssn->filename); + _dpd.snortFree(ftpssn->filename, + (strlen(ftpssn->filename) + 1), + PP_FTPTELNET, + PP_MEM_CATEGORY_SESSION); ftpssn->filename = NULL; ftpssn->file_xfer_info = FTPP_FILE_IGNORE; } @@ -1865,7 +1874,11 @@ if (((req->param_begin != NULL) && (req->param_size > 0)) && (CmdConf->file_get_cmd || CmdConf->file_put_cmd)) { - ftpssn->filename = (char *)malloc(req->param_size+1); + ftpssn->filename = (char *)_dpd.snortAlloc(1, + req->param_size + 1, + PP_FTPTELNET, + PP_MEM_CATEGORY_SESSION); + ftp_telnet_stats.heap_memory += req->param_size+1; if (ftpssn->filename) { memcpy(ftpssn->filename, req->param_begin, req->param_size); @@ -1877,6 +1890,7 @@ IP_COPY_VALUE(ftpssn->control_serverIP, GET_DST_IP(p)); ftpssn->control_serverPort = ntohs(p->tcp_header->destination_port); ftpssn->control_clientPort = ntohs(p->tcp_header->source_port); +#ifdef TARGET_BASED datassn = (FTP_DATA_SESSION *)ftpssn->datassn; if(datassn) { @@ -1885,6 +1899,7 @@ file_name = ftpssn->filename; datassn->path_hash = _dpd.fileAPI->str_to_hash((uint8_t *)file_name, strlen(file_name)); } +#endif } } else diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_ftp.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_ftp.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_ftp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_ftp.h 2022-05-18 04:54:26.000000000 +0000 @@ -1,7 +1,7 @@ /* * pp_ftp.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_telnet.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_telnet.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_telnet.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_telnet.c 2022-05-18 04:54:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * Copyright (C) 1998-2002 Martin Roesch * diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_telnet.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_telnet.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/pp_telnet.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/pp_telnet.h 2022-05-18 04:54:29.000000000 +0000 @@ -1,7 +1,7 @@ /* * pp_telnet.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj snort-2.9.20/src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/sf_ftptelnet.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,343 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {2304868A-4DC4-46BF-98E8-00C8A41A7511} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_ftptelnet.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_ftptelnet.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_ftptelnet.bsc + + + true + true + true + Console + .\Debug\sf_ftptelnet.dll + .\Debug\sf_ftptelnet.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_ftptelnet.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_ftptelnet.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_ftptelnet.bsc + + + true + true + true + Console + .\Debug\sf_ftptelnet.dll + .\Debug\sf_ftptelnet.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_ftptelnet.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_ftptelnet.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_ftptelnet.bsc + + + true + true + Console + .\Release\sf_ftptelnet.dll + .\Release\sf_ftptelnet.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_ftptelnet.pch + .\Release\ + .\Release\ + CompileAsC + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_ftptelnet.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_ftptelnet.bsc + + + true + true + Console + .\Release\sf_ftptelnet.dll + .\Release\sf_ftptelnet.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.c 2022-05-18 04:54:30.000000000 +0000 @@ -1,7 +1,7 @@ /* * snort_ftptelnet.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker @@ -96,6 +96,7 @@ #include "Unified2_common.h" #include "ssl_include.h" #include +#include "memory_stats.h" #ifdef DUMP_BUFFER #include "ftptelnet_buffer_dump.h" @@ -331,7 +332,7 @@ for ( i = 0; i < CONF_CHUNKS; i++ ) sz += strlen(DEFAULT_FTP_CONF[i]); - str = malloc(sz); + str = _dpd.snortAlloc(1, sz, PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if ( !str ) DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -843,7 +844,8 @@ } GlobalConf->telnet_config = - (TELNET_PROTO_CONF *)calloc(1, sizeof(TELNET_PROTO_CONF)); + (TELNET_PROTO_CONF *)_dpd.snortAlloc(1, sizeof(TELNET_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (GlobalConf->telnet_config == NULL) { DynamicPreprocessorFatalMessage("Out of memory trying to create " @@ -1064,7 +1066,9 @@ { /* Add it to the list */ // note that struct includes 1 byte for null, so just add len - FTPCmd = (FTP_CMD_CONF *)calloc(1, sizeof(FTP_CMD_CONF)+strlen(cmd)); + FTPCmd = (FTP_CMD_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_CMD_CONF)+strlen(cmd), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (FTPCmd == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1204,7 +1208,9 @@ { /* Add it to the list */ // note that struct includes 1 byte for null, so just add len - FTPCmd = (FTP_CMD_CONF *)calloc(1, sizeof(FTP_CMD_CONF)+strlen(cmd)); + FTPCmd = (FTP_CMD_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_CMD_CONF) + strlen(cmd), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (FTPCmd == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1244,7 +1250,8 @@ } else { - Fmt = (FTP_PARAM_FMT *)calloc(1, sizeof(FTP_PARAM_FMT)); + Fmt = (FTP_PARAM_FMT *)_dpd.snortAlloc(1, sizeof(FTP_PARAM_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (Fmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1254,7 +1261,8 @@ Fmt->type = e_head; FTPCmd->param_format = Fmt; - Fmt = (FTP_PARAM_FMT *)calloc(1, sizeof(FTP_PARAM_FMT)); + Fmt = (FTP_PARAM_FMT *)_dpd.snortAlloc(1, sizeof(FTP_PARAM_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (Fmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1350,7 +1358,9 @@ { /* Add it to the list */ // note that struct includes 1 byte for null, so just add len - FTPCmd = (FTP_CMD_CONF *)calloc(1, sizeof(FTP_CMD_CONF)+strlen(cmd)); + FTPCmd = (FTP_CMD_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_CMD_CONF) + strlen(cmd), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (FTPCmd == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1479,7 +1489,10 @@ if (numChoices) { ThisFmt->numChoices = numChoices; - ThisFmt->choices = (FTP_PARAM_FMT **)calloc(numChoices, sizeof(FTP_PARAM_FMT *)); + ThisFmt->choices = (FTP_PARAM_FMT **)_dpd.snortAlloc(numChoices, + sizeof(FTP_PARAM_FMT *), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (ThisFmt->choices == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1562,14 +1575,20 @@ if (curr_len > 0) { FTP_DATE_FMT *OptFmt; - OptFmt = (FTP_DATE_FMT *)calloc(1, sizeof(FTP_DATE_FMT)); + OptFmt = (FTP_DATE_FMT *)_dpd.snortAlloc(1, + sizeof(FTP_DATE_FMT), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (OptFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", *(_dpd.config_file), *(_dpd.config_line)); } - curr_format = (char *)calloc(curr_len + 1, sizeof(char)); + curr_format = (char *)_dpd.snortAlloc(curr_len + 1, + sizeof(char), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (curr_format == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1578,16 +1597,19 @@ strncpy(curr_format, start_ch, curr_len); CurrFmt->format_string = curr_format; - curr_len = 0; CurrFmt->optional = OptFmt; OptFmt->prev = CurrFmt; iRet = ProcessDateFormat(OptFmt, CurrFmt, &curr_ch); if (iRet != FTPP_SUCCESS) { - free(OptFmt); - free(curr_format); + _dpd.snortFree(OptFmt, sizeof(FTP_DATE_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); + _dpd.snortFree(curr_format, + (curr_len + 1) * sizeof(char), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); return iRet; } + curr_len = 0; } start_ch = curr_ch; break; @@ -1595,7 +1617,10 @@ curr_ch++; if (curr_len > 0) { - curr_format = (char *)calloc(curr_len + 1, sizeof(char)); + curr_format = (char *)_dpd.snortAlloc(curr_len + 1, + sizeof(char), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (curr_format == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1613,7 +1638,10 @@ curr_ch++; { FTP_DATE_FMT *NewFmt; - NewFmt = (FTP_DATE_FMT *)calloc(1, sizeof(FTP_DATE_FMT)); + NewFmt = (FTP_DATE_FMT *)_dpd.snortAlloc(1, + sizeof(FTP_DATE_FMT), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (NewFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1622,7 +1650,10 @@ if (curr_len > 0) { - curr_format = (char *)calloc(curr_len + 1, sizeof(char)); + curr_format = (char *)_dpd.snortAlloc(curr_len + 1, + sizeof(char), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (curr_format == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1644,7 +1675,10 @@ { return iRet; } - NewFmt = (FTP_DATE_FMT *)calloc(1, sizeof(FTP_DATE_FMT)); + NewFmt = (FTP_DATE_FMT *)_dpd.snortAlloc(1, + sizeof(FTP_DATE_FMT), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (NewFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1659,7 +1693,10 @@ return iRet; } - NewFmt = (FTP_DATE_FMT *)calloc(1, sizeof(FTP_DATE_FMT)); + NewFmt = (FTP_DATE_FMT *)_dpd.snortAlloc(1, + sizeof(FTP_DATE_FMT), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (NewFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1679,7 +1716,9 @@ curr_ch++; if (curr_len > 0) { - curr_format = (char *)calloc(curr_len + 1, sizeof(char)); + curr_format = (char *)_dpd.snortAlloc(curr_len + 1, + sizeof(char), PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (curr_format == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1703,7 +1742,9 @@ curr_ch++; if (curr_len > 0) { - curr_format = (char *)calloc(curr_len + 1, sizeof(char)); + curr_format = (char *)_dpd.snortAlloc(curr_len + 1, + sizeof(char), PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (curr_format == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1732,7 +1773,8 @@ if (curr_len > 0) { - curr_format = (char *)calloc(curr_len + 1, sizeof(char)); + curr_format = (char *)_dpd.snortAlloc(curr_len + 1, sizeof(char), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (curr_format == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1797,7 +1839,8 @@ if (!strcmp(fmt, START_OPT_FMT)) { - NextFmt = (FTP_PARAM_FMT *)calloc(1, sizeof(FTP_PARAM_FMT)); + NextFmt = (FTP_PARAM_FMT *)_dpd.snortAlloc(1, sizeof(FTP_PARAM_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (NextFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1823,7 +1866,11 @@ int numChoices = 1; do { - FTP_PARAM_FMT **tmpChoices = (FTP_PARAM_FMT **)calloc(numChoices, sizeof(FTP_PARAM_FMT *)); + FTP_PARAM_FMT **tmpChoices = + (FTP_PARAM_FMT **)_dpd.snortAlloc(numChoices, + sizeof(FTP_PARAM_FMT *), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (tmpChoices == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1840,17 +1887,20 @@ memcpy(tmpChoices, ThisFmt->choices, sizeof(FTP_PARAM_FMT*) * ThisFmt->numChoices); } - NextFmt = (FTP_PARAM_FMT *)calloc(1, sizeof(FTP_PARAM_FMT)); + NextFmt = (FTP_PARAM_FMT *)_dpd.snortAlloc(1, sizeof(FTP_PARAM_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (NextFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", *(_dpd.config_file), *(_dpd.config_line)); } - ThisFmt->numChoices = numChoices; tmpChoices[numChoices-1] = NextFmt; if (ThisFmt->choices) - free(ThisFmt->choices); + _dpd.snortFree(ThisFmt->choices, + (ThisFmt->numChoices * sizeof(FTP_PARAM_FMT *)), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); + ThisFmt->numChoices = numChoices; ThisFmt->choices = tmpChoices; NextFmt->prev_param_fmt = ThisFmt; iRet = DoNextFormat(NextFmt, 1, ErrorString, ErrStrLen); @@ -1868,7 +1918,8 @@ if (!allocated) { - NextFmt = (FTP_PARAM_FMT *)calloc(1, sizeof(FTP_PARAM_FMT)); + NextFmt = (FTP_PARAM_FMT *)_dpd.snortAlloc(1, sizeof(FTP_PARAM_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (NextFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1922,7 +1973,8 @@ FTP_DATE_FMT *DateFmt; char *format = NextToken(CONF_SEPARATORS); NextFmt->type = e_date; - DateFmt = (FTP_DATE_FMT *)calloc(1, sizeof(FTP_DATE_FMT)); + DateFmt = (FTP_DATE_FMT *)_dpd.snortAlloc(1, sizeof(FTP_DATE_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (DateFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -1954,7 +2006,8 @@ return FTPP_INVALID_ARG; } NextFmt->type = e_literal; - NextFmt->format.literal = (char *)calloc(1, len+1); + NextFmt->format.literal = (char *)_dpd.snortAlloc(1, len + 1, + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if ( !NextFmt->format.literal ) { DynamicPreprocessorFatalMessage( @@ -2047,7 +2100,8 @@ return FTPP_FATAL_ERR; } - HeadFmt = (FTP_PARAM_FMT *)calloc(1, sizeof(FTP_PARAM_FMT)); + HeadFmt = (FTP_PARAM_FMT *)_dpd.snortAlloc(1, sizeof(FTP_PARAM_FMT), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (HeadFmt == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -2072,7 +2126,9 @@ { /* Add it to the list */ // note that struct includes 1 byte for null, so just add len - FTPCmd = (FTP_CMD_CONF *)calloc(1, sizeof(FTP_CMD_CONF)+strlen(cmd)); + FTPCmd = (FTP_CMD_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_CMD_CONF)+strlen(cmd), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (FTPCmd == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -2404,7 +2460,8 @@ * return most specific match -- ie a specific host is more specific * than subnet. */ - newBounce = (FTP_BOUNCE_TO *)calloc(1, sizeof(FTP_BOUNCE_TO)); + newBounce = (FTP_BOUNCE_TO *)_dpd.snortAlloc(1, sizeof(FTP_BOUNCE_TO), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (newBounce == NULL) { snprintf(ErrorString, ErrStrLen, @@ -2417,7 +2474,8 @@ { snprintf(ErrorString, ErrStrLen, "Invalid argument to token '%s': %s", ALLOW_BOUNCE, pcToken); - free(newBounce); + _dpd.snortFree(newBounce, sizeof(FTP_BOUNCE_TO), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); return FTPP_FATAL_ERR; } @@ -2428,7 +2486,8 @@ { snprintf(ErrorString, ErrStrLen, "Failed to add configuration for Bounce object '%s'.", ALLOW_BOUNCE); - free(newBounce); + _dpd.snortFree(newBounce, sizeof(FTP_BOUNCE_TO), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); return FTPP_FATAL_ERR; } @@ -2759,7 +2818,10 @@ // Write this IP into the buffer for printing snprintf(client_list, STD_BUF, "%s", client); - new_client_conf = (FTP_CLIENT_PROTO_CONF *)calloc(1, sizeof(FTP_CLIENT_PROTO_CONF)); + new_client_conf = (FTP_CLIENT_PROTO_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_CLIENT_PROTO_CONF), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (new_client_conf == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -2812,7 +2874,9 @@ } GlobalConf->default_ftp_client = - (FTP_CLIENT_PROTO_CONF *)calloc(1, sizeof(FTP_CLIENT_PROTO_CONF)); + (FTP_CLIENT_PROTO_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_CLIENT_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (GlobalConf->default_ftp_client == NULL) { DynamicPreprocessorFatalMessage("Out of memory trying to create " @@ -3189,7 +3253,8 @@ iRet = ProcessFTPServerOptions(ftp_conf, ErrorString, ErrStrLen); - free(default_conf_str); + _dpd.snortFree(default_conf_str, default_conf_len, + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); maxToken = saveMaxToken; if (iRet < 0) @@ -3347,7 +3412,9 @@ /* Write this IP into the buffer for printing */ snprintf(server_list, STD_BUF, "%s", server); - new_server_conf = (FTP_SERVER_PROTO_CONF *)calloc(1, sizeof(FTP_SERVER_PROTO_CONF)); + new_server_conf = (FTP_SERVER_PROTO_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_SERVER_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (new_server_conf == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory\n", @@ -3411,7 +3478,9 @@ } GlobalConf->default_ftp_server = - (FTP_SERVER_PROTO_CONF *)calloc(1, sizeof(FTP_SERVER_PROTO_CONF)); + (FTP_SERVER_PROTO_CONF *)_dpd.snortAlloc(1, + sizeof(FTP_SERVER_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); if (GlobalConf->default_ftp_server == NULL) { DynamicPreprocessorFatalMessage("Out of memory trying to create " @@ -3424,7 +3493,9 @@ GlobalConf->default_ftp_server->serverAddr = strdup("default"); if (GlobalConf->default_ftp_server->serverAddr == NULL) { - free(GlobalConf->default_ftp_server); + _dpd.snortFree(GlobalConf->default_ftp_server, + sizeof(FTP_SERVER_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); DynamicPreprocessorFatalMessage("Out of memory trying to create " "default ftp server configuration.\n"); } @@ -3492,7 +3563,8 @@ /* Free the FTP_PARAM_FMT stuff... */ ftpp_ui_config_reset_ftp_cmd(FTPCmd); - free(FTPCmd); + _dpd.snortFree(FTPCmd, sizeof(FTP_CMD_CONF)+strlen(FTPCmd->cmd_name), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } void FTPTelnetCleanupFTPServerConf(void *serverConf) @@ -3511,7 +3583,8 @@ void FTPTelnetCleanupFTPBounceTo(void *ftpBounce) { FTP_BOUNCE_TO *FTPBounce = (FTP_BOUNCE_TO *)ftpBounce; - free(FTPBounce); + _dpd.snortFree(FTPBounce, sizeof(FTP_BOUNCE_TO), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } void FTPTelnetCleanupFTPClientConf(void *clientConf) @@ -3557,22 +3630,28 @@ if (GlobalConf->default_ftp_client != NULL) { FTPTelnetCleanupFTPClientConf((void *)GlobalConf->default_ftp_client); - free(GlobalConf->default_ftp_client); + _dpd.snortFree(GlobalConf->default_ftp_client, + sizeof(FTP_CLIENT_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } if (GlobalConf->default_ftp_server != NULL) { FTPTelnetCleanupFTPServerConf((void *)GlobalConf->default_ftp_server); - free(GlobalConf->default_ftp_server); + _dpd.snortFree(GlobalConf->default_ftp_server, + sizeof(FTP_SERVER_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); } if (GlobalConf->telnet_config != NULL) - free(GlobalConf->telnet_config); + _dpd.snortFree(GlobalConf->telnet_config, sizeof(TELNET_PROTO_CONF), + PP_FTPTELNET, PP_MEM_CATEGORY_CONFIG); ftpp_ui_client_lookup_cleanup(&GlobalConf->client_lookup); ftpp_ui_server_lookup_cleanup(&GlobalConf->server_lookup); - free(GlobalConf); + _dpd.snortFree(GlobalConf, sizeof(FTPTELNET_GLOBAL_CONF), PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); } /* @@ -4807,8 +4886,8 @@ { if ( _dpd.isPafEnabled() ) { - ftp_paf_id = _dpd.streamAPI->register_paf_service(sc, policy, app, true, ftp_paf, false); - ftp_paf_id = _dpd.streamAPI->register_paf_service(sc, policy, app, false, ftp_paf, false); + ftp_paf_id = _dpd.streamAPI->register_paf_service(sc, policy, app, true, ftp_paf, true); + ftp_paf_id = _dpd.streamAPI->register_paf_service(sc, policy, app, false, ftp_paf, true); } } #endif @@ -4867,7 +4946,9 @@ void FTPData_Set_flow_id( void *app_data, uint32_t fid ) { +#ifdef TARGET_BASED FTP_DATA_SESSION *ssn = (FTP_DATA_SESSION *)app_data; if( ssn ) ssn->flow_id = fid; +#endif } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/snort_ftptelnet.h 2022-05-18 04:54:31.000000000 +0000 @@ -1,7 +1,7 @@ /* * snort_ftptelnet.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.c snort-2.9.20/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.c --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.c 2022-05-18 04:54:32.000000000 +0000 @@ -1,7 +1,7 @@ /* * spp_ftptelnet.c * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker @@ -45,6 +45,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -71,6 +72,7 @@ #endif #include "reg_test.h" +#include "memory_stats.h" const int MAJOR_VERSION = 1; const int MINOR_VERSION = 2; @@ -105,6 +107,7 @@ PreprocStats ftpdataPerfStats; #endif #endif +FTPTelnet_Stats ftp_telnet_stats; /* * Global Variables @@ -125,6 +128,7 @@ /* static function prototypes */ static void FTPTelnetReset(int, void *); static void FTPTelnetResetStats(int, void *); +static void FTPTelnetStats(int); #ifdef SNORT_RELOAD static void FtpTelnetReloadGlobal(struct _SnortConfig *, char *, void **); @@ -133,6 +137,7 @@ static void * FtpTelnetReloadSwap(struct _SnortConfig *, void *); static void FtpTelnetReloadSwapFree(void *); #endif +int ftptelnet_print_mem_stats(FILE *, char*, PreprocMemInfo *); extern char *maxToken; @@ -282,12 +287,15 @@ _dpd.addPreprocReset(FTPTelnetReset, NULL, PRIORITY_APPLICATION, PP_FTPTELNET); _dpd.addPreprocResetStats(FTPTelnetResetStats, NULL, PRIORITY_APPLICATION, PP_FTPTELNET); _dpd.addPreprocConfCheck(sc, FTPConfigCheck); + _dpd.registerPreprocStats("ftp_telnet", FTPTelnetStats); #ifdef PERF_PROFILING _dpd.addPreprocProfileFunc("ftptelnet_ftp", (void*)&ftpPerfStats, 0, _dpd.totalPerfStats, NULL); _dpd.addPreprocProfileFunc("ftptelnet_telnet", (void*)&telnetPerfStats, 0, _dpd.totalPerfStats, NULL); +#ifdef TARGET_BASED _dpd.addPreprocProfileFunc("ftptelnet_ftpdata", (void*)&ftpdataPerfStats, 0, _dpd.totalPerfStats, NULL); #endif +#endif #ifdef TARGET_BASED if (_dpd.streamAPI != NULL) @@ -322,8 +330,10 @@ *_dpd.config_file, *_dpd.config_line); } - pPolicyConfig = - (FTPTELNET_GLOBAL_CONF *)calloc(1, sizeof(FTPTELNET_GLOBAL_CONF)); + pPolicyConfig = (FTPTELNET_GLOBAL_CONF *)_dpd.snortAlloc(1, + sizeof(FTPTELNET_GLOBAL_CONF), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { @@ -475,6 +485,7 @@ #ifdef DUMP_BUFFER _dpd.registerBufferTracer(getFTPTelnetBuffers, FTPTELNET_BUFFER_DUMP_FUNC); #endif + _dpd.registerMemoryStatsFunc(PP_FTPTELNET, ftptelnet_print_mem_stats); } static void FTPTelnetReset(int signal, void *data) @@ -487,6 +498,91 @@ return; } +static void FTPTelnetStats(int exiting) +{ + _dpd.logMsg("FTPTelnet Preprocessor Statistics\n"); + _dpd.logMsg(" Current active FTP sessions : " STDu64 "\n", + ftp_telnet_stats.ftp_sessions); + _dpd.logMsg(" Max concurrent FTP sessions : " STDu64 "\n", + ftp_telnet_stats.max_ftp_sessions); + _dpd.logMsg(" Total FTP Data sessions : " STDu64 "\n", + ftp_telnet_stats.ftp_data_sessions); + _dpd.logMsg(" Max concurrent FTP Data sessions : " STDu64 "\n", + ftp_telnet_stats.max_ftp_data_sessions); + _dpd.logMsg(" Current active Telnet sessions : " STDu64 "\n", + ftp_telnet_stats.telnet_sessions); + _dpd.logMsg(" Max concurrent Telnet sessions : " STDu64 "\n", + ftp_telnet_stats.max_telnet_sessions); + _dpd.logMsg(" Current ftp_telnet session non-mempool memory : " STDu64 "\n", + ftp_telnet_stats.heap_memory); +} + +int ftptelnet_print_mem_stats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time = time(NULL); + int len = 0; + size_t total_heap_memory = meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory; + if (fd) + { + len = fprintf(fd, ","STDu64","STDu64","STDu64"" + ","STDu64","STDu64","STDu64"" + ",%lu,%u,%u,%lu,%u,%u,%lu" + , ftp_telnet_stats.ftp_sessions + , ftp_telnet_stats.max_ftp_sessions + , ftp_telnet_stats.ftp_data_sessions + , ftp_telnet_stats.max_ftp_data_sessions + , ftp_telnet_stats.telnet_sessions + , ftp_telnet_stats.max_telnet_sessions + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , total_heap_memory); + return len; + } + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, + "\n\nMemory Statistics for FTPTelnet at: %s\n" + "FTPTelnet Preprocessor Statistics:\n" + " Current active FTP sessions : "STDu64"\n" + " Max concurrent FTP sessions : "STDu64"\n" + " Total FTP Data sessions : "STDu64"\n" + " Max concurrent FTP Data sessions : "STDu64"\n" + " Current active Telnet sessions : "STDu64"\n" + " Max concurrent Telnet sessions : "STDu64"\n" + , ctime(&curr_time) + , ftp_telnet_stats.ftp_sessions + , ftp_telnet_stats.max_ftp_sessions + , ftp_telnet_stats.ftp_data_sessions + , ftp_telnet_stats.max_ftp_data_sessions + , ftp_telnet_stats.telnet_sessions + , ftp_telnet_stats.max_telnet_sessions); + } + else + { + _dpd.logMsg("\n"); + _dpd.logMsg("Memory Statistics of FTPTelnet at: %s\n", + ctime(&curr_time)); + _dpd.logMsg(" Current active FTP sessions : "STDu64"\n", + ftp_telnet_stats.ftp_sessions); + _dpd.logMsg(" Max concurrent FTP sessions : "STDu64"\n", + ftp_telnet_stats.max_ftp_sessions); + _dpd.logMsg(" Total FTP Data sessions : "STDu64"\n", + ftp_telnet_stats.ftp_data_sessions); + _dpd.logMsg(" Max concurrent FTP Data sessions : "STDu64"\n", + ftp_telnet_stats.max_ftp_data_sessions); + _dpd.logMsg(" Current active Telnet sessions : "STDu64"\n", + ftp_telnet_stats.telnet_sessions); + _dpd.logMsg(" Max concurrent Telnet sessions : "STDu64"\n", + ftp_telnet_stats.max_telnet_sessions); + } + return len; +} + #ifdef SNORT_RELOAD static void _FtpTelnetReload(struct _SnortConfig *sc, tSfPolicyUserContextId ftp_telnet_swap_config, char *args) { @@ -532,8 +628,10 @@ *_dpd.config_file, *_dpd.config_line); } - pPolicyConfig = - (FTPTELNET_GLOBAL_CONF *)calloc(1, sizeof(FTPTELNET_GLOBAL_CONF)); + pPolicyConfig = (FTPTELNET_GLOBAL_CONF *)_dpd.snortAlloc(1, + sizeof(FTPTELNET_GLOBAL_CONF), + PP_FTPTELNET, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.h snort-2.9.20/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.h --- snort-2.9.15.1/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ftptelnet/spp_ftptelnet.h 2022-05-18 04:54:33.000000000 +0000 @@ -1,7 +1,7 @@ /* * spp_ftptelnet.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * Steven A. Sturges * Daniel J. Roelker @@ -34,6 +34,19 @@ #ifndef __SPP_FTPTELNET_H__ #define __SPP_FTPTELNET_H__ +typedef struct _FTPTelnet_Stats +{ + uint64_t ftp_sessions; //Current sessions + uint64_t max_ftp_sessions; //Max cuncurrent sessions + uint64_t telnet_sessions;//Current sessions + uint64_t max_telnet_sessions; //Max cuncurrent sessions + uint64_t ftp_data_sessions; + uint64_t max_ftp_data_sessions; + uint64_t heap_memory; +} FTPTelnet_Stats; + +extern FTPTelnet_Stats ftp_telnet_stats; + void SetupFTPTelnet(void); #endif diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/Makefile.am snort-2.9.20/src/dynamic-preprocessors/gtp/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -34,6 +34,7 @@ endif EXTRA_DIST = \ +sf_gtp.vcxproj \ sf_gtp.dsp diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/Makefile.in snort-2.9.20/src/dynamic-preprocessors/gtp/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@gtp_buffer_dump.c subdir = src/dynamic-preprocessors/gtp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -157,7 +167,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -203,6 +213,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -248,6 +259,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -350,6 +362,7 @@ gtp_config.h gtp_parser.c gtp_parser.h gtp_roptions.c \ gtp_roptions.h gtp_debug.h $(am__append_1) EXTRA_DIST = \ +sf_gtp.vcxproj \ sf_gtp.dsp all: all-am @@ -368,14 +381,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/gtp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/gtp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -432,10 +444,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -504,7 +516,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -658,6 +673,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_buffer_dump.c 2022-05-18 04:54:35.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_buffer_dump.h 2022-05-18 04:54:36.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_config.c snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_config.c 2022-05-18 04:54:37.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_config.h snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_config.h 2022-05-18 04:54:38.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_debug.h snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_debug.h --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_debug.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_debug.h 2022-05-18 04:54:39.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_parser.c snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_parser.c --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_parser.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_parser.c 2022-05-18 04:54:40.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -584,17 +584,17 @@ status = gtp_parse_v0(msg, buff, gtp_len); break; case 1: /*GTP v1*/ - if ((msg->msg_type > 3) && (hdrv1_2->teid == 0)) { + if ((msg->msg_type > 3) && (hdrv1_2->teid == 0)) + { ALERT(GTP_TEID_MISSING, GTP_TEID_MISSING_STR); } status = gtp_parse_v1(msg, buff, gtp_len); break; case 2:/*GTP v2 */ - if ((msg->msg_type > 3) && (msg->version & 0x08)) { - if (hdrv1_2->teid == 0) { - ALERT(GTP_TEID_MISSING, GTP_TEID_MISSING_STR); - } + if ((msg->msg_type > 3) && (hdr->flag & 0x08) && (hdrv1_2->teid == 0)) + { + ALERT(GTP_TEID_MISSING, GTP_TEID_MISSING_STR); } status = gtp_parse_v2(msg, buff, gtp_len); diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_parser.h snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_parser.h --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_parser.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_parser.h 2022-05-18 04:54:41.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_roptions.c snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_roptions.c --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_roptions.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_roptions.c 2022-05-18 04:54:42.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_roptions.h snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_roptions.h --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/gtp_roptions.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/gtp_roptions.h 2022-05-18 04:54:43.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/sf_gtp.vcxproj snort-2.9.20/src/dynamic-preprocessors/gtp/sf_gtp.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/sf_gtp.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/sf_gtp.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,303 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {70A5AB00-59EA-490C-9DBB-4FC3249F44C4} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_gtp.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_gtp.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_gtp.bsc + + + true + true + Console + .\Release\sf_gtp.dll + .\Release\sf_gtp.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_gtp.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_gtp.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_gtp.bsc + + + true + true + Console + .\Release\sf_gtp.dll + .\Release\sf_gtp.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_gtp.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_gtp.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_gtp.bsc + + + true + true + true + Console + .\Debug\sf_gtp.dll + .\Debug\sf_gtp.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_gtp.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_gtp.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_gtp.bsc + + + true + true + true + Console + .\Debug\sf_gtp.dll + .\Debug\sf_gtp.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/spp_gtp.c snort-2.9.20/src/dynamic-preprocessors/gtp/spp_gtp.c --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/spp_gtp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/spp_gtp.c 2022-05-18 04:54:45.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/gtp/spp_gtp.h snort-2.9.20/src/dynamic-preprocessors/gtp/spp_gtp.h --- snort-2.9.15.1/src/dynamic-preprocessors/gtp/spp_gtp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/gtp/spp_gtp.h 2022-05-18 04:54:46.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/Makefile.am snort-2.9.20/src/dynamic-preprocessors/imap/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/imap/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -47,6 +47,7 @@ EXTRA_DIST = \ +sf_imap.vcxproj \ sf_imap.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/Makefile.in snort-2.9.20/src/dynamic-preprocessors/imap/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/imap/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@imap_buffer_dump.h subdir = src/dynamic-preprocessors/imap -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -163,7 +173,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -209,6 +219,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -254,6 +265,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -366,6 +378,7 @@ snort_imap.c snort_imap.h spp_imap.c spp_imap.h \ $(am__append_1) EXTRA_DIST = \ +sf_imap.vcxproj \ sf_imap.dsp all: all-am @@ -384,14 +397,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/imap/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/imap/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -448,10 +460,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -547,7 +559,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -701,6 +716,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/imap/imap_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_buffer_dump.c 2022-05-18 04:54:47.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/imap/imap_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_buffer_dump.h 2022-05-18 04:54:49.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_config.c snort-2.9.20/src/dynamic-preprocessors/imap/imap_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_config.c 2022-05-18 04:54:50.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_config.h snort-2.9.20/src/dynamic-preprocessors/imap/imap_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_config.h 2022-05-18 04:54:51.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_log.c snort-2.9.20/src/dynamic-preprocessors/imap/imap_log.c --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_log.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_log.c 2022-05-18 04:54:52.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_log.h snort-2.9.20/src/dynamic-preprocessors/imap/imap_log.h --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_log.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_log.h 2022-05-18 04:54:53.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_paf.c snort-2.9.20/src/dynamic-preprocessors/imap/imap_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_paf.c 2022-05-18 04:54:54.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -38,10 +38,10 @@ typedef struct _ImapDataInfo { int paren_cnt; /* The open parentheses count in fetch */ - char *next_letter; /* The current command in fetch */ bool found_len; - uint32_t length; bool esc_nxt_char; /* true if the next charachter has been escaped */ + char *next_letter; /* The current command in fetch */ + uint32_t length; } ImapDataInfo; @@ -70,9 +70,9 @@ { MimeDataPafInfo mime_info; /* Mime response information */ ImapPafState imap_state; /* The current IMAP paf stat */ + bool end_of_data; ImapDataInfo imap_data_info; /* Used for parsing data */ ImapDataEnd data_end_state; - bool end_of_data; // uint32_t length; TODO -- parse and add literal length } ImapPafData; @@ -556,7 +556,7 @@ //if (_dpd.fileAPI->check_paf_abort(ssn)) // return PAF_ABORT; - pfdata = _dpd.snortAlloc(1, sizeof(*pfdata), PP_IMAP, 0); + pfdata = _dpd.snortAlloc(1, sizeof(*pfdata), PP_IMAP, PP_MEM_CATEGORY_SESSION); if (pfdata == NULL) { return PAF_ABORT; @@ -595,7 +595,7 @@ void imap_paf_cleanup(void *pafData) { if(pafData) { - _dpd.snortFree(pafData, sizeof(ImapPafData), PP_IMAP, 0); + _dpd.snortFree(pafData, sizeof(ImapPafData), PP_IMAP, PP_MEM_CATEGORY_SESSION); } } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_paf.h snort-2.9.20/src/dynamic-preprocessors/imap/imap_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_paf.h 2022-05-18 04:54:55.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_util.c snort-2.9.20/src/dynamic-preprocessors/imap/imap_util.c --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_util.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_util.c 2022-05-18 04:54:56.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * @@ -56,15 +56,45 @@ #include "sf_snort_packet.h" #include "Unified2_common.h" +#include "memory_stats.h" + extern IMAP *imap_ssn; extern MemPool *imap_mempool; extern MemPool *imap_mime_mempool; -int IMAP_Print_Mem_Stats(char *buffer) +int IMAP_Print_Mem_Stats(FILE *fd, char *buffer, PreprocMemInfo *meminfo) { time_t curr_time = time(NULL); - - return snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of IMAP on: %s\n" + int len = 0; + + if (fd) + { + len = fprintf(fd, ",%lu,%lu,%lu" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu" + , imap_stats.sessions + , imap_stats.max_conc_sessions + , imap_stats.cur_sessions + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + + return len; + + } + + if (buffer) { + /* + * Old buffer output for control socket comm, + * like via, "show snort preprocessor-memory-usage" + * CLI preserved as is + */ + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of IMAP on: %s\n" "IMAP Session Statistics:\n" " Total Sessions seen: " STDu64 "\n" " Max concurrent sessions: " STDu64 "\n" @@ -88,6 +118,28 @@ , (imap_mempool) ? imap_mempool->used_memory : 0 , ((imap_mime_mempool) ? (imap_mime_mempool->max_memory) : 0) + ((imap_mempool) ? (imap_mempool->max_memory) : 0)); + + len += PopulateMemStatsBuffTrailer(buffer+len, len, meminfo); + + } else { + + _dpd.logMsg("IMAP Preprocessor Statistics\n"); + _dpd.logMsg(" Total sessions : %lu \n", imap_stats.sessions); + _dpd.logMsg(" Max concurrent sessions : %lu \n", imap_stats.max_conc_sessions); + _dpd.logMsg(" Current sessions : %lu \n", imap_stats.cur_sessions); + _dpd.logMsg(" IMAP Session \n"); + _dpd.logMsg(" Used Memory :%14lu\n", meminfo[PP_MEM_CATEGORY_SESSION].used_memory); + _dpd.logMsg(" No of Allocs :%14u\n", meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc); + _dpd.logMsg(" No of Frees :%14u\n", meminfo[PP_MEM_CATEGORY_SESSION].num_of_free); + _dpd.logMsg(" IMAP Config \n"); + _dpd.logMsg(" Used Memory :%14lu\n", meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + _dpd.logMsg(" No of Allocs :%14u\n", meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc); + _dpd.logMsg(" No of Frees :%14u\n", meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free); + _dpd.logMsg(" Total memory used :%14lu\n", meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + + } + return len; } void IMAP_GetEOL(const uint8_t *ptr, const uint8_t *end, diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_util.h snort-2.9.20/src/dynamic-preprocessors/imap/imap_util.h --- snort-2.9.15.1/src/dynamic-preprocessors/imap/imap_util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/imap_util.h 2022-05-18 04:54:58.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -35,7 +35,7 @@ void IMAP_GetEOL(const uint8_t *, const uint8_t *, const uint8_t **, const uint8_t **); void IMAP_DecodeType(const char *start, int length, bool cnt_xf); -int IMAP_Print_Mem_Stats(char *buffer); +int IMAP_Print_Mem_Stats(FILE *fd, char *buffer, PreprocMemInfo *meminfo); #ifdef DEBUG_MSGS const char * IMAP_PrintBuffer(SFSnortPacket *); diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/sf_imap.vcxproj snort-2.9.20/src/dynamic-preprocessors/imap/sf_imap.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/imap/sf_imap.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/sf_imap.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,326 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {4CC650AF-8110-4ED8-92A4-CF5A34BE99D6} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_imap.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_imap.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_imap.bsc + + + true + true + true + Console + .\Debug\sf_imap.dll + .\Debug\sf_imap.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_imap.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_imap.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_imap.bsc + + + true + true + true + Console + .\Debug\sf_imap.dll + .\Debug\sf_imap.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_imap.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_imap.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_imap.bsc + + + true + true + Console + .\Release\sf_imap.dll + .\Release\sf_imap.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_imap.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_imap.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_imap.bsc + + + true + true + Console + .\Release\sf_imap.dll + .\Release\sf_imap.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/snort_imap.c snort-2.9.20/src/dynamic-preprocessors/imap/snort_imap.c --- snort-2.9.15.1/src/dynamic-preprocessors/imap/snort_imap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/snort_imap.c 2022-05-18 04:54:59.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -218,7 +218,8 @@ return; /* add one to CMD_LAST for NULL entry */ - config->cmds = (IMAPToken *)_dpd.snortAlloc(CMD_LAST + 1, sizeof(IMAPToken), PP_IMAP, 1); + config->cmds = (IMAPToken *)_dpd.snortAlloc(CMD_LAST + 1, sizeof(IMAPToken), PP_IMAP, + PP_MEM_CATEGORY_CONFIG); if (config->cmds == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => failed to allocate memory for imap " @@ -241,7 +242,8 @@ } /* initialize memory for command searches */ - config->cmd_search = (IMAPSearch *)_dpd.snortAlloc(CMD_LAST, sizeof(IMAPSearch), PP_IMAP, 1); + config->cmd_search = (IMAPSearch *)_dpd.snortAlloc(CMD_LAST, sizeof(IMAPSearch), PP_IMAP, + PP_MEM_CATEGORY_CONFIG); if (config->cmd_search == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => failed to allocate memory for imap " @@ -326,7 +328,7 @@ DEBUG_WRAP(DebugMessage(DEBUG_IMAP, "Creating new session data structure\n");); - ssn = (IMAP *)_dpd.snortAlloc(1, sizeof(IMAP), PP_IMAP, 0); + ssn = (IMAP *)_dpd.snortAlloc(1, sizeof(IMAP), PP_IMAP, PP_MEM_CATEGORY_SESSION); if (ssn == NULL) { DynamicPreprocessorFatalMessage("Failed to allocate IMAP session data\n"); @@ -352,7 +354,7 @@ } imap_stats.log_memcap_exceeded++; } - _dpd.snortFree(ssn, sizeof(*ssn), PP_IMAP, 0); + _dpd.snortFree(ssn, sizeof(*ssn), PP_IMAP, PP_MEM_CATEGORY_SESSION); return NULL; } @@ -549,18 +551,20 @@ if(imap->mime_ssn.decode_state != NULL) { mempool_free(imap_mime_mempool, imap->mime_ssn.decode_bkt); - _dpd.snortFree(imap->mime_ssn.decode_state, sizeof(Email_DecodeState), PP_IMAP, 0); + _dpd.snortFree(imap->mime_ssn.decode_state, sizeof(Email_DecodeState), PP_IMAP, + PP_MEM_CATEGORY_SESSION); } if(imap->mime_ssn.log_state != NULL) { mempool_free(imap_mempool, imap->mime_ssn.log_state->log_hdrs_bkt); - _dpd.snortFree(imap->mime_ssn.log_state, sizeof(MAIL_LogState), PP_IMAP, 0); + _dpd.snortFree(imap->mime_ssn.log_state, sizeof(MAIL_LogState), PP_IMAP, + PP_MEM_CATEGORY_SESSION); } if ( ssl_cb ) ssl_cb->session_free(imap->flow_id); - _dpd.snortFree(imap, sizeof(*imap), PP_IMAP, 0); + _dpd.snortFree(imap, sizeof(*imap), PP_IMAP, PP_MEM_CATEGORY_SESSION); if(imap_stats.conc_sessions) imap_stats.conc_sessions--; @@ -602,18 +606,18 @@ IMAPToken *tmp = config->cmds; for (; tmp->name != NULL; tmp++) - _dpd.snortFree(tmp->name, sizeof(*(tmp->name)), PP_IMAP, 1); + _dpd.snortFree(tmp->name, sizeof(*(tmp->name)), PP_IMAP, PP_MEM_CATEGORY_CONFIG); - _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_IMAP, 1); + _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_IMAP, PP_MEM_CATEGORY_CONFIG); } if (config->cmd_search_mpse != NULL) _dpd.searchAPI->search_instance_free(config->cmd_search_mpse); if (config->cmd_search != NULL) - _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_IMAP, 1); + _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_IMAP, PP_MEM_CATEGORY_CONFIG); - _dpd.snortFree(config, sizeof(*config), PP_IMAP, 1); + _dpd.snortFree(config, sizeof(*config), PP_IMAP, PP_MEM_CATEGORY_CONFIG); } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/snort_imap.h snort-2.9.20/src/dynamic-preprocessors/imap/snort_imap.h --- snort-2.9.15.1/src/dynamic-preprocessors/imap/snort_imap.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/snort_imap.h 2022-05-18 04:55:00.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -234,9 +234,9 @@ uint64_t session_number; #endif + tSfPolicyId policy_id; MimeState mime_ssn; - tSfPolicyId policy_id; tSfPolicyUserContextId config; uint32_t flow_id; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/spp_imap.c snort-2.9.20/src/dynamic-preprocessors/imap/spp_imap.c --- snort-2.9.15.1/src/dynamic-preprocessors/imap/spp_imap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/spp_imap.c 2022-05-18 04:55:01.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -185,7 +185,7 @@ PrintIMAPSize(); #endif - _dpd.registerMemoryStatsFunc(PP_IMAP, "imap", IMAP_Print_Mem_Stats); + _dpd.registerMemoryStatsFunc(PP_IMAP, IMAP_Print_Mem_Stats); if (imap_config == NULL) { @@ -233,7 +233,8 @@ DynamicPreprocessorFatalMessage("Can only configure IMAP preprocessor once.\n"); } - pPolicyConfig = (IMAPConfig *)_dpd.snortAlloc(1, sizeof(IMAPConfig), PP_IMAP, 1); + pPolicyConfig = (IMAPConfig *)_dpd.snortAlloc(1, sizeof(IMAPConfig), PP_IMAP, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { DynamicPreprocessorFatalMessage("Not enough memory to create IMAP " @@ -593,7 +594,8 @@ if (pPolicyConfig != NULL) DynamicPreprocessorFatalMessage("Can only configure IMAP preprocessor once.\n"); - pPolicyConfig = (IMAPConfig *)_dpd.snortAlloc(1, sizeof(IMAPConfig), PP_IMAP, 1); + pPolicyConfig = (IMAPConfig *)_dpd.snortAlloc(1, sizeof(IMAPConfig), PP_IMAP, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { DynamicPreprocessorFatalMessage("Not enough memory to create IMAP " diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/imap/spp_imap.h snort-2.9.20/src/dynamic-preprocessors/imap/spp_imap.h --- snort-2.9.15.1/src/dynamic-preprocessors/imap/spp_imap.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/imap/spp_imap.h 2022-05-18 04:55:02.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Bhagyashree Bantwal diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/libs/Makefile.am snort-2.9.20/src/dynamic-preprocessors/libs/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/libs/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/libs/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -1,6 +1,7 @@ AUTOMAKE_OPTIONS=foreign no-dependencies EXTRA_DIST = \ +sfdynamic_preproc_libs.vcxproj \ sfdynamic_preproc_libs.dsp \ sfparser.c \ sfcommon.h \ diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/libs/Makefile.in snort-2.9.20/src/dynamic-preprocessors/libs/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/libs/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/libs/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,12 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-preprocessors/libs -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/snort_preproc.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = snort_preproc.pc @@ -102,7 +111,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -140,6 +149,7 @@ am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/snort_preproc.pc.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -185,6 +195,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -276,6 +287,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies EXTRA_DIST = \ +sfdynamic_preproc_libs.vcxproj \ sfdynamic_preproc_libs.dsp \ sfparser.c \ sfcommon.h \ @@ -299,14 +311,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/libs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/libs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -353,7 +364,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -501,6 +515,8 @@ ps ps-am tags-am uninstall uninstall-am \ uninstall-pkgconfigDATA +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/libs/sf_preproc_info.h snort-2.9.20/src/dynamic-preprocessors/libs/sf_preproc_info.h --- snort-2.9.15.1/src/dynamic-preprocessors/libs/sf_preproc_info.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/libs/sf_preproc_info.h 2022-05-18 04:55:16.000000000 +0000 @@ -1,7 +1,7 @@ /* * sf_preproc_info.h * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/libs/sfcommon.h snort-2.9.20/src/dynamic-preprocessors/libs/sfcommon.h --- snort-2.9.15.1/src/dynamic-preprocessors/libs/sfcommon.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/libs/sfcommon.h 2022-05-18 04:55:18.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj snort-2.9.20/src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/libs/sfdynamic_preproc_libs.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,248 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {3B06C0CA-3CC0-4514-9737-69A5D41E610D} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + StaticLibrary + v141 + Dynamic + MultiByte + + + StaticLibrary + v141 + Dynamic + MultiByte + + + StaticLibrary + v141 + Dynamic + MultiByte + + + StaticLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + ..\;..\include;..\..\win32\Win32-Includes;..\..\;.\;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;_LIB;SF_SNORT_PREPROC_DLL;WIN32;HAVE_CONFIG_H;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ACTIVE_RESPONSE;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sfdynamic_preproc_libs.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sfdynamic_preproc_libs.bsc + + + true + .\Debug\sfdynamic_preproc_libs.lib + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + ..\;..\include;..\..\win32\Win32-Includes;..\..\;.\;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;_LIB;SF_SNORT_PREPROC_DLL;WIN32;HAVE_CONFIG_H;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ACTIVE_RESPONSE;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sfdynamic_preproc_libs.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sfdynamic_preproc_libs.bsc + + + true + .\Debug\sfdynamic_preproc_libs.lib + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\include;..\..\win32\Win32-Includes;..\..\;.\;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;_LIB;SF_SNORT_PREPROC_DLL;WIN32;HAVE_CONFIG_H;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ACTIVE_RESPONSE;%(PreprocessorDefinitions) + .\Release\ + .\Release\sfdynamic_preproc_libs.pch + .\Release\ + .\Release\ + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sfdynamic_preproc_libs.bsc + + + true + .\Release\sfdynamic_preproc_libs.lib + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\include;..\..\win32\Win32-Includes;..\..\;.\;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;_LIB;SF_SNORT_PREPROC_DLL;WIN32;HAVE_CONFIG_H;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ACTIVE_RESPONSE;%(PreprocessorDefinitions) + .\Release\ + .\Release\sfdynamic_preproc_libs.pch + .\Release\ + .\Release\ + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sfdynamic_preproc_libs.bsc + + + true + .\Release\sfdynamic_preproc_libs.lib + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/libs/sfparser.c snort-2.9.20/src/dynamic-preprocessors/libs/sfparser.c --- snort-2.9.15.1/src/dynamic-preprocessors/libs/sfparser.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/libs/sfparser.c 2022-05-18 04:55:25.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/Makefile.am snort-2.9.20/src/dynamic-preprocessors/modbus/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -33,6 +33,7 @@ endif EXTRA_DIST = \ +sf_modbus.vcxproj \ sf_modbus.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/Makefile.in snort-2.9.20/src/dynamic-preprocessors/modbus/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@modbus_buffer_dump.h subdir = src/dynamic-preprocessors/modbus -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -158,7 +168,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -204,6 +214,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -249,6 +260,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -351,6 +363,7 @@ modbus_decode.c modbus_decode.h modbus_roptions.c \ modbus_roptions.h modbus_paf.c modbus_paf.h $(am__append_1) EXTRA_DIST = \ +sf_modbus.vcxproj \ sf_modbus.dsp all: all-am @@ -369,14 +382,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/modbus/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/modbus/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -433,10 +445,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -505,7 +517,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -659,6 +674,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_buffer_dump.c 2022-05-18 04:55:27.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_buffer_dump.h 2022-05-18 04:55:28.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_decode.c snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_decode.c --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_decode.c 2022-05-18 04:55:30.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan @@ -95,7 +95,7 @@ static void ModbusCheckRequestLengths(modbus_session_data_t *session, SFSnortPacket *packet) { uint16_t modbus_payload_len = packet->payload_size - MODBUS_MIN_LEN; - uint8_t tmp_count; + uint8_t byte_count; int check_passed = 0; switch (session->func) @@ -123,9 +123,9 @@ case MODBUS_FUNC_WRITE_MULTIPLE_REGISTERS: if (modbus_payload_len >= MODBUS_WRITE_MULTIPLE_MIN_SIZE) { - tmp_count = *(packet->payload + MODBUS_MIN_LEN + + byte_count = *(packet->payload + MODBUS_MIN_LEN + MODBUS_WRITE_MULTIPLE_BYTE_COUNT_OFFSET); - if (modbus_payload_len == tmp_count + MODBUS_WRITE_MULTIPLE_MIN_SIZE) + if (modbus_payload_len == byte_count + MODBUS_WRITE_MULTIPLE_MIN_SIZE) check_passed = 1; } break; @@ -138,9 +138,9 @@ case MODBUS_FUNC_READ_WRITE_MULTIPLE_REGISTERS: if (modbus_payload_len >= MODBUS_READ_WRITE_MULTIPLE_MIN_SIZE) { - tmp_count = *(packet->payload + MODBUS_MIN_LEN + + byte_count = *(packet->payload + MODBUS_MIN_LEN + MODBUS_READ_WRITE_MULTIPLE_BYTE_COUNT_OFFSET); - if (modbus_payload_len == MODBUS_READ_WRITE_MULTIPLE_MIN_SIZE + tmp_count) + if (modbus_payload_len == MODBUS_READ_WRITE_MULTIPLE_MIN_SIZE + byte_count) check_passed = 1; } break; @@ -175,9 +175,9 @@ by a set of 7-byte sub-requests. */ if (modbus_payload_len >= MODBUS_BYTE_COUNT_SIZE) { - tmp_count = *(packet->payload + MODBUS_MIN_LEN); - if ((tmp_count == modbus_payload_len - MODBUS_BYTE_COUNT_SIZE) && - (tmp_count % MODBUS_FILE_RECORD_SUB_REQUEST_SIZE == 0)) + byte_count = *(packet->payload + MODBUS_MIN_LEN); + if ((byte_count == modbus_payload_len - MODBUS_BYTE_COUNT_SIZE) && + (byte_count % MODBUS_FILE_RECORD_SUB_REQUEST_SIZE == 0)) { check_passed = 1; } @@ -191,36 +191,40 @@ if (modbus_payload_len >= MODBUS_BYTE_COUNT_SIZE) { - tmp_count = *(packet->payload + MODBUS_MIN_LEN); - if (tmp_count == modbus_payload_len - MODBUS_BYTE_COUNT_SIZE) + byte_count = *(packet->payload + MODBUS_MIN_LEN); + if (byte_count == modbus_payload_len - MODBUS_BYTE_COUNT_SIZE) { uint16_t bytes_processed = 0; - while (bytes_processed < (uint16_t)tmp_count) + while (bytes_processed < (uint16_t)byte_count) { - uint16_t record_length = 0; - /* Check space for sub-request header info */ if ((modbus_payload_len - bytes_processed) < MODBUS_FILE_RECORD_SUB_REQUEST_SIZE) break; - /* Extract record length. */ - record_length = *(packet->payload + MODBUS_MIN_LEN + - MODBUS_BYTE_COUNT_SIZE + bytes_processed + + /* Extract record length. Sub-request record length is + * 2 bytes, but shouldn't be bigger than byte_count + * (request total data length) which is uint8_t. + */ + const uint8_t extra_byte = *(packet->payload + + MODBUS_MIN_LEN + MODBUS_BYTE_COUNT_SIZE + + bytes_processed + MODBUS_FILE_RECORD_SUB_REQUEST_LEN_OFFSET); - record_length = record_length << 8; + if (extra_byte != 0) + break; - record_length |= *(packet->payload + MODBUS_MIN_LEN + - MODBUS_BYTE_COUNT_SIZE + bytes_processed + + const uint8_t record_length = *(packet->payload + + MODBUS_MIN_LEN + MODBUS_BYTE_COUNT_SIZE + + bytes_processed + MODBUS_FILE_RECORD_SUB_REQUEST_LEN_OFFSET + 1); - /* Jump over record data. */ + /* Jump over record data. record_length is in words, multiplied by 2.*/ bytes_processed += MODBUS_FILE_RECORD_SUB_REQUEST_SIZE + - 2*record_length; + 2*(uint16_t)record_length; - if (bytes_processed == (uint16_t)tmp_count) + if (bytes_processed == (uint16_t)byte_count) check_passed = 1; } } @@ -242,7 +246,7 @@ static void ModbusCheckResponseLengths(modbus_session_data_t *session, SFSnortPacket *packet) { uint16_t modbus_payload_len = packet->payload_size - MODBUS_MIN_LEN; - uint8_t tmp_count; + uint8_t byte_count; int check_passed = 0; switch (session->func) @@ -253,8 +257,8 @@ case MODBUS_FUNC_READ_WRITE_MULTIPLE_REGISTERS: if (modbus_payload_len >= MODBUS_BYTE_COUNT_SIZE) { - tmp_count = *(packet->payload + MODBUS_MIN_LEN); /* byte count */ - if (modbus_payload_len == MODBUS_BYTE_COUNT_SIZE + tmp_count) + byte_count = *(packet->payload + MODBUS_MIN_LEN); + if (modbus_payload_len == MODBUS_BYTE_COUNT_SIZE + byte_count) check_passed = 1; } break; @@ -263,8 +267,8 @@ case MODBUS_FUNC_READ_INPUT_REGISTERS: if (modbus_payload_len >= MODBUS_BYTE_COUNT_SIZE) { - tmp_count = *(packet->payload + MODBUS_MIN_LEN); - if (modbus_payload_len == MODBUS_BYTE_COUNT_SIZE + tmp_count) + byte_count = *(packet->payload + MODBUS_MIN_LEN); + if (modbus_payload_len == MODBUS_BYTE_COUNT_SIZE + byte_count) check_passed = 1; } break; @@ -292,12 +296,12 @@ case MODBUS_FUNC_READ_FIFO_QUEUE: if (modbus_payload_len >= MODBUS_DOUBLE_BYTE_COUNT_SIZE) { - uint16_t tmp_count_16; + uint16_t byte_count_16; /* This function uses a 2-byte byte count!! */ - tmp_count_16 = *(uint16_t *)(packet->payload + MODBUS_MIN_LEN); - tmp_count_16 = ntohs(tmp_count_16); - if (modbus_payload_len == MODBUS_DOUBLE_BYTE_COUNT_SIZE + tmp_count_16) + byte_count_16 = *(uint16_t *)(packet->payload + MODBUS_MIN_LEN); + byte_count_16 = ntohs(byte_count_16); + if (modbus_payload_len == MODBUS_DOUBLE_BYTE_COUNT_SIZE + byte_count_16) check_passed = 1; } break; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_decode.h snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_decode.h --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_decode.h 2022-05-18 04:55:36.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_paf.c snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_paf.c 2022-05-18 04:55:38.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_paf.h snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_paf.h 2022-05-18 04:55:40.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_roptions.c snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_roptions.c --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_roptions.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_roptions.c 2022-05-18 04:55:41.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_roptions.h snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_roptions.h --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/modbus_roptions.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/modbus_roptions.h 2022-05-18 04:55:43.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/sf_modbus.vcxproj snort-2.9.20/src/dynamic-preprocessors/modbus/sf_modbus.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/sf_modbus.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/sf_modbus.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,305 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {442239F3-EB5E-4499-9078-CA1EE69D0055} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_modbus.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_modbus.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_modbus.bsc + + + true + true + true + Console + .\Debug\sf_modbus.dll + .\Debug\sf_modbus.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_modbus.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_modbus.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_modbus.bsc + + + true + true + true + Console + .\Debug\sf_modbus.dll + .\Debug\sf_modbus.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_modbus.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_modbus.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_modbus.bsc + + + true + true + Console + .\Release\sf_modbus.dll + .\Release\sf_modbus.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_modbus.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_modbus.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_modbus.bsc + + + true + true + Console + .\Release\sf_modbus.dll + .\Release\sf_modbus.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/spp_modbus.c snort-2.9.20/src/dynamic-preprocessors/modbus/spp_modbus.c --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/spp_modbus.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/spp_modbus.c 2022-05-18 04:55:44.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/modbus/spp_modbus.h snort-2.9.20/src/dynamic-preprocessors/modbus/spp_modbus.h --- snort-2.9.15.1/src/dynamic-preprocessors/modbus/spp_modbus.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/modbus/spp_modbus.h 2022-05-18 04:55:45.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Ryan Jordan diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/Makefile.am snort-2.9.20/src/dynamic-preprocessors/pop/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/pop/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -47,6 +47,7 @@ EXTRA_DIST = \ +sf_pop.vcxproj \ sf_pop.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/Makefile.in snort-2.9.20/src/dynamic-preprocessors/pop/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/pop/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@pop_buffer_dump.h subdir = src/dynamic-preprocessors/pop -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -162,7 +172,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -208,6 +218,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -253,6 +264,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -364,6 +376,7 @@ pop_log.h pop_paf.c pop_paf.h pop_util.c pop_util.h \ snort_pop.c snort_pop.h spp_pop.c spp_pop.h $(am__append_1) EXTRA_DIST = \ +sf_pop.vcxproj \ sf_pop.dsp all: all-am @@ -382,14 +395,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/pop/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/pop/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -446,10 +458,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -545,7 +557,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -699,6 +714,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/pop/pop_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_buffer_dump.c 2022-05-18 04:55:46.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/pop/pop_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_buffer_dump.h 2022-05-18 04:55:48.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_config.c snort-2.9.20/src/dynamic-preprocessors/pop/pop_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_config.c 2022-05-18 04:55:49.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_config.h snort-2.9.20/src/dynamic-preprocessors/pop/pop_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_config.h 2022-05-18 04:55:52.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_log.c snort-2.9.20/src/dynamic-preprocessors/pop/pop_log.c --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_log.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_log.c 2022-05-18 04:55:53.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_log.h snort-2.9.20/src/dynamic-preprocessors/pop/pop_log.h --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_log.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_log.h 2022-05-18 04:55:54.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_paf.c snort-2.9.20/src/dynamic-preprocessors/pop/pop_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_paf.c 2022-05-18 04:55:56.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -67,8 +67,8 @@ typedef struct _PopPafData { PopExpectedResp pop_state; /* The current POP PAF state. */ - PopPafParseCmd cmd_state; /* all of the command parsing data */ DataEndState end_state; /* Current termination sequence state */ + PopPafParseCmd cmd_state; /* all of the command parsing data */ MimeDataPafInfo data_info; /* Mime Information */ bool cmd_continued; /* data continued from previous packet? */ bool end_of_data; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_paf.h snort-2.9.20/src/dynamic-preprocessors/pop/pop_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_paf.h 2022-05-18 04:55:58.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_util.c snort-2.9.20/src/dynamic-preprocessors/pop/pop_util.c --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_util.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_util.c 2022-05-18 04:55:59.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * @@ -57,17 +57,47 @@ #include "sf_snort_packet.h" #include "Unified2_common.h" +#include "memory_stats.h" + extern POP *pop_ssn; extern MemPool *pop_mime_mempool; extern MemPool *pop_mempool; extern POP_Stats pop_stats; -int POP_Print_Mem_Stats(char *buffer) +int POP_Print_Mem_Stats(FILE *fd, char *buffer, PreprocMemInfo *meminfo) { time_t curr_time = time(NULL); - - return snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of POP on: %s\n" + int len = 0; + + if (fd) + { + len = fprintf(fd, ",%lu,%lu,%lu" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu" + , pop_stats.sessions + , pop_stats.max_conc_sessions + , pop_stats.cur_sessions + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + + return len; + + } + + if (buffer) { + /* + * Old buffer output for control socket comm, + * like via, "show snort preprocessor-memory-usage" + * CLI preserved as is + */ + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of POP on: %s\n" "POP Session Statistics:\n" " Total Sessions seen: " STDu64 "\n" " Max concurrent sessions: " STDu64 "\n" @@ -91,6 +121,26 @@ , (pop_mempool) ? pop_mempool->used_memory : 0 , ((pop_mime_mempool) ? (pop_mime_mempool->max_memory) : 0) + ((pop_mempool) ? (pop_mempool->max_memory) : 0)); + + len += PopulateMemStatsBuffTrailer(buffer+len, len, meminfo); + } else { + + _dpd.logMsg("POP Preprocessor Statistics\n"); + _dpd.logMsg(" Total sessions : %lu \n", pop_stats.sessions); + _dpd.logMsg(" Max concurrent sessions : %lu \n", pop_stats.max_conc_sessions); + _dpd.logMsg(" Current sessions : %lu \n", pop_stats.cur_sessions); + _dpd.logMsg(" POP Session \n"); + _dpd.logMsg(" Used Memory :%14lu\n", meminfo[PP_MEM_CATEGORY_SESSION].used_memory); + _dpd.logMsg(" No of Allocs :%14u\n", meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc); + _dpd.logMsg(" No of Frees :%14u\n", meminfo[PP_MEM_CATEGORY_SESSION].num_of_free); + _dpd.logMsg(" POP Config \n"); + _dpd.logMsg(" Used Memory :%14lu\n", meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + _dpd.logMsg(" No of Allocs :%14u\n", meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc); + _dpd.logMsg(" No of Frees :%14u\n", meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free); + _dpd.logMsg(" Total memory used :%14lu\n", meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + } + return len; } void POP_GetEOL(const uint8_t *ptr, const uint8_t *end, diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_util.h snort-2.9.20/src/dynamic-preprocessors/pop/pop_util.h --- snort-2.9.15.1/src/dynamic-preprocessors/pop/pop_util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/pop_util.h 2022-05-18 04:56:01.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -35,7 +35,7 @@ void POP_GetEOL(const uint8_t *, const uint8_t *, const uint8_t **, const uint8_t **); void POP_DecodeType(const char *start, int length, bool cnt_xf); -int POP_Print_Mem_Stats(char *buffer); +int POP_Print_Mem_Stats(FILE *fd, char *buffer, PreprocMemInfo *meminfo); #ifdef DEBUG_MSGS const char * POP_PrintBuffer(SFSnortPacket *); diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/sf_pop.vcxproj snort-2.9.20/src/dynamic-preprocessors/pop/sf_pop.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/pop/sf_pop.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/sf_pop.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,329 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {584E267E-2E58-4388-B56C-3BF198680AF3} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_pop.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_pop.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_pop.bsc + + + true + true + Console + .\Release\sf_pop.dll + .\Release\sf_pop.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_pop.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_pop.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_pop.bsc + + + true + true + Console + .\Release\sf_pop.dll + .\Release\sf_pop.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_pop.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_pop.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_pop.bsc + + + true + true + true + Console + .\Debug\sf_pop.dll + .\Debug\sf_pop.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_pop.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_pop.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_pop.bsc + + + true + true + true + Console + .\Debug\sf_pop.dll + .\Debug\sf_pop.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/snort_pop.c snort-2.9.20/src/dynamic-preprocessors/pop/snort_pop.c --- snort-2.9.15.1/src/dynamic-preprocessors/pop/snort_pop.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/snort_pop.c 2022-05-18 04:56:02.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -173,7 +173,8 @@ return; /* add one to CMD_LAST for NULL entry */ - config->cmds = (POPToken *)_dpd.snortAlloc(CMD_LAST + 1, sizeof(POPToken), PP_POP, 1); + config->cmds = (POPToken *)_dpd.snortAlloc(CMD_LAST + 1, sizeof(POPToken), PP_POP, + PP_MEM_CATEGORY_CONFIG); if (config->cmds == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => failed to allocate memory for pop " @@ -196,7 +197,8 @@ } /* initialize memory for command searches */ - config->cmd_search = (POPSearch *)_dpd.snortAlloc(CMD_LAST, sizeof(POPSearch), PP_POP, 1); + config->cmd_search = (POPSearch *)_dpd.snortAlloc(CMD_LAST, sizeof(POPSearch), PP_POP, + PP_MEM_CATEGORY_CONFIG); if (config->cmd_search == NULL) { @@ -285,7 +287,8 @@ DEBUG_WRAP(DebugMessage(DEBUG_POP, "Creating new session data structure\n");); - ssn = (POP *)_dpd.snortAlloc(1, sizeof(POP), PP_POP, 0); + ssn = (POP *)_dpd.snortAlloc(1, sizeof(POP), PP_POP, + PP_MEM_CATEGORY_SESSION); if (ssn == NULL) { DynamicPreprocessorFatalMessage("Failed to allocate POP session data\n"); @@ -312,7 +315,8 @@ } pop_stats.log_memcap_exceeded++; } - _dpd.snortFree(ssn, sizeof(*ssn), PP_POP, 0); + _dpd.snortFree(ssn, sizeof(*ssn), PP_POP, + PP_MEM_CATEGORY_SESSION); return NULL; } @@ -507,20 +511,22 @@ if(pop->mime_ssn.decode_state != NULL) { mempool_free(pop_mime_mempool, pop->mime_ssn.decode_bkt); - _dpd.snortFree(pop->mime_ssn.decode_state, sizeof(Email_DecodeState), PP_POP, 0); + _dpd.snortFree(pop->mime_ssn.decode_state, sizeof(Email_DecodeState), + PP_POP,PP_MEM_CATEGORY_SESSION); } if(pop->mime_ssn.log_state != NULL) { mempool_free(pop_mempool, pop->mime_ssn.log_state->log_hdrs_bkt); - _dpd.snortFree(pop->mime_ssn.log_state, sizeof(MAIL_LogState), PP_POP, 0); + _dpd.snortFree(pop->mime_ssn.log_state, sizeof(MAIL_LogState), PP_POP, + PP_MEM_CATEGORY_SESSION); } if ( ssl_cb ) ssl_cb->session_free(pop->flow_id); - _dpd.snortFree(pop, sizeof(*pop), PP_POP, 0); + _dpd.snortFree(pop, sizeof(*pop), PP_POP, PP_MEM_CATEGORY_SESSION); if(pop_stats.cur_sessions) pop_stats.cur_sessions--; if(pop_stats.conc_sessions) @@ -561,18 +567,18 @@ POPToken *tmp = config->cmds; for (; tmp->name != NULL; tmp++) - _dpd.snortFree(tmp->name, sizeof(*(tmp->name)), PP_POP, 1); + _dpd.snortFree(tmp->name, sizeof(*(tmp->name)), PP_POP, PP_MEM_CATEGORY_CONFIG); - _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_POP, 1); + _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_POP, PP_MEM_CATEGORY_CONFIG); } if (config->cmd_search_mpse != NULL) _dpd.searchAPI->search_instance_free(config->cmd_search_mpse); if (config->cmd_search != NULL) - _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_POP, 1); + _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_POP, PP_MEM_CATEGORY_CONFIG); - _dpd.snortFree(config, sizeof(*config), PP_POP, 1); + _dpd.snortFree(config, sizeof(*config), PP_POP, PP_MEM_CATEGORY_CONFIG); } @@ -680,24 +686,25 @@ #ifdef DUMP_BUFFER dumpBuffer(POP_REQUEST_COMMAND_DUMP,ptr,(eolm-ptr)); #endif - if (pop_ssn->state == STATE_UNKNOWN) + if (pop_ssn->state == STATE_UNKNOWN && + ((pop_ssn->session_flags & POP_FLAG_CHECK_SSL) && + (IsSSL(ptr, end - ptr, p->flags)))) { DEBUG_WRAP(DebugMessage(DEBUG_POP, "Command not found, but state is " "unknown - checking for SSL\n");); /* check for encrypted */ - if ((pop_ssn->session_flags & POP_FLAG_CHECK_SSL) && - (IsSSL(ptr, end - ptr, p->flags))) - { - DEBUG_WRAP(DebugMessage(DEBUG_POP, "Packet is SSL encrypted\n");); + DEBUG_WRAP(DebugMessage(DEBUG_POP, "Packet is SSL encrypted\n");); - pop_ssn->state = STATE_TLS_DATA; + pop_ssn->state = STATE_TLS_DATA; - /* Ignore data */ - return end; - } - else + /* Ignore data */ + return end; + } + else + { + if (pop_ssn->state == STATE_UNKNOWN) { DEBUG_WRAP(DebugMessage(DEBUG_POP, "Not SSL - try data state\n");); /* don't check for ssl again in this packet */ @@ -705,15 +712,12 @@ pop_ssn->session_flags &= ~POP_FLAG_CHECK_SSL; pop_ssn->state = STATE_DATA; - //pop_ssn->data_state = STATE_DATA_UNKNOWN; - + POP_GenerateAlert(POP_UNKNOWN_CMD, "%s", POP_UNKNOWN_CMD_STR); + DEBUG_WRAP(DebugMessage(DEBUG_POP, "Unknown POP command found\n");); return ptr; } - } - else - { POP_GenerateAlert(POP_UNKNOWN_CMD, "%s", POP_UNKNOWN_CMD_STR); - DEBUG_WRAP(DebugMessage(DEBUG_POP, "No known command found\n");); + DEBUG_WRAP(DebugMessage(DEBUG_POP, "Unknown POP command found\n");); return eol; } } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/snort_pop.h snort-2.9.20/src/dynamic-preprocessors/pop/snort_pop.h --- snort-2.9.15.1/src/dynamic-preprocessors/pop/snort_pop.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/snort_pop.h 2022-05-18 04:56:09.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -165,9 +165,8 @@ MimeState mime_ssn; tSfPolicyId policy_id; - tSfPolicyUserContextId config; uint32_t flow_id; - + tSfPolicyUserContextId config; } POP; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/spp_pop.c snort-2.9.20/src/dynamic-preprocessors/pop/spp_pop.c --- snort-2.9.15.1/src/dynamic-preprocessors/pop/spp_pop.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/spp_pop.c 2022-05-18 04:56:14.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -186,7 +186,7 @@ PrintPOPSize(); #endif - _dpd.registerMemoryStatsFunc(PP_POP, "pop", POP_Print_Mem_Stats); + _dpd.registerMemoryStatsFunc(PP_POP, POP_Print_Mem_Stats); if (pop_config == NULL) { @@ -238,7 +238,8 @@ DynamicPreprocessorFatalMessage("Can only configure POP preprocessor once.\n"); } - pPolicyConfig = (POPConfig *)_dpd.snortAlloc(1, sizeof(POPConfig), PP_POP, 1); + pPolicyConfig = (POPConfig *)_dpd.snortAlloc(1, sizeof(POPConfig), PP_POP, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { DynamicPreprocessorFatalMessage("Not enough memory to create POP " @@ -588,7 +589,8 @@ if (pPolicyConfig != NULL) DynamicPreprocessorFatalMessage("Can only configure POP preprocessor once.\n"); - pPolicyConfig = (POPConfig *)_dpd.snortAlloc(1, sizeof(POPConfig), PP_POP, 1); + pPolicyConfig = (POPConfig *)_dpd.snortAlloc(1, sizeof(POPConfig), PP_POP, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { DynamicPreprocessorFatalMessage("Not enough memory to create POP " diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/pop/spp_pop.h snort-2.9.20/src/dynamic-preprocessors/pop/spp_pop.h --- snort-2.9.15.1/src/dynamic-preprocessors/pop/spp_pop.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/pop/spp_pop.h 2022-05-18 04:56:16.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * Author: Bhagyashree Bantwal diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/Makefile.am snort-2.9.20/src/dynamic-preprocessors/reputation/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -55,6 +55,7 @@ EXTRA_DIST = \ +sf_reputation.vcxproj \ sf_reputation.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/Makefile.in snort-2.9.20/src/dynamic-preprocessors/reputation/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-preprocessors/reputation -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -165,7 +175,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -211,6 +221,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -256,6 +267,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -390,6 +402,7 @@ @HAVE_SHARED_REP_TRUE@./shmem/shmem_mgmt.c EXTRA_DIST = \ +sf_reputation.vcxproj \ sf_reputation.dsp all: all-am @@ -408,14 +421,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/reputation/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/reputation/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -472,10 +484,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -577,7 +589,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -731,6 +746,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_config.c snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_config.c 2022-05-18 04:56:18.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -1620,8 +1620,9 @@ /* Sanity check(s) */ if ( !argp ) { - _dpd.logMsg("WARNING: Can't find any whitelist/blacklist entries. " - "Reputation Preprocessor disabled.\n"); + _dpd.logMsg("WARNING: Can't find any %s/%s entries. " + "Reputation Preprocessor disabled.\n", + REPUTATION_WHITELIST_KEYWORD, REPUTATION_BLACKLIST_KEYWORD); return; } @@ -1643,8 +1644,9 @@ if ((config->numEntries <= 0) && (!config->sharedMem.path)) { - _dpd.logMsg("WARNING: Can't find any whitelist/blacklist entries. " - "Reputation Preprocessor disabled.\n"); + _dpd.logMsg("WARNING: Can't find any %s/%s entries. " + "Reputation Preprocessor disabled.\n", + REPUTATION_WHITELIST_KEYWORD, REPUTATION_BLACKLIST_KEYWORD); free(argcpyp); return; } @@ -1680,7 +1682,7 @@ else if ( !strcasecmp( cur_tokenp, REPUTATION_BLACKLIST_KEYWORD )) { cur_tokenp = strtok( NULL, REPUTATION_CONFIG_VALUE_SEPERATORS); - DEBUG_WRAP(DebugMessage(DEBUG_REPUTATION, "Loading blacklist from %s\n",cur_tokenp );); + DEBUG_WRAP(DebugMessage(DEBUG_REPUTATION, "Loading %s from %s\n", REPUTATION_BLACKLIST_KEYWORD, cur_tokenp );); if(cur_tokenp == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Bad list filename in IP List.\n", @@ -1699,7 +1701,7 @@ else if ( !strcasecmp( cur_tokenp, REPUTATION_WHITELIST_KEYWORD )) { cur_tokenp = strtok( NULL, REPUTATION_CONFIG_VALUE_SEPERATORS); - DEBUG_WRAP(DebugMessage(DEBUG_REPUTATION, "Loading whitelist from %s\n",cur_tokenp );); + DEBUG_WRAP(DebugMessage(DEBUG_REPUTATION, "Loading %s from %s\n", REPUTATION_WHITELIST_KEYWORD, cur_tokenp );); if(cur_tokenp == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Bad list filename in IP List.\n", diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_config.h snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_config.h 2022-05-18 04:56:20.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_debug.h snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_debug.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_debug.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_debug.h 2022-05-18 04:56:21.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_utils.c snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_utils.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_utils.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_utils.c 2022-05-18 04:56:22.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_utils.h snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_utils.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/reputation_utils.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/reputation_utils.h 2022-05-18 04:56:23.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/sf_reputation.vcxproj snort-2.9.20/src/dynamic-preprocessors/reputation/sf_reputation.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/sf_reputation.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/sf_reputation.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,315 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {27AC2703-100A-4534-9EC4-9DBA758152FC} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_reputation.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_reputation.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_reputation.bsc + + + true + true + true + Console + .\Debug\sf_reputation.dll + .\Debug\sf_reputation.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_reputation.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_reputation.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_reputation.bsc + + + true + true + true + Console + .\Debug\sf_reputation.dll + .\Debug\sf_reputation.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_reputation.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_reputation.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_reputation.bsc + + + true + true + Console + .\Release\sf_reputation.dll + .\Release\sf_reputation.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_reputation.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_reputation.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_reputation.bsc + + + true + true + Console + .\Release\sf_reputation.dll + .\Release\sf_reputation.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.c snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.c 2022-05-18 04:56:24.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.h snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/sflinux_helpers.h 2022-05-18 04:56:25.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_common.h snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_common.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_common.h 2022-05-18 04:56:28.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_config.c snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_config.c 2022-05-18 04:56:29.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_config.h snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_config.h 2022-05-18 04:56:31.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.c snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.c 2022-05-18 04:56:33.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.h snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_datamgmt.h 2022-05-18 04:56:39.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_lib.c snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_lib.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_lib.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_lib.c 2022-05-18 04:56:40.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_lib.h snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_lib.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_lib.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_lib.h 2022-05-18 04:56:46.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.c snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.c 2022-05-18 04:56:51.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.h snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/shmem/shmem_mgmt.h 2022-05-18 04:56:53.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/spp_reputation.c snort-2.9.20/src/dynamic-preprocessors/reputation/spp_reputation.c --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/spp_reputation.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/spp_reputation.c 2022-05-18 04:56:55.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** @@ -89,6 +89,7 @@ static void ReputationCleanExit(int, void *); static inline IPrepInfo* ReputationLookup(sfaddr_t* ip); static inline IPdecision GetReputation(IPrepInfo *, SFSnortPacket *, uint32_t *); +int reputation_get_entry_count(void); bool reputation_process_external_ip(void *p, sfaddr_t* ip); #ifdef SHARED_REP static void ReputationMaintenanceCheck(int, void *); @@ -134,6 +135,7 @@ ReputationReloadVerify, ReputationReloadSwap, ReputationReloadSwapFree); #endif + _dpd.registerReputationGetEntryCount(reputation_get_entry_count); _dpd.registerReputationProcessExternal(reputation_process_external_ip); } #ifdef SHARED_REP @@ -224,11 +226,11 @@ break; case BLACKLISTED: - decision = "BLACKLISTED"; + decision = "BLOCK-LIST"; break; case WHITELISTED_UNBLACK: - decision = "WHITELISTED UNBLACK"; + decision = "DO-NOT-BLOCK-LIST UNBLOCK"; break; case MONITORED: @@ -236,7 +238,7 @@ break; case WHITELISTED_TRUST: - decision = "WHITELISTED TRUST"; + decision = "DO-NOT-BLOCK-LIST TRUST"; break; default: @@ -245,7 +247,7 @@ } snprintf(statusBuf, statusBufLen, - "Reputation Info: %s in list %d" + "Reputation Info: verdict %s in list %d" #ifdef DAQ_PKTHDR_UNKNOWN " from zone %d" #endif @@ -779,7 +781,7 @@ _dpd.inlineForceDropSession(p); flags |= SSNFLAG_FORCE_BLOCK; if (*_dpd.pkt_tracer_enabled) - _dpd.addPktTrace(VERDICT_REASON_REPUTATION, snprintf(_dpd.trace, _dpd.traceMax, "Reputation: packet blacklisted, drop\n")); + _dpd.addPktTrace(VERDICT_REASON_REPUTATION, snprintf(_dpd.trace, _dpd.traceMax, "Reputation: packet verdict block-list, drop\n")); else _dpd.addPktTrace(VERDICT_REASON_REPUTATION, 0); #endif // disable all preproc analysis and detection for this packet @@ -802,6 +804,12 @@ reputation_stats.whitelisted++; } } + +int reputation_get_entry_count(void) +{ + return (IPtables? sfrt_flat_num_entries((table_flat_t *)*IPtables) : 0); +} + bool reputation_process_external_ip(void *pkt, sfaddr_t *ip) { IPdecision decision = DECISION_NULL; @@ -833,7 +841,7 @@ _dpd.inlineForceDropSession(p); flags |= SSNFLAG_FORCE_BLOCK; if (*_dpd.pkt_tracer_enabled) - _dpd.addPktTrace(VERDICT_REASON_REPUTATION, snprintf(_dpd.trace, _dpd.traceMax, "Reputation: packet blacklisted based on IP fetched from URL, drop\n")); + _dpd.addPktTrace(VERDICT_REASON_REPUTATION, snprintf(_dpd.trace, _dpd.traceMax, "Reputation: packet verdict block-list based on IP fetched from URL, drop\n")); else _dpd.addPktTrace(VERDICT_REASON_REPUTATION, 0); #endif @@ -994,9 +1002,9 @@ _dpd.logMsg(" Total Memory Allocated: "STDu64"\n", reputation_stats.memoryAllocated); if (reputation_stats.blacklisted > 0) - _dpd.logMsg(" Number of packets blacklisted: "STDu64"\n", reputation_stats.blacklisted); + _dpd.logMsg(" Number of block-list packets: "STDu64"\n", reputation_stats.blacklisted); if (reputation_stats.whitelisted > 0) - _dpd.logMsg(" Number of packets whitelisted: "STDu64"\n", reputation_stats.whitelisted); + _dpd.logMsg(" Number of do-not-block-list packets: "STDu64"\n", reputation_stats.whitelisted); if (reputation_stats.monitored > 0) _dpd.logMsg(" Number of packets monitored: "STDu64"\n", reputation_stats.monitored); diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/reputation/spp_reputation.h snort-2.9.20/src/dynamic-preprocessors/reputation/spp_reputation.h --- snort-2.9.15.1/src/dynamic-preprocessors/reputation/spp_reputation.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/reputation/spp_reputation.h 2022-05-18 04:56:57.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** @@ -56,9 +56,9 @@ #define ALERT(x,y) { _dpd.alertAdd(GENERATOR_SPP_REPUTATION, x, 1, 0, 3, y, 0 ); } #define REPUTATION_EVENT_BLACKLIST 1 -#define REPUTATION_EVENT_BLACKLIST_STR "(spp_reputation) packets blacklisted" +#define REPUTATION_EVENT_BLACKLIST_STR "(spp_reputation) packets block-list" #define REPUTATION_EVENT_WHITELIST 2 -#define REPUTATION_EVENT_WHITELIST_STR "(spp_reputation) packets whitelisted" +#define REPUTATION_EVENT_WHITELIST_STR "(spp_reputation) packets do-not-block-list" #define REPUTATION_EVENT_MONITOR 3 #define REPUTATION_EVENT_MONITOR_STR "(spp_reputation) packets monitored" diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/Makefile.am snort-2.9.20/src/dynamic-preprocessors/s7commplus/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,34 @@ +## $Id +AUTOMAKE_OPTIONS=foreign no-dependencies + +INCLUDES = -I../include -I${srcdir}/../libs + +dynamicpreprocessordir = ${libdir}/snort_dynamicpreprocessor + +dynamicpreprocessor_LTLIBRARIES = libsf_s7commplus_preproc.la + +libsf_s7commplus_preproc_la_LDFLAGS = -export-dynamic -module @XCCFLAGS@ +if SO_WITH_STATIC_LIB +libsf_s7commplus_preproc_la_LIBADD = ../libsf_dynamic_preproc.la +else +nodist_libsf_s7commplus_preproc_la_SOURCES = \ +../include/sf_dynamic_preproc_lib.c \ +../include/sfPolicyUserData.c +endif + +libsf_s7commplus_preproc_la_SOURCES = \ +spp_s7comm.c \ +spp_s7comm.h \ +s7comm_decode.c \ +s7comm_decode.h \ +s7comm_roptions.c \ +s7comm_roptions.h \ +s7comm_paf.c \ +s7comm_paf.h + +#EXTRA_DIST = \ +#sf_s7comm.dsp + +all-local: $(LTLIBRARIES) + $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES + diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/Makefile.in snort-2.9.20/src/dynamic-preprocessors/s7commplus/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/Makefile.in 2022-05-23 15:42:30.000000000 +0000 @@ -0,0 +1,682 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/dynamic-preprocessors/s7commplus +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(dynamicpreprocessordir)" +LTLIBRARIES = $(dynamicpreprocessor_LTLIBRARIES) +@SO_WITH_STATIC_LIB_TRUE@libsf_s7commplus_preproc_la_DEPENDENCIES = \ +@SO_WITH_STATIC_LIB_TRUE@ ../libsf_dynamic_preproc.la +am_libsf_s7commplus_preproc_la_OBJECTS = spp_s7comm.lo \ + s7comm_decode.lo s7comm_roptions.lo s7comm_paf.lo +@SO_WITH_STATIC_LIB_FALSE@nodist_libsf_s7commplus_preproc_la_OBJECTS = \ +@SO_WITH_STATIC_LIB_FALSE@ sf_dynamic_preproc_lib.lo \ +@SO_WITH_STATIC_LIB_FALSE@ sfPolicyUserData.lo +libsf_s7commplus_preproc_la_OBJECTS = \ + $(am_libsf_s7commplus_preproc_la_OBJECTS) \ + $(nodist_libsf_s7commplus_preproc_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libsf_s7commplus_preproc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libsf_s7commplus_preproc_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = +am__maybe_remake_depfiles = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libsf_s7commplus_preproc_la_SOURCES) \ + $(nodist_libsf_s7commplus_preproc_la_SOURCES) +DIST_SOURCES = $(libsf_s7commplus_preproc_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CCONFIGFLAGS = @CCONFIGFLAGS@ +CFLAGS = @CFLAGS@ +CONFIGFLAGS = @CONFIGFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +ICONFIGFLAGS = @ICONFIGFLAGS@ +INCLUDES = -I../include -I${srcdir}/../libs +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIGNAL_SNORT_DUMP_STATS = @SIGNAL_SNORT_DUMP_STATS@ +SIGNAL_SNORT_READ_ATTR_TBL = @SIGNAL_SNORT_READ_ATTR_TBL@ +SIGNAL_SNORT_RELOAD = @SIGNAL_SNORT_RELOAD@ +SIGNAL_SNORT_ROTATE_STATS = @SIGNAL_SNORT_ROTATE_STATS@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XCCFLAGS = @XCCFLAGS@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extra_incl = @extra_incl@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +luajit_CFLAGS = @luajit_CFLAGS@ +luajit_LIBS = @luajit_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign no-dependencies +dynamicpreprocessordir = ${libdir}/snort_dynamicpreprocessor +dynamicpreprocessor_LTLIBRARIES = libsf_s7commplus_preproc.la +libsf_s7commplus_preproc_la_LDFLAGS = -export-dynamic -module @XCCFLAGS@ +@SO_WITH_STATIC_LIB_TRUE@libsf_s7commplus_preproc_la_LIBADD = ../libsf_dynamic_preproc.la +@SO_WITH_STATIC_LIB_FALSE@nodist_libsf_s7commplus_preproc_la_SOURCES = \ +@SO_WITH_STATIC_LIB_FALSE@../include/sf_dynamic_preproc_lib.c \ +@SO_WITH_STATIC_LIB_FALSE@../include/sfPolicyUserData.c + +libsf_s7commplus_preproc_la_SOURCES = \ +spp_s7comm.c \ +spp_s7comm.h \ +s7comm_decode.c \ +s7comm_decode.h \ +s7comm_roptions.c \ +s7comm_roptions.h \ +s7comm_paf.c \ +s7comm_paf.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/s7commplus/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/dynamic-preprocessors/s7commplus/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-dynamicpreprocessorLTLIBRARIES: $(dynamicpreprocessor_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(dynamicpreprocessor_LTLIBRARIES)'; test -n "$(dynamicpreprocessordir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(dynamicpreprocessordir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dynamicpreprocessordir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dynamicpreprocessordir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dynamicpreprocessordir)"; \ + } + +uninstall-dynamicpreprocessorLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(dynamicpreprocessor_LTLIBRARIES)'; test -n "$(dynamicpreprocessordir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dynamicpreprocessordir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dynamicpreprocessordir)/$$f"; \ + done + +clean-dynamicpreprocessorLTLIBRARIES: + -test -z "$(dynamicpreprocessor_LTLIBRARIES)" || rm -f $(dynamicpreprocessor_LTLIBRARIES) + @list='$(dynamicpreprocessor_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libsf_s7commplus_preproc.la: $(libsf_s7commplus_preproc_la_OBJECTS) $(libsf_s7commplus_preproc_la_DEPENDENCIES) $(EXTRA_libsf_s7commplus_preproc_la_DEPENDENCIES) + $(AM_V_CCLD)$(libsf_s7commplus_preproc_la_LINK) -rpath $(dynamicpreprocessordir) $(libsf_s7commplus_preproc_la_OBJECTS) $(libsf_s7commplus_preproc_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(AM_V_CC)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< + +sf_dynamic_preproc_lib.lo: ../include/sf_dynamic_preproc_lib.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sf_dynamic_preproc_lib.lo `test -f '../include/sf_dynamic_preproc_lib.c' || echo '$(srcdir)/'`../include/sf_dynamic_preproc_lib.c + +sfPolicyUserData.lo: ../include/sfPolicyUserData.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sfPolicyUserData.lo `test -f '../include/sfPolicyUserData.c' || echo '$(srcdir)/'`../include/sfPolicyUserData.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) all-local +installdirs: + for dir in "$(DESTDIR)$(dynamicpreprocessordir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-dynamicpreprocessorLTLIBRARIES clean-generic \ + clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dynamicpreprocessorLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dynamicpreprocessorLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \ + clean-dynamicpreprocessorLTLIBRARIES clean-generic \ + clean-libtool cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-dynamicpreprocessorLTLIBRARIES \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am \ + uninstall-dynamicpreprocessorLTLIBRARIES + +.PRECIOUS: Makefile + + +#EXTRA_DIST = \ +#sf_s7comm.dsp + +all-local: $(LTLIBRARIES) + $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_decode.c snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_decode.c --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_decode.c 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_decode.c 2022-05-18 04:56:58.000000000 +0000 @@ -0,0 +1,148 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Dynamic preprocessor for the S7comm protocol + * + */ + +/* + * This is the encapsulation of S7comm/S7comm-plus protocol: + * Ethernet | IP | TCP (server port 102) | TPKT | COTP | S7comm or S7comm-plus + */ + +#include "s7comm_decode.h" + +/* TPKT header */ +typedef struct _tpkt_header +{ + uint8_t version; + uint8_t reserved; + uint16_t length; +} tpkt_header_t; + +/* COTP header */ +typedef struct _cotp_header +{ + uint8_t length; + uint8_t pdu_type; + uint8_t tpdu_num; +} cotp_header_t; + +/* S7commplus data structures */ +typedef struct _s7commplus_header +{ + uint8_t proto_id; + uint8_t proto_version; + uint16_t data_len; +} s7commplus_header_t; + +#pragma pack(1) +typedef struct _s7commplus_data_hdr +{ + uint8_t opcode; + uint16_t reserved_1; + uint16_t function; + uint16_t reserved_2; +} s7commplus_data_hdr_t; +#pragma pack() + +static int S7commplusProtocolDecode(s7commplus_session_data_t *session, SFSnortPacket *packet) +{ + const s7commplus_header_t* s7commplus_header; + const s7commplus_data_hdr_t* s7commplus_data_header; + int offset; + + offset = sizeof(tpkt_header_t) + sizeof(cotp_header_t); + + s7commplus_header = (const s7commplus_header_t*)(packet->payload + offset); + /* Set the session data. Swap byte order for 16-bit fields. */ + session->s7commplus_proto_id = s7commplus_header->proto_id; + session->s7commplus_proto_version= s7commplus_header->proto_version; + session->s7commplus_data_len = ntohs(s7commplus_header->data_len); + + /* V1 or V2 header packets */ + if (s7commplus_header->proto_version <= 0x02) + offset += sizeof(s7commplus_header_t); + else + { + /* 33 byte Integrity part for V3 header packets */ + offset += sizeof(s7commplus_header_t) + INTEGRITY_PART_LEN ; + } + s7commplus_data_header = (const s7commplus_data_hdr_t *)(packet->payload + offset); + /* Set the session data. Swap byte order for 16-bit fields. */ + session->s7commplus_opcode = s7commplus_data_header->opcode; + session->s7commplus_reserved_1 = ntohs(s7commplus_data_header->reserved_1); + session->s7commplus_function = ntohs(s7commplus_data_header->function); + session->s7commplus_reserved_2 = ntohs(s7commplus_data_header->reserved_2); + + return true; +} + +int S7commplusDecode(s7commplus_config_t *config, SFSnortPacket *packet) +{ + s7commplus_session_data_t *session; + const tpkt_header_t *tpkt_header; + const cotp_header_t *cotp_header; + const s7commplus_header_t *s7commplus_header; + uint16_t tpkt_length; + + if (packet->payload_size < TPKT_MIN_HDR_LEN) { + memset(&session, 0, sizeof(session)); + return false; + } + + session = (s7commplus_session_data_t *) + _dpd.sessionAPI->get_application_data(packet->stream_session, PP_S7COMMPLUS); + session->s7commplus_proto_id = 0; + + /* Lay the header struct over the payload */ + tpkt_header = (const tpkt_header_t *) packet->payload; + cotp_header = (const cotp_header_t *) (packet->payload + sizeof(tpkt_header_t)); + tpkt_length = ntohs(tpkt_header->length); + + /* It might be COTP fragment data */ + if ((tpkt_length == TPKT_MIN_HDR_LEN) || (tpkt_length == TPKT_MIN_DATA_HDR_LEN)) + { + memset(&session, 0, sizeof(session)); + return true; + } + + /* It might be a TPKT/COTP packet for other purpose, e.g. connect */ + if (cotp_header->length != COTP_HDR_LEN_FOR_S7COMMPLUS || + cotp_header->pdu_type != COTP_HDR_PDU_TYPE_DATA) + { + memset(&session, 0, sizeof(session)); + return true; + } + + s7commplus_header = (const s7commplus_header_t *)(packet->payload + + sizeof(tpkt_header_t) + sizeof(cotp_header_t)); + + if (s7commplus_header->proto_id == S7COMMPLUS_PROTOCOL_ID) + { + return (S7commplusProtocolDecode(session, packet)); + } + else + { + _dpd.alertAdd(GENERATOR_SPP_S7COMMPLUS, S7COMMPLUS_BAD_PROTO_ID, 1, 0, 3, + S7COMMPLUS_BAD_PROTO_ID_STR, 0); + return false; + } +} diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_decode.h snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_decode.h --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_decode.h 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_decode.h 2022-05-18 04:56:59.000000000 +0000 @@ -0,0 +1,57 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Dynamic preprocessor for the S7commplus protocol + * + */ + +#ifndef S7COMM_DECODE_H +#define S7COMM_DECODE_H + +#include +#include /* For memset */ + +#include "spp_s7comm.h" +#include "sf_snort_plugin_api.h" + +/* GIDs, SIDs, and Strings */ +#define GENERATOR_SPP_S7COMMPLUS 149 /* matches generators.h */ + +/* S7Commplus defines */ +#define S7COMMPLUS_PROTOCOL_ID 0x72 +#define S7COMMPLUS_PDUTYPE_CONNECT 0x01 +#define S7COMMPLUS_PDUTYPE_DATA 0x02 +#define S7COMMPLUS_PDUTYPE_DATAFW1_5 0x03 +#define S7COMMPLUS_PDUTYPE_KEEPALIVE 0xFF + +#define COTP_HDR_LEN_FOR_S7COMMPLUS 2 +#define COTP_HDR_PDU_TYPE_DATA 0xF0 + +#define S7COMMPLUS_BAD_LENGTH 1 +#define S7COMMPLUS_BAD_PROTO_ID 2 +#define S7COMMPLUS_RESERVED_FUNCTION 3 + +#define S7COMMPLUS_BAD_LENGTH_STR "(spp_s7commplus): Length in S7commplus header does not match the length needed for the given S7comm function." +#define S7COMMPLUS_BAD_PROTO_ID_STR "(spp_s7commplus): S7commplus protocol ID is non-zero." +#define S7COMMPLUS_RESERVED_FUNCTION_STR "(spp_s7commplus): Reserved S7commplus function code in use." + +int S7commplusDecode(s7commplus_config_t *config, SFSnortPacket *packet); + +#endif /* S7COMM_DECODE_H */ diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_paf.c snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_paf.c 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_paf.c 2022-05-18 04:57:01.000000000 +0000 @@ -0,0 +1,142 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Protocol-Aware Flushing (PAF) code for the S7commplus preprocessor. + * + */ + +#include "spp_s7comm.h" +#include "s7comm_decode.h" +#include "s7comm_paf.h" +#include "sf_dynamic_preprocessor.h" + +int S7commplusPafRegisterPort (struct _SnortConfig *sc, uint16_t port, tSfPolicyId policy_id) +{ + if (!_dpd.isPafEnabled()) + return 0; + + _dpd.streamAPI->register_paf_port(sc, policy_id, port, 0, (PAF_Callback)S7commplusPaf, true); + _dpd.streamAPI->register_paf_port(sc, policy_id, port, 1, (PAF_Callback)S7commplusPaf, true); + + return 0; +} + +#ifdef TARGET_BASED +int S7commplusAddServiceToPaf (struct _SnortConfig *sc, uint16_t service, tSfPolicyId policy_id) +{ + if (!_dpd.isPafEnabled()) + return 0; + + _dpd.streamAPI->register_paf_service(sc, policy_id, service, 0, (PAF_Callback)S7commplusPaf, true); + _dpd.streamAPI->register_paf_service(sc, policy_id, service, 1, (PAF_Callback)S7commplusPaf, true); + + return 0; +} +#endif + +/* Function: S7commplusPaf() + +Purpose: S7commplus/TCP PAF callback. +Statefully inspects S7commplus traffic from the start of a session, +Reads up until the length octet is found, then sets a flush point. + +Arguments: +void * - stream5 session pointer +void ** - S7commplus state tracking structure +const uint8_t * - payload data to inspect +uint32_t - length of payload data +uint32_t - flags to check whether client or server +uint32_t * - pointer to set flush point + +Returns: +PAF_Status - PAF_FLUSH if flush point found, PAF_SEARCH otherwise + */ + +PAF_Status S7commplusPaf(void *ssn, void **user, const uint8_t *data, + uint32_t len, uint32_t flags, uint32_t *fp, uint32_t *fp_eoh) +{ + s7commplus_paf_data_t *pafdata = *(s7commplus_paf_data_t **)user; + uint32_t bytes_processed = 0; + + /* Allocate state object if it doesn't exist yet. */ + if (pafdata == NULL) + { + pafdata = calloc(1, sizeof(s7commplus_paf_data_t)); + if (pafdata == NULL) + return PAF_ABORT; + + *user = pafdata; + } + + /* Process this packet 1 byte at a time */ + while (bytes_processed < len) + { + switch (pafdata->state) + { + /* Skip the Transaction & Protocol IDs */ + case S7COMMPLUS_PAF_STATE__TPKT_VER: + case S7COMMPLUS_PAF_STATE__TPKT_RESERVED: + case S7COMMPLUS_PAF_STATE__COPT_LEN: + case S7COMMPLUS_PAF_STATE__COPT_PDU_TYPE: + pafdata->state++; + break; + + case S7COMMPLUS_PAF_STATE__TPKT_LEN_1: + pafdata->tpkt_length |= ( *(data + bytes_processed) << 8 ); + pafdata->state++; + break; + + case S7COMMPLUS_PAF_STATE__TPKT_LEN_2: + pafdata->tpkt_length |= *(data + bytes_processed); + pafdata->state++; + break; + + case S7COMMPLUS_PAF_STATE__SET_FLUSH: + if ((pafdata->tpkt_length < TPKT_MIN_HDR_LEN)) + { + _dpd.alertAdd(GENERATOR_SPP_S7COMMPLUS, S7COMMPLUS_BAD_LENGTH, 1, 0, 3, + S7COMMPLUS_BAD_LENGTH_STR, 0); + } + /* flush point at the end of payload */ + *fp = pafdata->tpkt_length; + pafdata->state = S7COMMPLUS_PAF_STATE__TPKT_VER; + pafdata->tpkt_length = 0; + return PAF_FLUSH; + } + + bytes_processed++; + } + + return PAF_SEARCH; +} + +/* Take a S7commplus config + Snort policy, iterate through ports, register PAF callback */ +void S7commplusAddPortsToPaf(struct _SnortConfig *sc, s7commplus_config_t *config, tSfPolicyId policy_id) +{ + unsigned int i; + + for (i = 0; i < MAX_PORTS; i++) + { + if (config->ports[PORT_INDEX(i)] & CONV_PORT(i)) + { + S7commplusPafRegisterPort(sc, (uint16_t) i, policy_id); + } + } +} diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_paf.h snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_paf.h 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_paf.h 2022-05-18 04:57:02.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Protocol-Aware Flushing (PAF) code for the S7commplus preprocessor. + * + */ + +#ifndef S7COMM_PAF__H +#define S7COMM_PAF__H + +#include "spp_s7comm.h" +#include "stream_api.h" + +typedef enum _s7commplus_paf_state +{ + S7COMMPLUS_PAF_STATE__TPKT_VER = 0, + S7COMMPLUS_PAF_STATE__TPKT_RESERVED, + S7COMMPLUS_PAF_STATE__TPKT_LEN_1, + S7COMMPLUS_PAF_STATE__TPKT_LEN_2, + S7COMMPLUS_PAF_STATE__COPT_LEN, + S7COMMPLUS_PAF_STATE__COPT_PDU_TYPE, + S7COMMPLUS_PAF_STATE__SET_FLUSH +} s7commplus_paf_state_t; + +typedef struct _s7commplus_paf_data +{ + s7commplus_paf_state_t state; + uint16_t tpkt_length; +} s7commplus_paf_data_t; + +void S7commplusAddPortsToPaf(struct _SnortConfig *sc, s7commplus_config_t *config, tSfPolicyId policy_id); +int S7commplusPafRegisterPort(struct _SnortConfig *sc, uint16_t port, tSfPolicyId policy_id); +int S7commplusAddServiceToPaf(struct _SnortConfig *sc, uint16_t service, tSfPolicyId policy_id); +PAF_Status S7commplusPaf(void *ssn, void **user, const uint8_t *data, + uint32_t len, uint32_t flags, uint32_t *fp, uint32_t *fp_eoh); +static inline bool S7commplusIsPafActive(const SFSnortPacket *p) +{ + bool to_server = (p->flags & FLAG_FROM_CLIENT)? true:false; + if ((p->stream_session_ptr) + && _dpd.streamAPI->is_paf_active(p->stream_session_ptr, to_server)) + return true; + + return false; +} +#endif /* S7COMMPLUS_PAF__H */ diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_roptions.c snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_roptions.c --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_roptions.c 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_roptions.c 2022-05-18 04:57:08.000000000 +0000 @@ -0,0 +1,272 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Rule options for S7commplus preprocessor + * + */ + +#include + +#include "sf_types.h" +#include "sf_snort_plugin_api.h" +#include "sf_dynamic_preprocessor.h" +#include "spp_s7comm.h" +#include "s7comm_decode.h" +#include "s7comm_roptions.h" +#include "s7comm_paf.h" + +static s7commplus_opcode_map_t s7commplus_opcode_map[] = +{ + {"request", 0x31}, + {"response", 0x32}, + {"notification", 0x33}, + {"response2", 0x02} +}; + +/* Mapping of name -> function code for 's7commplus_function' option. */ +static s7commplus_func_map_t s7commplus_func_map[] = +{ + {"explore", 0x04BB}, + {"createobject", 0x04CA}, + {"deleteobject", 0x04D4}, + {"setvariable", 0x04F2}, + {"getlink", 0x0524}, + {"setmultivar", 0x0542}, + {"getmultivar", 0x054C}, + {"beginsequence", 0x0556}, + {"endsequence", 0x0560}, + {"invoke", 0x056B}, + {"getvarsubstr", 0x0586} +}; + +int S7commplusOpcodeInit(struct _SnortConfig *sc, char *name, char *params, void **data) +{ + char *endptr; + s7commplus_option_data_t *s7commplus_data; + unsigned int opcode = 0; + + if (name == NULL || data == NULL) + return 0; + + if (strcmp(name, S7COMMPLUS_OPCODE_NAME) != 0) + return 0; + + if (params == NULL) + { + DynamicPreprocessorFatalMessage("%s(%d): No argument given for s7commplus_opcode. " + "s7commplus_opcode requires a number between 0 and 0xFF.\n", + *_dpd.config_file, *_dpd.config_line); + } + + s7commplus_data = (s7commplus_option_data_t *)calloc(1, sizeof(s7commplus_option_data_t)); + if (s7commplus_data == NULL) + { + DynamicPreprocessorFatalMessage("%s(%d) Failed to allocate memory for " + "s7commplus_option_data_t data structure.\n", __FILE__, __LINE__); + } + + /* Parsing time */ + if (isdigit(params[0])) + { + /* argument given as integer (hexidecimal) */ + opcode = _dpd.SnortStrtoul(params, &endptr, 16); + if ((opcode > 255) || (*endptr != '\0')) + { + DynamicPreprocessorFatalMessage("%s(%d): s7commplus_opcode requires a " + "number between 0 and 0xFF.\n", *_dpd.config_file, *_dpd.config_line); + } + } else { + /* Check the argument against the map */ + size_t i; + int parse_success = 0; + for (i = 0; i < (sizeof(s7commplus_opcode_map) / sizeof(s7commplus_opcode_map_t)); i++) + { + if (strcmp(params, s7commplus_opcode_map[i].name) == 0) + { + parse_success = 1; + opcode = s7commplus_opcode_map[i].opcode; + break; + } + } + + if (!parse_success) + { + DynamicPreprocessorFatalMessage("%s(%d): s7commplus_opcode requires a " + "number between 0 and 0xFF, or a valid opcode name.\n", + *_dpd.config_file, *_dpd.config_line); + } + } + + s7commplus_data->type = S7COMMPLUS_OPCODE; + s7commplus_data->arg = (uint8_t) opcode; + + *data = (void *)s7commplus_data; + + return 1; +} + +int S7commplusFuncInit(struct _SnortConfig *sc, char *name, char *params, void **data) +{ + char *endptr; + s7commplus_option_data_t *s7commplus_data; + unsigned int func = 0; + + if (name == NULL || data == NULL) + return 0; + + if (strcmp(name, S7COMMPLUS_FUNC_NAME) != 0) + return 0; + + if (params == NULL) + { + DynamicPreprocessorFatalMessage("%s(%d): No argument given for s7commplus_function. " + "s7commplus_function requires a number between 0 and 0xFFFF.\n", + *_dpd.config_file, *_dpd.config_line); + } + + s7commplus_data = (s7commplus_option_data_t *)calloc(1, sizeof(s7commplus_option_data_t)); + if (s7commplus_data == NULL) + { + DynamicPreprocessorFatalMessage("%s(%d) Failed to allocate memory for " + "s7commplus_option_data_t data structure.\n", __FILE__, __LINE__); + } + + /* Parsing time */ + if (isdigit(params[0])) + { + /* argument given as integer (hexidecimal) */ + func = _dpd.SnortStrtoul(params, &endptr, 16); + if ((func > 0xFFFF) || (*endptr != '\0')) + { + DynamicPreprocessorFatalMessage("%s(%d): s7commplus_function requires a " + "number between 0 and 0xFFFF.\n", *_dpd.config_file, *_dpd.config_line); + } + } else { + /* Check the argument against the map */ + size_t i; + int parse_success = 0; + for (i = 0; i < (sizeof(s7commplus_func_map) / sizeof(s7commplus_func_map_t)); i++) + { + if (strcmp(params, s7commplus_func_map[i].name) == 0) + { + parse_success = 1; + func = s7commplus_func_map[i].func; + break; + } + } + + if (!parse_success) + { + DynamicPreprocessorFatalMessage("%s(%d): s7commplus_function requires a " + "number between 0 and 0xFFFF, or a valid function name.\n", + *_dpd.config_file, *_dpd.config_line); + } + } + + s7commplus_data->type = S7COMMPLUS_FUNC; + s7commplus_data->arg = (uint16_t) func; + + *data = (void *)s7commplus_data; + + return 1; +} + +int S7commplusContentInit(struct _SnortConfig *sc, char *name, char *params, void **data) +{ + s7commplus_option_data_t *s7commplus_data; + + if (strcmp(name, S7COMMPLUS_CONTENT_NAME) != 0) + return 0; + + /* Nothing to parse. */ + if (params) + { + DynamicPreprocessorFatalMessage("%s(%d): s7commplus_content does not take " + "any arguments.\n", *_dpd.config_file, *_dpd.config_line); + } + + s7commplus_data = (s7commplus_option_data_t *)calloc(1, sizeof(s7commplus_option_data_t)); + if (s7commplus_data == NULL) + { + DynamicPreprocessorFatalMessage("%s(%d) Failed to allocate memory for " + "s7commplus_option_data_t data structure.\n", __FILE__, __LINE__); + } + + s7commplus_data->type = S7COMMPLUS_CONTENT; + s7commplus_data->arg = 0; + + *data = (void *)s7commplus_data; + return 1; +} + +/* S7commplus rule evaluation callback. */ +int S7commplusRuleEval(void *raw_packet, const uint8_t **cursor, void *data) +{ + SFSnortPacket *packet = (SFSnortPacket *)raw_packet; + s7commplus_option_data_t *rule_data = (s7commplus_option_data_t *)data; + s7commplus_session_data_t *session_data; + + /* + * The preprocessor only evaluates PAF-flushed PDUs. If the rule options + * don't check for this, they'll fire on stale session data when the + * original packet goes through before flushing. + */ + if (!PacketHasFullPDU(packet) && S7commplusIsPafActive(packet)) + return RULE_NOMATCH; + + session_data = (s7commplus_session_data_t *) + _dpd.sessionAPI->get_application_data(packet->stream_session, PP_S7COMMPLUS); + + if ((packet->payload_size == 0 ) || (session_data == NULL)) + { + return RULE_NOMATCH; + } + + switch (rule_data->type) + { + case S7COMMPLUS_OPCODE: + if (session_data->s7commplus_proto_id != S7COMMPLUS_PROTOCOL_ID) + return RULE_NOMATCH; + if (session_data->s7commplus_opcode == rule_data->arg) + return RULE_MATCH; + break; + + case S7COMMPLUS_FUNC: + if (session_data->s7commplus_proto_id != S7COMMPLUS_PROTOCOL_ID) + return RULE_NOMATCH; + if (session_data->s7commplus_function == rule_data->arg) + return RULE_MATCH; + break; + + case S7COMMPLUS_CONTENT: + if (session_data->s7commplus_proto_id != S7COMMPLUS_PROTOCOL_ID) + return RULE_NOMATCH; + if (packet->payload_size < TPKT_MIN_HDR_LEN + S7COMMPLUS_MIN_HDR_LEN) + return RULE_NOMATCH; + + /* S7commplus data */ + *cursor = (const uint8_t *) (packet->payload + TPKT_MIN_HDR_LEN + S7COMMPLUS_MIN_HDR_LEN); + _dpd.SetAltDetect((uint8_t *)*cursor, (uint16_t)(packet->payload_size - TPKT_MIN_HDR_LEN - S7COMMPLUS_MIN_HDR_LEN)); + + return RULE_MATCH; + } + + return RULE_NOMATCH; +} diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_roptions.h snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_roptions.h --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/s7comm_roptions.h 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/s7comm_roptions.h 2022-05-18 04:57:10.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Rule options for S7commplus preprocessor. + * + */ + +#ifndef S7COMM_ROPTIONS_H +#define S7COMM_ROPTIONS_H + +#include + +#define S7COMMPLUS_OPCODE_NAME "s7commplus_opcode" +#define S7COMMPLUS_FUNC_NAME "s7commplus_func" +#define S7COMMPLUS_CONTENT_NAME "s7commplus_content" + +/* Data types */ +typedef enum _s7commplus_option_type_t +{ + S7COMMPLUS_OPCODE = 0, + S7COMMPLUS_FUNC, + S7COMMPLUS_CONTENT +} s7commplus_option_type_t; + +typedef struct _s7commplus_option_data_t +{ + s7commplus_option_type_t type; + uint16_t arg; +} s7commplus_option_data_t; + +typedef struct _s7commplus_opcode_map_t +{ + char *name; + uint8_t opcode; +} s7commplus_opcode_map_t; + +typedef struct _s7commplus_func_map_t +{ + char *name; + uint16_t func; +} s7commplus_func_map_t; + +int S7commplusOpcodeInit(struct _SnortConfig *sc, char *name, char *params, void **data); +int S7commplusFuncInit(struct _SnortConfig *sc, char *name, char *params, void **data); +int S7commplusContentInit(struct _SnortConfig *sc, char *name, char *params, void **data); + +int S7commplusRuleEval(void *raw_packet, const uint8_t **cursor, void *data); + +#endif /* S7COMM_ROPTIONS_H */ diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/spp_s7comm.c snort-2.9.20/src/dynamic-preprocessors/s7commplus/spp_s7comm.c --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/spp_s7comm.c 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/spp_s7comm.c 2022-05-18 04:57:11.000000000 +0000 @@ -0,0 +1,688 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Dynamic preprocessor for the S7commplus protocol + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include +#include + +#include "sf_types.h" +#include "sf_snort_packet.h" +#include "sf_dynamic_preprocessor.h" +#include "sf_snort_plugin_api.h" +#include "snort_debug.h" + +#include "preprocids.h" +#include "spp_s7comm.h" +#include "sf_preproc_info.h" + +#include "profiler.h" +#ifdef PERF_PROFILING +PreprocStats s7commplusPerfStats; +#endif + +#include "sf_types.h" +#include "s7comm_decode.h" +#include "s7comm_roptions.h" +#include "s7comm_paf.h" + +const int MAJOR_VERSION = 1; +const int MINOR_VERSION = 0; +const int BUILD_VERSION = 1; +const char *PREPROC_NAME = "SF_S7COMMPLUS"; + +#define SetupS7commplus DYNAMIC_PREPROC_SETUP + +/* Preprocessor config objects */ +static tSfPolicyUserContextId s7commplus_context_id = NULL; +static s7commplus_config_t *s7commplus_eval_config = NULL; + +/* Target-based app ID */ +#ifdef TARGET_BASED +int16_t s7commplus_app_id = SFTARGET_UNKNOWN_PROTOCOL; +#endif + +/* Prototypes */ +static void S7commplusInit(struct _SnortConfig *, char *); +static inline void S7commplusOneTimeInit(struct _SnortConfig *); +static inline s7commplus_config_t * S7commplusPerPolicyInit(struct _SnortConfig *, tSfPolicyUserContextId); + +static void ProcessS7commplus(void *, void *); + +#ifdef SNORT_RELOAD +static void S7commplusReload(struct _SnortConfig *, char *, void **); +static int S7commplusReloadVerify(struct _SnortConfig *, void *); +static void * S7commplusReloadSwap(struct _SnortConfig *, void *); +static void S7commplusReloadSwapFree(void *); +#endif + +static void registerPortsForDispatch( struct _SnortConfig *sc, s7commplus_config_t *policy ); +static void registerPortsForReassembly( s7commplus_config_t *policy, int direction ); +static void _addPortsToStreamFilter(struct _SnortConfig *, s7commplus_config_t *, tSfPolicyId); +#ifdef TARGET_BASED +static void _addServicesToStreamFilter(struct _SnortConfig *, tSfPolicyId); +#endif + +static void S7commplusFreeConfig(tSfPolicyUserContextId context_id); +static void FreeS7commplusData(void *); +static int S7commplusCheckConfig(struct _SnortConfig *); +static void S7commplusCleanExit(int, void *); + +static void ParseS7commplusArgs(s7commplus_config_t *config, char *args); +static void S7commplusPrintConfig(s7commplus_config_t *config); + +static int S7commplusPortCheck(s7commplus_config_t *config, SFSnortPacket *packet); +static s7commplus_session_data_t * S7commplusCreateSessionData(SFSnortPacket *); + +/* Register init callback */ +void SetupS7commplus(void) +{ +#ifndef SNORT_RELOAD + _dpd.registerPreproc("s7commplus", S7commplusInit); +#else + _dpd.registerPreproc("s7commplus", S7commplusInit, S7commplusReload, + S7commplusReloadVerify, S7commplusReloadSwap, + S7commplusReloadSwapFree); +#endif +} + +/* Allocate memory for preprocessor config, parse the args, set up callbacks */ +static void S7commplusInit(struct _SnortConfig *sc, char *argp) +{ + s7commplus_config_t *s7commplus_policy = NULL; + + if (s7commplus_context_id == NULL) + { + S7commplusOneTimeInit(sc); + } + + s7commplus_policy = S7commplusPerPolicyInit(sc, s7commplus_context_id); + + ParseS7commplusArgs(s7commplus_policy, argp); + + /* Can't add ports until they've been parsed... */ + S7commplusAddPortsToPaf(sc, s7commplus_policy, _dpd.getParserPolicy(sc)); +#ifdef TARGET_BASED + S7commplusAddServiceToPaf(sc, s7commplus_app_id, _dpd.getParserPolicy(sc)); +#endif + // register ports with session and stream + registerPortsForDispatch(sc, s7commplus_policy ); + registerPortsForReassembly( s7commplus_policy, SSN_DIR_FROM_SERVER | SSN_DIR_FROM_CLIENT ); + + S7commplusPrintConfig(s7commplus_policy); +} + +static inline void S7commplusOneTimeInit(struct _SnortConfig *sc) +{ + /* context creation & error checking */ + s7commplus_context_id = sfPolicyConfigCreate(); + if (s7commplus_context_id == NULL) + { + _dpd.fatalMsg("%s(%d) Failed to allocate memory for " + "S7commplus config.\n", *_dpd.config_file, *_dpd.config_line); + } + + if (_dpd.streamAPI == NULL) + { + _dpd.fatalMsg("%s(%d) SetupS7commplus(): The Stream preprocessor " + "must be enabled.\n", *_dpd.config_file, *_dpd.config_line); + } + + /* callback registration */ + _dpd.addPreprocConfCheck(sc, S7commplusCheckConfig); + _dpd.addPreprocExit(S7commplusCleanExit, NULL, PRIORITY_LAST, PP_S7COMMPLUS); + +#ifdef PERF_PROFILING + _dpd.addPreprocProfileFunc("s7commplus", (void *)&s7commplusPerfStats, 0, _dpd.totalPerfStats, NULL); +#endif + + /* Set up target-based app id */ +#ifdef TARGET_BASED + s7commplus_app_id = _dpd.findProtocolReference("cotp"); + if (s7commplus_app_id == SFTARGET_UNKNOWN_PROTOCOL) + s7commplus_app_id = _dpd.addProtocolReference("s7commplus"); + +// register with session to handle applications + _dpd.sessionAPI->register_service_handler( PP_S7COMMPLUS, s7commplus_app_id ); + +#endif +} + +/* Responsible for allocating a S7commplus policy. Never returns NULL. */ +static inline s7commplus_config_t * S7commplusPerPolicyInit(struct _SnortConfig *sc, tSfPolicyUserContextId context_id) +{ + tSfPolicyId policy_id = _dpd.getParserPolicy(sc); + s7commplus_config_t *s7commplus_policy = NULL; + + /* Check for existing policy & bail if found */ + sfPolicyUserPolicySet(context_id, policy_id); + s7commplus_policy = (s7commplus_config_t *)sfPolicyUserDataGetCurrent(context_id); + if (s7commplus_policy != NULL) + { + _dpd.fatalMsg("%s(%d) S7commplus preprocessor can only be " + "configured once.\n", *_dpd.config_file, *_dpd.config_line); + } + + /* Allocate new policy */ + s7commplus_policy = (s7commplus_config_t *)calloc(1, sizeof(s7commplus_config_t)); + if (!s7commplus_policy) + { + _dpd.fatalMsg("%s(%d) Could not allocate memory for " + "s7commplus preprocessor configuration.\n" + , *_dpd.config_file, *_dpd.config_line); + } + + sfPolicyUserDataSetCurrent(context_id, s7commplus_policy); + + /* Register callbacks that are done for each policy */ + _dpd.addPreproc(sc, ProcessS7commplus, PRIORITY_APPLICATION, PP_S7COMMPLUS, PROTO_BIT__TCP); + _addPortsToStreamFilter(sc, s7commplus_policy, policy_id); +#ifdef TARGET_BASED + _addServicesToStreamFilter(sc, policy_id); +#endif + + /* Add preprocessor rule options here */ + _dpd.preprocOptRegister(sc, S7COMMPLUS_OPCODE_NAME, S7commplusOpcodeInit, S7commplusRuleEval, free, NULL, NULL, NULL, NULL); + _dpd.preprocOptRegister(sc, S7COMMPLUS_FUNC_NAME, S7commplusFuncInit, S7commplusRuleEval, free, NULL, NULL, NULL, NULL); + _dpd.preprocOptRegister(sc, S7COMMPLUS_CONTENT_NAME, S7commplusContentInit, S7commplusRuleEval, free, NULL, NULL, NULL, NULL); + + return s7commplus_policy; +} + +static void ParseSinglePort(s7commplus_config_t *config, char *token) +{ + /* single port number */ + char *endptr; + unsigned long portnum = _dpd.SnortStrtoul(token, &endptr, 10); + + if ((*endptr != '\0') || (portnum >= MAX_PORTS)) + { + _dpd.fatalMsg("%s(%d) Bad s7commplus port number: %s\n" + "Port number must be an integer between 0 and 65535.\n", + *_dpd.config_file, *_dpd.config_line, token); + } + + /* Good port number! */ + config->ports[PORT_INDEX(portnum)] |= CONV_PORT(portnum); +} + +static void ParseS7commplusArgs(s7commplus_config_t *config, char *args) +{ + char *saveptr; + char *token; + + /* Set default port */ + config->ports[PORT_INDEX(S7COMMPLUS_PORT)] |= CONV_PORT(S7COMMPLUS_PORT); + + /* No args? Stick to the default. */ + if (args == NULL) + return; + + token = strtok_r(args, " ", &saveptr); + while (token != NULL) + { + if (strcmp(token, "ports") == 0) + { + unsigned nPorts = 0; + + /* Un-set the default port */ + config->ports[PORT_INDEX(S7COMMPLUS_PORT)] = 0; + + /* Parse ports */ + token = strtok_r(NULL, " ", &saveptr); + + if (token == NULL) + { + _dpd.fatalMsg("%s(%d) Missing argument for S7commplus preprocessor " + "'ports' option.\n", *_dpd.config_file, *_dpd.config_line); + } + + if (isdigit(token[0])) + { + ParseSinglePort(config, token); + nPorts++; + } + + else if (*token == '{') + { + /* list of ports */ + token = strtok_r(NULL, " ", &saveptr); + while (token != NULL && *token != '}') + { + ParseSinglePort(config, token); + nPorts++; + token = strtok_r(NULL, " ", &saveptr); + } + } + + else + { + nPorts = 0; + } + if ( nPorts == 0 ) + { + _dpd.fatalMsg("%s(%d) Bad S7commplus 'ports' argument: '%s'\n" + "Argument to S7commplus 'ports' must be an integer, or a list " + "enclosed in { } braces.\n", *_dpd.config_file, *_dpd.config_line, token); + } + } + else + { + _dpd.fatalMsg("%s(%d) Failed to parse s7commplus argument: %s\n", + *_dpd.config_file, *_dpd.config_line, token); + } + + token = strtok_r(NULL, " ", &saveptr); + } + +} + +/* Print a S7commplus config */ +static void S7commplusPrintConfig(s7commplus_config_t *config) +{ + int index; + int newline = 1; + + if (config == NULL) + return; + + _dpd.logMsg("S7commplus config: \n"); + _dpd.logMsg(" Ports:\n"); + + /* Loop through port array & print, 5 ports per line */ + for (index = 0; index < MAX_PORTS; index++) + { + if (config->ports[PORT_INDEX(index)] & CONV_PORT(index)) + { + _dpd.logMsg("\t%d", index); + if ( !((newline++) % 5) ) + { + _dpd.logMsg("\n"); + } + } + } + _dpd.logMsg("\n"); +} + +/* Main runtime entry point */ +static void ProcessS7commplus(void *ipacketp, void *contextp) +{ + SFSnortPacket *packetp = (SFSnortPacket *)ipacketp; + s7commplus_session_data_t *sessp; + PROFILE_VARS; + + // preconditions - what we registered for + assert(IsTCP(packetp) && packetp->payload && packetp->payload_size); + + PREPROC_PROFILE_START(s7commplusPerfStats); + + /* Fetch me a preprocessor config to use with this VLAN/subnet/etc.! */ + s7commplus_eval_config = sfPolicyUserDataGetCurrent(s7commplus_context_id); + + /* Look for a previously-allocated session data. */ + sessp = _dpd.sessionAPI->get_application_data(packetp->stream_session, PP_S7COMMPLUS); + + if (sessp == NULL) + { + /* No existing session. Check those ports. */ + if (S7commplusPortCheck(s7commplus_eval_config, packetp) != true) + { + PREPROC_PROFILE_END(s7commplusPerfStats); + return; + } + } + + if ( !PacketHasFullPDU(packetp) && S7commplusIsPafActive(packetp) ) + { + /* If a packet is rebuilt, but not a full PDU, then it's garbage that + got flushed at the end of a stream. */ + if ( packetp->flags & (FLAG_REBUILT_STREAM|FLAG_PDU_HEAD) ) + { + _dpd.alertAdd(GENERATOR_SPP_S7COMMPLUS, S7COMMPLUS_BAD_LENGTH, 1, 0, 3, + S7COMMPLUS_BAD_LENGTH_STR, 0); + } + + PREPROC_PROFILE_END(s7commplusPerfStats); + return; + } + + if (sessp == NULL) + { + /* Create session data and attach it to the Stream session */ + sessp = S7commplusCreateSessionData(packetp); + + if ( !sessp ) + { + PREPROC_PROFILE_END(s7commplusPerfStats); + return; + } + } + + /* When pipelined S7commplus PDUs appear in a single TCP segment, the + detection engine caches the results of the rule options after + evaluating on the first PDU. Setting this flag stops the caching. */ + packetp->flags |= FLAG_ALLOW_MULTIPLE_DETECT; + + /* Do preprocessor-specific detection stuff here */ + S7commplusDecode(s7commplus_eval_config, packetp); + + /* That's the end! */ + PREPROC_PROFILE_END(s7commplusPerfStats); +} + +/* Check ports & services */ +static int S7commplusPortCheck(s7commplus_config_t *config, SFSnortPacket *packet) +{ +#ifdef TARGET_BASED + int16_t app_id = _dpd.sessionAPI->get_application_protocol_id(packet->stream_session); + + /* call to get_application_protocol_id gave an error */ + if (app_id == SFTARGET_UNKNOWN_PROTOCOL) + return false; + + /* this is identified as non-s7commplus */ + if (app_id && (app_id != s7commplus_app_id)) + return false; + + /* this is identified as s7commplus */ + if (app_id == s7commplus_app_id) + return true; + + /* fall back to port check */ +#endif + + if (config->ports[PORT_INDEX(packet->src_port)] & CONV_PORT(packet->src_port)) + return true; + + if (config->ports[PORT_INDEX(packet->dst_port)] & CONV_PORT(packet->dst_port)) + return true; + + return false; +} + +static s7commplus_session_data_t* S7commplusCreateSessionData(SFSnortPacket *packet) +{ + s7commplus_session_data_t *data = NULL; + + /* Sanity Check */ + if (!packet || !packet->stream_session) + return NULL; + + data = (s7commplus_session_data_t *)calloc(1, sizeof(s7commplus_session_data_t)); + + if (!data) + return NULL; + + /* Attach to Stream session */ + _dpd.sessionAPI->set_application_data(packet->stream_session, PP_S7COMMPLUS, + data, FreeS7commplusData); + + /* This reference counting stuff got from old preprocs */ + data->policy_id = _dpd.getNapRuntimePolicy(); + data->context_id = s7commplus_context_id; + ((s7commplus_config_t *)sfPolicyUserDataGetCurrent(s7commplus_context_id))->ref_count++; + + return data; +} + +/* Reload functions */ +#ifdef SNORT_RELOAD +/* Almost like S7commplusInit, but not quite. */ +static void S7commplusReload(struct _SnortConfig *sc, char *args, void **new_config) +{ + tSfPolicyUserContextId s7commplus_swap_context_id = (tSfPolicyUserContextId)*new_config; + s7commplus_config_t *s7commplus_policy = NULL; + + if (s7commplus_swap_context_id == NULL) + { + s7commplus_swap_context_id = sfPolicyConfigCreate(); + if (s7commplus_swap_context_id == NULL) + { + _dpd.fatalMsg("Failed to allocate memory " + "for S7commplus config.\n"); + } + + if (_dpd.streamAPI == NULL) + { + _dpd.fatalMsg("SetupS7commplus(): The Stream preprocessor " + "must be enabled.\n"); + } + *new_config = (void *)s7commplus_swap_context_id; + } + + s7commplus_policy = S7commplusPerPolicyInit(sc, s7commplus_swap_context_id); + + ParseS7commplusArgs(s7commplus_policy, args); + + /* Can't add ports until they've been parsed... */ + S7commplusAddPortsToPaf(sc, s7commplus_policy, _dpd.getParserPolicy(sc)); + + S7commplusPrintConfig(s7commplus_policy); +} + +static int S7commplusReloadVerify(struct _SnortConfig *sc, void *swap_config) +{ + if (!_dpd.isPreprocEnabled(sc, PP_STREAM)) + { + _dpd.errMsg("SetupS7commplus(): The Stream preprocessor must be enabled.\n"); + return -1; + } + + return 0; +} + +static int S7commplusFreeUnusedConfigPolicy( + tSfPolicyUserContextId context_id, + tSfPolicyId policy_id, + void *data + ) +{ + s7commplus_config_t *s7commplus_config = (s7commplus_config_t *)data; + + /* do any housekeeping before freeing s7commplus config */ + if (s7commplus_config->ref_count == 0) + { + sfPolicyUserDataClear(context_id, policy_id); + free(s7commplus_config); + } + + return 0; +} + +static void * S7commplusReloadSwap(struct _SnortConfig *sc, void *swap_config) +{ + tSfPolicyUserContextId s7commplus_swap_context_id = (tSfPolicyUserContextId)swap_config; + tSfPolicyUserContextId old_context_id = s7commplus_context_id; + + if (s7commplus_swap_context_id == NULL) + return NULL; + + s7commplus_context_id = s7commplus_swap_context_id; + + sfPolicyUserDataFreeIterate(old_context_id, S7commplusFreeUnusedConfigPolicy); + + if (sfPolicyUserPolicyGetActive(old_context_id) == 0) + { + /* No more outstanding configs - free the config array */ + return (void *)old_context_id; + } + + return NULL; +} + +static void S7commplusReloadSwapFree(void *data) +{ + if (data == NULL) + return; + + S7commplusFreeConfig( (tSfPolicyUserContextId)data ); +} +#endif //Reload functions ends here + +static void registerPortsForDispatch( struct _SnortConfig *sc, s7commplus_config_t *policy ) +{ + uint32_t port; + + for ( port = 0; port < MAX_PORTS; port++ ) + { + if( isPortEnabled( policy->ports, port ) ) + _dpd.sessionAPI->enable_preproc_for_port( sc, PP_S7COMMPLUS, PROTO_BIT__TCP, port ); + } +} + +static void registerPortsForReassembly( s7commplus_config_t *policy, int direction ) +{ + uint32_t port; + + for ( port = 0; port < MAX_PORTS; port++ ) + { + if( isPortEnabled( policy->ports, port ) ) + _dpd.streamAPI->register_reassembly_port( NULL, port, direction ); + } +} + +/* Stream filter functions */ +static void _addPortsToStreamFilter(struct _SnortConfig *sc, s7commplus_config_t *config, tSfPolicyId policy_id) +{ + if (config == NULL) + return; + + if (_dpd.streamAPI) + { + int portNum; + + for (portNum = 0; portNum < MAX_PORTS; portNum++) + { + if(config->ports[(portNum/8)] & (1<<(portNum%8))) + { + //Add port the port + _dpd.streamAPI->set_port_filter_status( sc, IPPROTO_TCP, (uint16_t)portNum, + PORT_MONITOR_SESSION, policy_id, 1 ); + } + } + } + +} + +#ifdef TARGET_BASED +static void _addServicesToStreamFilter(struct _SnortConfig *sc, tSfPolicyId policy_id) +{ + _dpd.streamAPI->set_service_filter_status(sc, s7commplus_app_id, PORT_MONITOR_SESSION, policy_id, 1); +} +#endif + +static int S7commplusFreeConfigPolicy( + tSfPolicyUserContextId context_id, + tSfPolicyId policy_id, + void *data + ) +{ + s7commplus_config_t *s7commplus_config = (s7commplus_config_t *)data; + + /* do any housekeeping before freeing s7commplus_config */ + + sfPolicyUserDataClear(context_id, policy_id); + free(s7commplus_config); + return 0; +} + +static void S7commplusFreeConfig(tSfPolicyUserContextId context_id) +{ + if (context_id == NULL) + return; + + sfPolicyUserDataFreeIterate(context_id, S7commplusFreeConfigPolicy); + sfPolicyConfigDelete(context_id); +} + +static int S7commplusCheckPolicyConfig( + struct _SnortConfig *sc, + tSfPolicyUserContextId context_id, + tSfPolicyId policy_id, + void *data + ) +{ + _dpd.setParserPolicy(sc, policy_id); + + if (!_dpd.isPreprocEnabled(sc, PP_STREAM)) + { + _dpd.errMsg("%s(%d) S7commplusCheckPolicyConfig(): The Stream preprocessor " + "must be enabled.\n", *_dpd.config_file, *_dpd.config_line); + return -1; + } + return 0; +} + +static int S7commplusCheckConfig(struct _SnortConfig *sc) +{ + int rval; + + if ((rval = sfPolicyUserDataIterate(sc, s7commplus_context_id, S7commplusCheckPolicyConfig))) + return rval; + + return 0; +} + +static void S7commplusCleanExit(int signal, void *data) +{ + if (s7commplus_context_id != NULL) + { + S7commplusFreeConfig(s7commplus_context_id); + s7commplus_context_id = NULL; + } +} + +static void FreeS7commplusData(void *data) +{ + s7commplus_session_data_t *session = (s7commplus_session_data_t *)data; + s7commplus_config_t *config = NULL; + + if (session == NULL) + return; + + if (session->context_id != NULL) + { + config = (s7commplus_config_t *)sfPolicyUserDataGet(session->context_id, session->policy_id); + } + + if (config != NULL) + { + config->ref_count--; + if ((config->ref_count == 0) && + (session->context_id != s7commplus_context_id)) + { + sfPolicyUserDataClear(session->context_id, session->policy_id); + free(config); + + if (sfPolicyUserPolicyGetActive(session->context_id) == 0) + { + /* No more outstanding configs - free the config array */ + S7commplusFreeConfig(session->context_id); + } + } + } + free(session); +} diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/spp_s7comm.h snort-2.9.20/src/dynamic-preprocessors/s7commplus/spp_s7comm.h --- snort-2.9.15.1/src/dynamic-preprocessors/s7commplus/spp_s7comm.h 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/s7commplus/spp_s7comm.h 2022-05-18 04:57:13.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation. You may not use, modify or + * distribute this program under any other version of the GNU General + * Public License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Copyright (C) 2020-2022 Cisco and/or its affiliates. All rights reserved. + * + * Authors: Jeffrey Gu , Pradeep Damodharan + * + * Dynamic preprocessor for the S7commplus protocol + * + */ + +#ifndef SPP_S7COMM_H +#define SPP_S7COMM_H + +#include "sf_types.h" +#include "sfPolicy.h" +#include "sfPolicyUserData.h" + +#define MAX_PORTS 65536 + +/* Default S7commplus port */ +#define S7COMMPLUS_PORT 102 + +/* Convert port value into an index for the s7comm_config->ports array */ +#define PORT_INDEX(port) port/8 + +/* Convert port value into a value for bitwise operations */ +#define CONV_PORT(port) 1<<(port%8) + +/* S7commplus preprocessor configuration */ +typedef struct _s7commplus_config +{ + uint8_t ports[MAX_PORTS/8]; + + int ref_count; +} s7commplus_config_t; + +/* S7commplus session data */ +typedef struct _s7commplus_session_data +{ + uint8_t s7commplus_proto_id; + uint8_t s7commplus_proto_version; + uint16_t s7commplus_data_len; + uint8_t s7commplus_opcode; + uint16_t s7commplus_function, s7commplus_reserved_1, s7commplus_reserved_2; + + tSfPolicyId policy_id; + tSfPolicyUserContextId context_id; +} s7commplus_session_data_t; + +#define S7COMMPLUS_PORTS_KEYWORD "ports" +#define S7COMMPLUS_MEMCAP_KEYWORD "memcap" + +#define TPKT_MIN_HDR_LEN 7 /* length field in TPKT header for S7commplus */ +#define TPKT_MIN_DATA_HDR_LEN 11 /* length field in TPKT header for S7commplus */ +#define INTEGRITY_PART_LEN 33 /* length of Integrity part in V3 Header packets */ +#define S7COMMPLUS_MIN_HDR_LEN 4 + +#define S7COMMPLUS_PROTOCOL_ID 0x72 + +#endif /* SPP_S7COMM_H */ diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/Makefile.am snort-2.9.20/src/dynamic-preprocessors/sdf/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -29,6 +29,7 @@ sdf_detection_option.h EXTRA_DIST = \ +sf_sdf.vcxproj \ sf_sdf.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/Makefile.in snort-2.9.20/src/dynamic-preprocessors/sdf/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/Makefile.in 2019-12-03 09:30:44.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/dynamic-preprocessors/sdf -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -148,7 +158,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -194,6 +204,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -239,6 +250,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -350,6 +362,7 @@ sdf_detection_option.h EXTRA_DIST = \ +sf_sdf.vcxproj \ sf_sdf.dsp all: all-am @@ -368,14 +381,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/sdf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/sdf/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -432,10 +444,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -504,7 +516,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -658,6 +673,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_credit_card.c snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_credit_card.c --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_credit_card.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_credit_card.c 2022-05-18 04:57:16.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_credit_card.h snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_credit_card.h --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_credit_card.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_credit_card.h 2022-05-18 04:57:17.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_detection_option.c snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_detection_option.c --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_detection_option.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_detection_option.c 2022-05-18 04:57:23.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_detection_option.h snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_detection_option.h --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_detection_option.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_detection_option.h 2022-05-18 04:57:25.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_pattern_match.c snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_pattern_match.c --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_pattern_match.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_pattern_match.c 2022-05-18 04:57:27.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_pattern_match.h snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_pattern_match.h --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_pattern_match.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_pattern_match.h 2022-05-18 04:57:29.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_us_ssn.c snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_us_ssn.c --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_us_ssn.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_us_ssn.c 2022-05-18 04:57:30.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_us_ssn.h snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_us_ssn.h --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sdf_us_ssn.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sdf_us_ssn.h 2022-05-18 04:57:32.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/sf_sdf.vcxproj snort-2.9.20/src/dynamic-preprocessors/sdf/sf_sdf.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/sf_sdf.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/sf_sdf.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,307 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {F0F86116-A76F-4A8F-B416-9BAA2DA4D16E} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_sdf.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_sdf.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_sdf.bsc + + + true + true + Console + .\Release\sf_sdf.dll + .\Release\sf_sdf.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_sdf.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_sdf.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_sdf.bsc + + + true + true + Console + .\Release\sf_sdf.dll + .\Release\sf_sdf.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_sdf.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_sdf.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_sdf.bsc + + + true + true + true + Console + .\Debug\sf_sdf.dll + .\Debug\sf_sdf.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_sdf.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_sdf.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_sdf.bsc + + + true + true + true + Console + .\Debug\sf_sdf.dll + .\Debug\sf_sdf.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/spp_sdf.c snort-2.9.20/src/dynamic-preprocessors/sdf/spp_sdf.c --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/spp_sdf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/spp_sdf.c 2022-05-18 04:57:34.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -520,7 +520,7 @@ session = _dpd.sessionAPI->get_application_data(packet->stream_session, PP_SDF); if (session == NULL) { - char pseudo_start = 0; + char pseudo_start[1] = {'0'}; /* Do port checks */ if (SDFCheckPorts(config, packet) == 0) { @@ -541,7 +541,7 @@ session = NewSDFSession(config, packet); /* Add one byte to support sensitive data starts with first byte */ - begin = &pseudo_start; + begin = pseudo_start; buflen = 1; end = begin + buflen; SDFSearch(config, packet, session, begin, end, buflen, &ob_failed); diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sdf/spp_sdf.h snort-2.9.20/src/dynamic-preprocessors/sdf/spp_sdf.h --- snort-2.9.15.1/src/dynamic-preprocessors/sdf/spp_sdf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sdf/spp_sdf.h 2022-05-18 04:57:35.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2009-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj snort-2.9.20/src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sf_dynamic_initialize/sf_dynamic_initialize.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,1250 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MakeFileProj + {E8E29B7C-BDA1-4D36-93E9-B0596C35827F} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + + + + .\Release\ + .\Release\ + + + .\Release\ + .\Release\ + + + + .\Debug\sf_dynamic_initialize.tlb + + + + + .\Debug\sf_dynamic_initialize.tlb + + + + + .\Release\sf_dynamic_initialize.tlb + + + + + .\Release\sf_dynamic_initialize.tlb + + + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_dpd.debugMsgFile = /" -e "s/DebugMessageLine = /*_dpd.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _dpd.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _dpd.debugWideMsg/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_dpd.debugMsgFile = /" -e "s/DebugMessageLine = /*_dpd.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _dpd.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _dpd.debugWideMsg/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_dpd.debugMsgFile = /" -e "s/DebugMessageLine = /*_dpd.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _dpd.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _dpd.debugWideMsg/" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_dpd.debugMsgFile = /" -e "s/DebugMessageLine = /*_dpd.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _dpd.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _dpd.debugWideMsg/" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + ..\include\$(InputName).h;..\include\$(InputName).h.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + + + + + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -e "s/Packet /SFSnortPacket /" -e "s/decode.h/sf_snort_packet.h/" -e "/sfportobject\.h/d" -e "s/PortObject/void/g" ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).h.new +c:\cygwin\bin\sed -f ..\treenodes.sed ../include/%(Filename).h.new > ../include/%(Filename).h + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h.new;..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).h;%(Outputs) + ..\include\$(InputName).h;%(Outputs) + + + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/SnortStrnStr/_dpd.SnortStrnStr/" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/SnortStrnStr/_dpd.SnortStrnStr/" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/SnortStrnStr/_dpd.SnortStrnStr/" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/SnortStrnStr/_dpd.SnortStrnStr/" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" -e "s/ErrorMessage/_dpd.errMsg/" -e "s/LogMessage /_dpd.logMsg /" -e "/util.h/d" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + + + + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).c.new > ../include/%(Filename).c + mkdir ..\include +copy %(FullPath) ..\include\%(Filename).c.new +c:\cygwin\bin\sed -e "/SharedObjectAddStarts/d" -e "/SharedObjectAddEnds/d" -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" ../include/%(Filename).c.new > ../include/%(Filename).c + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + ..\include\$(InputName).c;..\include\$(InputName).c.new;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + + + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + mkdir ..\include +copy %(FullPath) ..\include + mkdir ..\include +copy %(FullPath) ..\include + ..\include\$(InputName).c;%(Outputs) + ..\include\$(InputName).c;%(Outputs) + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/Makefile.am snort-2.9.20/src/dynamic-preprocessors/sip/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/sip/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -47,6 +47,7 @@ endif EXTRA_DIST = \ +sf_sip.vcxproj \ sf_sip.dsp diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/Makefile.in snort-2.9.20/src/dynamic-preprocessors/sip/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/sip/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -85,11 +95,11 @@ @BUILD_BUFFER_DUMP_TRUE@sip_buffer_dump.h subdir = src/dynamic-preprocessors/sip -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -168,7 +178,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -214,6 +224,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -259,6 +270,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -365,6 +377,7 @@ sip_dialog.h sip_roptions.c sip_roptions.h sip_utils.c \ sip_utils.h sip_debug.h sip_paf.c sip_paf.h $(am__append_3) EXTRA_DIST = \ +sf_sip.vcxproj \ sf_sip.dsp all: all-am @@ -383,14 +396,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/sip/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/sip/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -447,10 +459,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -540,7 +552,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -694,6 +709,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sf_sip.vcxproj snort-2.9.20/src/dynamic-preprocessors/sip/sf_sip.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sf_sip.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sf_sip.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,316 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {E8B8A0A4-51A2-4D42-87C9-8AA65BEA6940} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_sip.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_sip.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_sip.bsc + + + true + true + Console + .\Release\sf_sip.dll + .\Release\sf_sip.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_sip.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_sip.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_sip.bsc + + + true + true + Console + .\Release\sf_sip.dll + .\Release\sf_sip.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_sip.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_sip.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_sip.bsc + + + true + true + true + Console + .\Debug\sf_sip.dll + .\Debug\sf_sip.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_PREPROC_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_sip.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_sip.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_sip.bsc + + + true + true + true + Console + .\Debug\sf_sip.dll + .\Debug\sf_sip.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/sip/sip_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_buffer_dump.c 2022-05-18 04:57:36.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_buffer_dump.h 2022-05-18 04:57:37.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_config.c snort-2.9.20/src/dynamic-preprocessors/sip/sip_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_config.c 2022-05-18 04:57:39.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -502,13 +502,15 @@ method = method->nextm; } - method = (SIPMethodNode *) malloc(sizeof (SIPMethodNode)); + method = (SIPMethodNode *) _dpd.snortAlloc(1, sizeof(SIPMethodNode), + PP_SIP, PP_MEM_CATEGORY_CONFIG); if (NULL == method) return NULL; method->methodName = strdup(methodName); if (NULL == method->methodName) { - free(method); + _dpd.snortFree(method, sizeof(SIPMethodNode), + PP_SIP, PP_MEM_CATEGORY_CONFIG); return NULL; } @@ -552,10 +554,12 @@ if (NULL != curNode->methodName) free(curNode->methodName); nextNode = curNode->nextm; - free(curNode); + _dpd.snortFree(curNode, sizeof(SIPMethodNode), PP_SIP, + PP_MEM_CATEGORY_CONFIG); curNode = nextNode; } - free(config); + _dpd.snortFree(config, sizeof(SIPConfig), PP_SIP, + PP_MEM_CATEGORY_CONFIG); } /* Parses and processes the configuration arguments * supplied in the SIP preprocessor rule. diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_config.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_config.h 2022-05-18 04:57:40.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_debug.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_debug.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_debug.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_debug.h 2022-05-18 04:57:41.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_dialog.c snort-2.9.20/src/dynamic-preprocessors/sip/sip_dialog.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_dialog.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_dialog.c 2022-05-18 04:57:43.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -417,8 +417,11 @@ DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Ignoring channels Destine IP: %s Port: %u\n", sfip_to_str(&mdataB->maddress), mdataB->mport);); /* Call into Streams to mark data channel as something to ignore. */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_SFOUTER_IPH_PROTOID(p, pkt_header); + #ifdef HAVE_DAQ_ADDRESS_SPACE_ID -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId = p->pkt_header->address_space_id_src; uint16_t dAsId = p->pkt_header->address_space_id_dst; @@ -426,16 +429,37 @@ &mdataB->maddress, mdataB->mport, IPPROTO_UDP, 0, 0, - sAsId, dAsId); + sAsId, dAsId, cid); #else ssn = _dpd.sessionAPI->get_session_ptr_from_ip_port(&mdataA->maddress,mdataA->mport, &mdataB->maddress, mdataB->mport, IPPROTO_UDP, 0, 0, + p->pkt_header->address_space_id, cid); +#endif +#else + ssn = _dpd.sessionAPI->get_session_ptr_from_ip_port(&mdataA->maddress,mdataA->mport, &mdataB->maddress, + mdataB->mport, IPPROTO_UDP, 0, 0, 0, cid); +#endif +#else /* No carrier id support */ +#ifdef HAVE_DAQ_ADDRESS_SPACE_ID +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + uint16_t sAsId = p->pkt_header->address_space_id_src; + uint16_t dAsId = p->pkt_header->address_space_id_dst; + + ssn = _dpd.sessionAPI->get_session_ptr_from_ip_port(&mdataA->maddress,mdataA->mport, + &mdataB->maddress, + mdataB->mport, + IPPROTO_UDP, 0, 0, + sAsId, dAsId); +#else + ssn = _dpd.sessionAPI->get_session_ptr_from_ip_port(&mdataA->maddress,mdataA->mport, &mdataB->maddress, + mdataB->mport, IPPROTO_UDP, 0, 0, p->pkt_header->address_space_id); #endif #else ssn = _dpd.sessionAPI->get_session_ptr_from_ip_port(&mdataA->maddress,mdataA->mport, &mdataB->maddress, mdataB->mport, IPPROTO_UDP, 0, 0, 0); #endif +#endif if ( _dpd.sessionAPI->is_session_verified( ssn ) ) { _dpd.sessionAPI->set_ignore_direction(ssn, SSN_DIR_BOTH); @@ -601,7 +625,8 @@ sip_stats.dialogs++; - dialog = (SIP_DialogData *) calloc(1, sizeof(SIP_DialogData)); + dialog = (SIP_DialogData *) _dpd.snortAlloc(1, sizeof(SIP_DialogData), PP_SIP, + PP_MEM_CATEGORY_SESSION); if (NULL == dialog) return NULL; @@ -664,7 +689,7 @@ currDialog->nextD->prevD = currDialog->prevD; } sip_freeMediaList(currDialog->mediaSessions); - free(currDialog); + _dpd.snortFree(currDialog, sizeof(SIP_DialogData), PP_SIP, PP_MEM_CATEGORY_SESSION); if( dList->num_dialogs > 0) dList->num_dialogs--; return SIP_SUCCESS; @@ -821,7 +846,8 @@ curNode->creator, curNode->dlgID.callIdHash,curNode->dlgID.fromTagHash,curNode->dlgID.toTagHash,curNode->state)); nextNode = curNode->nextD; sip_freeMediaList(curNode->mediaSessions); - free(curNode); + _dpd.snortFree(curNode, sizeof(SIP_DialogData), PP_SIP, + PP_MEM_CATEGORY_SESSION); curNode = nextNode; } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_dialog.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_dialog.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_dialog.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_dialog.h 2022-05-18 04:57:49.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_paf.c snort-2.9.20/src/dynamic-preprocessors/sip/sip_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_paf.c 2022-05-18 04:57:51.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -267,7 +267,8 @@ if (pfdata == NULL) { - pfdata = calloc(1, sizeof(*pfdata)); + pfdata = _dpd.snortAlloc(1, sizeof(*pfdata), + PP_SIP, PP_MEM_CATEGORY_SESSION); if (pfdata == NULL) { return PAF_ABORT; @@ -336,6 +337,13 @@ return PAF_SEARCH; } +static void sip_paf_cleanup(void *pafData) +{ + if (pafData) + _dpd.snortFree(pafData, sizeof(SIPPafData), PP_SIP, + PP_MEM_CATEGORY_SESSION); +} + #ifdef TARGET_BASED void register_sip_paf_service (struct _SnortConfig *sc, int16_t app, tSfPolicyId policy) { @@ -343,6 +351,7 @@ { sip_paf_id = _dpd.streamAPI->register_paf_service(sc, policy, app, true, sip_paf, true); sip_paf_id = _dpd.streamAPI->register_paf_service(sc, policy, app, false, sip_paf, true); + _dpd.streamAPI->register_paf_free(sip_paf_id, sip_paf_cleanup); } } #endif diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_paf.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_paf.h 2022-05-18 04:57:53.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_parser.c snort-2.9.20/src/dynamic-preprocessors/sip/sip_parser.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_parser.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_parser.c 2022-05-18 04:57:54.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -548,7 +548,9 @@ msg->body_data = (uint8_t *)buff; // Create a media session - msg->mediaSession = (SIP_MediaSession *)calloc(1, sizeof(SIP_MediaSession)); + msg->mediaSession = (SIP_MediaSession *)_dpd.snortAlloc(1, + sizeof(SIP_MediaSession), + PP_SIP, PP_MEM_CATEGORY_SESSION); if (NULL == msg->mediaSession) return SIP_FAILURE; start = (char *) buff; @@ -1266,7 +1268,8 @@ spaceIndex = memchr(start, ' ', length); // first space if ((NULL == spaceIndex)||(spaceIndex == end)) return SIP_PARSE_ERROR; - mdata = (SIP_MediaData *) calloc(1, sizeof(SIP_MediaData)); + mdata = (SIP_MediaData *) _dpd.snortAlloc(1, sizeof(SIP_MediaData), + PP_SIP, PP_MEM_CATEGORY_SESSION); if (NULL == mdata) return SIP_PARSE_ERROR; @@ -1438,11 +1441,12 @@ DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Clear media ip: %s, port: %d, number of port: %d\n", sfip_to_str(&curNode->maddress), curNode->mport, curNode->numPort )); nextNode = curNode->nextM; - free(curNode); + _dpd.snortFree(curNode, sizeof(SIP_MediaData), PP_SIP, PP_MEM_CATEGORY_SESSION); curNode = nextNode; } if (NULL != mediaSession) - free (mediaSession); + _dpd.snortFree(mediaSession, sizeof(SIP_MediaSession), PP_SIP, + PP_MEM_CATEGORY_SESSION); } /******************************************************************** * Function: sip_freeMediaList diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_parser.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_parser.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_parser.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_parser.h 2022-05-18 04:57:55.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_roptions.c snort-2.9.20/src/dynamic-preprocessors/sip/sip_roptions.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_roptions.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_roptions.c 2022-05-18 04:58:03.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_roptions.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_roptions.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_roptions.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_roptions.h 2022-05-18 04:58:04.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_utils.c snort-2.9.20/src/dynamic-preprocessors/sip/sip_utils.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_utils.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_utils.c 2022-05-18 04:58:05.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_utils.h snort-2.9.20/src/dynamic-preprocessors/sip/sip_utils.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/sip_utils.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/sip_utils.h 2022-05-18 04:58:12.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/spp_sip.c snort-2.9.20/src/dynamic-preprocessors/sip/spp_sip.c --- snort-2.9.15.1/src/dynamic-preprocessors/sip/spp_sip.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/spp_sip.c 2022-05-18 04:58:13.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** @@ -53,6 +53,7 @@ #include #include #include +#include #ifndef WIN32 #include #include @@ -147,6 +148,50 @@ static SIPMsg sipMsg; +int SIPPrintMemStats(FILE *fd, char *buffer, PreprocMemInfo *meminfo) +{ + int len = 0; + time_t curr_time; + + if (fd) + { + len = fprintf(fd, ",%lu,%u" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu" + , sip_stats.sessions + , numSessions + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + + return len; + } + + curr_time = time(NULL); + + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of SIP on: %s\n" + " Total Sessions : %lu\n" + " Current Active Sessions : %u\n\n" + , ctime(&curr_time) + , sip_stats.sessions + , numSessions); + } else { + _dpd.logMsg("\n"); + _dpd.logMsg("Memory Statistics of SIP on: %s\n", ctime(&curr_time)); + _dpd.logMsg(" Total Sessions : %lu\n", sip_stats.sessions); + _dpd.logMsg(" Current Active Sessions : %u\n\n", numSessions); + } + + return len; +} + /* Called at preprocessor setup time. Links preprocessor keyword * to corresponding preprocessor initialization function. * @@ -157,6 +202,7 @@ */ void SetupSIP(void) { + _dpd.registerMemoryStatsFunc(PP_SIP, SIPPrintMemStats); /* Link preprocessor keyword to initialization function * in the preprocessor list. */ #ifndef SNORT_RELOAD @@ -250,7 +296,8 @@ "configured once.\n"); } - pPolicyConfig = (SIPConfig *)calloc(1, sizeof(SIPConfig)); + pPolicyConfig = (SIPConfig *)_dpd.snortAlloc(1, sizeof(SIPConfig), PP_SIP, + PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { DynamicPreprocessorFatalMessage("Could not allocate memory for " @@ -403,11 +450,21 @@ assert((IsUDP(packetp) || IsTCP(packetp)) && packetp->payload && packetp->payload_size); - if (IsTCP(packetp) && (!_dpd.readyForProcess(packetp))) + if (IsTCP(packetp)) { - /* Packet will be rebuilt, so wait for it */ - DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Packet will be reassembled\n")); - return; + if (!_dpd.readyForProcess(packetp)) + { + /* Packet will be rebuilt, so wait for it */ + DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Packet will be reassembled\n")); + return; + } + if (_dpd.sessionAPI->get_application_data(packetp->stream_session, PP_SSL) && + !_dpd.streamAPI->is_session_decrypted(packetp->stream_session)) + { + /* Packet is a non-SIP/encrypted SIP one, skip those */ + DEBUG_WRAP(DebugMessage(DEBUG_SIP, "Packet is encrypted or not a SIP packet\n")); + return; + } } PREPROC_PROFILE_START(sipPerfStats); @@ -551,7 +608,8 @@ { MaxSessionsAlerted = 0; } - datap = (SIPData *)calloc(1, sizeof(SIPData)); + datap = (SIPData *)_dpd.snortAlloc(1, sizeof(SIPData), PP_SIP, + PP_MEM_CATEGORY_SESSION); if ( !datap ) return NULL; @@ -620,7 +678,7 @@ if (config == NULL) { - free(ssn); + _dpd.snortFree(ssn, sizeof(SIPData), PP_SIP, PP_MEM_CATEGORY_SESSION); return; } @@ -628,7 +686,7 @@ if ((config->ref_count == 0) && (ssn->config != sip_config)) { sfPolicyUserDataClear (ssn->config, ssn->policy_id); - free(config); + _dpd.snortFree(config, sizeof(SIPConfig), PP_SIP, PP_MEM_CATEGORY_CONFIG); if (sfPolicyUserPolicyGetActive(ssn->config) == 0) { @@ -638,7 +696,7 @@ } - free(ssn); + _dpd.snortFree(ssn, sizeof(SIPData), PP_SIP, PP_MEM_CATEGORY_SESSION); } /* ********************************************************************** * Validates given port as an SIP server port. @@ -924,7 +982,8 @@ DynamicPreprocessorFatalMessage("SIP preprocessor can only be configured once.\n"); } - pPolicyConfig = (SIPConfig *)calloc(1, sizeof(SIPConfig)); + pPolicyConfig = (SIPConfig *)_dpd.snortAlloc(1, sizeof(SIPConfig), PP_SIP, + PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { DynamicPreprocessorFatalMessage("Could not allocate memory for " diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/sip/spp_sip.h snort-2.9.20/src/dynamic-preprocessors/sip/spp_sip.h --- snort-2.9.15.1/src/dynamic-preprocessors/sip/spp_sip.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/sip/spp_sip.h 2022-05-18 04:58:14.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** @@ -93,13 +93,11 @@ */ typedef struct _sipData { - uint32_t state_flags; + tSfPolicyId policy_id; SIP_DialogList dialogs; SIP_Roptions ropts; - tSfPolicyId policy_id; tSfPolicyUserContextId config; - } SIPData; typedef struct _SIPMsg diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/Makefile.am snort-2.9.20/src/dynamic-preprocessors/smtp/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -52,6 +52,7 @@ endif EXTRA_DIST = \ +sf_smtp.vcxproj \ sf_smtp.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/Makefile.in snort-2.9.20/src/dynamic-preprocessors/smtp/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@smtp_buffer_dump.h subdir = src/dynamic-preprocessors/smtp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -164,7 +174,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -210,6 +220,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -255,6 +266,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -369,6 +381,7 @@ smtp_paf.h snort_smtp.c snort_smtp.h spp_smtp.c spp_smtp.h \ $(am__append_1) EXTRA_DIST = \ +sf_smtp.vcxproj \ sf_smtp.dsp all: all-am @@ -387,14 +400,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/smtp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/smtp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -451,10 +463,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -553,7 +565,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -707,6 +722,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/sf_smtp.vcxproj snort-2.9.20/src/dynamic-preprocessors/smtp/sf_smtp.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/sf_smtp.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/sf_smtp.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,337 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {1B63B2E7-AF61-4248-83C5-1B1F0D237D2D} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_smtp.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_smtp.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_smtp.bsc + + + true + true + true + Console + .\Debug\sf_smtp.dll + .\Debug\sf_smtp.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_smtp.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_smtp.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_smtp.bsc + + + true + true + true + Console + .\Debug\sf_smtp.dll + .\Debug\sf_smtp.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_smtp.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_smtp.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_smtp.bsc + + + true + true + Console + .\Release\sf_smtp.dll + .\Release\sf_smtp.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_smtp.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_smtp.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_smtp.bsc + + + true + true + Console + .\Release\sf_smtp.dll + .\Release\sf_smtp.lib + ../../../src/win32/WIN32-Libraries;%(AdditionalLibraryDirectories) + pcre.lib;ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3b06c0ca-3cc0-4514-9737-69a5d41e610d} + false + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_buffer_dump.c 2022-05-18 04:58:16.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_buffer_dump.h 2022-05-18 04:58:17.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_config.c snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_config.c 2022-05-18 04:58:24.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -107,7 +107,8 @@ _dpd.fileAPI->set_mime_log_config_defauts(&(config->log_config)); config->log_config.email_hdrs_log_depth = DEFAULT_LOG_DEPTH; - config->cmd_config = (SMTPCmdConfig *)_dpd.snortAlloc(CMD_LAST, sizeof(SMTPCmdConfig), PP_SMTP, 1); + config->cmd_config = (SMTPCmdConfig *)_dpd.snortAlloc(CMD_LAST, sizeof(SMTPCmdConfig), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (config->cmd_config == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory for SMTP " @@ -911,7 +912,8 @@ config->num_cmds++; /* allocate enough memory for new commmand - alloc one extra for NULL entry */ - cmds = (SMTPToken *)_dpd.snortAlloc(config->num_cmds + 1, sizeof(SMTPToken), PP_SMTP, 1); + cmds = (SMTPToken *)_dpd.snortAlloc(config->num_cmds + 1, sizeof(SMTPToken), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (cmds == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory for SMTP " @@ -920,7 +922,8 @@ } /* This gets filled in later */ - cmd_search = (SMTPSearch *)_dpd.snortAlloc(config->num_cmds, sizeof(SMTPSearch), PP_SMTP, 1); + cmd_search = (SMTPSearch *)_dpd.snortAlloc(config->num_cmds, sizeof(SMTPSearch), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (cmd_search == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory for SMTP " @@ -928,7 +931,8 @@ *(_dpd.config_file), *(_dpd.config_line)); } - cmd_config = (SMTPCmdConfig *)_dpd.snortAlloc(config->num_cmds, sizeof(SMTPCmdConfig), PP_SMTP, 1); + cmd_config = (SMTPCmdConfig *)_dpd.snortAlloc(config->num_cmds, sizeof(SMTPCmdConfig), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (cmd_config == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => Failed to allocate memory for SMTP " @@ -975,13 +979,16 @@ /* free global memory structures */ if (config->cmds != NULL) - _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_SMTP, 1); + _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (config->cmd_search != NULL) - _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_SMTP, 1); + _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (config->cmd_config != NULL) - _dpd.snortFree(config->cmd_config, sizeof(*(config->cmd_config)), PP_SMTP, 1); + _dpd.snortFree(config->cmd_config, sizeof(*(config->cmd_config)), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); /* set globals to new memory */ config->cmds = cmds; diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_config.h snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_config.h 2022-05-18 04:58:25.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_log.c snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_log.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_log.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_log.c 2022-05-18 04:58:28.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_log.h snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_log.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_log.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_log.h 2022-05-18 04:58:30.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_normalize.c snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_normalize.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_normalize.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_normalize.c 2022-05-18 04:58:32.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Andy Mullican diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_normalize.h snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_normalize.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_normalize.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_normalize.h 2022-05-18 04:58:34.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Andy Mullican diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_paf.c snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_paf.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_paf.c 2022-05-18 04:58:35.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -90,10 +90,10 @@ DataEndState data_end_state; uint32_t length; SmtpPafState smtp_state; - SmtpCmdSearchInfo cmd_info; - MimeDataPafInfo data_info; bool end_of_data; bool alert_generated; + SmtpCmdSearchInfo cmd_info; + MimeDataPafInfo data_info; } SmtpPafData; /* State tracker for SMTP PAF */ @@ -400,7 +400,7 @@ if (_dpd.fileAPI->check_paf_abort(ssn)) return PAF_ABORT; - pfdata = _dpd.snortAlloc(1, sizeof(*pfdata), PP_SMTP, 0); + pfdata = _dpd.snortAlloc(1, sizeof(*pfdata), PP_SMTP, PP_MEM_CATEGORY_SESSION); if (pfdata == NULL) { @@ -444,7 +444,7 @@ void smtp_paf_cleanup(void *pafData) { if (pafData) { - _dpd.snortFree(pafData, sizeof(SmtpPafData), PP_SMTP, 0); + _dpd.snortFree(pafData, sizeof(SmtpPafData), PP_SMTP, PP_MEM_CATEGORY_SESSION); } } diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_paf.h snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_paf.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_paf.h 2022-05-18 04:58:36.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_util.c snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_util.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_util.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_util.c 2022-05-18 04:58:38.000000000 +0000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Andy Mullican @@ -54,16 +54,47 @@ #include "sf_dynamic_preprocessor.h" #include "sf_snort_packet.h" +#include "memory_stats.h" + extern SMTP *smtp_ssn; extern char smtp_normalizing; extern MemPool *smtp_mime_mempool; extern MemPool *smtp_mempool; -int SMTP_Print_Mem_Stats(char *buffer) +int SMTP_Print_Mem_Stats(FILE *fd, char *buffer, PreprocMemInfo *meminfo) { time_t curr_time = time(NULL); - - return snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of SMTP on: %s\n" + int len = 0; + + + if (fd) + { + len = fprintf(fd, ",%lu,%lu,%lu" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu" + , smtp_stats.sessions + , smtp_stats.max_conc_sessions + , smtp_stats.cur_sessions + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + + return len; + + } + + if (buffer) { + /* + * Old buffer output for control socket comm, + * like via, "show snort preprocessor-memory-usage" + * CLI preserved as is + */ + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of SMTP on: %s\n" "SMTP Session Statistics:\n" " Total Sessions seen: " STDu64 "\n" " Max concurrent sessions: " STDu64 "\n" @@ -87,6 +118,28 @@ , (smtp_mempool) ? smtp_mempool->used_memory : 0 , ((smtp_mime_mempool) ? (smtp_mime_mempool->max_memory) : 0) + ((smtp_mempool) ? (smtp_mempool->max_memory) : 0)); + + len += PopulateMemStatsBuffTrailer(buffer+len, len, meminfo); + + } else { + + _dpd.logMsg("SMTP Preprocessor Statistics\n"); + _dpd.logMsg(" Total sessions : %lu \n", smtp_stats.sessions); + _dpd.logMsg(" Max concurrent sessions : %lu \n", smtp_stats.max_conc_sessions); + _dpd.logMsg(" Current sessions : %lu \n", smtp_stats.cur_sessions); + _dpd.logMsg(" SMTP Session \n"); + _dpd.logMsg(" Used Memory :%14lu\n", meminfo[PP_MEM_CATEGORY_SESSION].used_memory); + _dpd.logMsg(" No of Allocs :%14u\n", meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc); + _dpd.logMsg(" No of Frees :%14u\n", meminfo[PP_MEM_CATEGORY_SESSION].num_of_free); + _dpd.logMsg(" SMTP Config \n"); + _dpd.logMsg(" Used Memory :%14lu\n", meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + _dpd.logMsg(" No of Allocs :%14u\n", meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc); + _dpd.logMsg(" No of Frees :%14u\n", meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free); + _dpd.logMsg(" Total memory used :%14lu\n", meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + + } + return len; } void SMTP_GetEOL(const uint8_t *ptr, const uint8_t *end, diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_util.h snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_util.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_util.h 2022-05-18 04:58:39.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -39,7 +39,7 @@ int SMTP_CopyEmailHdrs(const uint8_t *, int, MAIL_LogState *log_state ); int SMTP_CopyEmailID(const uint8_t *, int , int, MAIL_LogState *log_state ); void SMTP_LogFuncs(SMTPConfig *config, SFSnortPacket *p, MimeState *mime_ssn); -int SMTP_Print_Mem_Stats(char *buffer); +int SMTP_Print_Mem_Stats(FILE *fd, char *buffer, PreprocMemInfo *meminfo); #ifdef DEBUG_MSGS const char * SMTP_PrintBuffer(SFSnortPacket *); diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_xlink2state.c snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_xlink2state.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_xlink2state.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_xlink2state.c 2022-05-18 04:58:42.000000000 +0000 @@ -1,6 +1,6 @@ /*************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_xlink2state.h snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_xlink2state.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/smtp_xlink2state.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/smtp_xlink2state.h 2022-05-18 04:58:43.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/snort_smtp.c snort-2.9.20/src/dynamic-preprocessors/smtp/snort_smtp.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/snort_smtp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/snort_smtp.c 2022-05-18 04:58:45.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -252,7 +252,8 @@ return; /* add one to CMD_LAST for NULL entry */ - config->cmds = (SMTPToken *)_dpd.snortAlloc(CMD_LAST + 1, sizeof(SMTPToken), PP_SMTP, 1); + config->cmds = (SMTPToken *)_dpd.snortAlloc(CMD_LAST + 1, sizeof(SMTPToken), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (config->cmds == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => failed to allocate memory for smtp " @@ -276,7 +277,8 @@ } /* initialize memory for command searches */ - config->cmd_search = (SMTPSearch *)_dpd.snortAlloc(CMD_LAST, sizeof(SMTPSearch), PP_SMTP, 1); + config->cmd_search = (SMTPSearch *)_dpd.snortAlloc(CMD_LAST, sizeof(SMTPSearch), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (config->cmd_search == NULL) { DynamicPreprocessorFatalMessage("%s(%d) => failed to allocate memory for smtp " @@ -386,7 +388,8 @@ DEBUG_WRAP(DebugMessage(DEBUG_SMTP, "Creating new session data structure\n");); - ssn = (SMTP *)_dpd.snortAlloc(1, sizeof(SMTP), PP_SMTP, 0); + ssn = (SMTP *)_dpd.snortAlloc(1, sizeof(SMTP), PP_SMTP, + PP_MEM_CATEGORY_SESSION); if (ssn == NULL) { DynamicPreprocessorFatalMessage("Failed to allocate SMTP session data\n"); @@ -410,7 +413,7 @@ } smtp_stats.log_memcap_exceeded++; } - _dpd.snortFree(ssn, sizeof(*ssn), PP_SMTP, 0); + _dpd.snortFree(ssn, sizeof(*ssn), PP_SMTP, PP_MEM_CATEGORY_SESSION); return NULL; } _dpd.sessionAPI->set_application_data(p->stream_session, PP_SMTP, @@ -599,23 +602,26 @@ if(smtp->mime_ssn.decode_state != NULL) { mempool_free(smtp_mime_mempool, smtp->mime_ssn.decode_bkt); - _dpd.snortFree(smtp->mime_ssn.decode_state, sizeof(Email_DecodeState), PP_SMTP, 0); + _dpd.snortFree(smtp->mime_ssn.decode_state, sizeof(Email_DecodeState), PP_SMTP, + PP_MEM_CATEGORY_SESSION); } if(smtp->mime_ssn.log_state != NULL) { mempool_free(smtp_mempool, smtp->mime_ssn.log_state->log_hdrs_bkt); - _dpd.snortFree(smtp->mime_ssn.log_state, sizeof(MAIL_LogState), PP_SMTP, 0); + _dpd.snortFree(smtp->mime_ssn.log_state, sizeof(MAIL_LogState), PP_SMTP, + PP_MEM_CATEGORY_SESSION); } if(smtp->auth_name != NULL) { - _dpd.snortFree(smtp->auth_name, sizeof(*(smtp->auth_name)), PP_SMTP, 0); + _dpd.snortFree(smtp->auth_name, sizeof(*(smtp->auth_name)), PP_SMTP, + PP_MEM_CATEGORY_SESSION); } if ( ssl_cb ) ssl_cb->session_free(smtp->flow_id); - _dpd.snortFree(smtp, sizeof(*smtp), PP_SMTP, 0); + _dpd.snortFree(smtp, sizeof(*smtp), PP_SMTP, PP_MEM_CATEGORY_SESSION); if(smtp_stats.conc_sessions) smtp_stats.conc_sessions--; @@ -657,21 +663,23 @@ SMTPToken *tmp = config->cmds; for (; tmp->name != NULL; tmp++) - _dpd.snortFree(tmp->name, sizeof(*(tmp->name)), PP_SMTP, 1); + _dpd.snortFree(tmp->name, sizeof(*(tmp->name)), PP_SMTP, PP_MEM_CATEGORY_CONFIG); - _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_SMTP, 1); + _dpd.snortFree(config->cmds, sizeof(*(config->cmds)), PP_SMTP, PP_MEM_CATEGORY_CONFIG); } if (config->cmd_config != NULL) - _dpd.snortFree(config->cmd_config, sizeof(*(config->cmd_config)), PP_SMTP, 1); + _dpd.snortFree(config->cmd_config, sizeof(*(config->cmd_config)), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (config->cmd_search_mpse != NULL) _dpd.searchAPI->search_instance_free(config->cmd_search_mpse); if (config->cmd_search != NULL) - _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_SMTP, 1); + _dpd.snortFree(config->cmd_search, sizeof(*(config->cmd_search)), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); - _dpd.snortFree(config, sizeof(*config), PP_SMTP, 1); + _dpd.snortFree(config, sizeof(*config), PP_SMTP, PP_MEM_CATEGORY_CONFIG); } @@ -759,7 +767,8 @@ auth_changed = true; } else - smtp_ssn->auth_name = _dpd.snortAlloc(1, sizeof(*(smtp_ssn->auth_name)), PP_SMTP, 0); + smtp_ssn->auth_name = _dpd.snortAlloc(1, sizeof(*(smtp_ssn->auth_name)), PP_SMTP, + PP_MEM_CATEGORY_SESSION); /* save the current authentication mechanism*/ if (!smtp_ssn->auth_name) @@ -1683,20 +1692,23 @@ if(smtp_ssn->mime_ssn.decode_state != NULL) { mempool_free(smtp_mime_mempool, smtp_ssn->mime_ssn.decode_bkt); - _dpd.snortFree(smtp_ssn->mime_ssn.decode_state, sizeof(Email_DecodeState), PP_SMTP, 0); + _dpd.snortFree(smtp_ssn->mime_ssn.decode_state, sizeof(Email_DecodeState), PP_SMTP, + PP_MEM_CATEGORY_SESSION); smtp_ssn->mime_ssn.decode_state = NULL; } if(smtp_ssn->mime_ssn.log_state != NULL) { mempool_free(smtp_mempool, smtp_ssn->mime_ssn.log_state->log_hdrs_bkt); - _dpd.snortFree(smtp_ssn->mime_ssn.log_state, sizeof(MAIL_LogState), PP_SMTP, 0); + _dpd.snortFree(smtp_ssn->mime_ssn.log_state, sizeof(MAIL_LogState), PP_SMTP, + PP_MEM_CATEGORY_SESSION); smtp_ssn->mime_ssn.log_state = NULL; } if(smtp_ssn->auth_name != NULL) { - _dpd.snortFree(smtp_ssn->auth_name, sizeof(*(smtp_ssn->auth_name)), PP_SMTP, 0); + _dpd.snortFree(smtp_ssn->auth_name, sizeof(*(smtp_ssn->auth_name)), PP_SMTP, + PP_MEM_CATEGORY_SESSION); smtp_ssn->auth_name = NULL; } } @@ -1734,6 +1746,9 @@ if(ssn == NULL) return 0; + if(ssn->mime_ssn.log_state == NULL) + return 0; + *buf = ssn->mime_ssn.log_state->file_log.filenames; *len = ssn->mime_ssn.log_state->file_log.file_logged; *type = EVENT_INFO_SMTP_FILENAME; @@ -1748,6 +1763,9 @@ if(ssn == NULL) return 0; + if(ssn->mime_ssn.log_state == NULL) + return 0; + *buf = ssn->mime_ssn.log_state->senders; *len = ssn->mime_ssn.log_state->snds_logged; *type = EVENT_INFO_SMTP_MAILFROM; @@ -1762,6 +1780,9 @@ if(ssn == NULL) return 0; + if(ssn->mime_ssn.log_state == NULL) + return 0; + *buf = ssn->mime_ssn.log_state->recipients; *len = ssn->mime_ssn.log_state->rcpts_logged; *type = EVENT_INFO_SMTP_RCPTTO; @@ -1776,13 +1797,37 @@ if(ssn == NULL) return 0; + if(ssn->mime_ssn.log_state == NULL) + return 0; + *buf = ssn->mime_ssn.log_state->emailHdrs; *len = ssn->mime_ssn.log_state->hdrs_logged; *type = EVENT_INFO_SMTP_EMAIL_HDRS; return 1; } +int SMTP_SessionIfExists(void *data) +{ + SMTP *ssn = SMTP_GetSession(data); + + if(ssn == NULL) + return 0; + + return 1; +} + +static SmtpAPI smtpApiTable = { + SMTP_SessionIfExists, + SMTP_GetFilename, + SMTP_GetMailFrom, + SMTP_GetRcptTo, + SMTP_GetEmailHdrs +}; +void SmtpApiInit(SmtpAPI *api) +{ + *api = smtpApiTable; +} void SMTP_Set_flow_id( void *app_data, uint32_t fid ) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/snort_smtp.h snort-2.9.20/src/dynamic-preprocessors/smtp/snort_smtp.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/snort_smtp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/snort_smtp.h 2022-05-18 04:58:46.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -263,9 +263,8 @@ */ tSfPolicyId policy_id; - tSfPolicyUserContextId config; uint32_t flow_id; - + tSfPolicyUserContextId config; } SMTP; @@ -285,6 +284,7 @@ int SMTP_GetMailFrom(void *data, uint8_t **buf, uint32_t *len, uint32_t *type); int SMTP_GetRcptTo(void *data, uint8_t **buf, uint32_t *len, uint32_t *type); int SMTP_GetEmailHdrs(void *data, uint8_t **buf, uint32_t *len, uint32_t *type); +int SMTP_SessionExist(void *data); void SMTP_MempoolInit(uint32_t, uint32_t); /**************************************************************************/ diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/spp_smtp.c snort-2.9.20/src/dynamic-preprocessors/smtp/spp_smtp.c --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/spp_smtp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/spp_smtp.c 2022-05-18 04:58:47.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -64,6 +64,7 @@ #include "snort_debug.h" #include "sfPolicy.h" #include "sfPolicyUserData.h" +#include "smtp_api.h" #include "profiler.h" #ifdef PERF_PROFILING @@ -128,7 +129,7 @@ static void * SMTPReloadSwap(struct _SnortConfig *, void *); static void SMTPReloadSwapFree(void *); #endif - +void SmtpApiInit(SmtpAPI *api); /* * Function: SetupSMTP() @@ -181,7 +182,7 @@ PrintSMTPSize(); #endif - _dpd.registerMemoryStatsFunc(PP_SMTP, "smtp", SMTP_Print_Mem_Stats); + _dpd.registerMemoryStatsFunc(PP_SMTP, SMTP_Print_Mem_Stats); if (smtp_config == NULL) { @@ -233,7 +234,8 @@ DynamicPreprocessorFatalMessage("Can only configure SMTP preprocessor once.\n"); } - pPolicyConfig = (SMTPConfig *)_dpd.snortAlloc(1, sizeof(SMTPConfig), PP_SMTP, 1); + pPolicyConfig = (SMTPConfig *)_dpd.snortAlloc(1, sizeof(SMTPConfig), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { @@ -288,6 +290,7 @@ #ifdef DUMP_BUFFER _dpd.registerBufferTracer(getSMTPBuffers, SMTP_BUFFER_DUMP_FUNC); #endif + SmtpApiInit(_dpd.smtpApi); } /* @@ -619,7 +622,8 @@ if (pPolicyConfig != NULL) DynamicPreprocessorFatalMessage("Can only configure SMTP preprocessor once.\n"); - pPolicyConfig = (SMTPConfig *)_dpd.snortAlloc(1, sizeof(SMTPConfig), PP_SMTP, 1); + pPolicyConfig = (SMTPConfig *)_dpd.snortAlloc(1, sizeof(SMTPConfig), PP_SMTP, + PP_MEM_CATEGORY_CONFIG); if (pPolicyConfig == NULL) { diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/smtp/spp_smtp.h snort-2.9.20/src/dynamic-preprocessors/smtp/spp_smtp.h --- snort-2.9.15.1/src/dynamic-preprocessors/smtp/spp_smtp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/smtp/spp_smtp.h 2022-05-18 04:58:48.000000000 +0000 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * Author: Andy Mullican diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssh/Makefile.am snort-2.9.20/src/dynamic-preprocessors/ssh/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/ssh/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssh/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -27,6 +27,7 @@ endif EXTRA_DIST = \ +sf_ssh.vcxproj \ sf_ssh.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssh/Makefile.in snort-2.9.20/src/dynamic-preprocessors/ssh/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/ssh/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssh/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@ssh_buffer_dump.h subdir = src/dynamic-preprocessors/ssh -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -154,7 +164,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -200,6 +210,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -245,6 +256,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -345,6 +357,7 @@ libsf_ssh_preproc_la_SOURCES = spp_ssh.c spp_ssh.h $(am__append_1) EXTRA_DIST = \ +sf_ssh.vcxproj \ sf_ssh.dsp all: all-am @@ -363,14 +376,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssh/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssh/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -427,10 +439,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -499,7 +511,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -653,6 +668,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssh/sf_ssh.vcxproj snort-2.9.20/src/dynamic-preprocessors/ssh/sf_ssh.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/ssh/sf_ssh.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssh/sf_ssh.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,298 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {967A437F-57A3-4C85-A273-C70C75DF16CC} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_ssh.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_ssh.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_ssh.bsc + + + true + true + Console + .\Release\sf_ssh.dll + .\Release\sf_ssh.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_ssh.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_ssh.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_ssh.bsc + + + true + true + Console + .\Release\sf_ssh.dll + .\Release\sf_ssh.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_ssh.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_ssh.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_ssh.bsc + + + true + true + true + Console + .\Debug\sf_ssh.dll + .\Debug\sf_ssh.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\libs;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_ssh.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_ssh.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_ssh.bsc + + + true + true + true + Console + .\Debug\sf_ssh.dll + .\Debug\sf_ssh.lib + ws2_32.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssh/spp_ssh.c snort-2.9.20/src/dynamic-preprocessors/ssh/spp_ssh.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssh/spp_ssh.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssh/spp_ssh.c 2022-05-18 04:59:03.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssh/spp_ssh.h snort-2.9.20/src/dynamic-preprocessors/ssh/spp_ssh.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssh/spp_ssh.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssh/spp_ssh.h 2022-05-18 04:59:10.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssh/ssh_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/ssh/ssh_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssh/ssh_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssh/ssh_buffer_dump.c 2022-05-18 04:59:16.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssh/ssh_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/ssh/ssh_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssh/ssh_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssh/ssh_buffer_dump.h 2022-05-18 04:59:17.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl/Makefile.am snort-2.9.20/src/dynamic-preprocessors/ssl/Makefile.am --- snort-2.9.15.1/src/dynamic-preprocessors/ssl/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -32,6 +32,7 @@ endif EXTRA_DIST = \ +sf_ssl.vcxproj \ sf_ssl.dsp all-local: $(LTLIBRARIES) diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl/Makefile.in snort-2.9.20/src/dynamic-preprocessors/ssl/Makefile.in --- snort-2.9.15.1/src/dynamic-preprocessors/ssl/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,11 +93,11 @@ @BUILD_BUFFER_DUMP_TRUE@ssl_buffer_dump.h subdir = src/dynamic-preprocessors/ssl -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -156,7 +166,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -202,6 +212,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -247,6 +258,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -351,6 +363,7 @@ libsf_ssl_preproc_la_SOURCES = ssl_setup.c ssl_setup.h $(am__append_1) EXTRA_DIST = \ +sf_ssl.vcxproj \ sf_ssl.dsp all: all-am @@ -369,14 +382,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/dynamic-preprocessors/ssl/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -433,10 +445,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -517,7 +529,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -671,6 +686,8 @@ tags tags-am uninstall uninstall-am \ uninstall-dynamicpreprocessorLTLIBRARIES +.PRECIOUS: Makefile + all-local: $(LTLIBRARIES) $(MAKE) DESTDIR=`pwd`/../build install-dynamicpreprocessorLTLIBRARIES diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl/sf_ssl.vcxproj snort-2.9.20/src/dynamic-preprocessors/ssl/sf_ssl.vcxproj --- snort-2.9.15.1/src/dynamic-preprocessors/ssl/sf_ssl.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl/sf_ssl.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,305 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {6BA82E34-A6FB-4900-90FE-D88BF7AEB001} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + .\Debug\ + .\Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\..\;..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_ssl.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_ssl.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_ssl.bsc + + + true + true + Console + .\Release\sf_ssl.dll + .\Release\sf_ssl.lib + ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + false + ..\..\;..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;SF_SNORT_PREPROC_DLL;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\sf_ssl.pch + .\Release\ + .\Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\Release\sf_ssl.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\sf_ssl.bsc + + + true + true + Console + .\Release\sf_ssl.dll + .\Release\sf_ssl.lib + ws2_32.lib;../libs/Release/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + false + ..\..\;..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_ssl.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_ssl.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_ssl.bsc + + + true + true + true + Console + .\Debug\sf_ssl.dll + .\Debug\sf_ssl.lib + ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + false + ..\..\;..\libs;..\ssl_common;..\include;..\..\win32\Win32-Includes;.\;..\..\win32\Win32-Includes\WinPCAP;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + SF_SNORT_PREPROC_DLL;_DEBUG;DEBUG;ENABLE_PAF;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\sf_ssl.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\Debug\sf_ssl.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\sf_ssl.bsc + + + true + true + true + Console + .\Debug\sf_ssl.dll + .\Debug\sf_ssl.lib + ws2_32.lib;../libs/Debug/sfdynamic_preproc_libs.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + {ce034b6a-1872-4f3c-bd89-6dde0fc68fe7} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_buffer_dump.c snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_buffer_dump.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_buffer_dump.c 2022-05-18 04:59:18.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_buffer_dump.h snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_buffer_dump.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_buffer_dump.h 2022-05-18 04:59:20.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_setup.c snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_setup.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_setup.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_setup.c 2022-05-18 04:59:21.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_setup.h snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_setup.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl/ssl_setup.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl/ssl_setup.h 2022-05-18 04:59:27.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl.c snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl.c 2022-05-18 04:59:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 1998-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl.h snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl.h 2022-05-18 04:59:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 1998-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_config.c snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_config.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_config.c 2022-05-18 04:59:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_config.h snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_config.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_config.h 2022-05-18 04:59:32.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_ha.c snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_ha.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_ha.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_ha.c 2022-05-18 04:59:34.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_ha.h snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_ha.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_ha.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_ha.h 2022-05-18 04:59:36.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_include.h snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_include.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_include.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_include.h 2022-05-18 04:59:37.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2013-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_inspect.c snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_inspect.c --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_inspect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_inspect.c 2022-05-18 04:59:43.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_inspect.h snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_inspect.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_inspect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_inspect.h 2022-05-18 04:59:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_session.h snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_session.h --- snort-2.9.15.1/src/dynamic-preprocessors/ssl_common/ssl_session.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/dynamic-preprocessors/ssl_common/ssl_session.h 2022-05-18 04:59:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/encode.c snort-2.9.20/src/encode.c --- snort-2.9.15.1/src/encode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/encode.c 2022-05-18 04:59:52.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -262,12 +262,15 @@ pkth->egress_index = phdr->egress_index; pkth->egress_group = phdr->egress_group; pkth->flags = phdr->flags & (~DAQ_PKT_FLAG_HW_TCP_CS_GOOD); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) pkth->address_space_id_src = phdr->address_space_id_src; pkth->address_space_id_dst = phdr->address_space_id_dst; #else pkth->address_space_id = phdr->address_space_id; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) && defined(DAQ_VERSION) && DAQ_VERSION > 10 + pkth->carrier_id = phdr->carrier_id; +#endif pkth->opaque = opaque; if( type == PSEUDO_PKT_TCP || type == PSEUDO_PKT_IP ) pkth->priv_ptr = phdr->priv_ptr; diff -Nru snort-2.9.15.1/src/encode.h snort-2.9.20/src/encode.h --- snort-2.9.15.1/src/encode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/encode.h 2022-05-18 04:59:53.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/event.h snort-2.9.20/src/event.h --- snort-2.9.15.1/src/event.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/event.h 2022-05-18 04:59:54.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/event_queue.c snort-2.9.20/src/event_queue.c --- snort-2.9.15.1/src/event_queue.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/event_queue.c 2022-05-18 04:59:55.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2004-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/event_queue.h snort-2.9.20/src/event_queue.h --- snort-2.9.15.1/src/event_queue.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/event_queue.h 2022-05-18 05:00:01.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/event_wrapper.c snort-2.9.20/src/event_wrapper.c --- snort-2.9.15.1/src/event_wrapper.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/event_wrapper.c 2022-05-18 05:00:12.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/event_wrapper.h snort-2.9.20/src/event_wrapper.h --- snort-2.9.15.1/src/event_wrapper.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/event_wrapper.h 2022-05-18 05:00:13.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/Makefile.in snort-2.9.20/src/file-process/Makefile.in --- snort-2.9.15.1/src/file-process/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/file-process/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/file-process -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -118,7 +128,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @@ -163,7 +173,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -184,6 +194,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -254,6 +265,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -390,14 +402,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/file-process/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/file-process/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -424,10 +435,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -543,7 +554,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -719,6 +733,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/file-process/circular_buffer.c snort-2.9.20/src/file-process/circular_buffer.c --- snort-2.9.15.1/src/file-process/circular_buffer.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/circular_buffer.c 2022-05-18 05:00:14.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/circular_buffer.h snort-2.9.20/src/file-process/circular_buffer.h --- snort-2.9.15.1/src/file-process/circular_buffer.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/circular_buffer.h 2022-05-18 05:00:15.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_api.h snort-2.9.20/src/file-process/file_api.h --- snort-2.9.15.1/src/file-process/file_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_api.h 2022-05-18 05:00:16.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * ** Copyright (C) 2012-2013 Sourcefire, Inc. * ** AUTHOR: Hui Cao * ** @@ -259,6 +259,7 @@ typedef void (*File_event_log_dump_func)( struct _FileCache *fileCache, void* p, uint64_t file_id); typedef void (*File_signature_reset)(void *ssnptr); typedef void (*Set_file_partial_func)(void *p, FilePosition position, bool upload, bool is_partial); +typedef char* (*File_get_filetype_func) (void *ssnptr); typedef struct _file_api { @@ -723,6 +724,13 @@ File_cache_mem_adjust_func file_cache_shrink_to_memcap; File_cache_mem_set_func file_cache_set_memcap; File_signature_reset file_signature_reset; + /* Return a char string that indicates the file type + * Arguments: + * void * ssnptr: session pointer + * Returns: + * File Type name + */ + File_get_filetype_func file_get_filetype; /* Logging a file event */ File_event_log_dump_func file_event_log_dump; diff -Nru snort-2.9.15.1/src/file-process/file_capture.c snort-2.9.20/src/file-process/file_capture.c --- snort-2.9.15.1/src/file-process/file_capture.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_capture.c 2022-05-18 05:00:17.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -38,11 +38,13 @@ #include "file_config.h" #include "file_stats.h" #include "file_service.h" +#include "memory_stats.h" #include #include #include #include +#include SafeMemPool *file_mempool = NULL; File_Capture_Stats file_capture_stats; @@ -135,12 +137,11 @@ max_files = max_file_mem_in_bytes / block_size ; - file_mempool = (SafeMemPool *)calloc(1, sizeof(SafeMemPool)); + file_mempool = (SafeMemPool *)SnortPreprocAlloc(1, sizeof(SafeMemPool), PP_FILE, PP_MEM_CATEGORY_MEMPOOL); if ((!file_mempool)|| (safe_mempool_init(file_mempool, max_files, block_size) != 0)) { - FILE_CRITICAL( "File capture: Could not allocate file buffer mempool."); FatalError( "File capture: Could not allocate file buffer mempool.\n"); } @@ -213,7 +214,6 @@ context->file_capture = NULL; } context->file_capture_enabled = false; - FILE_DEBUG("Capture stopped"); } /* @@ -271,7 +271,7 @@ { FileCaptureInfo *fileInfo = (FileCaptureInfo *) context->file_capture; FileCaptureInfo *lastBlock = fileInfo->last; - int64_t available_bytes; + uint64_t available_bytes; FileConfig *file_config = (FileConfig *)(snort_conf->file_config); DEBUG_WRAP(verify_file_capture_info(context, fileInfo);); @@ -286,6 +286,11 @@ /* Check whether current file block can hold file data*/ available_bytes = file_config->file_capture_block_size - lastBlock->length; + if ( available_bytes > file_config->file_capture_block_size) + { + context->file_state.capture_state = FILE_CAPTURE_MEMCAP; + return -1; + } if ( data_size > available_bytes) { @@ -641,8 +646,66 @@ if (safe_mempool_destroy(file_mempool) == 0) { - free(file_mempool); + SnortPreprocFree(file_mempool, sizeof(SafeMemPool), PP_FILE, PP_MEM_CATEGORY_MEMPOOL); file_mempool = NULL; } } + +int FilePrintMemStats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time = time(NULL); + int len = 0; + size_t total_heap_memory = meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + + meminfo[PP_MEM_CATEGORY_MEMPOOL].used_memory; + if (fd) + { + len = fprintf(fd, ",%lu,%u,%u" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu" + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_MEMPOOL].used_memory + , meminfo[PP_MEM_CATEGORY_MEMPOOL].num_of_alloc + , meminfo[PP_MEM_CATEGORY_MEMPOOL].num_of_free + , total_heap_memory); + return len; + } + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics for File at: %s\n" + "Total buffers allocated: "FMTu64("-10")" \n" + "Total buffers freed: "FMTu64("-10")" \n" + "Total buffers released: "FMTu64("-10")" \n" + "Total file mempool: "FMTu64("-10")" \n" + "Total allocated file mempool: "FMTu64("-10")" \n" + "Total freed file mempool: "FMTu64("-10")" \n" + "Total released file mempool: "FMTu64("-10")" \n" + , ctime(&curr_time) + , file_capture_stats.file_buffers_allocated_total + , file_capture_stats.file_buffers_freed_total + , file_capture_stats.file_buffers_released_total + , (file_mempool)?(file_mempool->total):0 + , (file_mempool)?(safe_mempool_allocated(file_mempool)):0 + , (file_mempool)?(safe_mempool_freed(file_mempool)):0 + , (file_mempool)?(safe_mempool_released(file_mempool)):0); + } + else + { + LogMessage("\n"); + LogMessage("Memory Statistics for File at:%s\n" , ctime(&curr_time)); + LogMessage("Total buffers allocated: "FMTu64("-10")" \n", file_capture_stats.file_buffers_allocated_total); + LogMessage("Total buffers freed: "FMTu64("-10")" \n", file_capture_stats.file_buffers_freed_total); + LogMessage("Total buffers released: "FMTu64("-10")" \n", file_capture_stats.file_buffers_released_total); + LogMessage("Total file mempool: "FMTu64("-10")" \n", (file_mempool)?(file_mempool->total):0); + LogMessage("Total allocated file mempool: "FMTu64("-10")" \n", (file_mempool)?(safe_mempool_allocated(file_mempool)):0); + LogMessage("Total freed file mempool: "FMTu64("-10")" \n", (file_mempool)?(safe_mempool_freed(file_mempool)):0); + LogMessage("Total released file mempool: "FMTu64("-10")" \n", (file_mempool)?(safe_mempool_released(file_mempool)):0); + } + return len; +} diff -Nru snort-2.9.15.1/src/file-process/file_capture.h snort-2.9.20/src/file-process/file_capture.h --- snort-2.9.15.1/src/file-process/file_capture.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_capture.h 2022-05-18 05:00:19.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** @@ -29,6 +29,7 @@ #include "file_api.h" #include "file_lib.h" +#include "memory_stats.h" struct _FileCaptureInfo { @@ -163,5 +164,5 @@ * this must be called when snort exits */ void file_caputure_close(void); - +int FilePrintMemStats(FILE *fd, char* buffer, PreprocMemInfo *meminfo); #endif diff -Nru snort-2.9.15.1/src/file-process/file_mail_common.h snort-2.9.20/src/file-process/file_mail_common.h --- snort-2.9.15.1/src/file-process/file_mail_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_mail_common.h 2022-05-18 05:00:20.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * ** Copyright (C) 2012-2013 Sourcefire, Inc. * ** AUTHOR: Hui Cao * ** diff -Nru snort-2.9.15.1/src/file-process/file_mempool.c snort-2.9.20/src/file-process/file_mempool.c --- snort-2.9.15.1/src/file-process/file_mempool.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_mempool.c 2022-05-18 05:00:21.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -36,6 +36,8 @@ #include #include #include "file_mempool.h" +#include "memory_stats.h" +#include "preprocids.h" #include "util.h" /*This magic is used for double free detection*/ @@ -83,7 +85,8 @@ if (mempool->datapool != NULL) { - free(mempool->datapool); + SnortPreprocFree(mempool->datapool, mempool->obj_size * mempool->total, PP_FILE, + PP_MEM_CATEGORY_MEMPOOL); mempool->datapool = NULL; } @@ -118,7 +121,7 @@ /* this is the basis pool that represents all the *data pointers * in the list */ - mempool->datapool = calloc(num_objects, obj_size); + mempool->datapool = SnortPreprocAlloc(num_objects, obj_size, PP_FILE, PP_MEM_CATEGORY_MEMPOOL); if(mempool->datapool == NULL) { ErrorMessage("%s(%d) safe_mempool_init(): Failed to init datapool\n", @@ -218,7 +221,7 @@ if (*(MagicType *)b != ((uint64_t)FREE_MAGIC)) { - ErrorMessage("%s(%d) safe_mempool_alloc(): Allocation errors! \n", + ErrorMessage("%s(%d) safe_mempool_alloc(): Possible memory corruption! \n", __FILE__, __LINE__); } @@ -244,15 +247,15 @@ if (obj == NULL) return SAFE_MEM_FAIL; - if(cbuffer_write(cb, obj)) + if (*(MagicType *)obj == ((uint64_t)FREE_MAGIC)) { + DEBUG_WRAP(ErrorMessage("%s(%d) safe_mempool_remove(): Double free! \n", + __FILE__, __LINE__);); return SAFE_MEM_FAIL; } - if (*(MagicType *)obj == ((uint64_t)FREE_MAGIC)) + if (cbuffer_write(cb, obj)) { - DEBUG_WRAP(ErrorMessage("%s(%d) safe_mempool_remove(): Double free! \n", - __FILE__, __LINE__);); return SAFE_MEM_FAIL; } diff -Nru snort-2.9.15.1/src/file-process/file_mempool.h snort-2.9.20/src/file-process/file_mempool.h --- snort-2.9.15.1/src/file-process/file_mempool.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_mempool.h 2022-05-18 05:00:22.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_mime_config.c snort-2.9.20/src/file-process/file_mime_config.c --- snort-2.9.15.1/src/file-process/file_mime_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_mime_config.c 2022-05-18 05:00:23.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_mime_config.h snort-2.9.20/src/file-process/file_mime_config.h --- snort-2.9.15.1/src/file-process/file_mime_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_mime_config.h 2022-05-18 05:00:24.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_mime_process.c snort-2.9.20/src/file-process/file_mime_process.c --- snort-2.9.15.1/src/file-process/file_mime_process.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_mime_process.c 2022-05-18 05:00:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -38,6 +38,7 @@ #include "decode.h" #include "detection_util.h" +#include "memory_stats.h" #include "stream_api.h" #include "reg_test.h" #include @@ -391,7 +392,7 @@ max_sessions = max_mime_mem / ( 2 * encode_depth); - mime_mempool = (MemPool *)calloc(1, sizeof(MemPool)); + mime_mempool = (MemPool *)SnortPreprocAlloc(1, sizeof(MemPool), PP_FILE, PP_MEM_CATEGORY_MEMPOOL); if ((!mime_mempool)||(mempool_init(mime_mempool, max_sessions, (2 * encode_depth)) != 0)) @@ -418,7 +419,7 @@ max_sessions_logged = memcap/max_bkt_size; - log_mempool = calloc(1, sizeof(*log_mempool)); + log_mempool = (MemPool *)SnortPreprocAlloc(1, sizeof(*log_mempool), PP_FILE, PP_MEM_CATEGORY_MEMPOOL); if ((!log_mempool)||(mempool_init(log_mempool, max_sessions_logged, max_bkt_size) != 0)) @@ -1193,15 +1194,16 @@ if(mime_ssn->decode_state != NULL) { mempool_free(mime_ssn->mime_mempool, mime_ssn->decode_bkt); - free(mime_ssn->decode_state); + SnortPreprocFree(mime_ssn->decode_state, sizeof(Email_DecodeState), PP_FILE, + PP_MEM_CATEGORY_SESSION); } if(mime_ssn->log_state != NULL) { mempool_free(mime_ssn->log_mempool, mime_ssn->log_state->log_hdrs_bkt); - free(mime_ssn->log_state); + SnortPreprocFree(mime_ssn->log_state, sizeof(FILE_LogState), PP_FILE, PP_MEM_CATEGORY_SESSION); } - free(mime_ssn); + SnortPreprocFree(mime_ssn, sizeof(MimeState), PP_FILE, PP_MEM_CATEGORY_SESSION); } /* diff -Nru snort-2.9.15.1/src/file-process/file_mime_process.h snort-2.9.20/src/file-process/file_mime_process.h --- snort-2.9.15.1/src/file-process/file_mime_process.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_mime_process.h 2022-05-18 05:00:27.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_resume_block.c snort-2.9.20/src/file-process/file_resume_block.c --- snort-2.9.15.1/src/file-process/file_resume_block.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_resume_block.c 2022-05-18 05:00:28.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -157,13 +157,13 @@ if( !buf ) { - FILE_ERROR("Side channel: No buffer"); + LogMessage("Side channel: No buffer\n"); return -1; } if( len < sizeof(*hk) + sizeof(*hv) ) { - FILE_ERROR("Side channel: length too small"); + LogMessage("Side channel: length too small\n"); return -1; } hk = (FileHashKey *)buf; @@ -193,21 +193,23 @@ * for key. This means bigger problems, but fail * gracefully. */ - FILE_ERROR("Side channel: Failed to add file node to hash table"); + LogMessage("Failed to add file node to hash table\n"); pthread_mutex_unlock(&file_cache_mutex); return -1; } pthread_mutex_unlock(&file_cache_mutex); #ifdef REG_TEST - LogMessage("consume verdict =%d file id =%d \n",hv->verdict,hv->file_type_id); - file_sha256_print(hv->sha256); -#endif - FILE_DEBUG("Side channel: Consume verdict: %d file id: %d",hv->verdict,hv->file_type_id); + LogMessage("consume verdict =%d file id =%d \n",hv->verdict,hv->file_type_id); + file_sha256_print(hv->sha256); +#endif /* REG_TEST */ return 0; } #endif +/*Message will be logged within 600 seconds*/ +static ThrottleInfo error_throttleInfo = {0,600,0}; + /** * * @param sip - source IP address * @param dip - destination IP address @@ -284,7 +286,7 @@ DAQ_DC_Params params; memset(¶ms, 0, sizeof(params)); - params.flags = DAQ_DC_ALLOW_MULTIPLE | DAQ_DC_PERSIST; + params.flags = DAQ_DC_ALLOW_MULTIPLE; params.timeout_ms = 5 * 60 * 1000; /* 5 minutes */ if (p->packet_flags & PKT_FROM_CLIENT) { @@ -321,9 +323,9 @@ node->expires = now + (timeout * 4);/* 20 minuts timeout*/ updateFileNode(node, verdict, file_type_id, signature); #ifdef SIDE_CHANNEL - if (ProduceSSFileCache(&hashKey, node) < 0) + if ((ProduceSSFileCache(&hashKey, node) < 0) && ScSideChannelEnabled()) { - LogMessage("Failed to add Side channel message\n"); + ErrorMessageThrottled(&error_throttleInfo, "Failed to add Side channel message\n"); } #endif } @@ -344,9 +346,9 @@ /* Add it to the table */ #ifdef SIDE_CHANNEL - if (ProduceSSFileCache(&hashKey, &new_node) < 0) + if ((ProduceSSFileCache(&hashKey, &new_node) < 0) && ScSideChannelEnabled()) { - LogMessage("Failed to add Side channel message\n"); + ErrorMessageThrottled(&error_throttleInfo, "Failed to add Side channel message\n"); } #endif pthread_mutex_lock(&file_cache_mutex); @@ -363,20 +365,28 @@ } pthread_mutex_unlock(&file_cache_mutex); } - FILE_DEBUG("Resume block: Added file node with verdict: %d, file signature: %d, hash:" - "%02X%02X %02X%02X %02X%02X %02X%02X" - "%02X%02X %02X%02X %02X%02X %02X%02X " - "%02X%02X %02X%02X %02X%02X %02X%02X " - "%02X%02X %02X%02X %02X%02X %02X%02X", - verdict, file_sig, - signature[0], signature[1], signature[2], signature[3], - signature[4], signature[5], signature[6], signature[7], - signature[8], signature[9], signature[10], signature[11], - signature[12], signature[13], signature[14], signature[15], - signature[16], signature[17], signature[18], signature[19], - signature[20], signature[21], signature[22], signature[23], - signature[24], signature[25], signature[26], signature[27], - signature[28], signature[29], signature[30], signature[31]); + if (signature) + { + FILE_DEBUG("Resume block: Added file node with verdict: %d, file signature: %d, hash:" + "%02X%02X %02X%02X %02X%02X %02X%02X" + "%02X%02X %02X%02X %02X%02X %02X%02X " + "%02X%02X %02X%02X %02X%02X %02X%02X " + "%02X%02X %02X%02X %02X%02X %02X%02X", + verdict, file_sig, + signature[0], signature[1], signature[2], signature[3], + signature[4], signature[5], signature[6], signature[7], + signature[8], signature[9], signature[10], signature[11], + signature[12], signature[13], signature[14], signature[15], + signature[16], signature[17], signature[18], signature[19], + signature[20], signature[21], signature[22], signature[23], + signature[24], signature[25], signature[26], signature[27], + signature[28], signature[29], signature[30], signature[31]); + } + else + { + FILE_DEBUG("Resume block: Added file node with verdict: %d, file signature: %d", + verdict, file_sig); + } return 0; } diff -Nru snort-2.9.15.1/src/file-process/file_resume_block.h snort-2.9.20/src/file-process/file_resume_block.h --- snort-2.9.15.1/src/file-process/file_resume_block.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_resume_block.h 2022-05-18 05:00:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/file-process/file_segment_process.c snort-2.9.20/src/file-process/file_segment_process.c --- snort-2.9.15.1/src/file-process/file_segment_process.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_segment_process.c 2022-05-18 05:00:30.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -25,8 +25,10 @@ #include "parser.h" #include "file_resume_block.h" #include "file_config.h" +#include "memory_stats.h" #ifdef REG_TEST +#include "file_stats.h" #include "reg_test.h" #include #endif @@ -48,7 +50,7 @@ fileCache->status.segment_mem_in_use = 0; } - free(file_segment); + SnortPreprocFree(file_segment, sizeof(FileSegment), PP_FILE, PP_MEM_CATEGORY_SESSION); } static inline void file_segments_free (FileEntry *file_entry) @@ -74,14 +76,16 @@ if (file_entry->file_name) { - FILE_DEBUG("File name: %s released (%p)", file_entry->file_name, file_entry->file_name); - free(file_entry->file_name); + DEBUG_WRAP(DebugMessage(DEBUG_FILE, + "File name: %s released (%p)\n", file_entry->file_name, file_entry->file_name)); + SnortPreprocFree(file_entry->file_name, file_entry->file_name_size, PP_FILE, PP_MEM_CATEGORY_SESSION); file_entry->file_name = NULL; file_entry->file_name_size = 0; } if (file_entry->context) { + file_entry->context->attached_file_entry = NULL; file_context_free(file_entry->context); file_entry->context = NULL; } @@ -116,7 +120,6 @@ break; if (sfxhash_free_node(fileCache->hashTable, lru_node) != SFXHASH_OK) { - FILE_WARNING("failed to remove file entry from hash."); LogMessage("WARNING: failed to remove file entry from hash.\n"); break; } @@ -228,16 +231,18 @@ return NULL; /* Check against memcap here*/ - if ((fileCache->status.segment_mem_in_use + size) > fileCache->file_segment_memcap) + if ((fileCache->status.segment_mem_in_use + size) > fileCache->file_segment_memcap) { /* make more memory available by pruning. Return NULL if nothing is pruned*/ if(pruneFileCache(fileCache, file) == 0) return NULL; + else if ((fileCache->status.segment_mem_in_use + size) > fileCache->file_segment_memcap) + return NULL; } - fileCache->status.segment_mem_in_use += size; + fileCache->status.segment_mem_in_use += size; - ss = (FileSegment*) SnortAlloc(size); + ss = (FileSegment*) SnortPreprocAlloc(1, size, PP_FILE, PP_MEM_CATEGORY_SESSION); ss->segment_size = size; ss->size = data_size; ss->offset = offset; @@ -270,23 +275,6 @@ FileSegment *left = NULL; FileSegment *previous = NULL; bool find_left = false; - bool is_overlap = false; - - /* Create a new segment first */ - new_segment = file_segment_alloc(fileCache, file_data, data_size, offset, file); - - if (!new_segment) - { - FILE_ERROR("Failed to allocate new file segment"); - return 0; - } - - /* First segment to store*/ - if (!current_segment) - { - file->segments = new_segment; - return 1; - } /* Find left boundary, left points to segment that needs update*/ while (current_segment) @@ -302,47 +290,71 @@ current_segment = current_segment->next; } - /* New segment should be at the end of link list*/ - if (!find_left) + if (find_left) { - previous->next = new_segment; - } - /* New segment should be at the start of link list*/ - else if (left == NULL) - { - if (end <= file->segments->offset) - { - new_segment->next = file->segments; - file->segments = new_segment; + if (!left) + { + /* Need to insert at begining */ + if (end > file->segments->offset) + { + /* Overlap, trim off exrta data from end */ + data_size = file->segments->offset - offset; + } } else - { - is_overlap = true; + { + /* Need to insert in the middle */ + if (left->offset + left->size > start) + { + /* Overlap, trim begining */ + offset = left->offset +left->size; + data_size = end - offset; + file_data = file_data + offset - start; + } + if (left->next->offset < end) + { + /* Overlap, trim end of data */ + data_size = left->next->offset - offset; + } } } - else - { - if ((left->offset + left->size > start) || - (left->next->offset < end)) - { - is_overlap = true; - } - - else - { - new_segment->next = left->next; - left->next = new_segment; + else if (previous) + { + /* Need to insert at end */ + left = previous; + if (left->offset + left->size > start) + { + /* Overlap, trim begining */ + offset = left->offset + left->size; + data_size = end - offset; + file_data = file_data + offset - start; } } - - /* ignore overlap case */ - if (is_overlap) + if (data_size > 0) { - file_segment_free(fileCache, new_segment); - FILE_ERROR("Overlapping segments"); + new_segment = file_segment_alloc(fileCache, file_data, data_size, offset, file); + if (!new_segment) + return 0; + } + else + { + /* data_size <= 0 means a complete coverlapped segment we have already seen */ + FILE_DEBUG("Complete overlapped segment, discarding."); return 0; } - + + if (!left) + { + /* inserting at begining or list is empty */ + new_segment->next = file->segments; + file->segments = new_segment; + } + else + { + /* inserting at end or middle */ + new_segment->next = left->next; + left->next = new_segment; + } return 1; } @@ -380,7 +392,7 @@ { if((fileEntry->context->file_state.sig_state == FILE_SIG_FLUSH) && fileEntry->context->sha256) { - free(fileEntry->context->sha256); + SnortPreprocFree(fileEntry->context->sha256, SHA256_HASH_SIZE, PP_FILE, PP_MEM_CATEGORY_SESSION); fileEntry->context->sha256 = NULL; } fileEntry->context->smb_unknown_file_size = false; @@ -392,7 +404,7 @@ Packet *pkt = (Packet *)p; if((fileEntry->context->file_state.sig_state == FILE_SIG_FLUSH) && fileEntry->context && fileEntry->context->sha256) { - free(fileEntry->context->sha256); + SnortPreprocFree(fileEntry->context->sha256, SHA256_HASH_SIZE, PP_FILE, PP_MEM_CATEGORY_SESSION); fileEntry->context->sha256 = NULL; } if(pkt->packet_flags & PKT_PDU_TAIL) @@ -443,7 +455,6 @@ if( !memcap ) { - FILE_WARNING("File cache memory unlimited!"); WarningMessage("%s(%d) File cache memory unlimited!\n", file_name, file_line); } @@ -451,7 +462,7 @@ /* Half for file segment, half for file context tracking*/ max_files = get_max_files_from_memcap(memcap - file_segment_memcap); - fileCache = SnortAlloc( sizeof( *fileCache ) ); + fileCache = SnortPreprocAlloc(1, sizeof(*fileCache), PP_FILE, PP_MEM_CATEGORY_SESSION); if( fileCache ) { fileCache->max_files = max_files; @@ -461,7 +472,6 @@ if (!fileCache->hashTable) { - FILE_CRITICAL("Unable to create a file cache."); FatalError( "%s(%d) Unable to create a file cache.\n", file_name, file_line); } @@ -471,7 +481,6 @@ } else { - FILE_CRITICAL("Unable to create a file cache."); FatalError( "%s(%d) Unable to create a file cache.\n", file_name, file_line); } @@ -485,7 +494,7 @@ if (fileCache) { sfxhash_delete(fileCache->hashTable); - free(fileCache); + SnortPreprocFree(fileCache, sizeof(FileCache), PP_FILE, PP_MEM_CATEGORY_SESSION); } } @@ -516,7 +525,7 @@ if (fileEntry->file_name && fileEntry->file_name != file_name) { FILE_DEBUG("File name: %s released (%p)", fileEntry->file_name,fileEntry->file_name); - free(fileEntry->file_name); + SnortPreprocFree(fileEntry->file_name, fileEntry->file_name_size, PP_FILE, PP_MEM_CATEGORY_SESSION); } fileEntry->file_name = file_name; fileEntry->file_name_size = file_name_size; @@ -552,7 +561,7 @@ file_session->file_cache = fileCache; file_session->file_id = file_id; - FILE_DEBUG("Updated file_id: %u",file_id); + FILE_DEBUG("Updated file_id: %u, file cache %p in file session %p",file_id, fileCache, file_session); } /* @@ -586,9 +595,6 @@ if (!fileEntry->context) fileEntry->file_resume_check = true; - if(offset == 0) - fileEntry->file_resume_check = false; - if(fileEntry->file_resume_check) { if(fileEntry->file_name_size > 0) @@ -610,7 +616,7 @@ sfaddr_t *srcIP = GET_SRC_IP(pkt); sfaddr_t *dstIP = GET_DST_IP(pkt); memset(¶ms, 0, sizeof(params)); - params.flags = DAQ_DC_ALLOW_MULTIPLE | DAQ_DC_PERSIST; + params.flags = DAQ_DC_ALLOW_MULTIPLE; params.timeout_ms = 15 * 60 * 1000; /* 15 minutes */ if (pkt->packet_flags & PKT_FROM_CLIENT) DAQ_Add_Dynamic_Protocol_Channel(pkt, srcIP, 0, dstIP, pkt->dp, GET_IPH_PROTO(pkt), @@ -641,23 +647,18 @@ fileEntry->context = file_api->create_file_context(ssnptr); file_api->init_file_context(ssnptr, upload, fileEntry->context); fileEntry->context->file_id = (uint32_t)file_id; + fileEntry->context->attached_file_entry = fileEntry; + update_file_session(ssnptr, fileCache, file_id, fileEntry->context); + file_name_set(fileEntry->context, fileEntry->file_name, fileEntry->file_name_size, true); } else if (fileEntry->context->verdict != FILE_VERDICT_UNKNOWN && !fileEntry->context->smb_unknown_file_size) { /*A new file session, but policy might be different*/ - file_api->init_file_context(ssnptr, upload, fileEntry->context); if (((fileEntry->context->sha256)) || !fileEntry->context->file_signature_enabled ) { /* Just check file type and signature */ - update_file_session(ssnptr, fileCache, file_id, fileEntry->context); - ret = _process_one_file_segment(p, fileEntry, file_data, &data_size, file_size); - goto resume_block; - } - if (offset == 0) - { - fileEntry->offset = 0; - fileEntry->context->file_id = (uint32_t)file_id; + return _process_one_file_segment(p, fileEntry, file_data, &data_size, file_size); } } @@ -672,7 +673,6 @@ if (fileEntry->offset == offset) { /*Process the packet update the offset */ - update_file_session(ssnptr, fileCache, file_id, fileEntry->context); ret = _process_one_file_segment(p, fileEntry, file_data, &data_size, file_size); fileEntry->offset += data_size; if (!ret) @@ -687,33 +687,14 @@ { ret = _file_segments_update(fileCache, file_data, offset, data_size, fileEntry); } - +#ifdef REG_TEST if(ret && fileEntry->file_name_size) { - update_file_session(ssnptr, fileCache, file_id, fileEntry->context); - file_api->set_file_name(ssnptr, fileEntry->file_name, fileEntry->file_name_size, true); + FILE_REG_DEBUG_WRAP(printFileContext(fileEntry->context)); fileEntry->file_name_size = 0; } +#endif -resume_block: - verdict = fileEntry->context->verdict; - /* Add to resume queue if it is blocked */ - if((verdict == FILE_VERDICT_BLOCK) || (verdict == FILE_VERDICT_REJECT)) - { - FileConfig *file_config = (FileConfig *)(snort_conf->file_config); - if(fileEntry->file_name_size > 0) - { - file_sig = file_api->str_to_hash(fileEntry->file_name, fileEntry->file_name_size); - } - else if(fileEntry->context->file_name_size > 0 && fileEntry->context->file_name) - { - file_sig = file_api->str_to_hash(fileEntry->context->file_name, fileEntry->context->file_name_size); - } - - file_resume_block_add_file(p, file_sig, - (uint32_t)file_config->file_block_timeout, - verdict, fileEntry->context->file_type_id, fileEntry->context->sha256, 0, 0, true, 0); - } return ret; } diff -Nru snort-2.9.15.1/src/file-process/file_segment_process.h snort-2.9.20/src/file-process/file_segment_process.h --- snort-2.9.15.1/src/file-process/file_segment_process.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_segment_process.h 2022-05-18 05:00:31.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -69,11 +69,11 @@ { FileContext *context; uint8_t *file_name; - uint32_t file_name_size; uint64_t offset; FileSegment *segments; uint64_t file_size; FileCache *file_cache; + uint32_t file_name_size; bool file_resume_check; } FileEntry; diff -Nru snort-2.9.15.1/src/file-process/file_service.c snort-2.9.20/src/file-process/file_service.c --- snort-2.9.15.1/src/file-process/file_service.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_service.c 2022-05-18 05:00:32.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -113,6 +113,7 @@ static FileCharEncoding get_character_encoding(uint8_t *buffer, uint32_t length); void file_event_log_dump(FileCache *fileCache, void* p, uint64_t file_id); static void file_signature_reset(void* ssnptr); +static char* file_get_filetype (void *ssnptr); FileAPI fileAPI; FileAPI* file_api = NULL; @@ -197,8 +198,10 @@ fileAPI.file_event_log_dump = &file_event_log_dump; fileAPI.file_signature_reset= &file_signature_reset; fileAPI.set_file_partial = &set_file_partial; + fileAPI.file_get_filetype = &file_get_filetype; file_api = &fileAPI; init_mime(); + RegisterMemoryStatsFunction(PP_FILE, FilePrintMemStats); } @@ -269,7 +272,7 @@ file_config_version++; file_rule_free(conf); file_identifiers_free(conf); - free(conf); + SnortPreprocFree(conf, sizeof(FileConfig), PP_FILE, PP_MEM_CATEGORY_CONFIG); } void close_fileAPI(void) @@ -289,11 +292,13 @@ FileSession *file_session = get_file_session(ssnptr); if(!file_session) { - file_session = (FileSession *)SnortAlloc(sizeof(*file_session)); + file_session = (FileSession *)SnortPreprocAlloc(1, sizeof(*file_session), + PP_FILE, PP_MEM_CATEGORY_SESSION); if (session_api->set_application_data(ssnptr, PP_FILE, file_session, file_session_free)) { - free(file_session); + SnortPreprocFree(file_session, sizeof(*file_session), + PP_FILE, PP_MEM_CATEGORY_SESSION); return NULL; } } @@ -378,8 +383,8 @@ file_context_free(file_session->main_context); } - - free(file_session); + SnortPreprocFree(file_session, sizeof(FileSession), PP_FILE, + PP_MEM_CATEGORY_SESSION); } static void init_file_context(void *ssnptr, bool upload, FileContext *context) @@ -391,6 +396,7 @@ context->file_config_version = file_config_version; context->smb_unknown_file_size = false; context->partial_file = false; + context->attached_file_entry = NULL; file_direction_set(context,upload); file_stats.files_total++; #ifdef TARGET_BASED @@ -513,13 +519,15 @@ return SnortEventqAdd(gid, sid, 1, 0, 3, msg, otn); } -static inline void add_file_to_block(Packet *p, File_Verdict verdict, - uint32_t file_type_id, uint8_t *signature) + +static inline void add_file_to_block(Packet *p, FileContext* context, + bool signature_available) { uint8_t *buf = NULL; uint32_t len = 0; uint32_t type = 0; - uint32_t file_sig; + uint32_t file_sig = 0; + uint8_t* signature = signature_available ? context->sha256 : NULL; Packet *pkt = (Packet *)p; FileConfig *file_config = (FileConfig *)(snort_conf->file_config); @@ -532,9 +540,24 @@ { file_sig = str_to_hash(buf, len); file_resume_block_add_file(p, file_sig, - (uint32_t)file_config->file_block_timeout, - verdict, file_type_id, signature, 0, 0, true, 0); + (uint32_t)file_config->file_block_timeout, context->verdict, + context->file_type_id, signature, 0, 0, true, 0); } + /*use the file name for smb2*/ + else if(context->attached_file_entry && context->file_name_size > 0) + { + file_sig = str_to_hash(context->file_name, context->file_name_size); + file_resume_block_add_file(p, file_sig, + (uint32_t)file_config->file_block_timeout, context->verdict, + context->file_type_id, signature, 0, 0, true, 0); + /*We cant call file_entry_free directly as that will delete the context, but we still may be using it. + So we are unlinking the context from the file entry. this way the context will not be deleted now, + but it will be deleted as part of tcp cleanup. As no context is linked to the file entry now, it will + be set to do resume check. */ + ((FileEntry*)(context->attached_file_entry))->context = NULL; + context->attached_file_entry = NULL; + } + FILE_INFO("File blocked"); if (pkt_trace_enabled) addPktTraceData(VERDICT_REASON_FILE, snprintf(trace_line, MAX_TRACE_LINE, @@ -553,16 +576,30 @@ uint32_t type = 0; uint32_t file_sig; const HttpBuffer* hb = GetHttpBuffer(HTTP_BUFFER_STAT_CODE); - bool partial_cont = isHttpRespPartialCont(p->ssnptr); + uint8_t partial_cont = isHttpRespPartialCont(p->ssnptr); + int is_not_partial_ret_code = 0; - /*Not partial content, return*/ + /* Not partial content, return */ if (hb) { - if (((hb->length != 3) || strncmp((const char*)hb->buf, "206", 3)) && !partial_cont) + if (hb->length != 3) + { + is_not_partial_ret_code = 1; + } + else + { + is_not_partial_ret_code = strncmp((const char*)hb->buf, "206", 3); + } + if (((is_not_partial_ret_code) && !(partial_cont &= PARTIAL_CONTENT)) || + ((!is_not_partial_ret_code) && (partial_cont &= FULL_CONTENT))) + { return 0; + } } - else if (!partial_cont) + else if (!(partial_cont &= PARTIAL_CONTENT)) + { return 0; + } /*Use URI as the identifier for file*/ if (GetHttpUriData(p->ssnptr, &buf, &len, &type)) @@ -660,7 +697,9 @@ "File Process: can't decide verdict and waiting, %s\n", getPktTraceActMsg())); } else addPktTraceData(VERDICT_REASON_FILE, 0); - stream_api->set_event_handler(ssnptr, s_cb_id, SE_REXMIT); + if (!context->suspend_block_verdict) + stream_api->set_event_handler(ssnptr, s_cb_id, SE_REXMIT); + save_to_pending_context(ssnptr); return; } @@ -720,15 +759,13 @@ { file_eventq_add(GENERATOR_FILE_SIGNATURE, FILE_SIGNATURE_SHA256, FILE_SIGNATURE_SHA256_STR, RULE_TYPE__DROP); - add_file_to_block(p, context->verdict, context->file_type_id, - context->sha256); + add_file_to_block(p, context, true); } else if (context->verdict == FILE_VERDICT_REJECT) { file_eventq_add(GENERATOR_FILE_SIGNATURE, FILE_SIGNATURE_SHA256, FILE_SIGNATURE_SHA256_STR, RULE_TYPE__REJECT); - add_file_to_block(p, context->verdict, context->file_type_id, - context->sha256); + add_file_to_block(p, context, true); } finish_signature_lookup(context); @@ -839,13 +876,6 @@ set_current_file_context(ssnptr, context); file_stats.file_data_total += data_size; - if ((!context->file_type_enabled) && (!context->file_signature_enabled)) - { - updateFileSize(context, data_size, position); - FILE_DEBUG("Signature and Type lookup not enabled"); - return 0; - } - /* if file config is changed, update it*/ if ((context->file_config != snort_conf->file_config) || (context->file_config_version != file_config_version)) @@ -859,6 +889,13 @@ FILE_DEBUG("Updated file config."); } + if ((!context->file_type_enabled) && (!context->file_signature_enabled)) + { + updateFileSize(context, data_size, position); + FILE_DEBUG("Signature and Type lookup not enabled"); + return 0; + } + if(check_http_partial_content(p)) { context->file_type_enabled = false; @@ -917,7 +954,7 @@ RULE_TYPE__DROP); updateFileSize(context, data_size, position); context->file_signature_enabled = false; - add_file_to_block(p, verdict, context->file_type_id, NULL); + add_file_to_block(p, context, false); return 1; } else if (verdict == FILE_VERDICT_REJECT) @@ -927,7 +964,7 @@ RULE_TYPE__REJECT); updateFileSize(context, data_size, position); context->file_signature_enabled = false; - add_file_to_block(p, verdict, context->file_type_id, NULL); + add_file_to_block(p, context, false); return 1; } else if (verdict == FILE_VERDICT_STOP) @@ -1020,7 +1057,8 @@ context = find_main_file_context(p, position, upload); if((context->file_state.sig_state == FILE_SIG_FLUSH) && context->sha256) { - free(context->sha256); + SnortPreprocFree(context->sha256, sizeof(SHA256_HASH_SIZE), PP_FILE, + PP_MEM_CATEGORY_SESSION); context->sha256 = NULL; } if(do_flush) @@ -1389,7 +1427,6 @@ if (!context) { - FILE_ERROR("Faild to reset signature state: context not found."); return; } @@ -1400,14 +1437,35 @@ context->verdict = FILE_VERDICT_UNKNOWN; if (context->sha256) { - free(context->sha256); + SnortPreprocFree(context->sha256, sizeof(SHA256_HASH_SIZE), PP_FILE, + PP_MEM_CATEGORY_SESSION); context->sha256 = NULL; } } - else + return; +} + +static char* file_get_filetype (void *ssnptr) +{ + FileContext *context = get_current_file_context(ssnptr); + + if (!context) { - FILE_DEBUG("Did not reset signature state: current state %d",context->file_state.sig_state); + return NULL; } - return; + +#ifdef TARGET_BASED + if (cur_config.file_policy_cb) + { + bool policy_flags; + policy_flags = cur_config.file_policy_cb(ssnptr, context->app_id, context->upload); + if (!(policy_flags & ENABLE_FILE_TYPE_IDENTIFICATION)) + { + return NULL; + } + } +#endif + + return file_type_name (context->file_config, context->file_type_id); } diff -Nru snort-2.9.15.1/src/file-process/file_service.h snort-2.9.20/src/file-process/file_service.h --- snort-2.9.15.1/src/file-process/file_service.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_service.h 2022-05-18 05:00:38.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_service_config.c snort-2.9.20/src/file-process/file_service_config.c --- snort-2.9.15.1/src/file-process/file_service_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_service_config.c 2022-05-18 05:00:39.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -36,6 +36,7 @@ #include "sf_types.h" #include "util.h" #include "mstring.h" +#include "memory_stats.h" #include "parser.h" #include "file_service_config.h" @@ -109,7 +110,7 @@ FileConfig* file_service_config_create(void) { - FileConfig *file_config = SnortAlloc(sizeof(*file_config)); + FileConfig *file_config = SnortPreprocAlloc(1, sizeof(*file_config), PP_FILE, PP_MEM_CATEGORY_CONFIG); file_service_config_defaults(file_config); return file_config; @@ -136,13 +137,16 @@ FileConfig *file_config = (FileConfig *)config; FileSSConfig *file_ss_config = file_config->file_ss_config; if (file_ss_config == NULL) - return; + return; + /* Not changing the free here because memory is allocated using strdup */ if (file_ss_config->startup_input_file) free(file_ss_config->startup_input_file); + /* Not changing the free here because memory is allocated using strdup */ if (file_ss_config->runtime_output_file) free(file_ss_config->runtime_output_file); - free(file_ss_config); + + SnortPreprocFree(file_ss_config, sizeof(FileSSConfig), PP_FILE, PP_MEM_CATEGORY_CONFIG); return; } #endif @@ -280,7 +284,8 @@ file_service_config_defaults(file_config); #if defined (SIDE_CHANNEL) && defined (REG_TEST) - if (NULL == (file_config->file_ss_config = (FileSSConfig *)calloc(1, sizeof(FileSSConfig)))) + if (NULL == (file_config->file_ss_config = (FileSSConfig *)SnortPreprocAlloc(1, + sizeof(FileSSConfig), PP_FILE, PP_MEM_CATEGORY_CONFIG))) return; else if(ScSideChannelEnabled()) file_config->use_side_channel = true; diff -Nru snort-2.9.15.1/src/file-process/file_service_config.h snort-2.9.20/src/file-process/file_service_config.h --- snort-2.9.15.1/src/file-process/file_service_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_service_config.h 2022-05-18 05:00:40.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_ss.c snort-2.9.20/src/file-process/file_ss.c --- snort-2.9.15.1/src/file-process/file_ss.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_ss.c 2022-05-18 05:00:42.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as @@ -106,6 +106,8 @@ return rval; } +/*Message will be logged within 600 seconds*/ +static ThrottleInfo error_throttleInfo = {0,600,0}; /* Caller should proceed writing to the 'data_ptr' ONLY upon successful return i.e 0 */ int CreateFileSSUpdate(void **msg_handle, void **hdr_ptr, void **data_ptr, uint32_t type, uint32_t data_len) @@ -155,7 +157,7 @@ else #endif { - ErrorMessage("side channel infra is not up\n"); + ErrorMessageThrottled(&error_throttleInfo, "side channel infra is not up\n"); return -1; } } diff -Nru snort-2.9.15.1/src/file-process/file_ss.h snort-2.9.20/src/file-process/file_ss.h --- snort-2.9.15.1/src/file-process/file_ss.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_ss.h 2022-05-18 05:00:43.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/file-process/file_stats.c snort-2.9.20/src/file-process/file_stats.c --- snort-2.9.15.1/src/file-process/file_stats.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_stats.c 2022-05-18 05:00:44.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/file_stats.h snort-2.9.20/src/file-process/file_stats.h --- snort-2.9.15.1/src/file-process/file_stats.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/file_stats.h 2022-05-18 05:00:45.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/libs/Makefile.in snort-2.9.20/src/file-process/libs/Makefile.in --- snort-2.9.15.1/src/file-process/libs/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/file-process/libs/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/file-process/libs -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -113,7 +123,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -322,14 +334,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/file-process/libs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/file-process/libs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -356,10 +367,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -422,7 +433,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -571,6 +585,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/file-process/libs/file_config.c snort-2.9.20/src/file-process/libs/file_config.c --- snort-2.9.15.1/src/file-process/libs/file_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/libs/file_config.c 2022-05-18 05:00:46.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -38,6 +38,7 @@ #include "util.h" #include "mstring.h" #include "parser.h" +#include "memory_stats.h" #include "sfutil/strvec.h" @@ -307,7 +308,7 @@ ParseError("No hexmode argument."); } - hex = (uint8_t*) SnortAlloc(num_toks); + hex = (uint8_t*) SnortPreprocAlloc(1, num_toks, PP_FILE, PP_MEM_CATEGORY_SESSION); *size = num_toks; memset(hex_buf, 0, sizeof(hex_buf)); @@ -405,8 +406,8 @@ for (predata = rule->magics; predata->next != NULL; predata = predata->next); } - - newdata = SnortAlloc(sizeof(*newdata)); + + newdata = SnortPreprocAlloc(1, sizeof(*newdata), PP_FILE, PP_MEM_CATEGORY_SESSION); DEBUG_WRAP(DebugMessage(DEBUG_FILE,"Content args: %s\n", start_ptr);); @@ -521,7 +522,8 @@ { int i; int buff_size = mdata->content_len * 2 + 1; - char *buff = SnortAlloc( buff_size); + char *buff = SnortPreprocAlloc(1, buff_size, PP_FILE, + PP_MEM_CATEGORY_SESSION); char *start_ptr = buff; DebugMessage(DEBUG_FILE,"Magic offset: %d\n", mdata->offset); @@ -534,7 +536,7 @@ buff_size -= num_read; } DebugMessage(DEBUG_FILE,"Magic content: %s\n", buff); - free(buff); + SnortPreprocFree(buff, buff_size, PP_FILE, PP_MEM_CATEGORY_SESSION); } return rule->id; } @@ -547,7 +549,8 @@ (*list_size)++; _temp = *list; - + + /* Not accounting this realloc and free for memory serviceability because of infra limitation*/ if ( (*list = realloc(_temp, sizeof(**list)*(*list_size))) == NULL ) { free(_temp); @@ -662,8 +665,7 @@ { return; } - - rule = SnortAlloc(sizeof (*rule)); + rule = SnortPreprocAlloc(1, sizeof (*rule), PP_FILE, PP_MEM_CATEGORY_SESSION); DEBUG_WRAP(DebugMessage(DEBUG_FILE,"Loading file configuration: %s\n", args);); @@ -726,15 +728,15 @@ if (!magics) return; _free_file_magic(magics->next); - free (magics->content); - free (magics); + SnortPreprocFree(magics->content, sizeof(magics->content_len), PP_FILE, PP_MEM_CATEGORY_SESSION); + SnortPreprocFree(magics , sizeof(MagicData), PP_FILE, PP_MEM_CATEGORY_SESSION); } static void _free_file_rule(RuleInfo *rule) { if ( !rule ) return; - + /* Not changing the free here because memory is allocated using strdup */ if ( rule->category ) free(rule->category); @@ -751,7 +753,7 @@ StringVector_Delete(rule->groups); _free_file_magic(rule->magics); - free(rule); + SnortPreprocFree(rule, sizeof(RuleInfo), PP_FILE, PP_MEM_CATEGORY_SESSION); } void file_rule_free(FileConfig* file_config) diff -Nru snort-2.9.15.1/src/file-process/libs/file_config.h snort-2.9.20/src/file-process/libs/file_config.h --- snort-2.9.15.1/src/file-process/libs/file_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/libs/file_config.h 2022-05-18 05:00:47.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/libs/file_identifier.c snort-2.9.20/src/file-process/libs/file_identifier.c --- snort-2.9.15.1/src/file-process/libs/file_identifier.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/libs/file_identifier.c 2022-05-18 05:00:48.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -39,6 +39,7 @@ #include "mstring.h" #include "sfghash.h" #include "file_config.h" +#include "memory_stats.h" uint32_t memory_used = 0; /*Track memory usage*/ @@ -84,11 +85,11 @@ { void *ret; IdentifierMemoryBlock *new = NULL; - ret = SnortAlloc(size); + ret = SnortPreprocAlloc(1, size, PP_FILE, PP_MEM_CATEGORY_SESSION); memory_used += size; /*For memory management*/ size = sizeof(*new); - new = (IdentifierMemoryBlock *)SnortAlloc(size); + new = (IdentifierMemoryBlock *)SnortPreprocAlloc(1, size, PP_FILE, PP_MEM_CATEGORY_SESSION); new->mem_block = ret; if (!id_memory_root) { @@ -486,8 +487,8 @@ while (id_memory_current) { id_memory_next = id_memory_current->next; - free(id_memory_current->mem_block); - free(id_memory_current); + SnortPreprocFree(id_memory_current->mem_block, sizeof(IdentifierNode), PP_FILE, PP_MEM_CATEGORY_SESSION); + SnortPreprocFree(id_memory_current, sizeof(IdentifierMemoryBlock), PP_FILE, PP_MEM_CATEGORY_SESSION); id_memory_current = id_memory_next; } @@ -526,8 +527,8 @@ unsigned int i; uint32_t type_id; - FileContext *context = SnortAlloc(sizeof (*context)); - + FileContext *context = SnortPreprocAlloc(1, sizeof (*context), PP_FILE, PP_MEM_CATEGORY_SESSION); + static const char *file_type = "MSEXE"; printf("Check string:"); @@ -549,7 +550,7 @@ printf("File type is: %s (%d)\n", file_type_name(conf, type_id), type_id); - free(context); + SnortPreprocFree(context, sizeof(FileContext), PP_FILE, PP_MEM_CATEGORY_SESSION); return ((char *)file_type); } #endif diff -Nru snort-2.9.15.1/src/file-process/libs/file_identifier.h snort-2.9.20/src/file-process/libs/file_identifier.h --- snort-2.9.15.1/src/file-process/libs/file_identifier.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/libs/file_identifier.h 2022-05-18 05:00:50.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/file-process/libs/file_lib.c snort-2.9.20/src/file-process/libs/file_lib.c --- snort-2.9.15.1/src/file-process/libs/file_lib.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/libs/file_lib.c 2022-05-18 05:00:51.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -38,6 +38,7 @@ #include #include #include "sf_sechash.h" +#include "memory_stats.h" #include "util.h" #include "file_capture.h" @@ -139,13 +140,14 @@ { case SNORT_FILE_START: if (!context->file_signature_context) - context->file_signature_context = SnortAlloc(sizeof(SHA256CONTEXT)); + context->file_signature_context = SnortPreprocAlloc(1, sizeof(SHA256CONTEXT), PP_FILE, PP_MEM_CATEGORY_SESSION); + SHA256INIT((SHA256CONTEXT *)context->file_signature_context); SHA256UPDATE((SHA256CONTEXT *)context->file_signature_context, file_data, data_size); if(context->file_state.sig_state == FILE_SIG_FLUSH) { static uint8_t file_signature_context_backup[sizeof(SHA256CONTEXT)]; - context->sha256 = SnortAlloc(SHA256_HASH_SIZE); + context->sha256 = SnortPreprocAlloc(1, SHA256_HASH_SIZE, PP_FILE, PP_MEM_CATEGORY_SESSION); memcpy(file_signature_context_backup, context->file_signature_context, sizeof(SHA256CONTEXT)); SHA256FINAL(context->sha256, (SHA256CONTEXT *)context->file_signature_context); @@ -154,13 +156,13 @@ break; case SNORT_FILE_MIDDLE: if (!context->file_signature_context) - context->file_signature_context = SnortAlloc(sizeof(SHA256CONTEXT)); + context->file_signature_context = SnortPreprocAlloc(1, sizeof(SHA256CONTEXT), PP_FILE, PP_MEM_CATEGORY_SESSION); SHA256UPDATE((SHA256CONTEXT *)context->file_signature_context, file_data, data_size); if(context->file_state.sig_state == FILE_SIG_FLUSH) { static uint8_t file_signature_context_backup[sizeof(SHA256CONTEXT)]; if(!context->sha256) - context->sha256 = SnortAlloc(SHA256_HASH_SIZE); + context->sha256 = SnortPreprocAlloc(1, SHA256_HASH_SIZE, PP_FILE, PP_MEM_CATEGORY_SESSION); memcpy(file_signature_context_backup, context->file_signature_context, sizeof(SHA256CONTEXT)); SHA256FINAL(context->sha256, (SHA256CONTEXT *)context->file_signature_context); @@ -169,22 +171,22 @@ break; case SNORT_FILE_END: if (!context->file_signature_context) - context->file_signature_context = SnortAlloc(sizeof(SHA256CONTEXT)); + context->file_signature_context = SnortPreprocAlloc(1, sizeof(SHA256CONTEXT), PP_FILE, PP_MEM_CATEGORY_SESSION); if (context->processed_bytes == 0) SHA256INIT((SHA256CONTEXT *)context->file_signature_context); SHA256UPDATE((SHA256CONTEXT *)context->file_signature_context, file_data, data_size); if(!context->sha256) - context->sha256 = SnortAlloc(SHA256_HASH_SIZE); + context->sha256 = SnortPreprocAlloc(1, SHA256_HASH_SIZE, PP_FILE, PP_MEM_CATEGORY_SESSION); SHA256FINAL(context->sha256, (SHA256CONTEXT *)context->file_signature_context); context->file_state.sig_state = FILE_SIG_DONE; break; case SNORT_FILE_FULL: if (!context->file_signature_context) - context->file_signature_context = SnortAlloc(sizeof (SHA256CONTEXT)); + context->file_signature_context = SnortPreprocAlloc(1, sizeof(SHA256CONTEXT), PP_FILE, PP_MEM_CATEGORY_SESSION); SHA256INIT((SHA256CONTEXT *)context->file_signature_context); SHA256UPDATE((SHA256CONTEXT *)context->file_signature_context, file_data, data_size); if(!context->sha256) - context->sha256 = SnortAlloc(SHA256_HASH_SIZE); + context->sha256 = SnortPreprocAlloc(1, SHA256_HASH_SIZE, PP_FILE, PP_MEM_CATEGORY_SESSION); SHA256FINAL(context->sha256, (SHA256CONTEXT *)context->file_signature_context); context->file_state.sig_state = FILE_SIG_DONE; break; @@ -197,20 +199,20 @@ FileContext *file_context_create(void) { - FileContext *context = (FileContext *)SnortAlloc(sizeof(*context)); + FileContext *context = (FileContext *)SnortPreprocAlloc(1, sizeof(*context), PP_FILE, PP_MEM_CATEGORY_SESSION); return (context); } static inline void cleanDynamicContext (FileContext *context) { if (context->file_signature_context) - free(context->file_signature_context); + SnortPreprocFree(context->file_signature_context, sizeof(SHA256CONTEXT), PP_FILE, PP_MEM_CATEGORY_SESSION); if(context->sha256) - free(context->sha256); + SnortPreprocFree(context->sha256, SHA256_HASH_SIZE, PP_FILE, PP_MEM_CATEGORY_SESSION); if(context->file_capture) file_capture_stop(context); if(context->file_name && context->file_name_saved) - free(context->file_name); + SnortPreprocFree(context->file_name, context->file_name_size, PP_FILE, PP_MEM_CATEGORY_SESSION); } void file_context_reset(FileContext *context) @@ -223,10 +225,10 @@ void file_context_free(void *ctx) { FileContext *context = (FileContext *)ctx; - if (!context) + if (!context || context->attached_file_entry) return; cleanDynamicContext(context); - free(context); + SnortPreprocFree(context, sizeof(FileContext), PP_FILE, PP_MEM_CATEGORY_SESSION); } /*File properties*/ @@ -243,8 +245,8 @@ if (save_in_context) { if (context->file_name && context->file_name_saved) - free(context->file_name); - name = SnortAlloc(name_size); + SnortPreprocFree(context->file_name, sizeof(name_size), PP_FILE, PP_MEM_CATEGORY_SESSION); + name = SnortPreprocAlloc(1, name_size, PP_FILE, PP_MEM_CATEGORY_SESSION); memcpy(name, file_name, name_size); context->file_name_saved = true; } diff -Nru snort-2.9.15.1/src/file-process/libs/file_lib.h snort-2.9.20/src/file-process/libs/file_lib.h --- snort-2.9.15.1/src/file-process/libs/file_lib.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/file-process/libs/file_lib.h 2022-05-18 05:00:52.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -70,13 +70,12 @@ { bool file_type_enabled; bool file_signature_enabled; - uint8_t *file_name; - uint32_t file_name_size; bool file_name_saved; - uint64_t file_size; bool upload; + uint32_t file_name_size; + uint8_t *file_name; + uint64_t file_size; uint64_t processed_bytes; - uint32_t file_type_id; uint8_t *sha256; void * file_type_context; void * file_signature_context; @@ -84,6 +83,8 @@ time_t expires; uint16_t app_id; bool file_capture_enabled; + bool partial_file; + uint32_t file_type_id; FileCaptureInfo *file_capture; uint8_t *current_data; /*current file data*/ uint32_t current_data_len; @@ -95,10 +96,10 @@ * only for SMB upload cases. */ bool smb_unknown_file_size; + void* attached_file_entry; FileState file_state; uint32_t file_id; uint32_t file_config_version; - bool partial_file; } FileContext; /*Main File Processing functions */ diff -Nru snort-2.9.15.1/src/fpcreate.c snort-2.9.20/src/fpcreate.c --- snort-2.9.15.1/src/fpcreate.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/fpcreate.c 2022-05-18 05:00:55.000000000 +0000 @@ -3,7 +3,7 @@ ** ** fpcreate.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** Marc Norton @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -1005,13 +1006,16 @@ fp->search_method = MPSE_LOWMEM; LogMessage(" Search-Method = Low-Mem\n"); } -#ifdef INTEL_SOFT_CPM else if( !strcasecmp(method,"intel-cpm") ) { +#ifdef INTEL_SOFT_CPM fp->search_method = MPSE_INTEL_CPM; LogMessage(" Search-Method = Intel CPM\n"); - } +#else + fp->search_method = MPSE_AC_BNFA_Q; + LogMessage(" Search-Method = AC-BNFA-Q\n"); #endif + } else { return -1; @@ -1942,10 +1946,12 @@ prm->prmNumSrcGroups= 0; prm->prmNumDstGroups= 0; +#ifdef TARGET_BASED prm->prmNumNoServiceSrcRules= 0; prm->prmNumNoServiceDstRules= 0; prm->prmNumNoServiceSrcGroups= 0; prm->prmNumNoServiceDstGroups= 0; +#endif /* Process src PORT groups */ if(src ) @@ -2055,11 +2061,12 @@ if( !po->data ) continue; /* Add up the total ns_src rules */ +#ifdef TARGET_BASED prm->prmNumNoServiceSrcRules += po->rule_hash->count; /* Increment the port group count */ prm->prmNumNoServiceSrcGroups ++; - +#endif /* Add this port group to the ns_src table at each port that uses it */ for( poi = (PortObjectItem*)sflist_first(po->item_list); poi; poi = (PortObjectItem*)sflist_next(po->item_list) ) @@ -2076,13 +2083,17 @@ */ if( poi->lport < MAX_PORTS ) #endif +#ifdef TARGET_BASED prm->prmNoServiceSrcPort[ poi->lport ] = (PORT_GROUP*)po->data; +#endif break; case PORT_OBJECT_RANGE: +#ifdef TARGET_BASED for(i= poi->lport;i<= poi->hport;i++ ) { prm->prmNoServiceSrcPort[ i ] = (PORT_GROUP*)po->data; } +#endif break; } } @@ -2099,11 +2110,13 @@ if( !po ) continue; if( !po->data ) continue; +#ifdef TARGET_BASED /* Add up the total ns_dst rules */ prm->prmNumNoServiceDstRules += po->rule_hash->count; /* Increment the port group count */ prm->prmNumNoServiceDstGroups ++; +#endif /* Add this port group to the ns_dst table at each port that uses it */ for( poi = (PortObjectItem*)sflist_first(po->item_list); @@ -2122,13 +2135,17 @@ */ if( poi->lport < MAX_PORTS ) #endif +#ifdef TARGET_BASED prm->prmNoServiceDstPort[ poi->lport ] = (PORT_GROUP*)po->data; +#endif break; case PORT_OBJECT_RANGE: +#ifdef TARGET_BASED for(i= poi->lport;i<= poi->hport;i++ ) { prm->prmNoServiceDstPort[ i ] = (PORT_GROUP*)po->data; } +#endif break; } } @@ -2146,29 +2163,37 @@ if (sc->prmTcpRTNX == NULL) return 1; +#ifdef TARGET_BASED if (fpCreateInitRuleMap(sc->prmTcpRTNX, p->tcp_src, p->tcp_dst, p->tcp_anyany, p->tcp_nocontent, p->ns_tcp_src, p->ns_tcp_dst )) return -1; +#endif sc->prmUdpRTNX = prmNewMap(); if (sc->prmUdpRTNX == NULL) return -1; +#ifdef TARGET_BASED if (fpCreateInitRuleMap(sc->prmUdpRTNX, p->udp_src, p->udp_dst, p->udp_anyany, p->udp_nocontent, p->ns_udp_src, p->ns_udp_dst)) return -1; +#endif sc->prmIpRTNX = prmNewMap(); if (sc->prmIpRTNX == NULL) return 1; +#ifdef TARGET_BASED if (fpCreateInitRuleMap(sc->prmIpRTNX, p->ip_src, p->ip_dst, p->ip_anyany, p->ip_nocontent, p->ns_ip_src, p->ns_ip_dst)) return -1; +#endif sc->prmIcmpRTNX = prmNewMap(); if (sc->prmIcmpRTNX == NULL) return 1; +#ifdef TARGET_BASED if (fpCreateInitRuleMap(sc->prmIcmpRTNX, p->icmp_src, p->icmp_dst, p->icmp_anyany, p->icmp_nocontent, p->ns_icmp_src, p->ns_icmp_dst)) return -1; +#endif return 0; } @@ -3322,6 +3347,15 @@ { rule_port_tables_t *port_tables; FastPatternConfig *fp; + +#ifndef REG_TEST + struct rusage ru; + if (ScTestMode()) + { + getrusage(RUSAGE_SELF, &ru); + LogMessage("\nMaxRss at the end of rules:%li\n", ru.ru_maxrss); + } +#endif /* This is somewhat necessary because of how the detection option trees * are added via a callback from the pattern matcher */ @@ -3416,7 +3450,13 @@ if (fp->search_method == MPSE_INTEL_CPM) IntelPmCompile(sc); #endif - +#ifndef REG_TEST + if (ScTestMode()) + { + getrusage(RUSAGE_SELF, &ru); + LogMessage("\nMaxRss at the end of detection rules:%li\n", ru.ru_maxrss); + } +#endif return 0; } diff -Nru snort-2.9.15.1/src/fpcreate.h snort-2.9.20/src/fpcreate.h --- snort-2.9.15.1/src/fpcreate.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/fpcreate.h 2022-05-18 05:00:56.000000000 +0000 @@ -3,7 +3,7 @@ ** ** fpcreate.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** Marc Norton diff -Nru snort-2.9.15.1/src/fpdetect.c snort-2.9.20/src/fpdetect.c --- snort-2.9.15.1/src/fpdetect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/fpdetect.c 2022-05-18 05:00:57.000000000 +0000 @@ -3,7 +3,7 @@ ** ** fpdetect.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Dan Roelker ** Marc Norton diff -Nru snort-2.9.15.1/src/fpdetect.h snort-2.9.20/src/fpdetect.h --- snort-2.9.15.1/src/fpdetect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/fpdetect.h 2022-05-18 05:01:03.000000000 +0000 @@ -3,7 +3,7 @@ ** ** fpfuncs.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** Marc Norton diff -Nru snort-2.9.15.1/src/generators.h snort-2.9.20/src/generators.h --- snort-2.9.15.1/src/generators.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/generators.h 2022-05-18 05:01:04.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -153,6 +153,8 @@ #define DECODE_GTP_MULTIPLE_ENCAPSULATION 297 #define DECODE_GTP_BAD_LEN 298 +#define DECODE_DECODING_DEPTH_EXCEEDED 300 + //----------------------------------------------------- // remember to add rules to preproc_rules/decoder.rules // add the new decoder rules to the following enum. @@ -285,6 +287,10 @@ #define HI_CLIENT_UNESCAPED_SPACE_URI 33 #define HI_CLIENT_PIPELINE_MAX 34 +#define HI_CLIENT_INVALID_RANGE_UNIT_FMT 36 +#define HI_CLIENT_RANGE_NON_GET_METHOD 37 +#define HI_CLIENT_RANGE_FIELD_ERROR 38 + // these are either server specific or both client / server #define GENERATOR_SPP_HTTP_INSPECT 120 #define HI_ANOM_SERVER_ALERT 1 /* done */ @@ -305,6 +311,10 @@ #define HI_SERVER_PDF_CASC_COMP 16 #define HI_SERVER_PDF_PARSE_FAILURE 17 +#define HI_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT 30 +#define HI_SERVER_RANGE_FIELD_ERROR 31 +#define HI_SERVER_NON_RANGE_GET_PARTIAL_METHOD 32 + #define GENERATOR_PSNG 122 #define PSNG_TCP_PORTSCAN 1 @@ -433,6 +443,7 @@ #define STREAM_DATA_AFTER_RST_RCVD 18 #define STREAM_WINDOW_SLAM 19 #define STREAM_NO_3WHS 20 +#define STREAM_WIN_SZ_0_TCP_FIN_WAIT_1 21 #define GENERATOR_DNS 131 #define DNS_EVENT_OBSOLETE_TYPES 1 @@ -534,6 +545,7 @@ // #define GENERATOR_FILE_SIGNATURE 147 //Defined in file_service.h #define GENERATOR_SPP_CIP 148 +#define GENERATOR_SPP_S7COMMPLUS 149 /* This is where all the alert messages will be archived for each @@ -594,6 +606,7 @@ #define STREAM_DATA_AFTER_RST_RCVD_STR "Data sent on stream after TCP Reset received" #define STREAM_WINDOW_SLAM_STR "TCP window closed before receiving data" #define STREAM_NO_3WHS_STR "TCP session without 3-way handshake" +#define STREAM_WIN_SZ_0_TCP_FIN_WAIT_1_STR "TCP window size is zero for ACK packet received after FIN,ACK" #define STREAM_INTERNAL_EVENT_STR "" @@ -821,4 +834,6 @@ #define DECODE_MPLS_LABEL_STACK_STR "(snort_decoder) WARNING: Too Many MPLS headers" #define DECODE_MULTICAST_MPLS_STR "(snort_decoder) WARNING: Multicast MPLS traffic detected" +#define DECODE_DECODING_DEPTH_EXCEEDED_STR "(snort_decoder) WARNING: Too many levels for decoding" + #endif /* __GENERATORS_H__ */ diff -Nru snort-2.9.15.1/src/hashstring.c snort-2.9.20/src/hashstring.c --- snort-2.9.15.1/src/hashstring.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/hashstring.c 2022-05-18 05:01:05.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/hashstring.h snort-2.9.20/src/hashstring.h --- snort-2.9.15.1/src/hashstring.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/hashstring.h 2022-05-18 05:01:06.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/idle_processing.c snort-2.9.20/src/idle_processing.c --- snort-2.9.15.1/src/idle_processing.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/idle_processing.c 2022-05-18 05:01:07.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/idle_processing.h snort-2.9.20/src/idle_processing.h --- snort-2.9.15.1/src/idle_processing.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/idle_processing.h 2022-05-18 05:01:09.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/idle_processing_funcs.h snort-2.9.20/src/idle_processing_funcs.h --- snort-2.9.15.1/src/idle_processing_funcs.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/idle_processing_funcs.h 2022-05-18 05:01:10.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/ipv6_port.h snort-2.9.20/src/ipv6_port.h --- snort-2.9.15.1/src/ipv6_port.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/ipv6_port.h 2022-05-18 05:01:11.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/log.c snort-2.9.20/src/log.c --- snort-2.9.15.1/src/log.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/log.c 2022-05-18 05:01:12.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -1773,6 +1773,10 @@ fwrite("SackOK ", 7, 1, fp); break; + case TCPOPT_TFO: + fwrite("TFO ", 4, 1, fp); + break; + case TCPOPT_ECHO: memset((char *) tmp, 0, 5); if (p->tcp_options[i].data) diff -Nru snort-2.9.15.1/src/log.h snort-2.9.20/src/log.h --- snort-2.9.15.1/src/log.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/log.h 2022-05-18 05:01:13.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/log_text.c snort-2.9.20/src/log_text.c --- snort-2.9.15.1/src/log_text.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/log_text.c 2022-05-18 05:01:14.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -764,6 +764,10 @@ TextLog_Puts(log, "EOL "); break; + case TCPOPT_TFO: + TextLog_Puts(log, "TFO "); + break; + case TCPOPT_NOP: TextLog_Puts(log, "NOP "); break; diff -Nru snort-2.9.15.1/src/log_text.h snort-2.9.20/src/log_text.h --- snort-2.9.15.1/src/log_text.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/log_text.h 2022-05-18 05:01:15.000000000 +0000 @@ -1,7 +1,7 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/memory_stats.c snort-2.9.20/src/memory_stats.c --- snort-2.9.15.1/src/memory_stats.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/memory_stats.c 2022-05-18 05:01:16.000000000 +0000 @@ -2,7 +2,7 @@ ** ** memory_stats.c ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Author(s): Puneeth Kumar C V ** ** This program is free software; you can redistribute it and/or modify @@ -34,27 +34,525 @@ #include "preprocids.h" #include "memory_stats.h" +#define STATS_SEPARATOR \ + "===============================================================================" + +extern bool periodic_dump_enable; static MemoryStatsDisplayFunc MemStatsDisplayCallback[PP_MAX] = {0}; -static PreprocMemInfo *preproc_mem_info[PP_MAX] = {0}; +static PreprocMemInfo preproc_mem_info[PP_MAX][PP_MEM_MAX_CATEGORY]; +static const char* preproc_names[PP_MAX] = { + "bo", + "app_id", + "dns", + "frag", + "ftptelnet", + "httpinspect", + "perfmonitor", + "rpcdecode", + "shared_rules", + "sfportscan", + "smtp", + "ssh", + "ssl", + "stream", + "telnet", + "arpspoof", + "dce", + "sdf", + "normalize", + "isakmp", + "session", + "sip", + "pop", + "imap", + "network_discovery", + "fw_rule_engine", + "reputation", + "gtp", + "modbus", + "dnp", + "file", + "file_inspect", + "nap_rule_engine", + "prefilter_rule_engine", + "httpmod", + "http", + "cip", + "s7commplus", +}; + +void initMemoryStatsApi() +{ + memset(preproc_mem_info, 0, + sizeof(PreprocMemInfo) * PP_MAX * PP_MEM_MAX_CATEGORY); +} + +static int MemStatsDisplayGeneralStats(uint32_t preproc_id) +{ + LogMessage("\n"); + LogMessage("Heap Statistics of %s:\n", preproc_names[preproc_id]); + LogMessage(" Total Statistics:\n"); + LogMessage(" Memory in use: %14zu bytes\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_SESSION].used_memory + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_CONFIG].used_memory + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MEMPOOL].used_memory + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MISC].used_memory); + LogMessage(" No of allocs: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_SESSION].num_of_alloc + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_CONFIG].num_of_alloc + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MEMPOOL].num_of_alloc + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MISC].num_of_alloc); + LogMessage(" No of frees: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_SESSION].num_of_free + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_CONFIG].num_of_free + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MEMPOOL].num_of_free + + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MISC].num_of_free); + if (preproc_mem_info[preproc_id][PP_MEM_CATEGORY_SESSION].num_of_alloc) + { + LogMessage(" Session Statistics:\n"); + LogMessage(" Memory in use: %14zu bytes\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_SESSION].used_memory); + LogMessage(" No of allocs: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_SESSION].num_of_alloc); + LogMessage(" No of frees: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_SESSION].num_of_free); + } + if (preproc_mem_info[preproc_id][PP_MEM_CATEGORY_CONFIG].num_of_alloc) + { + LogMessage(" Config Statistics:\n"); + LogMessage(" Memory in use: %14zu bytes\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_CONFIG].used_memory); + LogMessage(" No of allocs: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_CONFIG].num_of_alloc); + LogMessage(" No of frees: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_CONFIG].num_of_free); + } + if (preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MEMPOOL].num_of_alloc) + { + LogMessage(" Mempool Statistics:\n"); + LogMessage(" Memory in use: %14zu bytes\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MEMPOOL].used_memory); + LogMessage(" No of allocs: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MEMPOOL].num_of_alloc); + LogMessage(" No of frees: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MEMPOOL].num_of_free); + } + if (preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MISC].num_of_alloc) + { + LogMessage(" Misc run-time Statistics:\n"); + LogMessage(" Memory in use: %14zu bytes\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MISC].used_memory); + LogMessage(" No of allocs: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MISC].num_of_alloc); + LogMessage(" No of frees: %14u\n", + preproc_mem_info[preproc_id][PP_MEM_CATEGORY_MISC].num_of_free); + } + return 0; +} + +static bool CheckSampleInterval(time_t curr_time) +{ + static time_t last_true = 0; + + //Initial alignment + if (last_true == 0) + { + last_true = curr_time; + last_true -= last_true % 60 ; + } + + //Dump on aligned time if possible. If not, get close and say we did. + if (curr_time - last_true >= MEMSTATS_DUMP_INTERVAL) + { + curr_time -= curr_time % 60; + last_true = curr_time; + return true; + } + + return false; +} + +FILE *dump_stats_fd = NULL; -static int PopulateMemStatsBuff(char *buffer, uint32_t preproc_id) +static void LogFileHeader(FILE *fd) { - return snprintf(buffer, CS_STATS_BUF_SIZE, "\n Heap Memory:\n" - " Session: %14zu bytes\n" - " Configuration: %14zu bytes\n" - " -------------- ------------\n" - " Total Memory: %14zu bytes\n" - " No of allocs: %14d times\n" - " IP sessions: %14d times\n" - "----------------------------------------------------\n" - , preproc_mem_info[preproc_id]->session_memory.used_memory - , preproc_mem_info[preproc_id]->cfg_memory.used_memory - , preproc_mem_info[preproc_id]->session_memory.used_memory + - preproc_mem_info[preproc_id]->cfg_memory.used_memory - , preproc_mem_info[preproc_id]->session_memory.num_of_alloc + - preproc_mem_info[preproc_id]->cfg_memory.num_of_alloc - , preproc_mem_info[preproc_id]->session_memory.num_of_free + - preproc_mem_info[preproc_id]->cfg_memory.num_of_free); + fprintf(fd, + "#%s","timestamp"); + /* BO preproc stats */ + /* APPID preproc stats */ + fprintf(fd, + ",%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", + "appid_total_sessions", + "appid_current_sessions", + "appid_session_mempool_alloc_count", + "appid_session_heap_alloc_count", + "appid_session_mempool_count", + "appid_session_mempool_size", + "appid_flowdata_mempool_count", + "appid_flowdata_mempool_size", + "appid_tmp_mempool_count", + "appid_tmp_mempool_size", + "appid_received_packets", + "appid_processed_packets", + "appid_ignored_packets"); + fprintf(fd, + ",%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", + "appid_session_memory", + "appid_session_allocs", + "appid_session_frees", + "appid_config_memory", + "appid_config_allocs", + "appid_config_frees", + "appid_misc_memory", + "appid_misc_allocs", + "appid_misc_frees", + "appid_total_memory", + "appid_total_allocs", + "appid_total_frees"); + /* DNS preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s", + "dns_session_memory", + "dns_session_allocs", + "dns_session_frees", + "dns_config_memory", + "dns_config_allocs", + "dns_config_frees", + "dns_total_memory"); + /* FRAG3 preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s,%s,%s", + "frag3_mem_in_use", + "prealloc_nodes_in_use", + "frag3_session_memory", + "frag3_session_allocs", + "frag3_session_frees", + "frag3_config_memory", + "frag3_config_allocs", + "frag3_config_frees", + "frag3_total_memory"); + /* FTPTELNET preproc stats */ + fprintf(fd,",%s,%s,%s,%s,%s,%s,%s,%s,%s" + ",%s,%s,%s,%s", + "ftp_current_active_sessions", + "ftp_max_concurrent_sessions", + "ftp_total_data_sessions", + "ftp_max_concurrent_data_sessions", + "telnet_current_active_sessions", + "telnet_max_concurrent_active_sessions", + "ftptelnet_session_memory", + "ftptelnet_session_allocs", + "ftptelnet_session_frees", + "ftptelnet_config_memory", + "ftptelnet_config_allocs", + "ftptelnet_config_frees", + "ftptelnet_total_memory"); + /* HTTP Inspect preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s" + ",%s,%s,%s" + ",%s,%s,%s" + ",%s,%s,%s" + ",%s,%s,%s" + ",%s,%s,%s" + ",%s,%s,%s" + ",%s,%s,%s", + "current_active_session", + "no_of_POST_methods_encountered", + "no_of_GET_methods_encountered", + "no_of_successfully_extract_post_params", + "no_of_successfully_extract_request_params", + "no_of_successfully_extract_response_params", + "http_mempool_free", + "http_mempool_used", + "http_mempool_max", + "mime_decode_mempool_free", + "mime_decode_mempool_used", + "mime_decode_mempool_max", + "hi_gzip_mempool_free", + "hi_gzip_mempool_used", + "hi_gzip_mempool_max", + "mime_log_mempool_free", + "mime_log_mempool_used", + "mime_log_mempool_max", + "httpinspect_session_memory", + "httpinspect_session_allocs", + "httpinspect_session_frees", + "httpinspect_config_memory", + "httpinspect_config_allocs", + "httpinspect_config_frees", + "httpinspect_pool_memory", + "httpinspect_pool_allocs", + "httpinspect_pool_frees" + ); + /* Perfmonitor preproc stats */ + /* RPCDecode preproc stats */ + /* Shared rules preproc stats */ + /* SFPortscan preproc stats */ + /* SMTP preproc stats */ + fprintf(fd,",%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", + "smtp_total_sessions", + "smtp_max_sessions", + "smtp_cur_active_sessions", + "smtp_session_memory", + "smtp_session_allocs", + "smtp_imapsession_frees", + "smtp_config_memory", + "smtp_config_allocs", + "smtp_config_frees", + "smtp_total_memory"); + /* SSH preproc stats */ + /* SSL preproc stats */ + /* Stream preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s,%s,%s" + ",%s,%s,%s,%s,%s,%s,%s,%s", + "total_sessions", + "total_tcp_sessions", + "active_tcp_sessions", + "total_udp_sessions", + "active_udp_sessions", + "total_icmp_sessions", + "active_icmp_sessions", + "total_ip_sessions", + "active_ip_sessions", + "stream_session_memory", + "stream_session_allocs", + "stream_session_frees", + "stream_config_memory", + "stream_config_allocs", + "stream_config_frees", + "stream_max_mempool", + "stream_total_memory"); + + /* Telnet preproc stats */ + /* Arpspoof preproc stats */ + /* DCE preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s,%s,%s" + ",%s,%s,%s,%s,%s,%s,%s,%s" + ",%s,%s,%s,%s,%s,%s,%s,%s" + ",%s,%s,%s,%s,%s,%s,%s,%s", + "dce_total_sessions", + "dce_active_sessions", + "dce_total_smb_sessions", + "dce_smb_current_total", + "dce_smb_maximum_total", + "dce_smb_current_session_data", + "dce_smb_maximum_session_data", + "dce_total_tcp_sessions", + "dce_tcp_current_total", + "dce_tcp_maximum_total", + "dce_tcp_current_session_data", + "dce_tcp_maximum_session_data", + "dce_total_udp_sessions", + "dce_udp_current_total", + "dce_udp_maximum_total", + "dce_udp_current_session_data", + "dce_udp_maximum_session_data", + "dce_total_http_server_sessions", + "dce_total_http_proxy_sessions", + "dce_http_current_total", + "dce_http_maximum_total", + "dce_http_current_session_data", + "dce_http_maximum_session_data", + "dce_session_memory", + "dce_session_allocs", + "dce_session_frees", + "dce_config_memory", + "dce_config_allocs", + "dce_config_frees", + "dce_misc_memory", + "dce_misc_allocs", + "dce_misc_frees", + "dce_total_memory"); + /* SDF preproc stats */ + /* Normalize preproc stats */ + /* ISAKMP preproc stats */ + /* Session preproc stats */ + /* SIP preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s,%s,%s", + "sip_total_sessions", + "sip_cur_active_sessions", + "sip_session_memory", + "sip_session_allocs", + "sip_session_frees", + "sip_config_memory", + "sip_config_allocs", + "sip_config_frees", + "sip_total_memory"); + /* POP preproc stats */ + fprintf(fd,",%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", + "pop_total_sessions", + "pop_max_sessions", + "pop_cur_active_sessions", + "pop_session_memory", + "pop_session_allocs", + "pop_imapsession_frees", + "pop_config_memory", + "pop_config_allocs", + "pop_config_frees", + "pop_total_memory"); + /* IMAP preproc stats */ + fprintf(fd,",%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", + "imap_total_sessions", + "imap_max_sessions", + "imap_cur_active_sessions", + "imap_session_memory", + "imap_session_allocs", + "imap_session_frees", + "imap_config_memory", + "imap_config_allocs", + "imap_config_frees", + "imap_total_memory"); + /* Network Discovery preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s,%s" + ",%s,%s", + "rna_session_memory", + "rna_session_allocs", + "rna_session_frees", + "rna_config_memory", + "rna_config_allocs", + "rna_config_frees", + "rna_misc_memory", + "rna_misc_allocs", + "rna_misc_frees", + "rna_total_memory"); + /* FW Rule Engine preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s,%s" + ",%s,%s,%s,%s,%s,%s,%s", + "fw_total_sessions", + "fw_active_sessions", + "fw_heap_used_count", + "fw_freelist_total_count", + "fw_freelist_free_count", + "fw_session_memory", + "fw_session_allocs", + "fw_session_frees", + "fw_config_memory", + "fw_config_allocs", + "fw_config_frees", + "fw_misc_memory", + "fw_misc_allocs", + "fw_misc_frees", + "fw_total_memory"); + /* Reputation preproc stats */ + /* GTP preproc stats */ + /* Modbus preproc stats */ + /* DNP preproc stats */ + /* File preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s,%s,%s,%s", + "file_session_memory", + "file_session_allocs", + "file_session_frees", + "file_config_memory", + "file_config_allocs", + "file_config_frees", + "file_mempool_memory", + "file_mempool_allocs", + "file_mempool_frees", + "file_total_memory"); +#if !defined(SFLINUX) && !defined(WRLINUX) + /* File Inspect preproc stats */ + fprintf(fd, ",%s,%s,%s,%s,%s,%s,%s", + "file_inspect_session_memory", + "file_inspect_session_allocs", + "file_inspect_session_frees", + "file_inspect_config_memory", + "file_inspect_config_allocs", + "file_inspect_config_frees", + "file_inspect_total_memory"); +#endif + /* NAP Rule Engine preproc stats */ + /* Prefilter Rule Engine preproc stats */ + /* HTTPMOD preproc stats */ + /* HTTP preproc stats */ + /* CIP preproc stats */ + /* S7COMMPLUS preproc stats */ + /* End of preproc stats */ + fprintf(dump_stats_fd, "\n"); +} + +void dump_preproc_stats(time_t curr_time) +{ + char dump_file_path[PATH_MAX]; + + if (snort_conf->memdump_file == NULL) + return; + + if (CheckSampleInterval(curr_time)) + { + if( dump_stats_fd == NULL ) + { + sprintf(dump_file_path, "%s", snort_conf->memdump_file); + dump_stats_fd = fopen(dump_file_path, "w"); + LogFileHeader(dump_stats_fd); + } + fprintf(dump_stats_fd, "%lu", (unsigned long)curr_time); + memory_stats_periodic_handler(dump_stats_fd,true); + fprintf(dump_stats_fd, "\n"); + fflush(dump_stats_fd); + } +} + +static inline long int preproc_stats_filesize() +{ + long int res = 0; + + if (dump_stats_fd == NULL) + { + return -1; + } + fseek(dump_stats_fd, 0L, SEEK_END); + + res = ftell(dump_stats_fd); + return res; +} + +void rotate_preproc_stats() +{ + long int size = 0; + char dump_file_path[PATH_MAX]; + char rotate_file_path[PATH_MAX]; + time_t ts; + struct tm *tm; + + if (snort_conf->memdump_file == NULL) + return; + + size = preproc_stats_filesize(); + + if (size >= MIN_FILE_SIZE_TO_ROTATE) + { + // Get current time, then subtract one day to get yesterday + ts = time(NULL); + ts -= (24*60*60); + tm = localtime(&ts); + sprintf(rotate_file_path, "%s-%d-%02d-%02d-%lu", snort_conf->memdump_file, + tm->tm_year + 1900, tm->tm_mon + 1, + tm->tm_mday, ts); + sprintf(dump_file_path,"%s", snort_conf->memdump_file); + if (dump_stats_fd) + { + fclose(dump_stats_fd); + dump_stats_fd = NULL; + } + rename(dump_file_path, rotate_file_path); + dump_stats_fd = fopen(dump_file_path, "w"); + LogFileHeader(dump_stats_fd); + } +} + +void memory_stats_periodic_handler(FILE *fd, bool file_dump) +{ + uint32_t pp_id; + + for (pp_id = PP_BO; pp_id < PP_MAX; pp_id++) + { + if(MemStatsDisplayCallback[pp_id] != 0) + { + if (!file_dump) + LogMessage("%s\n", STATS_SEPARATOR); + MemStatsDisplayCallback[pp_id](fd, NULL, preproc_mem_info[pp_id]); + if (!file_dump) + MemStatsDisplayGeneralStats(pp_id); + } + } } static inline void PreprocDisplaystats(char *buffer, uint32_t preproc_id) @@ -64,16 +562,17 @@ { if ( (preproc_id != PP_ALL) && (MemStatsDisplayCallback[preproc_id] != 0 && preproc_mem_info[preproc_id] != NULL) ) { - len += MemStatsDisplayCallback[preproc_id](buffer); - len += PopulateMemStatsBuff(buffer + len, preproc_id); + if (preproc_id == PP_SMTP || preproc_id == PP_POP || preproc_id == PP_IMAP) + len += MemStatsDisplayCallback[preproc_id](NULL, buffer, preproc_mem_info[preproc_id]); } - else + else { for (preproc_id = PP_BO; preproc_id < PP_MAX; preproc_id++) if(MemStatsDisplayCallback[preproc_id] != 0 && preproc_mem_info[preproc_id] != NULL) { - len += MemStatsDisplayCallback[preproc_id](buffer + len); - len += PopulateMemStatsBuff(buffer + len, preproc_id); + if (preproc_id == PP_SMTP || preproc_id == PP_POP || preproc_id == PP_IMAP) + len += MemStatsDisplayCallback[preproc_id](NULL, buffer + len, preproc_mem_info[preproc_id]); } + } } else { @@ -85,15 +584,16 @@ { char *buffer = (char*) calloc(MEM_STATS_BUF_SIZE + 1, 1); uint32_t preproc_id; - + if(old_context) { preproc_id = *((uint32_t *) old_context); PreprocDisplaystats(buffer, preproc_id); - if(-1 == f(te, (const uint8_t *)buffer, strlen(buffer))) + if (-1 == f(te, (const uint8_t *)buffer, strlen(buffer))) LogMessage("Unable to send data to the frontend\n"); - } + } + free(buffer); } int MemoryControlFunction(uint16_t type, void *new_context, void **old_context) @@ -115,7 +615,48 @@ return 0; } -int RegisterMemoryStatsFunction(uint preproc, char* preproc_name, MemoryStatsDisplayFunc cb) +int PPMemoryStatsDumpCfg(uint16_t type, const uint8_t *data, uint32_t length, + void **new_context, char* statusBuf, int statusBuf_len) +{ + if (!data) + return 0; + + char *args = (char*) data; + + if (0 == strncmp(args, "enable", strlen("enable"))) + { + periodic_dump_enable = true; + } + else if (0 == strncmp(args, "disable", strlen("disable"))) + { + periodic_dump_enable = false; + if (dump_stats_fd) + { + fclose(dump_stats_fd); + dump_stats_fd = NULL; + } + } + return 0; +} + +void PPMemoryStatsDumpShow(uint16_t type, void *old_context, + struct _THREAD_ELEMENT *te, ControlDataSendFunc f) +{ + char buffer[CS_STATS_BUF_SIZE + 1]; + int len = 0; + + if (periodic_dump_enable) + len = snprintf(buffer, CS_STATS_BUF_SIZE, + "\nPeriodic memory stats dump is enabled.\n\n"); + else + len = snprintf(buffer, CS_STATS_BUF_SIZE, + "\nPeriodic memory stats dump is disabled.\n\n"); + + if (-1 == f(te, (const uint8_t *)buffer, len)) + LogMessage("Unable to send data to the frontend\n"); +} + +int RegisterMemoryStatsFunction(uint preproc, MemoryStatsDisplayFunc cb) { if (preproc >= PP_MAX) { @@ -123,38 +664,24 @@ } MemStatsDisplayCallback[preproc] = cb; - - if (preproc_mem_info[preproc] == NULL) - { - preproc_mem_info[preproc] = (PreprocMemInfo *)SnortAlloc(sizeof(PreprocMemInfo)); - preproc_mem_info[preproc]->preproc_name = preproc_name; - } - + return 0; } -void* SnortPreprocAlloc (int num, unsigned long size, uint32_t preproc, bool cfg) +void* SnortPreprocAlloc (int num, unsigned long size, uint32_t preproc, uint32_t sub) { - void *pv = calloc(num, size); + void *pv; + + if (sub >= PP_MEM_MAX_CATEGORY) { + FatalError("Unable to allocate memory! (requested %lu)\n", size); + } + + pv = calloc(num, size); if ( pv ) { - if (preproc_mem_info[preproc] == 0) - { - LogMessage("Memory stats information for preprocessor is NULL"); - return pv; - } - - if (cfg) - { - preproc_mem_info[preproc]->cfg_memory.used_memory += size; - preproc_mem_info[preproc]->cfg_memory.num_of_alloc++; - } - else - { - preproc_mem_info[preproc]->session_memory.used_memory += size; - preproc_mem_info[preproc]->session_memory.num_of_alloc++; - } + preproc_mem_info[preproc][sub].used_memory += (num*size); + preproc_mem_info[preproc][sub].num_of_alloc++; } else @@ -165,40 +692,19 @@ return pv; } -void SnortPreprocFree (void *ptr, uint32_t size, uint32_t preproc, bool cfg) +void SnortPreprocFree (void *ptr, uint32_t size, uint32_t preproc, uint32_t sub) { + if (sub >= PP_MEM_MAX_CATEGORY) { + FatalError("Unable to free memory!\n"); + } + if( ptr ) { free(ptr); ptr = NULL; } - if (preproc_mem_info[preproc] == NULL) - { - LogMessage("Memory stats information for preprocessor is NULL"); - return; - } - if (cfg) - { - preproc_mem_info[preproc]->cfg_memory.used_memory -= size; - preproc_mem_info[preproc]->cfg_memory.num_of_free++; - } - else - { - preproc_mem_info[preproc]->session_memory.used_memory -= size; - preproc_mem_info[preproc]->session_memory.num_of_free++; - } -} + preproc_mem_info[preproc][sub].used_memory -= size; + preproc_mem_info[preproc][sub].num_of_free++; -void MemoryStatsFree () -{ - int i; - for (i = 0;i < PP_MAX;i++) - { - if (preproc_mem_info[i]) - { - free( preproc_mem_info[i]); - preproc_mem_info[i] = NULL; - } - } } diff -Nru snort-2.9.15.1/src/memory_stats.h snort-2.9.20/src/memory_stats.h --- snort-2.9.15.1/src/memory_stats.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/memory_stats.h 2022-05-18 05:01:17.000000000 +0000 @@ -2,7 +2,7 @@ ** ** memory_stats.h ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Author(s): Puneeth Kumar C V ** ** This program is free software; you can redistribute it and/or modify @@ -24,8 +24,17 @@ #ifndef __MEMORY_STATS_H__ #define __MEMORY_STATS_H__ -#include "sf_types.h" -#include "control/sfcontrol.h" +#include +#include "sfcontrol.h" + +#define PP_MEM_CATEGORY_SESSION 0 +#define PP_MEM_CATEGORY_CONFIG 1 +#define PP_MEM_CATEGORY_MEMPOOL 2 +#define PP_MEM_CATEGORY_MISC 3 +#define PP_MEM_MAX_CATEGORY 4 + +#define MEMSTATS_DUMP_INTERVAL 5 * 60 //5 minutes +#define MIN_FILE_SIZE_TO_ROTATE (20 * 1024 * 1024) typedef struct _PreprocMemNumAlloc { uint32_t num_of_alloc; @@ -34,12 +43,17 @@ } PreprocMemNumAlloc; typedef struct _PreprocMemInfo { - PreprocMemNumAlloc session_memory; - PreprocMemNumAlloc cfg_memory; - char *preproc_name; + uint32_t num_of_alloc; + uint32_t num_of_free; + size_t used_memory; } PreprocMemInfo; -typedef int (*MemoryStatsDisplayFunc)(char *buffer); + +typedef int (*MemoryStatsDisplayFunc)(FILE *fd, char *buffer, PreprocMemInfo *meminfo); + +void initMemoryStatsApi(); + +void rotate_preproc_stats(); void MemoryPostFunction(uint16_t type, void *old_context, struct _THREAD_ELEMENT *te, ControlDataSendFunc f); @@ -47,11 +61,38 @@ int MemoryPreFunction(uint16_t type, const uint8_t *data, uint32_t length, void **new_context, char *statusBuf, int statusBuf_len); -int RegisterMemoryStatsFunction(uint preproc, char *preproc_name, MemoryStatsDisplayFunc cb); - -void* SnortPreprocAlloc (int num, unsigned long size, uint32_t preproc, bool data); +int RegisterMemoryStatsFunction(uint preproc, MemoryStatsDisplayFunc cb); -void SnortPreprocFree (void *ptr, uint32_t size, uint32_t preproc, bool data); +int PPMemoryStatsDumpCfg(uint16_t type, const uint8_t *data, uint32_t length, + void **new_context, char* statusBuf, int statusBuf_len); +void PPMemoryStatsDumpShow(uint16_t type, void *old_context, + struct _THREAD_ELEMENT *te, ControlDataSendFunc f); + +void* SnortPreprocAlloc (int num, unsigned long size, uint32_t preproc, uint32_t sub); + +void SnortPreprocFree (void *ptr, uint32_t size, uint32_t preproc, uint32_t sub); + +void memory_stats_periodic_handler(FILE *fd, bool file_dump); +void dump_preproc_stats(time_t curr_time); + +static inline int PopulateMemStatsBuffTrailer(char *buffer, int len, PreprocMemInfo *meminfo) +{ + return snprintf(buffer, CS_STATS_BUF_SIZE-len, "\n Heap Memory:\n" + " Session: %14zu bytes\n" + " Configuration: %14zu bytes\n" + " -------------- ------------\n" + " Total Memory: %14zu bytes\n" + " No of allocs: %14d times\n" + " IP sessions: %14d times\n" + "----------------------------------------------------\n" + , meminfo[0].used_memory + , meminfo[1].used_memory + , meminfo[0].used_memory + + meminfo[1].used_memory + , meminfo[0].num_of_alloc + + meminfo[1].num_of_alloc + , meminfo[0].num_of_free + + meminfo[1].num_of_free); -void MemoryStatsFree(); +} #endif diff -Nru snort-2.9.15.1/src/mempool.c snort-2.9.20/src/mempool.c --- snort-2.9.15.1/src/mempool.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/mempool.c 2022-05-18 05:01:18.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/mempool.h snort-2.9.20/src/mempool.h --- snort-2.9.15.1/src/mempool.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/mempool.h 2022-05-18 05:01:20.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/mstring.c snort-2.9.20/src/mstring.c --- snort-2.9.15.1/src/mstring.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/mstring.c 2022-05-18 05:01:21.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch diff -Nru snort-2.9.15.1/src/mstring.h snort-2.9.20/src/mstring.h --- snort-2.9.15.1/src/mstring.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/mstring.h 2022-05-18 05:01:22.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/obfuscation.c snort-2.9.20/src/obfuscation.c --- snort-2.9.15.1/src/obfuscation.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/obfuscation.c 2022-05-18 05:01:23.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/obfuscation.h snort-2.9.20/src/obfuscation.h --- snort-2.9.15.1/src/obfuscation.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/obfuscation.h 2022-05-18 05:01:24.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/output-plugins/Makefile.in snort-2.9.20/src/output-plugins/Makefile.in --- snort-2.9.15.1/src/output-plugins/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/output-plugins/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,11 +92,11 @@ @BUILD_BUFFER_DUMP_TRUE@spo_log_buffer_dump.c spo_log_buffer_dump.h subdir = src/output-plugins -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -130,7 +140,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -179,6 +189,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -224,6 +235,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -339,14 +351,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/output-plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/output-plugins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -373,10 +384,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -439,7 +450,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -588,6 +602,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_fast.c snort-2.9.20/src/output-plugins/spo_alert_fast.c --- snort-2.9.15.1/src/output-plugins/spo_alert_fast.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_fast.c 2022-05-18 05:01:25.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000,2001 Andrew R. Baker diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_fast.h snort-2.9.20/src/output-plugins/spo_alert_fast.h --- snort-2.9.15.1/src/output-plugins/spo_alert_fast.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_fast.h 2022-05-18 05:01:26.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000,2001 Andrew R. Baker diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_full.c snort-2.9.20/src/output-plugins/spo_alert_full.c --- snort-2.9.15.1/src/output-plugins/spo_alert_full.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_full.c 2022-05-18 05:01:27.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000,2001 Andrew R. Baker diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_full.h snort-2.9.20/src/output-plugins/spo_alert_full.h --- snort-2.9.15.1/src/output-plugins/spo_alert_full.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_full.h 2022-05-18 05:01:29.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000,2001 Andrew R. Baker diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_sf_socket.c snort-2.9.20/src/output-plugins/spo_alert_sf_socket.c --- snort-2.9.15.1/src/output-plugins/spo_alert_sf_socket.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_sf_socket.c 2022-05-18 05:01:35.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_sf_socket.h snort-2.9.20/src/output-plugins/spo_alert_sf_socket.h --- snort-2.9.15.1/src/output-plugins/spo_alert_sf_socket.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_sf_socket.h 2022-05-18 05:01:36.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_syslog.c snort-2.9.20/src/output-plugins/spo_alert_syslog.c --- snort-2.9.15.1/src/output-plugins/spo_alert_syslog.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_syslog.c 2022-05-18 05:01:37.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_syslog.h snort-2.9.20/src/output-plugins/spo_alert_syslog.h --- snort-2.9.15.1/src/output-plugins/spo_alert_syslog.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_syslog.h 2022-05-18 05:01:38.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_test.c snort-2.9.20/src/output-plugins/spo_alert_test.c --- snort-2.9.15.1/src/output-plugins/spo_alert_test.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_test.c 2022-05-18 05:01:39.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_test.h snort-2.9.20/src/output-plugins/spo_alert_test.h --- snort-2.9.15.1/src/output-plugins/spo_alert_test.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_test.h 2022-05-18 05:01:40.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_unixsock.c snort-2.9.20/src/output-plugins/spo_alert_unixsock.c --- snort-2.9.15.1/src/output-plugins/spo_alert_unixsock.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_unixsock.c 2022-05-18 05:01:41.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000,2001 Andrew R. Baker diff -Nru snort-2.9.15.1/src/output-plugins/spo_alert_unixsock.h snort-2.9.20/src/output-plugins/spo_alert_unixsock.h --- snort-2.9.15.1/src/output-plugins/spo_alert_unixsock.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_alert_unixsock.h 2022-05-18 05:01:47.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000,2001 Andrew R. Baker diff -Nru snort-2.9.15.1/src/output-plugins/spo_csv.c snort-2.9.20/src/output-plugins/spo_csv.c --- snort-2.9.15.1/src/output-plugins/spo_csv.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_csv.c 2022-05-18 05:01:49.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2001 Brian Caswell diff -Nru snort-2.9.15.1/src/output-plugins/spo_csv.h snort-2.9.20/src/output-plugins/spo_csv.h --- snort-2.9.15.1/src/output-plugins/spo_csv.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_csv.h 2022-05-18 05:01:50.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2001 Brian Caswell diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_ascii.c snort-2.9.20/src/output-plugins/spo_log_ascii.c --- snort-2.9.15.1/src/output-plugins/spo_log_ascii.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_ascii.c 2022-05-18 05:01:51.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_ascii.h snort-2.9.20/src/output-plugins/spo_log_ascii.h --- snort-2.9.15.1/src/output-plugins/spo_log_ascii.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_ascii.h 2022-05-18 05:01:52.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** ** Author(s): Andrew R. Baker diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_buffer_dump.c snort-2.9.20/src/output-plugins/spo_log_buffer_dump.c --- snort-2.9.15.1/src/output-plugins/spo_log_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_buffer_dump.c 2022-05-18 05:01:54.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_buffer_dump.h snort-2.9.20/src/output-plugins/spo_log_buffer_dump.h --- snort-2.9.15.1/src/output-plugins/spo_log_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_buffer_dump.h 2022-05-18 05:01:55.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_null.c snort-2.9.20/src/output-plugins/spo_log_null.c --- snort-2.9.15.1/src/output-plugins/spo_log_null.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_null.c 2022-05-18 05:01:56.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_null.h snort-2.9.20/src/output-plugins/spo_log_null.h --- snort-2.9.15.1/src/output-plugins/spo_log_null.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_null.h 2022-05-18 05:01:57.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_tcpdump.c snort-2.9.20/src/output-plugins/spo_log_tcpdump.c --- snort-2.9.15.1/src/output-plugins/spo_log_tcpdump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_tcpdump.c 2022-05-18 05:01:58.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_log_tcpdump.h snort-2.9.20/src/output-plugins/spo_log_tcpdump.h --- snort-2.9.15.1/src/output-plugins/spo_log_tcpdump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_log_tcpdump.h 2022-05-18 05:01:59.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/output-plugins/spo_unified2.c snort-2.9.20/src/output-plugins/spo_unified2.c --- snort-2.9.15.1/src/output-plugins/spo_unified2.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_unified2.c 2022-05-18 05:02:01.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -890,7 +890,8 @@ p->ssnptr, p, event->sig_generator, event->sig_id, event->event_id, event->ref_time.tv_sec); - if ( p->xtradata_mask ) + if ( p->xtradata_mask && !(p->packet_flags & PKT_STREAM_INSERT) + && !(p->packet_flags & PKT_REBUILT_STREAM) ) { LogFunction *log_funcs; uint32_t max_count = stream_api->get_xtra_data_map(&log_funcs); @@ -1024,6 +1025,17 @@ } Unified2Write(write_pkt_buffer, write_len, config); + + if ( p->xtradata_mask && (Active_GetDisposition() >= ACTIVE_DROP) ) + { + LogFunction *log_funcs; + uint32_t max_count = stream_api->get_xtra_data_map(&log_funcs); + + if ( max_count > 0 ) + AlertExtraData( + p->ssnptr, config, log_funcs, max_count, p->xtradata_mask, + event->event_id, event->ref_time.tv_sec); + } } /** diff -Nru snort-2.9.15.1/src/output-plugins/spo_unified2.h snort-2.9.20/src/output-plugins/spo_unified2.h --- snort-2.9.15.1/src/output-plugins/spo_unified2.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/output-plugins/spo_unified2.h 2022-05-18 05:02:02.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/packet_time.c snort-2.9.20/src/packet_time.c --- snort-2.9.15.1/src/packet_time.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/packet_time.c 2022-05-18 05:02:03.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/packet_time.h snort-2.9.20/src/packet_time.h --- snort-2.9.15.1/src/packet_time.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/packet_time.h 2022-05-18 05:02:05.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/parser/IpAddrSet.c snort-2.9.20/src/parser/IpAddrSet.c --- snort-2.9.15.1/src/parser/IpAddrSet.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/parser/IpAddrSet.c 2022-05-18 05:02:06.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * * Author(s): Andrew R. Baker diff -Nru snort-2.9.15.1/src/parser/IpAddrSet.h snort-2.9.20/src/parser/IpAddrSet.h --- snort-2.9.15.1/src/parser/IpAddrSet.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/parser/IpAddrSet.h 2022-05-18 05:02:07.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * * Author(s): Andrew R. Baker diff -Nru snort-2.9.15.1/src/parser/Makefile.in snort-2.9.20/src/parser/Makefile.in --- snort-2.9.15.1/src/parser/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/parser/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/parser -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -314,14 +326,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/parser/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -348,10 +359,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -414,7 +425,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -563,6 +577,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/parser.c snort-2.9.20/src/parser.c --- snort-2.9.15.1/src/parser.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/parser.c 2022-05-18 05:02:08.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000,2001 Andrew R. Baker @@ -24,7 +24,7 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif - +#include #include #include #include @@ -101,6 +101,7 @@ #include "file_service_config.h" #include "dynamic-plugins/sp_dynamic.h" #include "dynamic-output/plugins/output.h" +#include "stream_common.h" #ifdef SIDE_CHANNEL # include "sidechannel.h" @@ -792,7 +793,7 @@ static OutputConfig * DupOutputConfig(OutputConfig *); static void RemoveOutputConfigs(OutputConfig **, int); static void XferHeader(RuleTreeNode *, RuleTreeNode *); -static OptTreeNode * ParseRuleOptions(SnortConfig *, RuleTreeNode *, +static OptTreeNode * ParseRuleOptions(SnortConfig *, RuleTreeNode **, char *, RuleType, int); #ifndef SOURCEFIRE static void DefineAllIfaceVars(SnortConfig *); @@ -829,6 +830,7 @@ static int ParsePolicyIdBindingLine(tSfPolicyConfig *, int, char **, char *); static RuleTreeNode * findHeadNode(SnortConfig *, RuleTreeNode *, tSfPolicyId); +static inline RuleTreeNode * createDynamicRuleTypeRtn(SnortConfig *, RuleTreeNode *); // only keep drop rules // if we are inline (and can actually drop), @@ -1814,6 +1816,52 @@ return 0; } +/* + * ParseIpsPortList() will create portlist for portocol specific and only for IPS policy at the snort + * process bringup, it will be used to enable/disable detection on packet. + */ +IpsPortFilter** ParseIpsPortList (SnortConfig *sc, IpProto protocol) +{ + tSfPolicyId policyId; + IpsPortFilter *ips_portfilter; + bool ignore_any = false; + + // Allocate memory for each policy to hold port filter list + IpsPortFilter **ips_port_filter_list = ( IpsPortFilter** ) SnortAlloc( sizeof(IpsPortFilter*) * sfPolicyNumAllocated(sc->policy_config) ); + + if ( !ips_port_filter_list ) + { + ParseError("IPS portlist memory allocation failed\n"); + return NULL; + } + + ignore_any = getStreamIgnoreAnyConfig(sc, protocol); + for (policyId = 0; policyId < sfPolicyNumAllocated(sc->policy_config); policyId++) + { + ips_portfilter = NULL; + // Create port filter list for default and IPS policy + if ( (policyId == 0) || (!getStreamPolicyConfig(policyId, 0)) ) + { + ips_portfilter = ( IpsPortFilter* ) SnortAlloc( sizeof(IpsPortFilter) ); + if ( ips_portfilter ) + { + ips_portfilter->parserPolicyId = policyId; + setPortFilterList(sc, ips_portfilter->port_filter, IPPROTO_UDP, ignore_any, policyId); + ips_port_filter_list[ policyId ] = ips_portfilter; + } else + { + ParseError("Failed to allocate memory for port filter list policy id :%d \n",policyId); + return NULL; + } + } else + { + // NAP policy port filter list is created in pre-processor check + ips_port_filter_list[ policyId ] = NULL; + } + } + return ips_port_filter_list; +} + /**************************************************************************** * * Function: CheckForIPListConflicts @@ -2105,6 +2153,9 @@ char *stored_file_name = file_name; int stored_file_line = file_line; tSfPolicyId i; +#ifndef REG_TEST + struct rusage ru; +#endif if (sc == NULL) return; @@ -2202,6 +2253,22 @@ /* Reset these since we're done with configuring dynamic preprocessors */ file_name = stored_file_name; file_line = stored_file_line; +#ifndef REG_TEST + if (ScTestMode()) + { + if (configure_dynamic) + { + getrusage(RUSAGE_SELF, &ru); + LogMessage("MaxRss at the end of dynamic preproc config:%li\n", ru.ru_maxrss); + } + else + { + getrusage(RUSAGE_SELF, &ru); + LogMessage("MaxRss at the end of static preproc config:%li\n", ru.ru_maxrss); + } + } +#endif + } #ifdef SIDE_CHANNEL @@ -2955,6 +3022,54 @@ return 1; } +/* createDynamicRuleTypeRtn + * + * This api is only getting called whenever will see those + * GID/SID pairs whose rule action type is getting modulated + * from code depending upon few runtime parameters. + * + * In present scenario for + * GID - GENERATOR_FILE_SIGNATURE/GENERATOR_FILE_TYPE, rule action + * type is getting modified depending upon file verdict. + * + * I/P - SnortConfig - + * old_rtn - This is the old RTN which has been created + * irrespective of above mentioned scenario. + * As a new RTN will be created with type NONE, + * will destroy this old RTN. + * + * O/P - rtn - This is RTN which has been created with + * RULE_TYPE_NONE specify that rule type will + * be decided at the run time. + */ +static inline RuleTreeNode * createDynamicRuleTypeRtn(SnortConfig *sc, RuleTreeNode *old_rtn) +{ + RuleTreeNode test_rtn; + RuleTreeNode *rtn; + ListHead *list = old_rtn->listhead; + + memset(&test_rtn, 0, sizeof(RuleTreeNode)); + + /* Making own key by changing the type to NONE */ + test_rtn.flags |= ANY_DST_PORT; + test_rtn.flags |= ANY_SRC_PORT; + test_rtn.flags |= ANY_DST_IP; + test_rtn.flags |= ANY_SRC_IP; + test_rtn.flags |= BIDIRECTIONAL; + + /* + * Initialising the rule type as NONE since type value will be + * dynamic for GENERATOR_FILE_SIGNATURE/GENERATOR_FILE_TYPE + */ + test_rtn.type = RULE_TYPE__NONE; + test_rtn.listhead = list; + + DestroyRuleTreeNode(old_rtn); + + /* Creating the RTN node for File policy internal IPS rules(147:1/146)*/ + rtn = ProcessHeadNode(sc, &test_rtn, list); + return rtn; +} /**************************************************************************** * @@ -2976,7 +3091,7 @@ * The new OptTreeNode on success or NULL on error. * ***************************************************************************/ -OptTreeNode * ParseRuleOptions(SnortConfig *sc, RuleTreeNode *rtn, +OptTreeNode * ParseRuleOptions(SnortConfig *sc, RuleTreeNode **rtn_addr, char *rule_opts, RuleType rule_type, int protocol) { OptTreeNode *otn; @@ -2985,6 +3100,7 @@ char *dopt_keyword = NULL; OptFpList *fpl = NULL; int got_sid = 0; + RuleTreeNode *rtn = *rtn_addr; otn = (OptTreeNode *)SnortAlloc(sizeof(OptTreeNode)); @@ -2994,7 +3110,9 @@ otn->sigInfo.generator = GENERATOR_SNORT_ENGINE; otn->sigInfo.rule_type = SI_RULE_TYPE_DETECT; /* standard rule */ otn->sigInfo.rule_flushing = SI_RULE_FLUSHING_ON; /* usually just standard rules cause a flush*/ +#ifdef TARGET_BASED otn->sigInfo.service_override = ServiceOverride_Nil; +#endif /* Set the default rule state */ otn->rule_state = ScDefaultRuleStateNewConf(sc); @@ -3176,6 +3294,13 @@ DEBUG_WRAP(DebugMessage(DEBUG_CONFIGRULES,"OptListEnd\n");); + if ((otn->sigInfo.generator == GENERATOR_FILE_SIGNATURE && + otn->sigInfo.id == FILE_SIGNATURE_SHA256) || + otn->sigInfo.generator == GENERATOR_FILE_TYPE) + { + rtn = createDynamicRuleTypeRtn(sc, rtn); + *rtn_addr = rtn; + } addRtnToOtn(sc, otn, getParserPolicy(sc), rtn); /* Check for duplicate SID */ @@ -4726,7 +4851,7 @@ if (otn->sigInfo.shared && (otn->ds_list[PLUGIN_DYNAMIC] == NULL)) { /* If still shared... */ - ParseWarning("Encoded Rule Plugin SID: %d, GID: %d not " + ErrorMessage("Encoded Rule Plugin SID: %d, GID: %d not " "registered properly. Disabling this rule.\n", otn->sigInfo.id, otn->sigInfo.generator); oneErr = 1; @@ -5206,7 +5331,10 @@ /* Just continue for blank line */ if (toks == NULL) + { + free (input); continue; + } /* Got end of rule type */ if ((num_toks == 1) && (strcmp(toks[0], "}") == 0)) @@ -5301,7 +5429,10 @@ /* Just continue for blank line */ if (toks == NULL) + { + free(input); continue; + } /* Got end of rule type */ if ((num_toks == 1) && (strcmp(toks[0], "}") == 0)) @@ -6066,6 +6197,9 @@ } } + if (saved_line != NULL) + free(saved_line); + fclose(fp); free(buf); } @@ -7983,6 +8117,14 @@ sc->perf_file = SnortStrdup(args); } +void ConfigDumpPeriodicMemStatsFile(SnortConfig *sc, char *args) +{ + if ((sc == NULL) || (args == NULL)) + return; + + sc->memdump_file = SnortStrdup(args); +} + void ConfigPacketCount(SnortConfig *sc, char *args) { char *endptr; @@ -9329,7 +9471,7 @@ DEBUG_WRAP(DebugMessage(DEBUG_CONFIGRULES,"Parsing Rule Options...\n");); - otn = ParseRuleOptions(sc, rtn, roptions, rule_type, protocol); + otn = ParseRuleOptions(sc, &rtn, roptions, rule_type, protocol); if (otn == NULL) { /* This otn is a dup and we're choosing to keep the old one */ @@ -11242,7 +11384,7 @@ rpt->ip_src->pt_lrc = DEFAULT_LARGE_RULE_GROUP; rpt->ip_dst->pt_lrc = DEFAULT_LARGE_RULE_GROUP; -#ifndef TARGET_BASED +#ifdef TARGET_BASED // if TARGET_BASED is not enabled, ensure that these // port tables are NULL. rpt->ns_tcp_src = NULL; diff -Nru snort-2.9.15.1/src/parser.h snort-2.9.20/src/parser.h --- snort-2.9.15.1/src/parser.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/parser.h 2022-05-18 05:02:09.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** Copyright (C) 2000-2001 Andrew R. Baker @@ -233,6 +233,7 @@ /* rule setup funcs */ SnortConfig * ParseSnortConf(void); void ParseRules(SnortConfig *); +IpsPortFilter** ParseIpsPortList (SnortConfig*, IpProto); void ParseOutput(SnortConfig *, SnortPolicy *, char *); void OrderRuleLists(SnortConfig *, char *); @@ -361,6 +362,7 @@ void ConfigPcreMatchLimit(SnortConfig *, char *); void ConfigPcreMatchLimitRecursion(SnortConfig *, char *); void ConfigPerfFile(SnortConfig *sc, char *); +void ConfigDumpPeriodicMemStatsFile(SnortConfig *, char *); void ConfigPidPath(SnortConfig *, char *); void ConfigPolicy(SnortConfig *, char *); void ConfigIpsPolicyMode(SnortConfig *, char *); diff -Nru snort-2.9.15.1/src/pcap_pkthdr32.h snort-2.9.20/src/pcap_pkthdr32.h --- snort-2.9.15.1/src/pcap_pkthdr32.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/pcap_pkthdr32.h 2022-05-18 05:02:10.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/pcrm.c snort-2.9.20/src/pcrm.c --- snort-2.9.15.1/src/pcrm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/pcrm.c 2022-05-18 05:02:11.000000000 +0000 @@ -3,7 +3,7 @@ ** ** pcrm.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker diff -Nru snort-2.9.15.1/src/pcrm.h snort-2.9.20/src/pcrm.h --- snort-2.9.15.1/src/pcrm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/pcrm.h 2022-05-18 05:02:12.000000000 +0000 @@ -3,7 +3,7 @@ ** ** pcrm.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker diff -Nru snort-2.9.15.1/src/pkt_tracer.c snort-2.9.20/src/pkt_tracer.c --- snort-2.9.15.1/src/pkt_tracer.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/pkt_tracer.c 2022-05-18 05:02:13.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as @@ -217,11 +217,15 @@ sfaddr_t *dst = GET_DST_IP(p); uint16_t sport = p->sp; uint16_t dport = p->dp; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId = DAQ_GetSourceAddressSpaceID(p->pkth); uint16_t dAsId = DAQ_GetDestinationAddressSpaceID(p->pkth); #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_OUTER_IPH_PROTOID(p, pkth); +#endif + uint8_t protocol = GET_IPH_PROTO(p); switch (protocol) { @@ -292,7 +296,17 @@ offset = 12; } inet_ntop(af, &dip->s6_addr[offset], dipstr, sizeof(dipstr)); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + snprintf(pkt_tracer_debug_session, DEBUG_SESSION_ID_SIZE, "%s-%u - %s-%u %u AS %u-%u CID %u", + sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)protocol, + sAsId, dAsId, (unsigned)cid); +#else + snprintf(pkt_tracer_debug_session, DEBUG_SESSION_ID_SIZE, "%s-%u - %s-%u %u CID %u", + sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)protocol, (unsigned)cid); +#endif +#else /* No Carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) snprintf(pkt_tracer_debug_session, DEBUG_SESSION_ID_SIZE, "%s-%u - %s-%u %u AS %u-%u", sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)protocol, sAsId, dAsId); @@ -300,6 +314,7 @@ snprintf(pkt_tracer_debug_session, DEBUG_SESSION_ID_SIZE, "%s-%u - %s-%u %u", sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)protocol); #endif +#endif pkt_trace_enabled_by_clish = true; return true; } @@ -309,7 +324,7 @@ // Get name-string from DAQ_Verdict (must sync with DAQ_Verdict defined at daq_common.h) static char* getVerdictStr(DAQ_Verdict vd) { - static char* vName[] = {"PASS", "BLOCK", "REPLACE", "WHITELIST", "BLACKLIST", + static char* vName[] = {"PASS", "BLOCK", "REPLACE", "ALLOWFLOW", "BLOCKFLOW", "IGNORE", "RETRY", "Error in reading verdict!"}; if (vd > MAX_DAQ_VERDICT) @@ -323,7 +338,7 @@ static char* mName[] = {"Packet Information", "Session String", "None", "a module", "DAQ Retry", "Snort", "AppID", "SSL", "Firewall", "Captive Portal", "Safe Search", "SI", "Prefilter", "FTP", "Stream", "Session", "Defragmentation", "Snort React", "Snort Response", "SI/Reputation", - "X-Link2State", "Back Orifice", "SMB", "File Process", "IPS"}; + "X-Link2State", "Back Orifice", "SMB", "File Process", "IPS", "Snort - Fast-Block"}; if (module >= MAX_VERDICT_REASON) module = VERDICT_REASON_UNKNOWN; @@ -379,6 +394,10 @@ { uint32_t snortId = (snort_conf->event_log_id >> 16); alreadySentTrace = false; + + if (p->packet_flags & PKT_FAST_BLOCK) + verdict_reason = VERDICT_REASON_FASTBLOCK; + if (pkt_trace_enabled_by_clish) { LogMessage("PktTracerDbg %s Snort id %u, NAP id %u, IPS id %u, Verdict %s\n", @@ -553,8 +572,22 @@ sfip_ntop(&scb->client_ip, sipstr, sizeof(sipstr)); sfip_ntop(&scb->server_ip, dipstr, sizeof(dipstr)); uint16_t sport = ntohs(scb->client_port); - uint16_t dport = ntohs(scb->server_port); -#ifdef DAQ_CAPA_VRF + uint16_t dport = ntohs(scb->server_port); +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = scb->key->carrierId; +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + uint16_t sAsId = scb->key->addressSpaceId_l; + uint16_t dAsId = scb->key->addressSpaceId_h; + + snprintf(pkt_tracer_debug_session, DEBUG_SESSION_ID_SIZE, "%s-%u - %s-%u %u AS %u-%u CID %u", + sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)scb->protocol, + sAsId, dAsId, cid); +#else + snprintf(pkt_tracer_debug_session, DEBUG_SESSION_ID_SIZE, "%s-%u - %s-%u %u CID %u", + sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)scb->protocol, cid); +#endif +#else /* No Carrier id */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId = scb->key->addressSpaceId_l; uint16_t dAsId = scb->key->addressSpaceId_h; @@ -565,6 +598,7 @@ snprintf(pkt_tracer_debug_session, DEBUG_SESSION_ID_SIZE, "%s-%u - %s-%u %u", sipstr, (unsigned)sport, dipstr, (unsigned)dport, (unsigned)scb->protocol); #endif +#endif pkt_trace_enabled_by_clish = true; return true; } diff -Nru snort-2.9.15.1/src/pkt_tracer.h snort-2.9.20/src/pkt_tracer.h --- snort-2.9.15.1/src/pkt_tracer.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/pkt_tracer.h 2022-05-18 05:02:14.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/plugbase.c snort-2.9.20/src/plugbase.c --- snort-2.9.15.1/src/plugbase.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/plugbase.c 2022-05-18 05:02:15.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/plugbase.h snort-2.9.20/src/plugbase.h --- snort-2.9.15.1/src/plugbase.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/plugbase.h 2022-05-18 05:02:16.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/plugin_enum.h snort-2.9.20/src/plugin_enum.h --- snort-2.9.15.1/src/plugin_enum.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/plugin_enum.h 2022-05-18 05:02:18.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/ppm.c snort-2.9.20/src/ppm.c --- snort-2.9.15.1/src/ppm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/ppm.c 2022-05-18 05:02:19.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/ppm.h snort-2.9.20/src/ppm.h --- snort-2.9.15.1/src/ppm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/ppm.h 2022-05-18 05:02:20.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -123,7 +133,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -168,7 +178,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -189,6 +199,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -264,6 +275,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -399,14 +411,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -537,7 +548,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -713,6 +727,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/anomaly_detection/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/anomaly_detection/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/anomaly_detection/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/anomaly_detection/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/anomaly_detection -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -316,14 +328,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/anomaly_detection/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/anomaly_detection/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -350,10 +361,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -416,7 +427,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -565,6 +579,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/anomaly_detection/hi_ad.c snort-2.9.20/src/preprocessors/HttpInspect/anomaly_detection/hi_ad.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/anomaly_detection/hi_ad.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/anomaly_detection/hi_ad.c 2022-05-18 05:02:22.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/client/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/client/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/client/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/client/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/client -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -113,7 +123,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -318,14 +330,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/client/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/client/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -352,10 +363,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -418,7 +429,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -567,6 +581,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/client/hi_client.c snort-2.9.20/src/preprocessors/HttpInspect/client/hi_client.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/client/hi_client.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/client/hi_client.c 2022-05-18 05:02:23.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -69,6 +69,7 @@ #include "hi_cmd_lookup.h" #include "detection_util.h" #include "hi_paf.h" +#include "memory_stats.h" #if defined(FEAT_OPEN_APPID) #include "spp_stream6.h" @@ -84,6 +85,8 @@ #define HEADER_LENGTH__TRUE_IP (sizeof(HEADER_NAME__TRUE_IP)-1) #define HEADER_NAME__HOSTNAME "Host" #define HEADER_LENGTH__HOSTNAME 4 +#define HEADER_NAME__RANGE "Range" +#define HEADER_LENGTH__RANGE 5 #define HEADER_NAME__TRANSFER_ENCODING "Transfer-encoding" #define HEADER_LENGTH__TRANSFER_ENCODING 17 #define HEADER_NAME__CONTENT_TYPE "Content-Type" @@ -356,6 +359,10 @@ { hi_eo_client_event_log(Session, HI_EO_CLIENT_CHUNK_SIZE_MISMATCH, NULL, NULL); + SnortEventqAdd( + GENERATOR_SPP_HTTP_INSPECT_CLIENT, + HI_EO_CLIENT_CHUNK_SIZE_MISMATCH+1, 1, 0, 2, + HI_EO_CLIENT_CHUNK_SIZE_MISMATCH_STR, NULL); } } else @@ -1822,7 +1829,9 @@ if (header_ptr->cookie.cookie) { /* unusal, multiple cookies... alloc new cookie pointer */ - COOKIE_PTR *extra_cookie = calloc(1, sizeof(COOKIE_PTR)); + COOKIE_PTR *extra_cookie = (COOKIE_PTR *)SnortPreprocAlloc(1, sizeof(COOKIE_PTR), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + hi_stats.mem_used += sizeof(COOKIE_PTR); if (!extra_cookie) { /* Failure to allocate, stop where we are... */ @@ -1873,7 +1882,9 @@ Transaction* createNode_tList(sfaddr_t *tmp, uint8_t req_id) { - Transaction *tList_node = (Transaction*)SnortAlloc(sizeof(Transaction)); + Transaction *tList_node = (Transaction*)SnortPreprocAlloc(1, sizeof(Transaction), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + hi_stats.mem_used += sizeof(Transaction); tList_node->true_ip = tmp; tList_node->tID = req_id; tList_node->next = NULL; @@ -2216,6 +2227,127 @@ return p; } +/* extract_http_range will extract "0-" and flag it as full + * content, when the unit is bytes. Otherwise flag error or + * partial content accordingly. Syntax as follows, + * Range: = + */ +static const u_char *extract_http_range(HI_SESSION *Session, + const u_char *p, const u_char *start, const u_char *end, + HEADER_PTR *header_ptr) +{ + u_char *crlf = NULL; + const u_char *unit_start = NULL; + const u_char *unit_end = NULL; + + SkipBlankSpace(start,end,&p); + if (hi_util_in_bounds(start, end, p) && *p == ':') + { + p++; + CheckSkipAlertMultipleColon(Session, start, end, &p, HI_SI_CLIENT_MODE); + while (hi_util_in_bounds(start, end, p) && ( *p == ' ' || *p == '\t' || *p == '\n')) + { + p++; + } + + if (hi_util_in_bounds(start, end, p)) + { + /* extract units and look for '=' token */ + unit_start = p; + while (hi_util_in_bounds(start, end, p) && ( *p != '=')) + { + p++; + } + + if (*p != '=') + { + if (hi_eo_generate_event(Session, HI_EO_CLIENT_INVALID_RANGE_UNIT_FMT)) + { + hi_eo_client_event_log(Session, HI_EO_CLIENT_INVALID_RANGE_UNIT_FMT, NULL, NULL); + } + header_ptr->range_flag = RANGE_WITH_REQ_ERROR; + return end; + } + + unit_end = (p - 1); + p++; + SkipBlankSpace(start,end,&p); + + while (hi_util_in_bounds(start, end, p) && ( *p == ',')) + { + p++; + } + SkipBlankSpace(start,end,&p); + + if (hi_util_in_bounds(start, end, p)) + { + /* Look for "0-" and unit as bytes, then set it as full content */ + if (*p == '0') + { + p++; + if (hi_util_in_bounds(start, end, p)) + { + if (*p == '-') + { + p++; + if (hi_util_in_bounds(start, end, p) && ( *p == '\r' || *p == '\n')) + { + if (((unit_end - unit_start) >= 5) && + (!strncasecmp((const char *)unit_start, RANGE_UNIT_BYTE, 5))) + { + header_ptr->range_flag = HTTP_RANGE_WITH_FULL_CONTENT_REQ; + } + else + { + header_ptr->range_flag = RANGE_WITH_PARTIAL_CONTENT_REQ; + } + + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + p = crlf; + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } + } + } + } + } + + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + p = crlf; + header_ptr->range_flag = RANGE_WITH_PARTIAL_CONTENT_REQ; + return p; + } + else + { + header_ptr->header.uri_end = end; + header_ptr->range_flag = RANGE_WITH_REQ_ERROR; + return end; + } + } + } + } + + header_ptr->range_flag = RANGE_WITH_REQ_ERROR; + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + p = crlf; + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } +} const u_char *extract_http_content_length(HI_SESSION *Session, HTTPINSPECT_CONF *ServerConf, const u_char *p, const u_char *start, @@ -2599,6 +2731,11 @@ p = extract_http_client_header(Session, p, start, end, hdrs_args->hdr_ptr, &hdrs_args->hdr_ptr->referer); } } + if (IsHeaderFieldName(p, end, HEADER_NAME__RANGE, HEADER_LENGTH__RANGE)) + { + p = p + HEADER_LENGTH__RANGE; + p = extract_http_range(Session, p, start, end, hdrs_args->hdr_ptr); + } } else if(((p - offset) == 0) && ((*p == 'V') || (*p == 'v'))) { @@ -2611,6 +2748,15 @@ } } } +#else + else if (((p - offset) == 0) && ((*p == 'R') || (*p == 'r'))) + { + if (IsHeaderFieldName(p, end, HEADER_NAME__RANGE, HEADER_LENGTH__RANGE)) + { + p = p + HEADER_LENGTH__RANGE; + p = extract_http_range(Session, p, start, end, hdrs_args->hdr_ptr); + } + } #endif /* defined(FEAT_OPEN_APPID) */ else if(((p - offset) == 0) && ((*p == 'H') || (*p == 'h'))) { @@ -2942,7 +3088,8 @@ COOKIE_PTR *cookie = Client->request.cookie.next; \ do { \ Client->request.cookie.next = Client->request.cookie.next->next; \ - free(cookie); \ + SnortPreprocFree(cookie, sizeof(COOKIE_PTR), PP_HTTPINSPECT, \ + PP_MEM_CATEGORY_SESSION); \ cookie = Client->request.cookie.next; \ } while(cookie); \ }\ @@ -3226,7 +3373,18 @@ // // uri_ptr.end points to end of URI & HTTP version identifier. if (hi_util_in_bounds(start, end, uri_ptr.uri_end + 1)) + { + header_ptr.range_flag = HTTP_RANGE_NONE; ptr = hi_client_extract_header(Session, ServerConf, &header_ptr, uri_ptr.uri_end+1, end, hsd, stream_ins, p->ssnptr); + if (header_ptr.range_flag != HTTP_RANGE_NONE) + { + Client->request.range_flag = header_ptr.range_flag; + } + else + { + Client->request.range_flag = HTTP_RANGE_NONE; + } + } if (header_ptr.header.uri) { @@ -3365,9 +3523,12 @@ /*callback into appId with header values extracted. */ CallHttpHeaderProcessors(p, &headers); - free((void *)headers.userAgent.start); - free((void *)headers.referer.start); - free((void *)headers.via.start); + SnortPreprocFree((void *)headers.userAgent.start, + (headers.userAgent.len) * sizeof(char), PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + SnortPreprocFree((void *)headers.referer.start, + (headers.referer.len) * sizeof(char), PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + SnortPreprocFree((void *)headers.via.start, + (headers.via.len) * sizeof(char), PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); } #endif /* defined(FEAT_OPEN_APPID) */ diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/client/hi_client_norm.c snort-2.9.20/src/preprocessors/HttpInspect/client/hi_client_norm.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/client/hi_client_norm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/client/hi_client_norm.c 2022-05-18 05:02:24.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -59,6 +59,7 @@ #include "hi_norm.h" #include "hi_util.h" #include "hi_return_codes.h" +#include "memory_stats.h" #include "snort_bounds.h" @@ -140,7 +141,9 @@ cookie = cookie->next; if (last_cookie && (last_cookie != first_cookie)) { - free(last_cookie); + SnortPreprocFree(last_cookie, sizeof(COOKIE_PTR), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); + hi_stats.mem_used -= sizeof(COOKIE_PTR); } last_cookie = cookie; if (!cookie) diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/event_output/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/event_output/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/event_output/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/event_output/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/event_output -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -316,14 +328,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/event_output/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/event_output/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -350,10 +361,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -416,7 +427,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -565,6 +579,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/event_output/hi_eo_log.c snort-2.9.20/src/preprocessors/HttpInspect/event_output/hi_eo_log.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/event_output/hi_eo_log.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/event_output/hi_eo_log.c 2022-05-18 05:02:25.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -125,7 +125,13 @@ {HI_EO_CLIENT_PIPELINE_MAX, HI_EO_MED_PRIORITY, HI_EO_CLIENT_PIPELINE_MAX_STR}, {HI_EO_CLIENT_MULTIPLE_COLON_BETN_KEY_VALUE, HI_EO_HIGH_PRIORITY, - HI_EO_CLIENT_MULTIPLE_COLON_BETN_KEY_VALUE_STR} + HI_EO_CLIENT_MULTIPLE_COLON_BETN_KEY_VALUE_STR}, + {HI_EO_CLIENT_INVALID_RANGE_UNIT_FMT, HI_EO_MED_PRIORITY, + HI_EO_CLIENT_INVALID_RANGE_UNIT_FMT_STR}, + {HI_EO_CLIENT_RANGE_NON_GET_METHOD, HI_EO_MED_PRIORITY, + HI_EO_CLIENT_RANGE_NON_GET_METHOD_STR}, + {HI_EO_CLIENT_RANGE_FIELD_ERROR, HI_EO_MED_PRIORITY, + HI_EO_CLIENT_RANGE_FIELD_ERROR_STR} }; static HI_EVENT_INFO server_event_info[HI_EO_SERVER_EVENT_NUM] = { @@ -185,7 +191,13 @@ {HI_EO_SERVER_INVALID_CHUNK_SIZE,HI_EO_HIGH_PRIORITY, HI_EO_SERVER_INVALID_CHUNK_SIZE_STR}, {HI_EO_SERVER_INVALID_VERSION_RESP_HEADER,HI_EO_HIGH_PRIORITY, - HI_EO_SERVER_INVALID_VERSION_RESP_HEADER_STR} + HI_EO_SERVER_INVALID_VERSION_RESP_HEADER_STR}, + {HI_EO_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT, HI_EO_MED_PRIORITY, + HI_EO_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT_STR}, + {HI_EO_SERVER_RANGE_FIELD_ERROR, HI_EO_MED_PRIORITY, + HI_EO_SERVER_RANGE_FIELD_ERROR_STR}, + {HI_EO_SERVER_NON_RANGE_GET_PARTIAL_METHOD, HI_EO_MED_PRIORITY, + HI_EO_SERVER_NON_RANGE_GET_PARTIAL_METHOD_STR} }; /* diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/files/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/files/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/files/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/files/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/files -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -113,7 +123,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -319,14 +331,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/files/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/files/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -353,10 +364,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -419,7 +430,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -568,6 +582,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/files/file_decomp.c snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/files/file_decomp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp.c 2022-05-18 05:02:26.000000000 +0000 @@ -2,7 +2,7 @@ /* ** file_decomp.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as @@ -34,6 +34,8 @@ #include "file_decomp.h" #include "sf_types.h" #include "detection_util.h" +#include "memory_stats.h" + #ifdef FILE_DECOMP_PDF #include "file_decomp_PDF.h" #endif @@ -267,7 +269,8 @@ { if( (g_Config != NULL) && (g_Config->fd_MemPool != NULL) && (mempool_destroy(g_Config->fd_MemPool) == 0)) { - free( g_Config->fd_MemPool ); + SnortPreprocFree(g_Config->fd_MemPool, sizeof(MemPool), PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); g_Config->fd_MemPool = NULL; g_Config = NULL; return( File_Decomp_OK ); @@ -291,7 +294,9 @@ Max_Sessions = ConfigPtr->Max_Memory / sizeof( fd_session_t ); - if( (g_Config->fd_MemPool = (MemPool *)SnortAlloc(sizeof(MemPool))) == NULL ) + g_Config->fd_MemPool = (MemPool *)SnortPreprocAlloc(1, sizeof(MemPool), + PP_HTTPINSPECT, PP_MEM_CATEGORY_MEMPOOL); + if( g_Config->fd_MemPool == NULL ) return( File_Decomp_Error ); if( (mempool_init(g_Config->fd_MemPool, Max_Sessions, sizeof( fd_session_t ))) != 0 ) diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/files/file_decomp_PDF.c snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_PDF.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/files/file_decomp_PDF.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_PDF.c 2022-05-18 05:02:27.000000000 +0000 @@ -2,7 +2,7 @@ /* ** file_decomp_PDF.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/files/file_decomp_SWF.c snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_SWF.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/files/file_decomp_SWF.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_SWF.c 2022-05-18 05:02:28.000000000 +0000 @@ -2,7 +2,7 @@ /* ** file_decomp_SWF.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/include/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/include -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +119,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +165,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -293,14 +305,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/include/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -324,7 +335,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -468,6 +482,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + #if BUILD_BUFFER_DUMP #EXTRA_DIST += \ diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/file_decomp.h snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/file_decomp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp.h 2022-05-18 05:02:30.000000000 +0000 @@ -2,7 +2,7 @@ /* ** file_decomp.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/file_decomp_PDF.h snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_PDF.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/file_decomp_PDF.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_PDF.h 2022-05-18 05:02:31.000000000 +0000 @@ -2,7 +2,7 @@ /* ** file_decomp_PDF.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/file_decomp_SWF.h snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_SWF.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/file_decomp_SWF.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_SWF.h 2022-05-18 05:02:32.000000000 +0000 @@ -2,7 +2,7 @@ /* ** file_decomp_SWF.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ad.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ad.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ad.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ad.h 2022-05-18 05:02:36.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_buffer_dump.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_buffer_dump.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_buffer_dump.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_buffer_dump.h 2022-05-18 05:02:37.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_client.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_client.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client.h 2022-05-18 05:02:38.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -52,6 +52,11 @@ #define XFF_TOP_PRECEDENCE (1) #define XFF_BOT_PRECEDENCE (255) +#define HTTP_RANGE_NONE 0 +#define HTTP_RANGE_WITH_FULL_CONTENT_REQ 1 +#define RANGE_WITH_PARTIAL_CONTENT_REQ 2 +#define RANGE_WITH_REQ_ERROR 3 + typedef struct s_COOKIE_PTR { const u_char *cookie; @@ -121,6 +126,7 @@ COOKIE_PTR cookie; CONTLEN_PTR content_len; CONT_ENCODING_PTR content_encoding; + uint8_t range_flag; bool is_chunked; #if defined(FEAT_OPEN_APPID) HEADER_LOCATION userAgent, referer, method, via, responseCode, server, xWorkingWith, contentType; @@ -179,6 +185,7 @@ uint16_t post_encode_type; const u_char *content_type; const u_char *content_disp; + uint8_t range_flag; } HI_CLIENT_REQ; diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_client_norm.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client_norm.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_client_norm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client_norm.h 2022-05-18 05:02:39.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_client_stateful.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client_stateful.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_client_stateful.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_client_stateful.h 2022-05-18 05:02:40.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_cmd_lookup.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_cmd_lookup.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_cmd_lookup.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_cmd_lookup.h 2022-05-18 05:02:41.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * * Copyright (C) 2003-2013 Sourcefire, Inc. * * * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_eo.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_eo.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo.h 2022-05-18 05:02:43.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_eo_events.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo_events.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_eo_events.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo_events.h 2022-05-18 05:02:44.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -66,6 +66,9 @@ HI_EO_CLIENT_UNESCAPED_SPACE_URI, HI_EO_CLIENT_PIPELINE_MAX, HI_EO_CLIENT_MULTIPLE_COLON_BETN_KEY_VALUE, + HI_EO_CLIENT_INVALID_RANGE_UNIT_FMT, + HI_EO_CLIENT_RANGE_NON_GET_METHOD, + HI_EO_CLIENT_RANGE_FIELD_ERROR, HI_EO_CLIENT_EVENT_NUM } HI_CLI_EVENTS; @@ -100,6 +103,9 @@ HI_EO_SERVER_NO_RESP_HEADER_END, HI_EO_SERVER_INVALID_CHUNK_SIZE, HI_EO_SERVER_INVALID_VERSION_RESP_HEADER, + HI_EO_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT, + HI_EO_SERVER_RANGE_FIELD_ERROR, + HI_EO_SERVER_NON_RANGE_GET_PARTIAL_METHOD, HI_EO_SERVER_EVENT_NUM }HI_EVENTS; @@ -177,6 +183,12 @@ "(http_inspect) TOO MANY PIPELINED REQUESTS" #define HI_EO_CLIENT_MULTIPLE_COLON_BETN_KEY_VALUE_STR \ "(http_inspect) MULTIPLE COLON BETWEEN KEY AND VALUE IN HTTP REQUEST HEADER" +#define HI_EO_CLIENT_INVALID_RANGE_UNIT_FMT_STR \ + "(http_inspect) INVALID RANGE UNIT FORMAT" +#define HI_EO_CLIENT_RANGE_NON_GET_METHOD_STR \ + "(http_inspect) RANGE FIELD PRESENT IN NON GET METHOD" +#define HI_EO_CLIENT_RANGE_FIELD_ERROR_STR \ + "(http_inspect) ERROR IN RANGE FIELD OF REQUEST HEADER" /* ** Server Events @@ -240,6 +252,12 @@ "(http_inspect) INVALID CHUNK SIZE OR CHUNK SIZE FOLLOWED BY JUNK CHARACTERS" #define HI_EO_SERVER_INVALID_VERSION_RESP_HEADER_STR \ "(http_inspect) INVALID VERSION IN HTTP RESPONSE HEADER" +#define HI_EO_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT_STR \ + "(http_inspect) INVALID CONTENT RANGE UNIT FORMAT" +#define HI_EO_SERVER_RANGE_FIELD_ERROR_STR \ + "(http_inspect) ERROR IN RANGE FIELD OF RESPONSE HEADER" +#define HI_EO_SERVER_NON_RANGE_GET_PARTIAL_METHOD_STR \ + "(http_inspect) RANGE FIELD NOT PRESENT IN GET METHOD, BUT RESPONSE WITH PARTIAL CONTENT" /* ** Event Priorities diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_eo_log.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo_log.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_eo_log.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_eo_log.h 2022-05-18 05:02:45.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_include.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_include.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_include.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_include.h 2022-05-18 05:02:46.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -58,6 +58,8 @@ uint64_t compr_bytes_read; uint64_t decompr_bytes_read; uint64_t h2_rebuilt_packets; + uint64_t mem_used; + uint64_t session_count; } HIStats; extern HIStats hi_stats; diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_mi.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_mi.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_mi.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_mi.h 2022-05-18 05:02:47.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_norm.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_norm.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_norm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_norm.h 2022-05-18 05:02:48.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -44,5 +44,6 @@ int hi_normalization(HI_SESSION *Session, int iInspectMode, HttpSessionData *hsd); int hi_norm_uri(HI_SESSION *Session, u_char *uribuf,int *uribuf_size, const u_char *uri, int uri_size, uint16_t *encodeType); +unsigned int NormalizeRandomNulls (unsigned char *src, unsigned int src_len, unsigned char *dst); #endif diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_paf.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_paf.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_paf.h 2022-05-18 05:02:49.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -45,6 +45,7 @@ uint32_t hi_paf_resp_bytes_processed(void* ssn); bool hi_paf_disable_te(void *ssn, bool to_server); bool hi_paf_valid_http(void* ssn); +uint32_t hi_paf_get_size(); #endif diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_reqmethod_check.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_reqmethod_check.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_reqmethod_check.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_reqmethod_check.h 2022-05-18 05:02:51.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_return_codes.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_return_codes.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_return_codes.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_return_codes.h 2022-05-18 05:02:52.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_server.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_server.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_server.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_server.h 2022-05-18 05:02:53.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -41,6 +41,24 @@ #include "snort_httpinspect.h" #include "hi_client.h" +#define RANGE_UNIT_BYTE "bytes" + +#ifndef HTTP_RESP_RANGE_NONE +#define HTTP_RESP_RANGE_NONE 0 +#endif +#define RANGE_WITH_RESP_FULL_CONTENT 1 +#define RANGE_WITH_RESP_PARTIAL_CONTENT 2 +#define RANGE_WITH_RESP_ERROR 3 +#define RANGE_WITH_RESP_NON_BYTE 4 +#define RANGE_WITH_UNKNOWN_CONTENT_RANGE 5 +#define RANGE_WITH_RESP_UNKNOWN_CONTENT_SIZE 6 +#define RANGE_WITH_RESP_SKIP 7 + +#define ACCEPT_RANGE_UNKNOWN 0 +#define ACCEPT_RANGE_NONE 1 +#define ACCEPT_RANGE_BYTES 2 +#define ACCEPT_RANGE_OTHER 3 + typedef struct s_HI_SERVER_RESP { const u_char *status_code; @@ -63,6 +81,8 @@ uint16_t header_encode_type; uint16_t cookie_encode_type; + uint8_t accept_range_flag; + uint8_t range_flag; } HI_SERVER_RESP; diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_server_norm.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_server_norm.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_server_norm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_server_norm.h 2022-05-18 05:02:54.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_si.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_si.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_si.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_si.h 2022-05-18 05:02:55.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_stateful_inspect.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_stateful_inspect.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_stateful_inspect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_stateful_inspect.h 2022-05-18 05:02:56.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ui_config.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_config.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ui_config.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_config.h 2022-05-18 05:02:57.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -285,6 +285,8 @@ uint32_t xtra_jsnorm_id; DecodeConfig decode_conf; MAIL_LogConfig mime_conf; + bool normalize_nulls; + bool fast_blocking; } HTTPINSPECT_GLOBAL_CONF; #define INVALID_HEX_VAL -1 diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ui_iis_unicode_map.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_iis_unicode_map.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ui_iis_unicode_map.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_iis_unicode_map.h 2022-05-18 05:02:58.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ui_server_lookup.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_server_lookup.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_ui_server_lookup.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_ui_server_lookup.h 2022-05-18 05:02:59.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_uri.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_uri.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_uri.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_uri.h 2022-05-18 05:03:00.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util.h 2022-05-18 05:03:07.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util_hbm.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_hbm.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util_hbm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_hbm.h 2022-05-18 05:03:09.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util_kmap.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_kmap.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util_kmap.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_kmap.h 2022-05-18 05:03:10.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util_xmalloc.h snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_xmalloc.h --- snort-2.9.15.1/src/preprocessors/HttpInspect/include/hi_util_xmalloc.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/include/hi_util_xmalloc.h 2022-05-18 05:03:11.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/mode_inspection/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/mode_inspection/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/mode_inspection/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/mode_inspection/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/mode_inspection -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -316,14 +328,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/mode_inspection/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/mode_inspection/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -350,10 +361,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -416,7 +427,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -565,6 +579,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/mode_inspection/hi_mi.c snort-2.9.20/src/preprocessors/HttpInspect/mode_inspection/hi_mi.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/mode_inspection/hi_mi.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/mode_inspection/hi_mi.c 2022-05-18 05:03:12.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/normalization/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/normalization/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/normalization/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/normalization/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/normalization -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -316,14 +328,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/normalization/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/normalization/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -350,10 +361,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -416,7 +427,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -565,6 +579,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/normalization/hi_norm.c snort-2.9.20/src/preprocessors/HttpInspect/normalization/hi_norm.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/normalization/hi_norm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/normalization/hi_norm.c 2022-05-18 05:03:13.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/server/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/server/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/server/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/server/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/server -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -113,7 +123,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -318,14 +330,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/server/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/server/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -352,10 +363,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -418,7 +429,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -567,6 +581,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/server/hi_server.c snort-2.9.20/src/preprocessors/HttpInspect/server/hi_server.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/server/hi_server.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/server/hi_server.c 2022-05-18 05:03:14.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -61,6 +61,7 @@ #include "detection_util.h" #include "stream_api.h" #include "sfutil/util_unfold.h" +#include "memory_stats.h" #if defined(FEAT_OPEN_APPID) #include "spp_stream6.h" @@ -83,6 +84,10 @@ #define HTTPRESP_HEADER_LENGTH__CONTENT_TYPE 12 #define HTTPRESP_HEADER_NAME__TRANSFER_ENCODING "Transfer-Encoding" #define HTTPRESP_HEADER_LENGTH__TRANSFER_ENCODING 17 +#define HTTPRESP_HEADER_NAME__CONTENT_RANGE "Content-Range" +#define HTTPRESP_HEADER_LENGTH__CONTENT_RANGE 13 +#define HTTPRESP_HEADER_NAME__ACCEPT_RANGES "Accept-Ranges" +#define HTTPRESP_HEADER_LENGTH__ACCEPT_RANGES 13 #if defined(FEAT_OPEN_APPID) #define HEADER_NAME__VIA "Via" #define HEADER_LENGTH__VIA sizeof(HEADER_NAME__VIA)-1 @@ -126,7 +131,8 @@ COOKIE_PTR *cookie = Server->response.cookie.next; \ do { \ Server->response.cookie.next = Server->response.cookie.next->next; \ - free(cookie); \ + SnortPreprocFree(cookie, sizeof(COOKIE_PTR), PP_HTTPINSPECT, \ + PP_MEM_CATEGORY_SESSION); \ cookie = Server->response.cookie.next; \ }while(cookie);\ }\ @@ -757,6 +763,382 @@ return p; } +/* + * extract_http_content_range() will extract required data from content-range + * field. Focus is for, when the units is "bytes". + * The possible syntax as follows, + * content-range: -/ + * content-range: * / + * content-range: -/ * + */ +static const u_char *extract_http_content_range(HI_SESSION *Session, + const u_char *p, const u_char *start, const u_char *end, + HEADER_PTR *header_ptr) +{ + u_char *crlf = NULL; + const u_char *unit_start = NULL; + int is_byte_range = false; + + SkipBlankSpace(start,end,&p); + if (hi_util_in_bounds(start, end, p) && *p == ':') + { + p++; + CheckSkipAlertMultipleColon(Session, start, end, &p, HI_SI_SERVER_MODE); + while (hi_util_in_bounds(start, end, p)) + { + if ((*p == ' ') || (*p == '\t')) + { + p++; + break; + } + p++; + } + if (hi_util_in_bounds(start, end, p)) + { + /* extract unit */ + unit_start = p; + while (hi_util_in_bounds(start, end, p) && ( *p != ' ')) + { + p++; + } + + if ((*p != ' ') || ((*(p+1) == ' '))) + { + if (hi_eo_generate_event(Session, HI_EO_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT)) + { + hi_eo_server_event_log(Session, HI_EO_SERVER_INVALID_CONTENT_RANGE_UNIT_FMT, NULL, NULL); + } + header_ptr->range_flag = RANGE_WITH_RESP_ERROR; + return end; + } + + /* Set flag, when unit is bytes. Based on unit, flow will change */ + if (!strncasecmp((const char *)unit_start, RANGE_UNIT_BYTE, 5)) + { + is_byte_range = true; + } + else + { + is_byte_range = false; + } + p++; + + if (hi_util_in_bounds(start, end, p)) + { + if (is_byte_range == true) + { + if (isdigit((int)*p)) + { + /*if start with digit, then expectation is + "-/" or "-/ *" + There is no whitespace between / and * To make it comment added the space + pattern other than above mentioned format will flag as error */ + uint64_t start_range = 0; + uint64_t end_range = 0; + uint64_t len = 0; + const u_char *start_ptr = NULL; + const u_char *end_ptr = NULL; + const u_char *len_ptr = NULL; + const u_char *ret_ptr = NULL; + int is_valid_range = false; + int delim_1 = false; + int delim_2 = false; + int assign = false; + + start_ptr = p; + p++; + while (hi_util_in_bounds(start, end, p)) + { + if (!isdigit((int)*p)) + { + if (*p == '-') + { + if ((delim_2 == true) || (delim_1 == true)) + { + break; + } + delim_1 = true; + assign = true; + p++; + continue; + } + else if (*p == '/') + { + if ((delim_1 == false) || (delim_2 == true)) + { + break; + } + delim_2 = true; + assign = true; + p++; + continue; + } + else if ((*p == '*') || (*p == '\r') || (*p == '\n')) + { + if ((delim_1 == false) || (delim_2 == false)) + { + break; + } + is_valid_range = true; + break; + } + break; + } + + /* Here digit only come */ + if (assign == true) + { + if ((delim_2 == false) && (delim_1 == true)) + { + end_ptr = p; + } + else if ((delim_1 == true) && (delim_2 == true)) + { + len_ptr = p; + } + else + { + assign = false; + break; + } + assign = false; + } + p++; + } + + if (is_valid_range == true) + { + /* Now check total_len, * means set the flag accordingly + or convert str to value and flag as full content + when differnce between start_pos and end_pos and sum with 1 + equals to total_len, otherwise partial flag set */ + if (*p == '*') + { + header_ptr->range_flag = RANGE_WITH_RESP_UNKNOWN_CONTENT_SIZE; + } + else if ((start_ptr) && (end_ptr) && (len_ptr)) + { + int error = false; + + start_range = (uint64_t)SnortStrtol((char *)start_ptr, (char**)&ret_ptr, 10); + if ((errno == ERANGE) || (start_ptr == ret_ptr) || (start_range > 0xFFFFFFFF)) + { + error = true; + } + + ret_ptr = NULL; + end_range = (uint64_t)SnortStrtol((char *)end_ptr, (char**)&ret_ptr, 10); + if ((errno == ERANGE) || (end_ptr == ret_ptr) || (end_range > 0xFFFFFFFF)) + { + error = true; + } + + ret_ptr = NULL; + len = (uint64_t)SnortStrtol((char *)len_ptr, (char**)&ret_ptr, 10); + if ((errno == ERANGE) || (len_ptr == ret_ptr) || (len > 0xFFFFFFFF)) + { + error = true; + } + + if (error == false) + { + if (((end_range - start_range) + 1) == len) + { + header_ptr->range_flag = RANGE_WITH_RESP_FULL_CONTENT; + } + else + { + header_ptr->range_flag = RANGE_WITH_RESP_PARTIAL_CONTENT; + } + } + else + { + header_ptr->range_flag = RANGE_WITH_RESP_ERROR; + } + } + else + { + header_ptr->range_flag = RANGE_WITH_RESP_ERROR; + } + + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } + } + } + else if (*p == '*') + { + /* To check pattern, "* /" and set flag accordingly */ + header_ptr->range_flag = RANGE_WITH_UNKNOWN_CONTENT_RANGE; + p++; + if (hi_util_in_bounds(start, end, p)) + { + if (*p == '/') + { + p++; + if (hi_util_in_bounds(start, end, p)) + { + if (isdigit((int)*p)) + { + p++; + while (hi_util_in_bounds(start, end, p)) + { + if (isdigit((int)*p)) + { + p++; + continue; + } + else if ((*p == '\r') || (*p == '\n')) /* digit followed by \r or \n */ + { + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } + } + } + } + } + } + } + } + header_ptr->range_flag = RANGE_WITH_RESP_ERROR; + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + p = crlf; + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } + } + else + { + /* other than byte range is out of scope for snort */ + while (hi_util_in_bounds(start, end, p)) + { + if ((*p == '\r') || (*p == '\n')) + { + header_ptr->range_flag = RANGE_WITH_RESP_NON_BYTE; + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + p = crlf; + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } + } + p++; + } + } + } + } + } + header_ptr->range_flag = RANGE_WITH_RESP_ERROR; + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + p = crlf; + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } +} + +/* extract_http_accept_ranges will extract and set flag based on bytes unit */ +static const u_char *extract_http_accept_ranges(HI_SESSION *Session, + const u_char *p, const u_char *start, const u_char *end, + HEADER_PTR *header_ptr, uint16_t *accept_range_flag) +{ + const u_char *start_ptr = NULL; + const u_char *end_ptr = NULL; + u_char *crlf = NULL; + int len = 0; + + *accept_range_flag = ACCEPT_RANGE_UNKNOWN; + SkipBlankSpace(start,end,&p); + + if (hi_util_in_bounds(start, end, p) && (*p == ':')) + { + p++; + CheckSkipAlertMultipleColon(Session, start, end, &p, HI_SI_SERVER_MODE); + while (hi_util_in_bounds(start, end, p)) + { + if ((*p == ' ') || (*p == '\t') || (*p == ',')) + { + p++; + break; + } + p++; + } + + if (hi_util_in_bounds(start, end, p)) + { + start_ptr = p; + while (hi_util_in_bounds(start, end, p)) + { + if ((*p == '\r') || (*p == '\n')) + { + end_ptr = (p - 1); + break; + } + p++; + } + + if (start_ptr && end_ptr) + { + len = end_ptr - start_ptr; + if ((len >= 5) && (SnortStrcasestr((const char *)start, len, "bytes"))) + { + *accept_range_flag = ACCEPT_RANGE_BYTES; + } + else if ((len >= 4) && (!strncasecmp((const char *)start, "none", 4))) + { + *accept_range_flag = ACCEPT_RANGE_NONE; + } + else + { + *accept_range_flag = ACCEPT_RANGE_OTHER; + } + } + } + } + + crlf = (u_char *)SnortStrnStr((const char *)p, end - p, "\n"); + if (crlf) + { + p = crlf; + return p; + } + else + { + header_ptr->header.uri_end = end; + return end; + } +} + const u_char *extract_http_transfer_encoding(HI_SESSION *Session, HttpSessionData *hsd, const u_char *p, const u_char *start, const u_char *end, HEADER_PTR *header_ptr, int iInspectMode) @@ -925,6 +1307,11 @@ if(hsd && !hsd->resp_state.last_pkt_chunked) p = extract_http_content_length(Session, ServerConf, p, start, end, header_ptr, header_field_ptr, HI_SI_SERVER_MODE ); } + else if (IsHeaderFieldName(p, end, HTTPRESP_HEADER_NAME__CONTENT_RANGE, HTTPRESP_HEADER_LENGTH__CONTENT_RANGE)) + { + p = p + HTTPRESP_HEADER_LENGTH__CONTENT_RANGE; + p = extract_http_content_range(Session, p, start, end, header_ptr); + } } else if (((p - offset) == 0) && ((*p == 'T') || (*p == 't'))) { @@ -935,6 +1322,17 @@ p = extract_http_transfer_encoding(Session, hsd, p, start, end, header_ptr, HI_SI_SERVER_MODE); } } + else if (((p - offset) == 0) && ((*p == 'A') || (*p == 'a'))) + { + if (IsHeaderFieldName(p, end, HTTPRESP_HEADER_NAME__ACCEPT_RANGES, + HTTPRESP_HEADER_LENGTH__ACCEPT_RANGES)) + { + uint16_t accept_range_flag = 0; + p = p + HTTPRESP_HEADER_LENGTH__ACCEPT_RANGES; + p = extract_http_accept_ranges(Session, p, start, end, header_ptr, &accept_range_flag); + Session->server.response.accept_range_flag = accept_range_flag; + } + } #if defined(FEAT_OPEN_APPID) else if(((p - offset) == 0) && ((*p == 'V') || (*p == 'v'))) { @@ -1991,8 +2389,18 @@ CLR_SERVER_STAT_MSG(Server); } { + header_ptr.range_flag = HTTP_RANGE_NONE; ptr = hi_server_extract_header(Session, ServerConf, &header_ptr, stat_msg_ptr.uri_end , end, parse_cont_encoding, parse_trans_encoding, sd ); + + if (header_ptr.range_flag != HTTP_RANGE_NONE) + { + Server->response.range_flag = header_ptr.range_flag; + } + else + { + Server->response.range_flag = HTTP_RESP_RANGE_NONE; + } } } else @@ -2051,8 +2459,10 @@ { sd->resp_state.inspect_body = 1; } - - if( ServerConf->file_decomp_modes != 0 ) + + /*InitFileDecomp should not be called twice when decomp_state_stage is + MID as the objects getting initialized twice*/ + if(( ServerConf->file_decomp_modes != 0 ) && (sd->fd_state == NULL)) { InitFileDecomp(sd, Session,p->ssnptr); } @@ -2203,9 +2613,12 @@ /*callback into appId with header values extracted. */ CallHttpHeaderProcessors(p, &headers); - free((void*)headers.server.start); - free((void*)headers.via.start); - free((void*)headers.xWorkingWith.start); + SnortPreprocFree((void*) headers.server.start, sizeof(uint8_t), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + SnortPreprocFree((void*) headers.via.start, sizeof(uint8_t), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + SnortPreprocFree((void*) headers.xWorkingWith.start, sizeof(uint8_t), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); } #endif /* defined(FEAT_OPEN_APPID) */ diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/server/hi_server_norm.c snort-2.9.20/src/preprocessors/HttpInspect/server/hi_server_norm.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/server/hi_server_norm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/server/hi_server_norm.c 2022-05-18 05:03:15.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -21,16 +21,16 @@ ****************************************************************************/ /** -** @file hi_client_norm.c +** @file hi_server_norm.c ** ** @author Daniel Roelker ** -** @brief HTTP client normalization routines +** @brief HTTP Server normalization routines ** ** We deal with the normalization of HTTP client requests headers and ** URI. ** -** In this file, we handle all the different HTTP request URI evasions. The +** In this file, we handle all the different HTTP request/response URI evasions. The ** list is: ** - ASCII decoding ** - UTF-8 decoding @@ -429,3 +429,31 @@ return HI_SUCCESS; } + + +/* This function assumes that only text input is passed to it always. + * It parses the input buffer for randomized UTF encoded characters + * and normalizes them to UTF 8 whether they are accompanied with BOM or not. + * In effect, it boils down to removing nulls from the passed text. + * It returns the number of valid bytes in the text after normalization. + */ +uint32_t NormalizeRandomNulls (u_char *src, uint32_t src_len, u_char *dst) +{ + uint16_t bytes = 0; + + while (src_len) + { + if(*src) + { + *dst++ = *src++; + bytes++; + } + else + { + src++; + } + src_len--; + } + return bytes; +} + diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/session_inspection/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/session_inspection/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/session_inspection/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/session_inspection/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/session_inspection -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -316,14 +328,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/session_inspection/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/session_inspection/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -350,10 +361,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -416,7 +427,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -565,6 +579,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/session_inspection/hi_si.c snort-2.9.20/src/preprocessors/HttpInspect/session_inspection/hi_si.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/session_inspection/hi_si.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/session_inspection/hi_si.c 2022-05-18 05:03:16.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/user_interface/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/Makefile.in 2019-12-03 09:30:45.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/user_interface/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/user_interface -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -113,7 +123,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -319,14 +331,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/user_interface/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/user_interface/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -353,10 +364,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -419,7 +430,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -568,6 +582,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/hi_ui_config.c snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_config.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/hi_ui_config.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_config.c 2022-05-18 05:03:18.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -55,6 +55,7 @@ #include "hi_ui_server_lookup.h" #include "hi_ui_config.h" #include "hi_cmd_lookup.h" +#include "memory_stats.h" /* ** NAME @@ -195,7 +196,8 @@ for( i=0; ixff_headers[i] != NULL ) { - free( ServerConf->xff_headers[i] ); + SnortPreprocFree(ServerConf->xff_headers[i], + sizeof(*(ServerConf->xff_headers[i])), PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); ServerConf->xff_headers[i] = NULL; } diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/hi_ui_iis_unicode_map.c snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_iis_unicode_map.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/hi_ui_iis_unicode_map.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_iis_unicode_map.c 2022-05-18 05:03:19.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/hi_ui_server_lookup.c snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_server_lookup.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/user_interface/hi_ui_server_lookup.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/user_interface/hi_ui_server_lookup.c 2022-05-18 05:03:20.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -50,6 +50,7 @@ #include "hi_return_codes.h" #include "hi_cmd_lookup.h" #include "sfrt.h" +#include "memory_stats.h" static void serverConfFree(void *pData); @@ -299,7 +300,9 @@ { if (ServerConf->xff_headers[i] != NULL) { - free(ServerConf->xff_headers[i]); + SnortPreprocFree(ServerConf->xff_headers[i], + sizeof(*(ServerConf->xff_headers[i])), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); ServerConf->xff_headers[i] = NULL; } } @@ -307,10 +310,13 @@ http_cmd_lookup_cleanup(&ServerConf->cmd_lookup); if (ServerConf->iis_unicode_map_filename) { - free(ServerConf->iis_unicode_map_filename); + SnortPreprocFree(ServerConf->iis_unicode_map_filename, + sizeof(*(ServerConf->iis_unicode_map_filename)), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); } - free(ServerConf); + SnortPreprocFree(ServerConf, sizeof(HTTPINSPECT_CONF), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); } } } diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/Makefile.in snort-2.9.20/src/preprocessors/HttpInspect/utils/Makefile.in --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/HttpInspect/utils -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -115,7 +125,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -164,6 +174,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -214,6 +225,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -331,14 +343,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/HttpInspect/utils/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -365,10 +376,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -431,7 +442,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -580,6 +594,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/h2_common.c snort-2.9.20/src/preprocessors/HttpInspect/utils/h2_common.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/h2_common.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/h2_common.c 2022-05-18 05:03:21.000000000 +0000 @@ -1,4 +1,5 @@ #include "h2_common.h" +#include "memory_stats.h" enum type_of_message { @@ -22,21 +23,28 @@ if (namelen < 0 || valuelen < 0) return NULL; - nv_list_node *temp = (nv_list_node *)SnortAlloc(sizeof(nv_list_node)); + nv_list_node *temp = (nv_list_node *)SnortPreprocAlloc(1, sizeof(nv_list_node), + PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if (NULL == temp) return NULL; - temp->nv.name = (uint8_t *)SnortAlloc(namelen); + temp->nv.name = (uint8_t *)SnortPreprocAlloc(1, namelen, + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if (NULL == temp->nv.name) { - free(temp); + SnortPreprocFree(temp, sizeof(nv_list_node), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); return NULL; } - temp->nv.value = (uint8_t *)SnortAlloc(valuelen); + temp->nv.value = (uint8_t *)SnortPreprocAlloc(1, valuelen, PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if (NULL == temp->nv.value) { - free(temp->nv.name); - free(temp); + SnortPreprocFree(temp->nv.name, sizeof(*(temp->nv.name)), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + SnortPreprocFree(temp, sizeof(nv_list_node), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); return NULL; } temp->nv.namelen = namelen; @@ -56,9 +64,12 @@ { nv_list_node *prev = temp; temp = temp->next; - free(prev->nv.name); - free(prev->nv.value); - free(prev); + SnortPreprocFree(prev->nv.name, sizeof(*(prev->nv.name)), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); + SnortPreprocFree(prev->nv.value, sizeof(*(prev->nv.value)), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); + SnortPreprocFree(prev, sizeof(nv_list_node), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); } *headers = NULL; return 0; @@ -146,6 +157,7 @@ uint32_t authority_len = 10; uint32_t length = 0; int ret = 0; + uint32_t plen = 0, hlen = 0, mlen = 0, slen = 0; nv_list_node *nvtemp = headers; if ((NULL == headers) || (NULL == out)) @@ -163,7 +175,9 @@ (memcmp(nvtemp->nv.name,":status", scheme_status_method_len) == 0)) { type = RESPONSE; - status = (char *)SnortAlloc((nvtemp->nv.valuelen +1) * sizeof(char)); + status = (char *) SnortPreprocAlloc(1, (nvtemp->nv.valuelen +1) * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + slen = nvtemp->nv.valuelen + 1; if (NULL == status) { ret = -1; @@ -177,7 +191,9 @@ memcmp(nvtemp->nv.name,":method", scheme_status_method_len) == 0)) { type = REQUEST; - method = (char *)SnortAlloc((nvtemp->nv.valuelen +1) * sizeof(char)); + method = (char *)SnortPreprocAlloc(1, (nvtemp->nv.valuelen +1) * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + mlen = nvtemp->nv.valuelen + 1; if (NULL == method) { ret = -1; @@ -193,7 +209,9 @@ { if(!path && (memcmp(nvtemp->nv.name,":path",path_len)==0)) { - path = (char *)SnortAlloc((nvtemp->nv.valuelen +1) * sizeof(char)); + path = (char *)SnortPreprocAlloc(1, (nvtemp->nv.valuelen +1) * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + plen = nvtemp->nv.valuelen + 1; if (NULL == path) { ret = -1; @@ -209,7 +227,9 @@ // Http 2.0 has host parameter in authority if (!host && (memcmp(nvtemp->nv.name,":authority",authority_len)==0)) { - host = (char *)SnortAlloc((nvtemp->nv.valuelen+1) * sizeof(char)); + host = (char *)SnortPreprocAlloc(1, (nvtemp->nv.valuelen +1) * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + hlen = nvtemp->nv.valuelen + 1; if (NULL == host) { ret = -1; @@ -236,7 +256,8 @@ if (NULL != method && NULL != path && NULL != host) { - out->message = (char *)SnortAlloc((length) * sizeof(char)); + out->message = (char *)SnortPreprocAlloc(1, (length) * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if(NULL != out->message) { snprintf(out->message, length, "%s %s %s\r\n", method, path, version); @@ -254,7 +275,8 @@ if(strcmp(method, "CONNECT") == 0) { length += strlen(host); - out->message = (char *)SnortAlloc((length) * sizeof(char)); + out->message = (char *)SnortPreprocAlloc(1, (length) * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if(NULL != out->message) { snprintf(out->message, length, "%s %s %s\r\n", method, host, version); @@ -284,7 +306,8 @@ //length = length + strlen(version) + +strlen(status)+3; length+= 3; - out->message = (char *)SnortAlloc((length) * sizeof(char)); + out->message = (char *)SnortPreprocAlloc(1, (length) * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if (NULL != out->message) { snprintf(out->message, length, "%s %s\r\n",version,status); @@ -332,13 +355,17 @@ } cleanup: if (NULL != path) - free(path); + SnortPreprocFree(path, plen * sizeof(char), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if (NULL != host) - free(host); + SnortPreprocFree(host , hlen * sizeof(char), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if (NULL != method) - free(method); + SnortPreprocFree(method , mlen * sizeof(char), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if (NULL != status) - free(status); + SnortPreprocFree(status , slen * sizeof(char), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); return ret; } @@ -388,7 +415,8 @@ { http2_stream_data *temp = NULL; - temp = (http2_stream_data *)SnortAlloc(sizeof(http2_stream_data)); + temp = (http2_stream_data *)SnortPreprocAlloc(1, sizeof(http2_stream_data), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if (NULL != temp) { temp->hd.stream_id = hd.stream_id; @@ -476,8 +504,9 @@ { free_headers(&(temp->headers)); if (NULL != temp->data) - free(temp->data); - free(*stream_data); + free(temp->data); // unable to find the size + SnortPreprocFree(*stream_data, sizeof(http2_stream_data), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); *stream_data = NULL; } } @@ -491,7 +520,8 @@ if (NULL == session_data) return temp; - temp = (return_data_list_node *)SnortAlloc(sizeof(return_data_list_node)); + temp = (return_data_list_node *)SnortPreprocAlloc(1, sizeof(return_data_list_node), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if (NULL != temp) { @@ -655,7 +685,9 @@ if (NULL == temp->data) { // Accumulate data till it reaches PAF_MAX - temp->data = (uint8_t*)SnortAlloc((ScPafMax() + ETHERNET_MTU) * sizeof(char)); + temp->data = (uint8_t*)SnortPreprocAlloc(1, + (ScPafMax() + ETHERNET_MTU)*sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if (NULL == temp->data) return 0; @@ -676,7 +708,9 @@ __FUNCTION__, session_data->num_of_return_data +1);) return 0; } - current->return_data.message = (char *)SnortAlloc(temp->databuf_off * sizeof(char)); + current->return_data.message = (char *)SnortPreprocAlloc(1, + temp->databuf_off * sizeof(char), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if (NULL != current->return_data.message) { memcpy(current->return_data.message,temp->data, temp->databuf_off); @@ -722,7 +756,10 @@ http2_free_stream(&temp); return 0; } - current->return_data.message = (char *)SnortAlloc(temp->databuf_off * sizeof(char)); + current->return_data.message = (char *)SnortPreprocAlloc(1, + temp->databuf_off*sizeof(char), + PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if (NULL == current->return_data.message) { DEBUG_WRAP(DebugMessage(DEBUG_STREAM_PAF, diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/h2_paf.c snort-2.9.20/src/preprocessors/HttpInspect/utils/h2_paf.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/h2_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/h2_paf.c 2022-05-18 05:03:22.000000000 +0000 @@ -20,6 +20,7 @@ #include "snort_debug.h" #include "profiler.h" #include "snort_httpinspect.h" +#include "memory_stats.h" #include "h2_common.h" @@ -99,7 +100,8 @@ { bool upg; - sd = calloc(1, sizeof(http2_session_data)); + sd = (http2_session_data*) SnortPreprocAlloc(1, sizeof(http2_session_data), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if (!sd) { @@ -166,7 +168,8 @@ if (h2_pkt) { if (h2_pkt->h2Hdr) - free(h2_pkt->h2Hdr); + SnortPreprocFree(h2_pkt->h2Hdr, sizeof(H2Hdr), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); Encode_Delete(h2_pkt); h2_pkt = NULL; } @@ -195,6 +198,15 @@ return 0; } +static void h2_paf_cleanup(void *pafData) +{ +#ifdef HAVE_LIBNGHTTP2 + if (pafData) + SnortPreprocFree(pafData, sizeof(http2_session_data), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); +#endif +} + int h2_paf_register_service ( struct _SnortConfig *sc, uint16_t service, bool client, bool server, tSfPolicyId pid, bool auto_on) { @@ -208,11 +220,15 @@ return -1; if ( client ) + { h2_paf_id = stream_api->register_paf_service(sc, pid, service, true, h2_paf, auto_on); - + stream_api->register_paf_free(h2_paf_id, h2_paf_cleanup); + } if ( server ) + { h2_paf_id = stream_api->register_paf_service(sc, pid, service, false, h2_paf, auto_on); - + stream_api->register_paf_free(h2_paf_id, h2_paf_cleanup); + } return 0; } @@ -238,7 +254,7 @@ if (!h2_pkt) h2_pkt = Encode_New(); else if (h2_pkt->h2Hdr) - free(h2_pkt->h2Hdr); + SnortPreprocFree(h2_pkt->h2Hdr, sizeof(H2Hdr), PP_HTTPINSPECT, 0); if ( !p->packet_flags || (dir & p->packet_flags) ) enc_flags = ENC_FLAG_FWD; @@ -271,7 +287,8 @@ h2_pkt->packet_flags |= (PKT_REBUILT_STREAM|PKT_STREAM_EST|PKT_STREAM_ORDER_OK); h2_pkt->dsize = (uint16_t)bytes; - h2_pkt->h2Hdr = (H2Hdr*)SnortAlloc(sizeof(H2Hdr)); + h2_pkt->h2Hdr = (H2Hdr *)SnortPreprocAlloc(1, sizeof(H2Hdr), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if (h2_pkt->h2Hdr != NULL) { copy_hd(h2_pkt->h2Hdr, *hd); diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_buffer_dump.c snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_buffer_dump.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_buffer_dump.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_buffer_dump.c 2022-05-18 05:03:23.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -31,6 +31,8 @@ #include "detection_util.h" #include "hi_buffer_dump.h" +#include "memory_stats.h" + #ifdef DUMP_BUFFER TraceBuffer buf[MAX_HTTP_BUFFER_DUMP] = {{"METHOD_DUMP", NULL, 0}, @@ -52,7 +54,8 @@ void dumpBuffer(HTTP_BUFFER_DUMP type, const u_char *content, uint16_t len) { if (dump_enabled) { - char *buf_cont = (char *)SnortAlloc(len + 1); + char *buf_cont = (char *)SnortPreprocAlloc(1, len + 1, PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); memcpy(buf_cont, content, len); buf[type].buf_content = buf_cont; buf[type].length = len; @@ -63,7 +66,8 @@ unsigned int i; for (i = METHOD_DUMP; i <= CLIENT_BODY_DUMP; i++) { if (buf[i].buf_content) { - free(buf[i].buf_content); + SnortPreprocFree(buf[i].buf_content, buf[i].length, PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); buf[i].buf_content = NULL; buf[i].length = 0; } @@ -74,7 +78,8 @@ unsigned int i; for (i = STAT_CODE_DUMP; i <= FILE_DATA_DUMP; i++) { if (buf[i].buf_content) { - free(buf[i].buf_content); + SnortPreprocFree(buf[i].buf_content, buf[i].length, PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); buf[i].buf_content = NULL; buf[i].length = 0; } diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_cmd_lookup.c snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_cmd_lookup.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_cmd_lookup.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_cmd_lookup.c 2022-05-18 05:03:24.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * -* Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +* Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_paf.c snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_paf.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_paf.c 2022-05-18 05:03:25.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -58,6 +58,7 @@ #include #include #include +#include #include "generators.h" @@ -68,6 +69,7 @@ #include "stream_api.h" #include "snort_debug.h" #include "snort_httpinspect.h" +#include "memory_stats.h" #ifdef DEBUG_MSGS #define HI_TRACE // define for state trace @@ -118,6 +120,7 @@ bool eoh; bool disable_chunked; bool valid_http; + bool fast_blocking; } Hi5State; // config stuff @@ -132,6 +135,9 @@ static uint8_t hi_paf_id = 0; +static bool hi_eoh_found = false; +static bool hi_is_chunked = false; + #ifdef TARGET_BASED extern int16_t hi_app_protocol_id; #endif @@ -464,6 +470,7 @@ }; static void hi_update_flow_depth_state(Hi5State *hip, uint32_t* fp, PAF_Status *paf ); static void get_flow_depth(void *ssn, uint64_t flags, Hi5State *hip); +static void get_fast_blocking_status(Hi5State *hip); //-------------------------------------------------------------------- @@ -637,7 +644,8 @@ hi_fsm_size = max + extra; assert(hi_fsm_size < TBD); // using uint8_t for Cell.next and Hi5State.fsm - hi_fsm = malloc(hi_fsm_size*sizeof(*hi_fsm)); + hi_fsm = SnortPreprocAlloc(1, hi_fsm_size*sizeof(*hi_fsm), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if ( hi_fsm == NULL ) { DEBUG_WRAP(DebugMessage(DEBUG_STREAM_PAF, "Unable to allocate memory for hi_fsm.");); @@ -830,15 +838,18 @@ } else { - if(!( s->flags & HIF_CHE) && !is_lwspace(c)) + if( !(s->flags & HIF_CHE) ) { - s->flags |= HIF_CHE; /*A correct chunk extension starts with semi-colon*/ - if( c != ';' ) + if( c != ';' ) { hi_paf_response_invalid_chunksize(); } - s->junk_chars = 1; + else + { + s->flags |= HIF_CHE; + s->junk_chars = 1; + } } else if( s->flags & HIF_CHE ) { @@ -878,6 +889,7 @@ break; case ACT_CHK: s->flags |= HIF_CHK; + hi_is_chunked = true; break; case ACT_UPG: DEBUG_WRAP(DebugMessage(DEBUG_STREAM_PAF, @@ -1097,11 +1109,22 @@ DEBUG_WRAP(DebugMessage(DEBUG_STREAM_PAF, "%s[%d]: 0x%2X, '%c'\n", __FUNCTION__, s->msg, c, isgraph(c) ? c : '.');) - if ( c == '\r' && s->msg != 1 && s->msg!=5 ) + if ( c == '\r' ) { - *fp = 0; - return paf; + if ( hi_is_chunked && hi_eoh_found ) + { + hi_paf_response_invalid_chunksize(); + hi_is_chunked = false; + } + hi_eoh_found = false; + + if ( s->msg != 1 && s->msg != 5 ) + { + *fp = 0; + return paf; + } } + hi_eoh_found = false; switch ( s->msg ) { @@ -1200,6 +1223,7 @@ case 5: if ( c == '\n' ) { + hi_eoh_found = true; if ( s->char_end_of_header >= 2) s->flags |= HIF_END; s->char_end_of_header =0; @@ -1227,8 +1251,19 @@ if ( paf_abort(s) ) paf = PAF_ABORT; - else if ( paf != PAF_SEARCH ) + else if ( paf != PAF_SEARCH ) { + /* + * If the flush point is set based on content-length, + * then the payload is eligible for pseudo flush for + * early detection and file processing. + */ *fp = s->len; + if (paf == PAF_FLUSH && s->fast_blocking && + !(stream_api->is_session_decrypted(ssn)) ) + { + paf = PAF_PSEUDO_FLUSH_SEARCH; + } + } if( paf != PAF_SEARCH && paf != PAF_ABORT ) { @@ -1264,6 +1299,8 @@ flow_depth_reset = false; } + get_fast_blocking_status(s); + DEBUG_WRAP(DebugMessage(DEBUG_STREAM_PAF, "%s: fsm=%u, flags=0x%X\n", __FUNCTION__, s->fsm, s->flags);) } @@ -1333,7 +1370,8 @@ { // beware - we allocate here but s5 calls free() directly // so no pointers allowed - hip = calloc(1, sizeof(Hi5State)); + hip = SnortPreprocAlloc(1, sizeof(Hi5State), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); if ( !hip ) { @@ -1479,6 +1517,11 @@ if ( paf != PAF_SKIP && paf != PAF_DISCARD_START ) hi_reset(hip, *flags, ssn); + + if ( hip->fast_blocking && (paf == PAF_SKIP) && + !(stream_api->is_session_decrypted(ssn)) ) + paf = PAF_PSEUDO_FLUSH_SKIP; + break; } } @@ -1521,6 +1564,12 @@ return 0; } +static void hi_paf_cleanup(void *pafData) +{ + if (pafData) + SnortPreprocFree(pafData, sizeof(Hi5State), PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); +} + int hi_paf_register_service ( struct _SnortConfig *sc, uint16_t service, bool client, bool server, tSfPolicyId pid, bool auto_on) { @@ -1534,11 +1583,15 @@ return -1; if ( client ) + { hi_paf_id = stream_api->register_paf_service(sc, pid, service, true, hi_paf, auto_on); - + stream_api->register_paf_free(hi_paf_id, hi_paf_cleanup); + } if ( server ) + { hi_paf_id = stream_api->register_paf_service(sc, pid, service, false, hi_paf, auto_on); - + stream_api->register_paf_free(hi_paf_id, hi_paf_cleanup); + } return 0; } @@ -1563,7 +1616,8 @@ void hi_paf_term (void) { - free(hi_fsm); + SnortPreprocFree(hi_fsm, hi_fsm_size*sizeof(*hi_fsm), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); DEBUG_WRAP(DebugMessage(DEBUG_STREAM_PAF, "%s: calls=%u, bytes=%u\n", __FUNCTION__, hi_paf_calls, hi_paf_bytes);) @@ -1586,6 +1640,11 @@ return false; } +static void get_fast_blocking_status(Hi5State *hip) +{ + hip->fast_blocking = GetHttpFastBlockingStatus(); +} + static void get_flow_depth(void *ssn, uint64_t flags, Hi5State *hip) { hip->flow_depth = GetHttpFlowDepth(ssn, flags); @@ -1745,3 +1804,8 @@ return false; } +uint32_t hi_paf_get_size() +{ + return sizeof(Hi5State); +} + diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_util_hbm.c snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_hbm.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_util_hbm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_hbm.c 2022-05-18 05:03:26.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -36,7 +36,9 @@ #endif #include "hi_util_hbm.h" +#include "preprocids.h" #include "util.h" +#include "memory_stats.h" /* * @@ -72,7 +74,8 @@ { HBM_STRUCT *p; - p = (HBM_STRUCT*)SnortAlloc(sizeof(HBM_STRUCT)); + p = (HBM_STRUCT *)SnortPreprocAlloc(1, sizeof(HBM_STRUCT), PP_HTTPINSPECT, + PP_MEM_CATEGORY_CONFIG); if( !hbm_prepx( p, pat, m ) ) { diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_util_kmap.c snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_kmap.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_util_kmap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_kmap.c 2022-05-18 05:03:27.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -52,6 +52,9 @@ #include "hi_util_kmap.h" #include "hi_util_xmalloc.h" +#include "sf_types.h" +#include "memory_stats.h" +#include "preprocids.h" //#define MEMASSERT(p) if(!p){printf("KMAP-No Memory: File: %s Line:%d!\n",__FILE__,__LINE__);exit(0);} @@ -187,7 +190,7 @@ knode->key = (unsigned char*)s_malloc(n); // Alloc the key space if( !knode->key ) { - free(knode); + SnortPreprocFree(knode, sizeof(KEYNODE), PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); return 0; } diff -Nru snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_util_xmalloc.c snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_xmalloc.c --- snort-2.9.15.1/src/preprocessors/HttpInspect/utils/hi_util_xmalloc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/HttpInspect/utils/hi_util_xmalloc.c 2022-05-18 05:03:29.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/Makefile.in snort-2.9.20/src/preprocessors/Makefile.in --- snort-2.9.15.1/src/preprocessors/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -135,7 +145,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -180,7 +190,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -201,6 +211,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -271,6 +282,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -403,14 +415,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -437,10 +448,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -550,7 +561,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -726,6 +740,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/Session/Makefile.in snort-2.9.20/src/preprocessors/Session/Makefile.in --- snort-2.9.15.1/src/preprocessors/Session/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -86,11 +96,11 @@ @BUILD_HA_TRUE@stream5_ha.o subdir = src/preprocessors/Session -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -126,7 +136,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -175,6 +185,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -220,6 +231,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -332,14 +344,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/Session/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/Session/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -366,10 +377,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -432,7 +443,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -581,6 +595,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/Session/session_common.c snort-2.9.20/src/preprocessors/Session/session_common.c --- snort-2.9.15.1/src/preprocessors/Session/session_common.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/session_common.c 2022-05-18 05:03:45.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/Session/session_common.h snort-2.9.20/src/preprocessors/Session/session_common.h --- snort-2.9.15.1/src/preprocessors/Session/session_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/session_common.h 2022-05-18 05:03:46.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -35,6 +35,7 @@ #include "session_api.h" #include "mempool.h" #include "sf_types.h" +#include "plugbase.h" #ifdef TARGET_BASED #include "target-based/sftarget_hostentry.h" @@ -254,6 +255,7 @@ uint32_t GetSessionMemCap( void ); void SessionFreeConfig( SessionConfiguration * ); int isPacketFilterDiscard( Packet *p, int ignore_any_rules ); +int isPacketFilterDiscardUdp( Packet *p, int ignore_any_rules ); typedef void ( *set_dir_ports_cb )( Packet *p, SessionControlBlock *scb ); typedef int ( *flush_stream_cb )( Packet *p, SessionControlBlock *scb ); diff -Nru snort-2.9.15.1/src/preprocessors/Session/session_expect.c snort-2.9.20/src/preprocessors/Session/session_expect.c --- snort-2.9.15.1/src/preprocessors/Session/session_expect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/session_expect.c 2022-05-18 05:03:47.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** AUTHOR: Steven Sturges ** @@ -99,6 +99,9 @@ uint16_t port1; uint16_t port2; uint32_t protocol; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierid; +#endif } ExpectHashKey; typedef struct _ExpectNode @@ -258,6 +261,9 @@ hashKey.port1 = cliPort; sfaddr_copy_to_raw(&hashKey.ip2, srvIP); hashKey.port2 = srvPort; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + hashKey.carrierid = GET_OUTER_IPH_PROTOID(ctrlPkt, pkth); +#endif reversed_key = 0; } else @@ -266,6 +272,9 @@ hashKey.port1 = srvPort; sfaddr_copy_to_raw(&hashKey.ip2, cliIP); hashKey.port2 = cliPort; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + hashKey.carrierid = GET_OUTER_IPH_PROTOID(ctrlPkt, pkth); +#endif reversed_key = 1; DEBUG_WRAP(DebugMessage(DEBUG_STREAM, "reversed\n");); } @@ -609,8 +618,13 @@ sfip_ntop(srcIP, src_ip, sizeof(src_ip)); sfip_ntop(dstIP, dst_ip, sizeof(dst_ip)); +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + DebugMessage(DEBUG_STREAM, "Checking isExpected %s-%u -> %s-%u %u %u\n", src_ip, + p->sp, dst_ip, p->dp, GET_IPH_PROTO(p), GET_OUTER_IPH_PROTOID(p, pkth)); +#else DebugMessage(DEBUG_STREAM, "Checking isExpected %s-%u -> %s-%u %u\n", src_ip, p->sp, dst_ip, p->dp, GET_IPH_PROTO(p)); +#endif } #endif @@ -623,6 +637,9 @@ hashKey.port2 = 0; port1 = 0; port2 = p->sp; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + hashKey.carrierid = GET_OUTER_IPH_PROTOID(p, pkth); +#endif reversed_key = 1; DEBUG_WRAP(DebugMessage(DEBUG_STREAM, "reversed\n");); } @@ -634,6 +651,9 @@ hashKey.port2 = p->dp; port1 = p->sp; port2 = 0; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + hashKey.carrierid = GET_OUTER_IPH_PROTOID(p, pkth); +#endif reversed_key = 0; } hashKey.protocol = (uint32_t)GET_IPH_PROTO(p); diff -Nru snort-2.9.15.1/src/preprocessors/Session/session_expect.h snort-2.9.20/src/preprocessors/Session/session_expect.h --- snort-2.9.15.1/src/preprocessors/Session/session_expect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/session_expect.h 2022-05-18 05:03:48.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. ** AUTHOR: Steven Sturges ** diff -Nru snort-2.9.15.1/src/preprocessors/Session/snort_session.c snort-2.9.20/src/preprocessors/Session/snort_session.c --- snort-2.9.15.1/src/preprocessors/Session/snort_session.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/snort_session.c 2022-05-18 05:03:49.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. ** AUTHOR: Steven Sturges ** diff -Nru snort-2.9.15.1/src/preprocessors/Session/snort_session.h snort-2.9.20/src/preprocessors/Session/snort_session.h --- snort-2.9.15.1/src/preprocessors/Session/snort_session.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/snort_session.h 2022-05-18 05:03:50.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/Session/stream5_ha.c snort-2.9.20/src/preprocessors/Session/stream5_ha.c --- snort-2.9.15.1/src/preprocessors/Session/stream5_ha.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/stream5_ha.c 2022-05-18 05:03:51.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/Session/stream5_ha.h snort-2.9.20/src/preprocessors/Session/stream5_ha.h --- snort-2.9.15.1/src/preprocessors/Session/stream5_ha.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Session/stream5_ha.h 2022-05-18 05:03:52.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/Makefile.in snort-2.9.20/src/preprocessors/Stream6/Makefile.in --- snort-2.9.15.1/src/preprocessors/Stream6/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/preprocessors/Stream6 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -117,7 +127,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -166,6 +176,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -211,6 +222,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -340,14 +352,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/preprocessors/Stream6/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/preprocessors/Stream6/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -374,10 +385,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -440,7 +451,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -589,6 +603,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_icmp.c snort-2.9.20/src/preprocessors/Stream6/snort_stream_icmp.c --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_icmp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_icmp.c 2022-05-18 05:04:25.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -30,6 +30,7 @@ #include "mstring.h" #include "sfxhash.h" #include "util.h" +#include "memory_stats.h" #include "spp_session.h" #include "session_api.h" @@ -207,6 +208,7 @@ session_api->free_application_data(ssn); s5stats.icmp_sessions_released++; + s5stats.active_icmp_sessions--; } uint32_t StreamGetIcmpPrunes(void) @@ -243,7 +245,8 @@ if (config == NULL) return; - free(config); + SnortPreprocFree(config, sizeof(StreamIcmpConfig), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); } int StreamVerifyIcmpConfig(StreamIcmpConfig *config, tSfPolicyId policy_id) @@ -262,12 +265,20 @@ int StreamProcessIcmp(Packet *p) { - int status; + int status = 0; switch (p->icmph->type) { case ICMP_DEST_UNREACH: - status = ProcessIcmpUnreach(p); + s5stats.icmp_unreachable++; + if (p->icmph->code != ICMP_FRAG_NEEDED) + { + status = ProcessIcmpUnreach(p); + } + else + { + s5stats.icmp_unreachable_code4++; + } break; case ICMP_ECHO: @@ -277,7 +288,6 @@ default: /* We only handle the above ICMP messages with stream5 */ - status = 0; break; } @@ -368,6 +378,7 @@ ssn->ha_state.session_flags |= SSNFLAG_DROP_CLIENT; ssn->ha_state.session_flags |= SSNFLAG_DROP_SERVER; ssn->session_state |= STREAM_STATE_UNREACH; + s5stats.active_icmp_sessions++; } return 0; @@ -377,6 +388,7 @@ { //SessionKey skey; //SessionControlBlock *ssn = NULL; + s5stats.active_icmp_sessions++; return 0; } @@ -436,3 +448,10 @@ } #endif +size_t get_icmp_used_mempool() +{ + if (icmp_lws_cache && icmp_lws_cache->protocol_session_pool) + return icmp_lws_cache->protocol_session_pool->used_memory; + + return 0; +} diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_icmp.h snort-2.9.20/src/preprocessors/Stream6/snort_stream_icmp.h --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_icmp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_icmp.h 2022-05-18 05:04:26.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -44,4 +44,6 @@ void SessionICMPReload(uint32_t max_sessions, uint16_t pruningTimeout, uint16_t nominalTimeout); unsigned SessionICMPReloadAdjust(unsigned maxWork); +size_t get_icmp_used_mempool(); + #endif /* STREAM_ICMP_H_ */ diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_ip.c snort-2.9.20/src/preprocessors/Stream6/snort_stream_ip.c --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_ip.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_ip.c 2022-05-18 05:04:27.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * -* Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +* Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -40,6 +40,7 @@ #include "sfxhash.h" #include "sf_types.h" #include "snort_debug.h" +#include "memory_stats.h" #include "spp_session.h" #include "session_api.h" @@ -153,6 +154,7 @@ scb->expire_time = 0; scb->ha_state.ignore_direction = 0; + s5stats.active_ip_sessions--; } @@ -171,7 +173,11 @@ { setNapRuntimePolicy(getDefaultPolicy()); - return session_api->create_session(ip_lws_cache, NULL, key); + SessionControlBlock *scb = session_api->create_session(ip_lws_cache, NULL, key); + if (scb) + s5stats.active_ip_sessions++; + + return scb; } static int StreamIPDeleteSession (const SessionKey *key) @@ -181,7 +187,10 @@ if( scb != NULL ) { if( StreamSetRuntimeConfiguration(scb, scb->protocol) == 0 ) + { session_api->delete_session(ip_lws_cache, scb, "ha sync", false); + s5stats.active_ip_sessions--; + } else WarningMessage(" WARNING: Attempt to delete an IP Session when no valid runtime configuration\n" ); } @@ -251,7 +260,8 @@ if (config == NULL) return; - free(config); + SnortPreprocFree(config, sizeof(StreamIpConfig), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); } int StreamVerifyIpConfig (StreamIpConfig* config, tSfPolicyId policy_id) @@ -292,6 +302,7 @@ "Stream IP session initialized!\n");); s5stats.total_ip_sessions++; + s5stats.active_ip_sessions++; IP_COPY_VALUE(scb->client_ip, GET_SRC_IP(p)); IP_COPY_VALUE(scb->server_ip, GET_DST_IP(p)); } @@ -515,3 +526,10 @@ } #endif +size_t get_ip_used_mempool() +{ + if (ip_lws_cache && ip_lws_cache->protocol_session_pool) + return ip_lws_cache->protocol_session_pool->used_memory; + + return 0; +} diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_ip.h snort-2.9.20/src/preprocessors/Stream6/snort_stream_ip.h --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_ip.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_ip.h 2022-05-18 05:04:28.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -51,4 +51,6 @@ void SessionIPReload(uint32_t max_sessions, uint16_t pruningTimeout, uint16_t nominalTimeout); unsigned SessionIPReloadAdjust(unsigned maxWork); +size_t get_ip_used_mempool(); + #endif diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_tcp.c snort-2.9.20/src/preprocessors/Stream6/snort_stream_tcp.c --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_tcp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_tcp.c 2022-05-18 05:04:29.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -66,6 +66,7 @@ #include "generators.h" #include "event_queue.h" #include "snort.h" +#include "memory_stats.h" #include "parser/IpAddrSet.h" #include "decode.h" @@ -207,6 +208,7 @@ #define EVENT_BAD_ACK 0x00008000 #define EVENT_DATA_AFTER_RST_RCVD 0x00010000 #define EVENT_WINDOW_SLAM 0x00020000 +#define EVENT_WIN_SZ_0_TCP_FIN_WAIT_1 0x00040000 #define TF_NONE 0x0000 #define TF_WSCALE 0x0001 @@ -394,6 +396,7 @@ // TBD move out of here since only used per packet? StreamSegment* seglist_next; /* next queued segment to flush */ + StreamSegment *held_segment; /* blocked segment of http connection */ #ifdef DEBUG int segment_ordinal; #endif @@ -455,7 +458,7 @@ int32_t egress_group; /* Index of the outbound group. */ uint32_t daq_flags; /* Flags for the packet (DAQ_PKT_FLAG_*) */ void *priv_ptr; /* private data pointer. used in pinhole */ -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src; uint16_t address_space_id_dst; #else @@ -470,6 +473,16 @@ uint8_t pp_flags; } TcpSession; + #ifdef HAVE_DAQ_ADDRESS_SPACE_ID + TcpSession initialization ={ + .ingress_index = DAQ_PKTHDR_UNKNOWN, + .egress_index = DAQ_PKTHDR_UNKNOWN, + .ingress_group = DAQ_PKTHDR_UNKNOWN, + .egress_group = DAQ_PKTHDR_UNKNOWN + }; + + #endif + #define SL_BUF_FLUSHED 1 static inline int SetupOK (const StreamTracker* st) @@ -723,7 +736,8 @@ #ifndef DYNAMIC_RANDOM_FLUSH_POINTS flush_point_list->current = 0; - flush_point_list->flush_points = SnortAlloc(sizeof(uint32_t) * RAND_FLUSH_POINTS); + flush_point_list->flush_points = SnortPreprocAlloc(RAND_FLUSH_POINTS, sizeof(uint32_t), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); for (i=0;irun_flags & RUN_FLAG__STATIC_HASH) @@ -1262,7 +1276,10 @@ if( scb != NULL ) { if( StreamSetRuntimeConfiguration( scb, scb->protocol ) == 0 ) - session_api->delete_session( tcp_lws_cache, scb, "ha sync", false ); + { + if (!session_api->delete_session( tcp_lws_cache, scb, "ha sync", false )) + s5stats.active_tcp_sessions--; + } else WarningMessage(" WARNING: Attempt to delete a TCP Session when no valid runtime configuration.\n" ); } @@ -1408,16 +1425,21 @@ /* Now add this context to the internal list */ if( config->policy_list == NULL ) { - config->policy_list = ( StreamTcpPolicy ** ) SnortAlloc( sizeof( StreamTcpPolicy * ) ); + config->policy_list = ( StreamTcpPolicy ** ) SnortPreprocAlloc(1, + sizeof( StreamTcpPolicy * ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); } else { uint32_t policyListSize = sizeof( StreamTcpPolicy * ) * ( config->num_policies ); - StreamTcpPolicy **tmpPolicyList = ( StreamTcpPolicy ** ) SnortAlloc( policyListSize ); + StreamTcpPolicy **tmpPolicyList = ( StreamTcpPolicy ** ) SnortPreprocAlloc(1, + policyListSize, PP_STREAM, + PP_MEM_CATEGORY_CONFIG); // copy the existing policies to new list, free old list and point to new... memcpy( tmpPolicyList, config->policy_list, policyListSize - sizeof( StreamTcpPolicy * ) ); - free( config->policy_list ); + SnortPreprocFree( config->policy_list, sizeof( StreamTcpPolicy * ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG ); config->policy_list = tmpPolicyList; } @@ -1427,7 +1449,9 @@ StreamTcpPolicy *initTcpPolicyInstance( void ) { - StreamTcpPolicy *tcp_policy = (StreamTcpPolicy *) SnortAlloc(sizeof(StreamTcpPolicy)); + StreamTcpPolicy *tcp_policy = (StreamTcpPolicy *) SnortPreprocAlloc(1, + sizeof(StreamTcpPolicy), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); /* Initialize flush policy to Ignore */ memcpy(&tcp_policy->flush_config, ignore_flush_policy, @@ -1440,9 +1464,8 @@ return tcp_policy; } -StreamTcpPolicy *StreamTcpPolicyClone( StreamTcpPolicy *master ) +StreamTcpPolicy *StreamTcpPolicyClone( StreamTcpPolicy *master, StreamConfig *config ) { - StreamConfig *config; StreamTcpPolicy *clone = initTcpPolicyInstance( ); clone->policy = master->policy; @@ -1459,7 +1482,6 @@ clone->max_consec_small_seg_size = master->max_consec_small_seg_size; memcpy(clone->small_seg_ignore, master->small_seg_ignore, sizeof(master->small_seg_ignore)); - config = (StreamConfig *) sfPolicyUserDataGet(stream_online_config, getParserPolicy( snort_conf )); addStreamTcpPolicyToList( config->tcp_config, clone ); return clone; @@ -2639,18 +2661,23 @@ { StreamTcpPolicy *policy = config->policy_list[i]; - free(policy->flush_point_list.flush_points); + SnortPreprocFree(policy->flush_point_list.flush_points, + sizeof(uint32_t) * RAND_FLUSH_POINTS, PP_STREAM, + PP_MEM_CATEGORY_CONFIG); if (policy->bound_addrs != NULL) sfvar_free(policy->bound_addrs); - free(policy); + SnortPreprocFree(policy, sizeof( StreamTcpPolicy * ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); } if ( config->paf_config ) s5_paf_delete(config->paf_config); - free(config->policy_list); - free(config); + SnortPreprocFree(config->policy_list, + sizeof(StreamTcpPolicy *) * (config->num_policies), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); + SnortPreprocFree(config, sizeof(StreamTcpConfig), PP_STREAM, PP_MEM_CATEGORY_CONFIG); } #ifdef STREAM_DEBUG_ENABLED @@ -3095,6 +3122,22 @@ NULL); /* rule info ptr */ } +static inline void EventWindowZeroAfterFinAck (StreamTcpPolicy *s5TcpPolicy) +{ + if(!(s5TcpPolicy->flags & STREAM_CONFIG_ENABLE_ALERTS)) + return; + + s5stats.events++; + + SnortEventqAdd(GENERATOR_SPP_STREAM, /* GID */ + STREAM_WIN_SZ_0_TCP_FIN_WAIT_1, /* SID */ + 1, /* rev */ + 0, /* class */ + 3, /* priority */ + STREAM_WIN_SZ_0_TCP_FIN_WAIT_1_STR, /* event msg */ + NULL); /* rule info ptr */ +} + static inline void EventNo3whs (StreamTcpPolicy *s5TcpPolicy) { if(!(s5TcpPolicy->flags & STREAM_CONFIG_ENABLE_ALERTS)) @@ -3420,7 +3463,8 @@ #ifdef HAVE_DAQ_ADDRESS_SPACE_ID static inline void SetPacketHeaderFoo (TcpSession* tcpssn, const Packet* p) { - if ( ( p->packet_flags & PKT_FROM_CLIENT ) || p->pkth->egress_index == DAQ_PKTHDR_UNKNOWN ) + if ((( p->packet_flags & PKT_FROM_CLIENT ) || (p->pkth->egress_index == DAQ_PKTHDR_UNKNOWN)) + && (p->pkth->egress_group == DAQ_PKTHDR_UNKNOWN )) { tcpssn->ingress_index = p->pkth->ingress_index; tcpssn->ingress_group = p->pkth->ingress_group; @@ -3437,12 +3481,14 @@ } tcpssn->egress_index = p->pkth->ingress_index; tcpssn->egress_group = p->pkth->ingress_group; + tcpssn->ingress_index = p->pkth->egress_index; + tcpssn->ingress_group = p->pkth->egress_group; } #ifdef HAVE_DAQ_FLOW_ID tcpssn->daq_flow_id = p->pkth->flow_id; #endif tcpssn->daq_flags = p->pkth->flags; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) tcpssn->address_space_id_dst = p->pkth->address_space_id_dst; tcpssn->address_space_id_src = p->pkth->address_space_id_src; #else @@ -3454,7 +3500,8 @@ const TcpSession* tcpssn, const DAQ_PktHdr_t* phdr, EncodeFlags fwd, DAQ_PktHdr_t* pkth, uint32_t dir) { - if ( (dir & PKT_FROM_CLIENT) || tcpssn->egress_index == DAQ_PKTHDR_UNKNOWN ) + if (((dir & PKT_FROM_CLIENT) || (tcpssn->egress_index == DAQ_PKTHDR_UNKNOWN)) + && (tcpssn->egress_group == DAQ_PKTHDR_UNKNOWN)) { pkth->ingress_index = tcpssn->ingress_index; pkth->ingress_group = tcpssn->ingress_group; @@ -3473,7 +3520,7 @@ #endif pkth->flags = tcpssn->daq_flags; pkth->priv_ptr = tcpssn->priv_ptr; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) pkth->address_space_id_dst = tcpssn->address_space_id_dst; pkth->address_space_id_src = tcpssn->address_space_id_src; #else @@ -3483,6 +3530,10 @@ pkth->proto = phdr->proto; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) && defined(DAQ_VERSION) && DAQ_VERSION > 10 + pkth->carrier_id = phdr->carrier_id; +#endif + #ifdef HAVE_DAQ_REAL_ADDRESSES if (phdr->flags & DAQ_PKT_FLAG_REAL_ADDRESSES) { @@ -4006,10 +4057,6 @@ if (SEQ_GT(tdb->end_seq, snd->l_nxt_seq)) snd->l_nxt_seq = tdb->end_seq; - if (!SEQ_EQ(snd->r_win_base, tdb->ack)) - { - snd->small_seg_count = 0; - } #ifdef S5_PEDANTIC if ( SEQ_GT(tdb->ack, snd->r_win_base) && SEQ_LEQ(tdb->ack, snd->r_nxt_ack) ) @@ -4056,7 +4103,7 @@ dropped += seg->caplen - 1; // seg contains 1st byte session_mem_in_use -= dropped; - free(seg); + SnortPreprocFree(seg, dropped, PP_STREAM, PP_MEM_CATEGORY_SESSION); s5stats.tcp_streamsegs_released++; STREAM_DEBUG_WRAP( DebugMessage(DEBUG_STREAM_STATE, @@ -4344,6 +4391,210 @@ return bytes_processed; } +static inline unsigned int getSegmentFlushSize( + StreamTracker* st, + StreamSegment *ss, + uint32_t to_seq, + unsigned int flushBufSize + ) +{ + unsigned int flushSize = ss->size; + + //copy only till flush buffer gets full + if ( flushSize > flushBufSize ) + flushSize = flushBufSize; + + // copy only to flush point + if ( s5_paf_active(&st->paf_state) && SEQ_GT(ss->seq + flushSize, to_seq) ) + flushSize = to_seq - ss->seq; + + return flushSize; +} + +static int PseudoFlushStream( + Packet* p, StreamTracker *st, uint32_t toSeq, + uint8_t *flushbuf, const uint8_t *flushbuf_end) +{ + StreamSegment *ss = NULL, *seglist; + uint16_t bytes_flushed = 0; + uint32_t flushbuf_size, bytes_to_copy; + int ret; + PROFILE_VARS; + + if ( st->seglist == NULL || st->seglist_tail == NULL ) + return -1; + + PREPROC_PROFILE_START(s5TcpBuildPacketPerfStats); + + // skip over previously pseudo flushed segments + seglist = st->seglist_next; + + for(ss = seglist; ss && SEQ_LT(ss->seq, toSeq); ss = ss->next) + { + flushbuf_size = flushbuf_end - flushbuf; + bytes_to_copy = getSegmentFlushSize(st, ss, toSeq, flushbuf_size); + + STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "Copying %u bytes for pseudo flushing from %X\n", + bytes_to_copy, ss->seq);); + + ret = SafeMemcpy(flushbuf, ss->payload, + bytes_to_copy, flushbuf, flushbuf_end); + + if (ret == SAFEMEM_ERROR) + { + STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "ERROR writing flushbuf while pseudo flushing." + "Attempting to write flushbuf out of range!\n");); + } + else + { + flushbuf += bytes_to_copy; + } + + bytes_flushed += bytes_to_copy; + if (ss->next) + { + st->seglist_next = ss->next; + } + + if ( flushbuf >= flushbuf_end ) + break; + + if ( SEQ_EQ(ss->seq + bytes_to_copy, toSeq) ) + break; + + } + + PREPROC_PROFILE_END(s5TcpBuildPacketPerfStats); + return bytes_flushed; +} + +static inline void pseudo_flush( +TcpSession *tcpssn, StreamTracker *st, uint32_t bytes, Packet *p, + sfaddr_t* sip, sfaddr_t* dip, uint16_t sp, uint16_t dp, uint32_t dir) +{ + uint32_t start_seq; + uint32_t stop_seq; + uint32_t footprint = 0; + uint32_t bytes_processed = 0; + int32_t flushed_bytes; + StreamSegment *ss = NULL; + +#ifdef HAVE_DAQ_ADDRESS_SPACE_ID + DAQ_PktHdr_t pkth; +#endif + EncodeFlags enc_flags = 0; + PROFILE_VARS; + + if (!bytes) + { + STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "No bytes to pseudo flush\n");); + return; + } + PREPROC_PROFILE_START(s5TcpFlushPerfStats); + + if ( !p->packet_flags || (dir & p->packet_flags) ) + enc_flags = ENC_FLAG_FWD; + +#ifdef HAVE_DAQ_ADDRESS_SPACE_ID + GetPacketHeaderFoo(tcpssn, p->pkth, enc_flags, &pkth, dir); + Encode_Format_With_DAQ_Info(enc_flags, p, s5_pkt, PSEUDO_PKT_TCP, &pkth, 0); +#elif defined(HAVE_DAQ_ACQUIRE_WITH_META) + Encode_Format_With_DAQ_Info(enc_flags, p, s5_pkt, PSEUDO_PKT_TCP, 0); +#else + Encode_Format(enc_flags, p, s5_pkt, PSEUDO_PKT_TCP); +#endif + + s5_pkt_end = s5_pkt->data + s5_pkt->max_dsize; + + ss = st->seglist_next; + stop_seq = st->seglist_next->seq + bytes; + do + { + footprint = bytes; + if(footprint > s5_pkt->max_dsize) + { + /* this is as much as we can pack into a stream buffer */ + footprint = s5_pkt->max_dsize; + stop_seq = st->seglist_next->seq + footprint; + } + + STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "Attempting to pseudo flush %lu bytes\n", footprint);); + /* Capture the seq of the first octet before flush changes the sequence numbers */ + start_seq = htonl(st->seglist_next->seq); + + /* setup the pseudopacket payload */ + flushed_bytes = PseudoFlushStream(p, st, stop_seq, (uint8_t *)s5_pkt->data, s5_pkt_end); + + if(flushed_bytes == -1) + { + STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "Failed to pseudo flush the stream\n");); + return; + } + if (flushed_bytes == 0) + { + /* No more ACK'd data... bail */ + break; + } + + bytes_processed += flushed_bytes; + + ((TCPHdr *)s5_pkt->tcph)->th_seq = start_seq; + s5_pkt->packet_flags |= (PKT_REBUILT_STREAM|PKT_STREAM_EST); + s5_pkt->dsize = (uint16_t)flushed_bytes; + + s5_pkt->packet_flags |= PKT_PDU_TAIL; + s5_pkt->packet_flags |= PKT_PSEUDO_FLUSH; + + Encode_Update(s5_pkt); + + if(IS_IP4(s5_pkt)) + { + s5_pkt->inner_ip4h.ip_len = s5_pkt->iph->ip_len; + } + else + { + IP6RawHdr* ip6h = (IP6RawHdr*)s5_pkt->raw_ip6h; + if ( ip6h ) s5_pkt->inner_ip6h.len = ip6h->ip6plen; + } + + ((DAQ_PktHdr_t*)s5_pkt->pkth)->ts.tv_sec = st->seglist_next->tv.tv_sec; + ((DAQ_PktHdr_t*)s5_pkt->pkth)->ts.tv_usec = st->seglist_next->tv.tv_usec; + + s5_pkt->packet_flags |= dir; + s5_pkt->ssnptr = (void *) tcpssn->scb; +#ifdef TARGET_BASED + s5_pkt->application_protocol_ordinal = p->application_protocol_ordinal; +#endif + PREPROC_PROFILE_TMPEND(s5TcpFlushPerfStats); + { + int tmp_do_detect, tmp_do_detect_content; + PROFILE_VARS; + + PREPROC_PROFILE_START(s5TcpProcessRebuiltPerfStats); + tmp_do_detect = do_detect; + tmp_do_detect_content = do_detect_content; + + SnortEventqPush(); + Preprocess(s5_pkt); + SnortEventqPop(); + DetectReset(s5_pkt->data, s5_pkt->dsize); + + do_detect = tmp_do_detect; + do_detect_content = tmp_do_detect_content; + PREPROC_PROFILE_END(s5TcpProcessRebuiltPerfStats); + } + PREPROC_PROFILE_TMPSTART(s5TcpFlushPerfStats); + } while(bytes_processed < bytes); + + st->seglist_next = ss; + PREPROC_PROFILE_END(s5TcpFlushPerfStats); +} + static inline int _flush_to_seq ( TcpSession *tcpssn, StreamTracker *st, uint32_t bytes, Packet *p, @@ -4464,6 +4715,12 @@ if ((p->packet_flags & PKT_PDU_TAIL)) s5_pkt->packet_flags |= PKT_PDU_TAIL; + + /* Rebuilt packet with only and complete http-post header is set with PKT_EVAL_DROP, + * it will be used to evalute drop/allow packet by preprocs + */ + if (tcpssn->pp_flags & PP_HTTPINSPECT_PAF_FLUSH_POST_HDR) + s5_pkt->packet_flags |= PKT_EVAL_DROP; Encode_Update(s5_pkt); @@ -4643,6 +4900,12 @@ } st->flags &= ~TF_FIRST_PKT_MISSING; + if (p->packet_flags & PKT_PSEUDO_FLUSH) + { + pseudo_flush(tcpssn, st, bytes, p, sip, dip, sp, dp, dir); + return 0; + } + return _flush_to_seq(tcpssn, st, bytes, p, sip, dip, sp, dp, dir); } @@ -4742,26 +5005,6 @@ return flush_ackd(tcpssn, st, p, sip, dip, sp, dp, dir); } -static inline unsigned int getSegmentFlushSize( - StreamTracker* st, - StreamSegment *ss, - uint32_t to_seq, - unsigned int flushBufSize - ) -{ - unsigned int flushSize = ss->size; - - //copy only till flush buffer gets full - if ( flushSize > flushBufSize ) - flushSize = flushBufSize; - - // copy only to flush point - if ( s5_paf_active(&st->paf_state) && SEQ_GT(ss->seq + flushSize, to_seq) ) - flushSize = to_seq - ss->seq; - - return flushSize; -} - static int FlushStream( Packet* p, StreamTracker *st, uint32_t toSeq, uint8_t *flushbuf, const uint8_t *flushbuf_end) @@ -5081,6 +5324,8 @@ // update stats s5stats.tcp_streamtrackers_released++; + if (s5stats.active_tcp_sessions > 0 ) + s5stats.active_tcp_sessions--; StreamUpdatePerfBaseState(&sfBase, tcpssn->scb, TCP_STATE_CLOSED); RemoveStreamSession(&sfBase); @@ -5219,6 +5464,9 @@ memcpy(&((((DAQ_PktHdr_t*)p->pkth)->real_dIP).s6_addr), &(dstIp)->ia32[3], sizeof(uint32_t)); } ((DAQ_PktHdr_t*)p->pkth)->flags |= DAQ_PKT_FLAG_REAL_ADDRESSES; + + if( tcpssn->daq_flags & DAQ_PKT_FLAG_IGNORE_VLAN ) + ((DAQ_PktHdr_t*)p->pkth)->flags |= DAQ_PKT_FLAG_IGNORE_VLAN; } #endif @@ -5305,6 +5553,9 @@ memcpy(&((((DAQ_PktHdr_t*)p->pkth)->real_dIP).s6_addr), &(dstIp)->ia32[3], sizeof(uint32_t)); } ((DAQ_PktHdr_t*)p->pkth)->flags |= DAQ_PKT_FLAG_REAL_ADDRESSES; + + if( tcpssn->daq_flags & DAQ_PKT_FLAG_IGNORE_VLAN ) + ((DAQ_PktHdr_t*)p->pkth)->flags |= DAQ_PKT_FLAG_IGNORE_VLAN; } #endif @@ -5761,6 +6012,7 @@ scb->session_established = true; scb->proto_policy = s5TcpPolicy; s5stats.total_tcp_sessions++; + s5stats.active_tcp_sessions++; } else { @@ -5800,6 +6052,7 @@ scb->session_established = true; scb->proto_policy = s5TcpPolicy; s5stats.total_tcp_sessions++; + s5stats.active_tcp_sessions++; } else if (p->dsize > 0) { @@ -5810,6 +6063,7 @@ scb->session_established = true; scb->proto_policy = s5TcpPolicy; s5stats.total_tcp_sessions++; + s5stats.active_tcp_sessions++; } else if( ( ( ( ( StreamConfig * ) scb->stream_config )->tcp_config->session_on_syn || ( StreamPacketHasWscale(p) & TF_WSCALE ) ) @@ -5822,6 +6076,7 @@ scb->session_established = true; scb->proto_policy = s5TcpPolicy; s5stats.total_tcp_sessions++; + s5stats.active_tcp_sessions++; } else { @@ -6244,25 +6499,19 @@ seq++; /* new packet seq is below the last ack... */ - if ( SEQ_GT(st->r_win_base, seq) ) - { - //Received data segment whose seq no is less than already ACKed bytes - if(SEQ_GT(st->r_nxt_ack, seq)) - { - //We have already seen the data and this is a retransmission with different packet size - //Add the delta to seglist if the size is more than overlap - STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, - "segment overlaps ack'd data...\n");); - overlap = st->r_win_base - seq; - if(overlap >= p->dsize) - { - STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, - "full overlap on ack'd data, dropping segment\n");); - PREPROC_PROFILE_END(s5TcpInsertPerfStats); - return; - } - } - } + if ( SEQ_GT(st->r_win_base, seq) ) + { + STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "segment overlaps ack'd data...\n");); + overlap = st->r_win_base - tdb->seq; + if (overlap >= p->dsize) + { + STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "full overlap on ack'd data, dropping segment\n");); + PREPROC_PROFILE_END(s5TcpInsertPerfStats); + return; + } + } AddStreamNode(st, p, tdb, tcpssn, p->dsize, overlap, 0, tdb->seq+overlap, NULL, &ss); @@ -6371,6 +6620,7 @@ session_mem_in_use -= size; return NULL; } + /* Smack the older time'd out sessions */ if ( !session_api->prune_session_cache( tcp_lws_cache, p->pkth->ts.tv_sec, ( SessionControlBlock * ) p->ssnptr, 0 ) ) @@ -6380,8 +6630,13 @@ session_api->prune_session_cache(tcp_lws_cache, 0, (SessionControlBlock*) p->ssnptr, 1); } } + if (session_mem_in_use > stream_session_config->memcap) + { + session_mem_in_use -= size; + return NULL; + } - ss = SnortAlloc(size); + ss = SnortPreprocAlloc(1, size, PP_STREAM, PP_MEM_CATEGORY_SESSION); ss->tv.tv_sec = tv->tv_sec; ss->tv.tv_usec = tv->tv_usec; @@ -6464,6 +6719,8 @@ } ss = SegmentAlloc(p, &p->pkth->ts, p->pkth->caplen, p->pkth->pktlen, p->pkt); + if (!ss) + return STREAM_INSERT_ANOMALY; ss->data = ss->pkt + (p->data - p->pkt); ss->orig_dsize = p->dsize; @@ -6620,6 +6877,35 @@ StreamCallHandler(p, tcpssn->scb->handler[SE_EOF]); } +static inline bool IsRetransmitOfHeldSegment(Packet *p, TcpDataBlock *tdb, + StreamTracker *listener) +{ + StreamSegment *held_seg = listener->held_segment; + + if (held_seg == NULL) + return FALSE; + + if (held_seg->seq == tdb->seq) + return TRUE; + + return FALSE; +} + +static bool IsTCPFastOpenPkt (Packet *p) +{ + uint8_t opt_count = 0; + + while (opt_count < p->tcp_option_count) + { + if (p->tcp_options[opt_count].code == TCPOPT_TFO) + { + return TRUE; + } + opt_count++; + } + return FALSE; +} + static int StreamQueue(StreamTracker *st, Packet *p, TcpDataBlock *tdb, TcpSession *tcpssn) { @@ -7000,7 +7286,15 @@ p->packet_flags |= PKT_RETRANSMIT; #endif // All data was retransmitted - RetransmitProcess(p, tcpssn); + if (IsRetransmitOfHeldSegment(p, tdb, st)) + { + st->held_segment = NULL; + p->packet_flags |= PKT_PSEUDO_FLUSH; + } + else + { + RetransmitProcess(p, tcpssn); + } addthis = 0; break; } @@ -7104,7 +7398,15 @@ p->packet_flags |= PKT_RETRANSMIT; #endif // All data was retransmitted - RetransmitProcess(p, tcpssn); + if (IsRetransmitOfHeldSegment(p, tdb, st)) + { + st->held_segment = NULL; + p->packet_flags |= PKT_PSEUDO_FLUSH; + } + else + { + RetransmitProcess(p, tcpssn); + } addthis = 0; } @@ -7385,25 +7687,22 @@ return; } - if (s5TcpPolicy->max_consec_small_segs) + if ((s5TcpPolicy->max_consec_small_segs) && + /* check ignore_ports */ + !(s5TcpPolicy->small_seg_ignore[p->dp/8] & (1 << (p->dp %8)))) { - if (p->dsize < s5TcpPolicy->max_consec_small_seg_size) + if (p->dsize >= s5TcpPolicy->max_consec_small_seg_size) { - /* check ignore_ports */ - if (!(s5TcpPolicy->small_seg_ignore[p->dp/8] & (1 << (p->dp %8)))) + rcv->small_seg_count = 0; + } + else + { + if (++rcv->small_seg_count == s5TcpPolicy->max_consec_small_segs) { - rcv->small_seg_count++; - - if (rcv->small_seg_count > s5TcpPolicy->max_consec_small_segs) - { - /* Above threshold, log it... requires detect_anomalies be - * on in this TCP policy, action controlled by preprocessor - * rule. */ - EventMaxSmallSegsExceeded(s5TcpPolicy); - - /* Reset counter, so we're not too noisy */ - rcv->small_seg_count = 0; - } + /* Above threshold, log it... requires detect_anomalies be + * on in this TCP policy, action controlled by preprocessor + * rule. */ + EventMaxSmallSegsExceeded(s5TcpPolicy); } } } @@ -7492,29 +7791,19 @@ if ( SEQ_GT(rcv->r_win_base, tdb->seq) ) { - //Received data segment whose seq no is less than already ACKed bytes - if(SEQ_GT(rcv->r_nxt_ack, tdb->seq)) - { - //We have already seen the data and this is a retransmission with different packet size - //Add the packet to seglist if the size is more than offset - uint32_t offset = rcv->r_win_base - tdb->seq; - if ( offset < p->dsize ) - { - tdb->seq += offset; - p->data += offset; - p->dsize -= (uint16_t)offset; - StreamQueue(rcv, p, tdb, tcpssn); - - //Restore the original seq and dsize before the packet is egressed - p->dsize += (uint16_t)offset; - p->data -= offset; - tdb->seq -= offset; - } - } - else + uint32_t offset = rcv->r_win_base - tdb->seq; + + if ( offset < p->dsize ) { - //We have NOT seen the data. Add it to stream queue + tdb->seq += offset; + p->data += offset; + p->dsize -= (uint16_t)offset; + StreamQueue(rcv, p, tdb, tcpssn); + + p->dsize += (uint16_t)offset; + p->data -= offset; + tdb->seq -= offset; } } else @@ -7591,7 +7880,7 @@ "In ProcessTcpData()\n");); PREPROC_PROFILE_START(s5TcpDataPerfStats); - if ((p->tcph->th_flags & TH_SYN) && (listener->os_policy != STREAM_POLICY_MACOS)) + if (!IsTCPFastOpenPkt(p) && (p->tcph->th_flags & TH_SYN) && (listener->os_policy != STREAM_POLICY_MACOS)) { STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, "Bailing, data on SYN, not MAC Policy!\n");); @@ -8309,6 +8598,60 @@ return 0; } +/* set_service_based_flush_policy + * + * Once appid detects the protocol, calling this api + * to set the respective paf apis. + * If paf function pointer already pointed to the + * correct paf api, not going to set again. + */ +void set_service_based_flush_policy(SessionControlBlock *scb) +{ + TcpSession *tcp_session = NULL; + StreamTracker* pst; + uint8_t flush_policy; + int ret; + +#ifdef TARGET_BASED + if (scb->proto_specific_data) + tcp_session = scb->proto_specific_data->data; + + if (tcp_session == NULL) + return; + + if (tcp_session->client.tcp_policy->flush_config_protocol[scb->ha_state.application_protocol].configured == 1) + { + pst = &tcp_session->server; + ret = cb_mask_cmp(((StreamConfig *)scb->stream_config)->tcp_config->paf_config, + scb->ha_state.application_protocol, true, pst->paf_state.cb_mask); + if (ret <= 0) + { + return; + } + + flush_policy = + pst->tcp_policy->flush_config_protocol[scb->ha_state.application_protocol].client.flush_policy; + InitFlushMgrByService(scb, pst, scb->ha_state.application_protocol, true, flush_policy); + } + + if (tcp_session->server.tcp_policy->flush_config_protocol[scb->ha_state.application_protocol].configured == 1) + { + pst = &tcp_session->client; + ret = cb_mask_cmp(((StreamConfig *)scb->stream_config)->tcp_config->paf_config, + scb->ha_state.application_protocol, false, pst->paf_state.cb_mask); + if (ret <= 0) + { + return; + } + + flush_policy = + pst->tcp_policy->flush_config_protocol[scb->ha_state.application_protocol].server.flush_policy; + InitFlushMgrByService(scb, pst, scb->ha_state.application_protocol, false, flush_policy); + } +#endif +} + + static int RepeatedSyn( StreamTracker *listener, StreamTracker *talker, TcpDataBlock *tdb, TcpSession *tcpssn) @@ -8438,6 +8781,9 @@ if (eventcode & EVENT_WINDOW_SLAM) EventWindowSlam(s5TcpPolicy); + + if (eventcode & EVENT_WIN_SZ_0_TCP_FIN_WAIT_1) + EventWindowZeroAfterFinAck(s5TcpPolicy); } static inline void DisableInspection (SessionControlBlock *scb, Packet* p, char ignore) @@ -8488,7 +8834,7 @@ tcpssn = (TcpSession *)scb->proto_specific_data->data; PREPROC_PROFILE_START(s5TcpStatePerfStats); - + if (tcpssn == NULL) { if ( ScPafEnabled() ) @@ -8920,7 +9266,7 @@ } /* Handle data on SYN */ - if ((p->dsize) && TCP_ISFLAGSET(p->tcph, TH_SYN)) + if (!IsTCPFastOpenPkt(p) && p->dsize && TCP_ISFLAGSET(p->tcph, TH_SYN)) { /* MacOS accepts data on SYN, so don't alert if policy is MACOS */ if (StreamGetPolicy(scb, s5TcpPolicy, FROM_CLIENT) != @@ -9333,34 +9679,35 @@ break; case TCP_STATE_ESTABLISHED: - case TCP_STATE_CLOSE_WAIT: + /* Handle out-of-order/OOO ACK */ + if ((Normalize_GetMode(snort_conf, NORM_TCP_IPS) == NORM_MODE_ON) && + (SEQ_GT(tdb->ack, listener->l_nxt_seq))) + { + NormalDropPacket(p); + PREPROC_PROFILE_END(s5TcpStatePerfStats); + return retcode | ACTION_BAD_PKT; + } UpdateSsn(p, listener, talker, tdb); break; - case TCP_STATE_FIN_WAIT_1: + case TCP_STATE_CLOSE_WAIT: UpdateSsn(p, listener, talker, tdb); + break; + case TCP_STATE_FIN_WAIT_1: STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, "tdb->ack %X >= talker->r_nxt_ack %X\n", tdb->ack, talker->r_nxt_ack);); if ( SEQ_EQ(tdb->ack, listener->l_nxt_seq) ) { +#ifdef NORMALIZER if ( (listener->os_policy == STREAM_POLICY_WINDOWS) && (tdb->win == 0) ) { - eventcode |= EVENT_WINDOW_SLAM; - Discard(); - -#ifdef NORMALIZER - if ( NormalDropPacket(p) ) - { - LogTcpEvents(listener->tcp_policy, eventcode); - PREPROC_PROFILE_END(s5TcpStatePerfStats); - return retcode | ACTION_BAD_PKT; - } -#endif + eventcode |= EVENT_WIN_SZ_0_TCP_FIN_WAIT_1; } - +#endif + UpdateSsn(p, listener, talker, tdb); listener->s_mgr.state = TCP_STATE_FIN_WAIT_2; if ( (p->tcph->th_flags & TH_FIN) ) @@ -9391,13 +9738,13 @@ } else { + UpdateSsn(p, listener, talker, tdb); STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, "bad ack!\n");); } break; case TCP_STATE_FIN_WAIT_2: - UpdateSsn(p, listener, talker, tdb); if ( SEQ_GT(tdb->ack, listener->l_nxt_seq) ) { eventcode |= EVENT_BAD_ACK; @@ -9406,6 +9753,7 @@ PREPROC_PROFILE_END(s5TcpStatePerfStats); return retcode | ACTION_BAD_PKT; } + UpdateSsn(p, listener, talker, tdb); break; case TCP_STATE_CLOSING: @@ -9479,6 +9827,14 @@ retcode |= ACTION_BAD_PKT; NormalDropPacket(p); } + else if ((TCP_STATE_FIN_WAIT_1 == talker->s_mgr.state) && + SEQ_GEQ(tdb->seq, (listener->s_mgr.transition_seq - 1))) + { + /* Alert! : Data on a segment when we're not accepting data any more */ + eventcode |= EVENT_DATA_ON_CLOSED; + retcode |= ACTION_BAD_PKT; + NormalDropPacket(p); + } else { STREAM_DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, @@ -9647,6 +10003,10 @@ listener->s_mgr.transition_seq = tdb->end_seq + 1; listener->s_mgr.expected_flags = TH_ACK; break; + + case TCP_STATE_CLOSED: + listener->s_mgr.transition_seq = tdb->end_seq + 1; + break; } } } @@ -9683,13 +10043,17 @@ } switch ( listener->s_mgr.state ) { - case TCP_STATE_ESTABLISHED: - listener->s_mgr.state_queue = TCP_STATE_CLOSE_WAIT; - listener->s_mgr.transition_seq = tdb->end_seq + 1; - listener->s_mgr.expected_flags = TH_ACK; - break; - } - } + case TCP_STATE_ESTABLISHED: + listener->s_mgr.state_queue = TCP_STATE_CLOSE_WAIT; + listener->s_mgr.transition_seq = tdb->end_seq + 1; + listener->s_mgr.expected_flags = TH_ACK; + break; + + case TCP_STATE_CLOSED: + listener->s_mgr.transition_seq = tdb->end_seq + 1; + break; + } + } } } @@ -9975,6 +10339,34 @@ } #ifdef NORMALIZER +/* + * In case of Pre-ACK mode, check if we need to + * block packet so that the payload deos not reach endpoint without + * inspection. + */ +static inline bool check_to_hold_packet(Packet *pkt, PAF_Status paf_state, + StreamTracker *trk) +{ + if (((paf_state == PAF_PSEUDO_FLUSH_SEARCH) || + (paf_state == PAF_PSEUDO_FLUSH_SKIP)) && + !(pkt->packet_flags & PKT_PSEUDO_FLUSH)) + { + if(trk->held_segment != NULL) + return FALSE; + + return TRUE; + } + return FALSE; +} + +static inline void hold_packet(Packet *pkt, StreamTracker *trk, + StreamSegment *seg) +{ + trk->held_segment = seg; + pkt->packet_flags |= PKT_FAST_BLOCK; + Active_DropPacket(pkt); +} + // see flush_pdu_ackd() for details // the key difference is that we operate on forward moving data // because we don't wait until it is acknowledged @@ -9998,13 +10390,18 @@ uint32_t size = seg->size; uint32_t end = seg->seq + seg->size; uint32_t pos = s5_paf_position(&trk->paf_state); - + total += size; if ( s5_paf_initialized(&trk->paf_state) && SEQ_LEQ(end, pos) ) { - seg = seg->next; - continue; + if (!seg->next && pkt->packet_flags & PKT_PSEUDO_FLUSH) + { + *flags |= PKT_PSEUDO_FLUSH; + } else { + seg = seg->next; + continue; + } } //Used by h2_paf wire_packet = pkt; @@ -10012,6 +10409,12 @@ flush_pt = s5_paf_check( config->paf_config, &trk->paf_state, ssn->scb, seg->payload, size, total, seg->seq, srv_port, flags, trk->flush_mgr.flush_pt); + + if (check_to_hold_packet(pkt, trk->paf_state.paf, trk)) + { + hold_packet(pkt, trk, seg); + } + if (*flags & PKT_PURGE) { //For HTTP/2 case where stream doesnt flush the data @@ -10227,7 +10630,14 @@ } // if this payload is exactly one pdu, don't // actually flush, just use the raw packet - else if ( listener->seglist_next && + + /* + * For pseudo flush case, fall back to the regular + * flush routine which takes care of handling + * pseudo flush case. + */ + else if (!(p->packet_flags & PKT_PSEUDO_FLUSH) && + listener->seglist_next && (tdb->seq == listener->seglist_next->seq) && (flush_amt == listener->seglist_next->size) && (flush_amt == p->dsize) ) @@ -10238,6 +10648,13 @@ listener->flush_count++; } p->packet_flags |= flags & PKT_PDU_FULL; + /* Raw packet with only and complete http-post header is set with PKT_EVAL_DROP, + * it will be used to evalute drop/allow packet by preprocs + */ + if (listener->paf_state.fpt_eoh) + { + p->packet_flags |= PKT_EVAL_DROP; + } ShowRebuiltPacket(p); } else @@ -11009,6 +11426,7 @@ st = &tcpssn->client; st->xtradata_mask |= BIT(xid); + p->xtradata_mask |= BIT(xid); } void StreamClearExtraDataTcp (SessionControlBlock* scb, Packet* p, uint32_t xid) @@ -11382,7 +11800,8 @@ file_name, file_line, name); } - ssod = SnortAlloc(sizeof(StreamSizeOptionData)); + ssod = SnortPreprocAlloc(1, sizeof(StreamSizeOptionData), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); if (!ssod) { @@ -11588,7 +12007,8 @@ StreamSizeOptionData *ssod = dataPtr; if (ssod) { - free(ssod); + SnortPreprocFree(ssod, sizeof(StreamSizeOptionData), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); } } @@ -11613,7 +12033,8 @@ file_name, file_line, name); } - srod = SnortAlloc(sizeof(StreamReassembleRuleOptionData)); + srod = SnortPreprocAlloc(1, sizeof(StreamReassembleRuleOptionData), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); if (!srod) { @@ -11740,7 +12161,8 @@ StreamReassembleRuleOptionData *srod = dataPtr; if (srod) { - free(srod); + SnortPreprocFree(srod, sizeof(StreamReassembleRuleOptionData), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); } } @@ -11881,12 +12303,17 @@ NetworkReassemblyPorts *nrp = ( NetworkReassemblyPorts * ) data; if( nrp->ip != NULL ) free( nrp->ip ); - free( data ); + SnortPreprocFree( data, sizeof( NetworkReassemblyPorts ), + PP_STREAM, PP_MEM_CATEGORY_CONFIG ); } } static void StreamCreateReassemblyPortList( void ) { + //In SnortInit, we call ConfigurePreprocessors twice. The allocations done first need to be freed + if(targeted_nrps.size > 0) + StreamDestoryReassemblyPortList(); + sf_sdlist_init( &targeted_nrps, &freeNrpNode ); } @@ -11897,7 +12324,8 @@ static NetworkReassemblyPorts *initNetworkPortReassembly( sfcidr_t *ip, unsigned short port, int ra_dir ) { - NetworkReassemblyPorts *nrp = calloc( 1, sizeof( NetworkReassemblyPorts ) ); + NetworkReassemblyPorts *nrp = SnortPreprocAlloc( 1, sizeof( NetworkReassemblyPorts ), + PP_STREAM, PP_MEM_CATEGORY_CONFIG ); if( nrp == NULL ) { @@ -12045,7 +12473,8 @@ { // no existing policy for this network...create a new one by cloning // the default policy - policy = StreamTcpPolicyClone( config->tcp_config->default_policy ); + policy = StreamTcpPolicyClone( config->tcp_config->default_policy, + config ); } // init the ports registered specifically for this network... @@ -12070,14 +12499,15 @@ void enableRegisteredPortsForReassembly( struct _SnortConfig *sc ) { int idx; - StreamConfig *config = (StreamConfig *) sfPolicyUserDataGet(stream_online_config, getParserPolicy(sc)); + tSfPolicyUserContextId stream_cfg = (stream_parsing_config)? stream_parsing_config : stream_online_config; + StreamConfig *config = (StreamConfig *) sfPolicyUserDataGet(stream_cfg, getParserPolicy(sc)); // Since stream configs are inherited from the default, // we should attempt to fetch the default policy config // if the non-default lookup failed if (!config && getParserPolicy(sc) != getDefaultPolicy()) config = (StreamConfig *) sfPolicyUserDataGet( - stream_online_config, + stream_cfg, getDefaultPolicy() ); @@ -12219,3 +12649,11 @@ } #endif +size_t get_tcp_used_mempool() +{ + if (tcp_lws_cache && tcp_lws_cache->protocol_session_pool) + return tcp_lws_cache->protocol_session_pool->used_memory; + + return 0; +} + diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_tcp.h snort-2.9.20/src/preprocessors/Stream6/snort_stream_tcp.h --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_tcp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_tcp.h 2022-05-18 05:04:30.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -108,8 +108,12 @@ void SetFTPFileLocation(void *scbptr ,bool flush); +void set_service_based_flush_policy(SessionControlBlock *scb); + #ifdef HAVE_DAQ_DECRYPTED_SSL int StreamSimulatePeerTcpAckp( SessionControlBlock *scb, uint8_t dir, uint32_t tcp_payload_len ); #endif +size_t get_tcp_used_mempool(); + #endif /* STREAM_TCP_H_ */ diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_udp.c snort-2.9.20/src/preprocessors/Stream6/snort_stream_udp.c --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_udp.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_udp.c 2022-05-18 05:04:31.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ #include "sfxhash.h" #include "util.h" #include "decode.h" +#include "memory_stats.h" #include "spp_session.h" #include "session_api.h" @@ -91,6 +92,7 @@ static void StreamParseUdpArgs(StreamUdpConfig *, char *, StreamUdpPolicy *); static void StreamPrintUdpConfig(StreamUdpPolicy *); static int ProcessUdp(SessionControlBlock *, Packet *, StreamUdpPolicy *, SFXHASH_NODE *); +static int ProcessUdpCreate (Packet *); #ifdef ENABLE_HA @@ -103,7 +105,11 @@ { setNapRuntimePolicy(getDefaultPolicy()); - return session_api->create_session(udp_lws_cache, NULL, key ); + SessionControlBlock *scb = session_api->create_session(udp_lws_cache, NULL, key ); + if (scb) + s5stats.active_udp_sessions++; + + return scb; } static int StreamUDPDeleteSession(const SessionKey *key) @@ -113,7 +119,10 @@ if (scb) { if( StreamSetRuntimeConfiguration( scb, scb->protocol ) == 0 ) + { session_api->delete_session( udp_lws_cache, scb, "ha sync", false ); + s5stats.active_udp_sessions--; + } else WarningMessage(" WARNING: Attempt to delete a UDP Session when no valid runtime configuration.\n" ); } @@ -165,7 +174,8 @@ if (config == NULL) return; - s5UdpPolicy = (StreamUdpPolicy *)SnortAlloc(sizeof(StreamUdpPolicy)); + s5UdpPolicy = (StreamUdpPolicy *)SnortPreprocAlloc(1, + sizeof(StreamUdpPolicy), PP_STREAM, PP_MEM_CATEGORY_CONFIG); StreamParseUdpArgs(config, args, s5UdpPolicy); @@ -175,17 +185,21 @@ if (config->policy_list == NULL) { config->policy_list = - (StreamUdpPolicy **)SnortAlloc(sizeof(StreamUdpPolicy *)); + (StreamUdpPolicy **)SnortPreprocAlloc(1, sizeof(StreamUdpPolicy *), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); } else { StreamUdpPolicy **tmpPolicyList = - (StreamUdpPolicy **)SnortAlloc(sizeof(StreamUdpPolicy *) * config->num_policies); + (StreamUdpPolicy **)SnortPreprocAlloc(config->num_policies, + sizeof(StreamUdpPolicy *), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); memcpy(tmpPolicyList, config->policy_list, sizeof(StreamUdpPolicy *) * (config->num_policies - 1)); - free(config->policy_list); + SnortPreprocFree(config->policy_list, (config->num_policies - 1) * + sizeof(StreamUdpPolicy *), PP_STREAM, PP_MEM_CATEGORY_CONFIG); config->policy_list = tmpPolicyList; } @@ -405,6 +419,7 @@ session_api->free_application_data(scb); s5stats.udp_sessions_released++; + s5stats.active_udp_sessions--; RemoveUDPSession(&sfBase); } @@ -473,6 +488,7 @@ session_api->set_expire_timer(p, scb, s5UdpPolicy->session_timeout); s5stats.udp_sessions_created++; + s5stats.active_udp_sessions++; AddUDPSession(&sfBase); if (perfmon_config && (perfmon_config->perf_flags & SFPERF_FLOWIP)) @@ -552,19 +568,23 @@ s5UdpPolicy->session_timeout = timeout; } #endif + scb->proto_policy = s5UdpPolicy; + rc = isPacketFilterDiscard( p, s5UdpPolicy->flags & STREAM_CONFIG_IGNORE_ANY ); if( ( rc == PORT_MONITOR_PACKET_DISCARD ) && !StreamExpectIsExpected( p, &hash_node ) ) { //ignore the packet + scb->session_state &= ~STREAM_STATE_PORT_INSPECT; UpdateFilteredPacketStats(&sfBase, IPPROTO_UDP); session_api->set_expire_timer(p, scb, s5UdpPolicy->session_timeout); PREPROC_PROFILE_END(s5UdpPerfStats); return 0; } - + + scb->session_state |= STREAM_STATE_PORT_INSPECT; scb->session_established = true; - scb->proto_policy = s5UdpPolicy; s5stats.total_udp_sessions++; + s5stats.active_udp_sessions++; } p->ssnptr = scb; @@ -729,6 +749,105 @@ return ACTION_NOTHING; } +int ProcessUdpCreate (Packet *p) +{ + SFXHASH_NODE *hash_node = NULL; + SessionControlBlock *scb; + StreamUdpPolicy *s5UdpPolicy; + PROFILE_VARS; + + scb = p->ssnptr; + if (!scb) { + DEBUG_WRAP(DebugMessage(DEBUG_STREAM, "[Stream] Could not find Udp session Control block ")); + return 0; + } + + s5UdpPolicy = scb->proto_policy; + if (s5UdpPolicy == NULL) { + DEBUG_WRAP(DebugMessage(DEBUG_STREAM, + "[Stream] Could not find Udp Policy context " + "for IP %s\n", inet_ntoa(GET_DST_ADDR(p)));); + return 0; + } + + PREPROC_PROFILE_START(s5UdpPerfStats); + scb->session_established = true; + s5stats.total_udp_sessions++; + + /* + * Check if the session is expired. + */ + if (( scb->session_state & STREAM_STATE_TIMEDOUT ) + || StreamExpire( p, scb )) { + + scb->ha_state.session_flags |= SSNFLAG_TIMEDOUT; + + /* Session is timed out */ + DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "Stream UDP session timedout!\n");); + +#ifdef ENABLE_HA + /* Notify the HA peer of the session cleanup/reset by way of a deletion notification. */ + PREPROC_PROFILE_TMPEND(s5UdpPerfStats); + SessionHANotifyDeletion(scb); + PREPROC_PROFILE_TMPSTART(s5UdpPerfStats); + scb->ha_flags = (HA_FLAG_NEW | HA_FLAG_MODIFIED | HA_FLAG_MAJOR_CHANGE); +#endif + + /* Clean it up */ + UdpSessionCleanup(scb); + ProcessUdp(scb, p, s5UdpPolicy, hash_node); + + } else { + ProcessUdp(scb, p, s5UdpPolicy, hash_node); + DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, + "Finished Stream UDP cleanly!\n" + "---------------------------------------------------\n");); + } + MarkupPacketFlags(p, scb); + session_api->set_expire_timer(p, scb, s5UdpPolicy->session_timeout); + PREPROC_PROFILE_END(s5UdpPerfStats); + + return 0; +} + +void InspectPortFilterUdp (Packet *p) +{ + int rc; + SessionControlBlock *scb; + StreamUdpPolicy *s5UdpPolicy; + + scb = p->ssnptr; + if (!scb) { + DEBUG_WRAP(DebugMessage(DEBUG_STREAM,"[Stream] Sesssion control does not exist")); + return; + } + + s5UdpPolicy = scb->proto_policy; + if (s5UdpPolicy == NULL) { + DEBUG_WRAP(DebugMessage(DEBUG_STREAM, + "[Stream] Could not find Udp Policy context " + "for IP %s\n", inet_ntoa(GET_DST_ADDR(p)));); + return; + } + // If NAP had set port to be filtered, now check IPS portlist. + if (!(scb->session_state & STREAM_STATE_PORT_INSPECT)) { + + rc = isPacketFilterDiscardUdp(p, s5UdpPolicy->flags & STREAM_CONFIG_IGNORE_ANY); + if (rc == PORT_MONITOR_PACKET_PROCESS) { + // Port is not present in NAP, but present in IPS portlist, flow will be tracked. + scb->session_state |= STREAM_STATE_PORT_INSPECT; + // Complete UDP session/flow creation as it needs to tracked. + ProcessUdpCreate(p); + } + /* + * If return value from isPacketFilterDiscardUdp() was PORT_MONITOR_PACKET_DISCARD, + * packet is marked either inspected/filtered, based NAP/IPS portlist flag evaluation. + */ + } + return; +} + void UdpUpdateDirection(SessionControlBlock *ssn, char dir, sfaddr_t* ip, uint16_t port) { UdpSession *udpssn = (UdpSession *)ssn->proto_specific_data->data; @@ -790,6 +909,15 @@ return PORT_MONITOR_NONE; } +int s5UdpGetIPSPortFilterStatus(struct _SnortConfig *sc, unsigned short sport, unsigned short dport, tSfPolicyId policyId) +{ + if ( sc->udp_ips_port_filter_list && sc->udp_ips_port_filter_list[policyId] ) + return ( ((int) sc->udp_ips_port_filter_list[policyId]->port_filter[ sport ]) | + ((int) sc->udp_ips_port_filter_list[policyId]->port_filter[ dport ]) ) ; + else + return PORT_MONITOR_NONE; +} + void StreamUdpConfigFree(StreamUdpConfig *config) { int i; @@ -804,11 +932,15 @@ if (policy->bound_addrs != NULL) sfvar_free(policy->bound_addrs); - free(policy); + SnortPreprocFree(policy, sizeof(StreamUdpPolicy), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); } - free(config->policy_list); - free(config); + SnortPreprocFree(config->policy_list, config->num_policies * + sizeof(StreamUdpPolicy *), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); + SnortPreprocFree(config, sizeof(StreamUdpConfig), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); } #ifdef SNORT_RELOAD @@ -832,3 +964,10 @@ } #endif +size_t get_udp_used_mempool() +{ + if (udp_lws_cache && udp_lws_cache->protocol_session_pool) + return udp_lws_cache->protocol_session_pool->used_memory; + + return 0; +} diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_udp.h snort-2.9.20/src/preprocessors/Stream6/snort_stream_udp.h --- snort-2.9.15.1/src/preprocessors/Stream6/snort_stream_udp.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/snort_stream_udp.h 2022-05-18 05:04:32.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -57,6 +57,12 @@ tSfPolicyId policyId, int parsing ); +int s5UdpGetIPSPortFilterStatus( + struct _SnortConfig *sc, + unsigned short sport, + unsigned short dport, + tSfPolicyId policyId); +void InspectPortFilterUdp (Packet *p); void StreamUdpConfigFree(StreamUdpConfig *); uint32_t StreamGetUdpPrunes(void); @@ -66,4 +72,6 @@ void SessionUDPReload(uint32_t max_sessions, uint16_t pruningTimeout, uint16_t nominalTimeout); unsigned SessionUDPReloadAdjust(unsigned maxWork); +size_t get_udp_used_mempool(); + #endif /* STREAM_UDP_H_ */ diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/stream_common.c snort-2.9.20/src/preprocessors/Stream6/stream_common.c --- snort-2.9.15.1/src/preprocessors/Stream6/stream_common.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/stream_common.c 2022-05-18 05:04:33.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ #include "generators.h" #include "event_queue.h" #include "snort.h" +#include "memory_stats.h" #include "session_api.h" @@ -501,7 +502,8 @@ { IgnoredRuleList *ignored_rule; - ignored_rule = SnortAlloc(sizeof(*ignored_rule)); + ignored_rule = SnortPreprocAlloc(1, sizeof(*ignored_rule), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); ignored_rule->otn = otn; ignored_rule->next = *ppIgnoredRuleList; *ppIgnoredRuleList = ignored_rule; @@ -555,7 +557,8 @@ } } next_ignored_rule = ignored_rule->next; - free(ignored_rule); + SnortPreprocFree(ignored_rule, sizeof(*ignored_rule), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); ignored_rule = next_ignored_rule; } @@ -620,7 +623,7 @@ config->ip_config = NULL; } - free(config); + SnortPreprocFree(config, sizeof(*config), PP_STREAM, PP_MEM_CATEGORY_CONFIG); } int StreamSetRuntimeConfiguration( SessionControlBlock *scb, uint8_t protocol ) @@ -636,3 +639,25 @@ return 0; } +bool getStreamIgnoreAnyConfig (struct _SnortConfig *sc, IpProto protocol) +{ + StreamConfig *config; + tSfPolicyId policyId; + + for (policyId = 0; policyId < sfPolicyNumAllocated(sc->policy_config); policyId++) { + + if ((config = getStreamPolicyConfig(policyId, 0))) { + switch (protocol) { + case IPPROTO_TCP : + if ((config->tcp_config) && (config->tcp_config->default_policy->flags & STREAM_CONFIG_IGNORE_ANY)) + return true; + case IPPROTO_UDP : + if ((config->udp_config) && (config->udp_config->default_policy->flags & STREAM_CONFIG_IGNORE_ANY)) + return true; + default: + break; + } + } + } + return false; +} diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/stream_common.h snort-2.9.20/src/preprocessors/Stream6/stream_common.h --- snort-2.9.15.1/src/preprocessors/Stream6/stream_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/stream_common.h 2022-05-18 05:04:35.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -125,6 +125,7 @@ #define STREAM_STATE_MIDSTREAM 0x0040 #define STREAM_STATE_TIMEDOUT 0x0080 #define STREAM_STATE_UNREACH 0x0100 +#define STREAM_STATE_PORT_INSPECT 0x0200 #define STREAM_STATE_CLOSED 0x0800 /* D A T A S T R U C T U R E S **********************************/ @@ -314,6 +315,13 @@ uint32_t ip_timeouts; uint32_t events; uint32_t internalEvents; + uint32_t active_tcp_sessions; + uint64_t active_tcp_memory; + uint32_t active_udp_sessions; + uint32_t active_icmp_sessions; + uint32_t active_ip_sessions; + uint32_t icmp_unreachable; + uint32_t icmp_unreachable_code4; tPortFilterStats tcp_port_filter; tPortFilterStats udp_port_filter; } StreamStats; @@ -370,6 +378,7 @@ IgnoredRuleList **ppIgnoredRuleList, int ignoreAnyAnyRules ); void s5PrintPortFilter( uint16_t portList[] ); int StreamSetRuntimeConfiguration( SessionControlBlock *scb, uint8_t protocol ); +bool getStreamIgnoreAnyConfig (struct _SnortConfig *sc, IpProto protocol); // shared stream state extern StreamStats s5stats; @@ -379,6 +388,7 @@ extern uint32_t session_mem_in_use; extern SessionConfiguration *stream_session_config; extern tSfPolicyUserContextId stream_online_config; +extern tSfPolicyUserContextId stream_parsing_config; extern tSfActionQueueId decoderActionQ; void StreamDeleteSession(SessionControlBlock *scb); diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/stream_paf.c snort-2.9.20/src/preprocessors/Stream6/stream_paf.c --- snort-2.9.15.1/src/preprocessors/Stream6/stream_paf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/stream_paf.c 2022-05-18 05:04:36.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -43,6 +43,7 @@ #include "snort_bounds.h" #include "snort_debug.h" #include "snort.h" +#include "memory_stats.h" #include "sfPolicyUserData.h" #include "stream_common.h" #include "stream_paf.h" @@ -63,7 +64,8 @@ FT_MAX, // flush len when len >= mfp FT_DISC_S,// start of discard FT_DISC_E, // End of discard - FT_PAF_HDR + FT_PAF_HDR, + FT_PSEUDO_FLUSH } FlushType; typedef struct { @@ -124,6 +126,10 @@ *flags |= PKT_PDU_TAIL; break; + case FT_PSEUDO_FLUSH: + at = s5_len; + break; + case FT_DISC_S: at = s5_len; ps->mode = FLUSH_MODE_DISCARD; @@ -177,6 +183,9 @@ if ( !ps->tot ) *flags |= PKT_PDU_HEAD; + + if (ft == FT_PSEUDO_FLUSH) + return at; if ( *flags & PKT_PDU_TAIL ) ps->tot = 0; @@ -320,6 +329,7 @@ return false; case PAF_FLUSH: + case PAF_PSEUDO_FLUSH_SEARCH: if ( s5_len >= ps->fpt ) { *ft = FT_PAF; @@ -333,7 +343,6 @@ } if(ps->fpt_eoh){ *ft = FT_PAF_HDR; - ps->paf = PAF_FLUSH; return true; } return false; @@ -350,8 +359,11 @@ return false; case PAF_SKIP: + case PAF_PSEUDO_FLUSH_SKIP: if ( s5_len > ps->fpt ) { + bool ret; + if ( ps->fpt > s5_idx ) { uint32_t delta = ps->fpt - s5_idx; @@ -361,7 +373,20 @@ len -= delta; } s5_idx = ps->fpt; - return s5_paf_callback(ps, ssn, data, len, flags); + ps->paf = PAF_SKIP; + ret = s5_paf_callback(ps, ssn, data, len, flags); + if (ps->paf == PAF_PSEUDO_FLUSH_SKIP) + { + /* + * If we have processed entire data, check if we + * can prepare for pseudo flush. + */ + if (!ret && (s5_len < ps->fpt)) + { + *ft = FT_PSEUDO_FLUSH; + } + } + return ret; } return false; @@ -527,6 +552,10 @@ ps->seq = ps->pos = seq; ps->paf = PAF_SEARCH; } + else if (*flags & PKT_PSEUDO_FLUSH) + { + return s5_paf_flush(pc, ps, FT_PSEUDO_FLUSH, flags); + } else if ( SEQ_GT(seq, ps->seq) ) { // if seq jumped we have a gap. Flush any queued data, then abort @@ -713,6 +742,36 @@ return i+1; } +/* cb_mask_cmp + * + * This api compares expected cb_mask w.r.t appid + * and cb_mask populated in stream paf_state. + * + * Input : PAF_Config - Paf configurations. + * Service - Service id like for HTTP id is 5. + * c2s - True - This represents flow is client to server. + * - False - This represents flow is server to client. + * cb_mask - cb_mask populated in stream paf_state + * + * Return : -1 - If PAF_Config is not present. + * 0 - If both the cb_mask matches. + * 1 - If both the cb_mask does not match. + */ +int cb_mask_cmp(void* pv, uint16_t service, bool c2s, uint16_t cb_mask) +{ + PAF_Config* pc = (PAF_Config*)pv; + PAF_Map* pm; + + if ( !pc ) + return -1; + + pm = pc->service_map[service] + (c2s?1:0); + if (pm && pm->cb_mask && (pm->cb_mask != cb_mask)) + return 1; + + return 0; +} + uint16_t s5_paf_service_registration (void* pv, uint16_t service, bool c2s, bool flush) { PAF_Config* pc = pv; @@ -722,7 +781,6 @@ return false; pm = pc->service_map[service] + (c2s?1:0); - if ( !pm->cb_mask ) return 0; @@ -736,7 +794,8 @@ void* s5_paf_new (void) { - PAF_Config* pc = SnortAlloc(sizeof(*pc)); + PAF_Config* pc = SnortPreprocAlloc(1, sizeof(*pc), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); assert( pc ); pc->mfp = ScPafMax(); @@ -760,7 +819,7 @@ "%s: prep=%u/%u\n", __FUNCTION__, pc->prep_calls, pc->prep_bytes);) - free(pc); + SnortPreprocFree(pc, sizeof(*pc), PP_STREAM, PP_MEM_CATEGORY_CONFIG); } void s5_paf_register_free (uint8_t id, PAF_Free_Callback cb) diff -Nru snort-2.9.15.1/src/preprocessors/Stream6/stream_paf.h snort-2.9.20/src/preprocessors/Stream6/stream_paf.h --- snort-2.9.15.1/src/preprocessors/Stream6/stream_paf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/Stream6/stream_paf.h 2022-05-18 05:04:37.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2011-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -68,7 +68,9 @@ uint16_t s5_paf_port_registration_all (void* pv, uint16_t port, bool c2s, bool flush); uint16_t s5_paf_service_registration (void* pv, uint16_t service, bool c2s, bool flush); -enum FlushMode +int cb_mask_cmp(void* pv, uint16_t service, bool c2s, uint16_t cb_mask); + +typedef enum _FlushMode { FLUSH_MODE_NORMAL = 0, FLUSH_MODE_PRE_DISCARD, diff -Nru snort-2.9.15.1/src/preprocessors/cip_common.h snort-2.9.20/src/preprocessors/cip_common.h --- snort-2.9.15.1/src/preprocessors/cip_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/cip_common.h 2022-05-18 05:02:21.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/normalize.c snort-2.9.20/src/preprocessors/normalize.c --- snort-2.9.15.1/src/preprocessors/normalize.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/normalize.c 2022-05-18 05:03:30.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/normalize.h snort-2.9.20/src/preprocessors/normalize.h --- snort-2.9.15.1/src/preprocessors/normalize.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/normalize.h 2022-05-18 05:03:31.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/perf-base.c snort-2.9.20/src/preprocessors/perf-base.c --- snort-2.9.15.1/src/preprocessors/perf-base.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf-base.c 2022-05-18 05:03:32.000000000 +0000 @@ -3,7 +3,7 @@ ** ** perf-base.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** Marc Norton diff -Nru snort-2.9.15.1/src/preprocessors/perf-base.h snort-2.9.20/src/preprocessors/perf-base.h --- snort-2.9.15.1/src/preprocessors/perf-base.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf-base.h 2022-05-18 05:03:33.000000000 +0000 @@ -3,7 +3,7 @@ ** ** perf-base.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker (droelker@sourcefire.com) ** Marc Norton (mnorton@sourcefire.com) diff -Nru snort-2.9.15.1/src/preprocessors/perf-event.c snort-2.9.20/src/preprocessors/perf-event.c --- snort-2.9.15.1/src/preprocessors/perf-event.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf-event.c 2022-05-18 05:03:34.000000000 +0000 @@ -3,7 +3,7 @@ ** ** perf-event.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker diff -Nru snort-2.9.15.1/src/preprocessors/perf-event.h snort-2.9.20/src/preprocessors/perf-event.h --- snort-2.9.15.1/src/preprocessors/perf-event.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf-event.h 2022-05-18 05:03:35.000000000 +0000 @@ -3,7 +3,7 @@ ** ** perf-event.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker diff -Nru snort-2.9.15.1/src/preprocessors/perf-flow.c snort-2.9.20/src/preprocessors/perf-flow.c --- snort-2.9.15.1/src/preprocessors/perf-flow.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf-flow.c 2022-05-18 05:03:36.000000000 +0000 @@ -4,7 +4,7 @@ ** perf-flow.c ** ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker @@ -323,6 +323,9 @@ *swapped = 1; } + if (!sfFlow->ipMap) + return NULL; + value = sfxhash_find(sfFlow->ipMap, &key); if (!value) { @@ -829,6 +832,9 @@ char ipA[41], ipB[41]; uint64_t total = 0; + if (!sfFlow->ipMap) + return; + LogMessage("\n"); LogMessage("\n"); LogMessage("IP Flows (%d unique IP pairs)\n", sfxhash_count(sfFlow->ipMap)); @@ -858,6 +864,9 @@ if (!fp) return; + if (!sfFlow->ipMap) + return; + fprintf(fp, "%u,%u\n", (uint32_t)time(NULL), sfxhash_count(sfFlow->ipMap)); for (node = sfxhash_findfirst(sfFlow->ipMap); node; node = sfxhash_findnext(sfFlow->ipMap)) { diff -Nru snort-2.9.15.1/src/preprocessors/perf-flow.h snort-2.9.20/src/preprocessors/perf-flow.h --- snort-2.9.15.1/src/preprocessors/perf-flow.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf-flow.h 2022-05-18 05:03:37.000000000 +0000 @@ -2,7 +2,7 @@ /* ** perf-flow.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker diff -Nru snort-2.9.15.1/src/preprocessors/perf.c snort-2.9.20/src/preprocessors/perf.c --- snort-2.9.15.1/src/preprocessors/perf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf.c 2022-05-18 05:03:38.000000000 +0000 @@ -3,7 +3,7 @@ ** ** perf.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** diff -Nru snort-2.9.15.1/src/preprocessors/perf.h snort-2.9.20/src/preprocessors/perf.h --- snort-2.9.15.1/src/preprocessors/perf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf.h 2022-05-18 05:03:39.000000000 +0000 @@ -3,7 +3,7 @@ ** ** perf.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** diff -Nru snort-2.9.15.1/src/preprocessors/perf_indicators.c snort-2.9.20/src/preprocessors/perf_indicators.c --- snort-2.9.15.1/src/preprocessors/perf_indicators.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf_indicators.c 2022-05-18 05:03:40.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/preprocessors/perf_indicators.h snort-2.9.20/src/preprocessors/perf_indicators.h --- snort-2.9.15.1/src/preprocessors/perf_indicators.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/perf_indicators.h 2022-05-18 05:03:42.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/preprocessors/portscan.c snort-2.9.20/src/preprocessors/portscan.c --- snort-2.9.15.1/src/preprocessors/portscan.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/portscan.c 2022-05-18 05:03:43.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/portscan.h snort-2.9.20/src/preprocessors/portscan.h --- snort-2.9.15.1/src/preprocessors/portscan.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/portscan.h 2022-05-18 05:03:44.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/session_api.c snort-2.9.20/src/preprocessors/session_api.c --- snort-2.9.15.1/src/preprocessors/session_api.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/session_api.c 2022-05-18 05:03:53.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * ** AUTHOR: d mcpherson * ** diff -Nru snort-2.9.15.1/src/preprocessors/session_api.h snort-2.9.20/src/preprocessors/session_api.h --- snort-2.9.15.1/src/preprocessors/session_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/session_api.h 2022-05-18 05:03:54.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * ** AUTHOR: d mcpherson * ** @@ -60,7 +60,7 @@ #define STREAM_DEFAULT_MAX_ICMP_SESSIONS 65536 /* 64k ICMP sessions by default */ #define STREAM_DEFAULT_MAX_IP_SESSIONS 16384 /* 16k IP sessions by default */ #define STREAM_DEFAULT_TCP_CACHE_PRUNING_TIMEOUT 30 /* 30 seconds */ -#define STREAM_DEFAULT_TCP_CACHE_NOMINAL_TIMEOUT ( 3 * 60 ) /* 3 minutes */ +#define STREAM_DEFAULT_TCP_CACHE_NOMINAL_TIMEOUT ( 60 * 60 ) /* 60 minutes */ #define STREAM_DEFAULT_UDP_CACHE_PRUNING_TIMEOUT 30 /* 30 seconds */ #define STREAM_DEFAULT_UDP_CACHE_NOMINAL_TIMEOUT ( 3 * 60 ) /* 3 minutes */ #define STREAM_MAX_CACHE_TIMEOUT ( 12 * 60 * 60 ) /* 12 hours */ @@ -163,13 +163,16 @@ uint8_t protocol; char pad; uint32_t mplsLabel; /* MPLS label */ -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t addressSpaceId_l; /* Low ASID */ uint16_t addressSpaceId_h; /* Higher ASID */ #else uint16_t addressSpaceId; uint16_t addressSpaceIdPad1; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierId; +#endif /* XXX If this data structure changes size, HashKeyCmp must be updated! */ } StreamSessionKey; @@ -294,11 +297,14 @@ */ int (*get_session_key_by_ip_port)(sfaddr_t*, uint16_t, sfaddr_t*, uint16_t, char, uint16_t, uint32_t, -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t, uint16_t, #else uint16_t, #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t, +#endif SessionKey *); /* Lookup by session key and return Session Control Block @@ -835,12 +841,15 @@ * Stream session pointer */ void *(*get_session_ptr_from_ip_port)(sfaddr_t*, uint16_t, sfaddr_t*, uint16_t, char, - uint16_t, uint32_t, -#ifdef DAQ_CAPA_VRF + uint16_t, uint32_t, +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t, uint16_t #else uint16_t #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + , uint32_t +#endif ); /** Retrieve the session key given a stream session pointer. @@ -894,11 +903,14 @@ * Application Data reference (pointer) */ void *(*get_application_data_from_ip_port)(sfaddr_t*, uint16_t, sfaddr_t*, uint16_t, -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t, uint16_t, #else uint16_t, -#endif +#endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t, +#endif char, uint16_t, uint32_t, uint32_t); void (*disable_preproc_for_session)( void *, uint32_t ); diff -Nru snort-2.9.15.1/src/preprocessors/sfprocpidstats.c snort-2.9.20/src/preprocessors/sfprocpidstats.c --- snort-2.9.15.1/src/preprocessors/sfprocpidstats.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/sfprocpidstats.c 2022-05-18 05:03:56.000000000 +0000 @@ -3,7 +3,7 @@ ** ** sfprocpidstats.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** diff -Nru snort-2.9.15.1/src/preprocessors/sfprocpidstats.h snort-2.9.20/src/preprocessors/sfprocpidstats.h --- snort-2.9.15.1/src/preprocessors/sfprocpidstats.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/sfprocpidstats.h 2022-05-18 05:03:57.000000000 +0000 @@ -3,7 +3,7 @@ ** ** sfprocpidstats.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** diff -Nru snort-2.9.15.1/src/preprocessors/sip_common.h snort-2.9.20/src/preprocessors/sip_common.h --- snort-2.9.15.1/src/preprocessors/sip_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/sip_common.h 2022-05-18 05:03:58.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * ** Copyright (C) 2005-2013 Sourcefire, Inc. * ** AUTHOR: Steven Sturges * ** @@ -112,8 +112,8 @@ typedef struct _SipDialog { SIP_DialogState state; - SIP_MediaList mediaSessions; bool mediaUpdated; + SIP_MediaList mediaSessions; } SipDialog; typedef struct _SipEventData diff -Nru snort-2.9.15.1/src/preprocessors/snort_httpinspect.c snort-2.9.20/src/preprocessors/snort_httpinspect.c --- snort-2.9.15.1/src/preprocessors/snort_httpinspect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/snort_httpinspect.c 2022-05-18 05:03:59.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -98,6 +98,7 @@ #include "sf_email_attach_decode.h" #include "file_decomp.h" #include "hi_eo_log.h" +#include "memory_stats.h" #ifdef DUMP_BUFFER #include "hi_buffer_dump.h" @@ -227,6 +228,8 @@ #define MAX_SPACES "max_spaces" #define INSPECT_SWF "decompress_swf" #define INSPECT_PDF "decompress_pdf" +#define NORMALIZE_NULLS "normalize_random_nulls_in_text" +#define FAST_BLOCKING "fast_blocking" #define DECOMPRESS_DEFLATE "deflate" #define DECOMPRESS_LZMA "lzma" @@ -756,6 +759,15 @@ GlobalConf->disabled = 1; return 0; } + else if (!strcmp(NORMALIZE_NULLS, pcToken)) + { + GlobalConf->normalize_nulls = TRUE; + } + else if (!strcmp(FAST_BLOCKING, pcToken)) + { + GlobalConf->fast_blocking = TRUE; + } + else if (!strcmp(HTTP_MEMCAP, pcToken)) { iRet = ProcessHttpMemcap(GlobalConf, ErrorString, ErrStrLen, saveptr); @@ -3412,7 +3424,8 @@ } GlobalConf->global_server = - (HTTPINSPECT_CONF *)SnortAlloc(sizeof(HTTPINSPECT_CONF)); + (HTTPINSPECT_CONF *)SnortPreprocAlloc(1, sizeof(HTTPINSPECT_CONF), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); ServerConf = GlobalConf->global_server; @@ -3493,7 +3506,8 @@ */ if (firstIpAddress) { - ServerConf = (HTTPINSPECT_CONF *)calloc(1, sizeof(HTTPINSPECT_CONF)); + ServerConf = (HTTPINSPECT_CONF *)SnortPreprocAlloc(1, sizeof(HTTPINSPECT_CONF), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); if(!ServerConf) { SnortSnprintf(ErrorString, ErrStrLen, @@ -3607,6 +3621,8 @@ GlobalConf->compr_depth); LogMessage(" Gzip Decompress Depth: %d\n", GlobalConf->decompr_depth); + LogMessage(" Normalize Random Nulls in Text: %s\n", + GlobalConf->normalize_nulls ? "YES" : "NO"); return 0; } @@ -4145,7 +4161,7 @@ const u_char *start = Session->client.request.content_type; const u_char *end = (Session->client.request.post_raw + Session->client.request.post_raw_size); - if ( !PacketHasPAFPayload(p) ) + if ( !PacketHasPAFPayload(p) || (p->packet_flags & PKT_PSEUDO_FLUSH)) return 0; if ( hsd && start && is_boundary_present(start, end)) @@ -4155,7 +4171,8 @@ */ if (!hsd->mime_ssn) { - hsd->mime_ssn = (MimeState *)SnortAlloc(sizeof(MimeState)); + hsd->mime_ssn = (MimeState *)SnortPreprocAlloc(1, sizeof(MimeState), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); if (!hsd->mime_ssn) return -1; hsd->mime_ssn->log_config = &(GlobalConf->mime_conf); @@ -4252,6 +4269,29 @@ return file_data_position; } +char *convert_range_flag_to_str(uint16_t range_flag) +{ + switch (range_flag) + { + case HTTP_RESP_RANGE_NONE: + return "Range None"; + case RANGE_WITH_RESP_FULL_CONTENT: + return "Full Content"; + case RANGE_WITH_RESP_PARTIAL_CONTENT: + return "Partial Content"; + case RANGE_WITH_RESP_ERROR: + return "Error in Range Field"; + case RANGE_WITH_RESP_NON_BYTE: + return "Non-Byte unit"; + case RANGE_WITH_UNKNOWN_CONTENT_RANGE: + return "Unknown Range Content"; + case RANGE_WITH_RESP_UNKNOWN_CONTENT_SIZE: + return "Unknown Range Content Length"; + default: + return "Skip Range"; + } +} + /* ** NAME ** SnortHttpInspect:: @@ -4296,7 +4336,8 @@ bool is_first = true; if (stream_api && stream_api->is_session_http2(p->ssnptr) - && !(p->packet_flags & PKT_REBUILT_STREAM)) + && !(p->packet_flags & PKT_REBUILT_STREAM) + && !(p->packet_flags & PKT_PDU_TAIL)) { return 0; } @@ -4413,6 +4454,7 @@ } p->packet_flags |= PKT_HTTP_DECODE; + HttpLogFuncs(GlobalConf, hsd, p, iCallDetect); if ( p->alt_dsize == 0 ) { @@ -4454,6 +4496,7 @@ ** requests in this way doesn't require any memory or tracking overhead. ** Instead, we just process each request linearly. */ + uint16_t vlanId = p->vh ? VTH_VLAN( p->vh ) : 0; if (hsd->decomp_state) hsd->decomp_state->stage = HTTP_DECOMP_START; do @@ -4699,6 +4742,31 @@ } } + if (Session->client.request.range_flag != HTTP_RANGE_NONE) + { + if (Session->client.request.method != HI_GET_METHOD) + { + if (hi_eo_generate_event(Session, HI_EO_CLIENT_RANGE_NON_GET_METHOD)) + { + hi_eo_client_event_log(Session, HI_EO_CLIENT_RANGE_NON_GET_METHOD, NULL, NULL); + } + } + else + { + if (Session->client.request.range_flag == RANGE_WITH_REQ_ERROR) + { + if (hi_eo_generate_event(Session, HI_EO_CLIENT_RANGE_FIELD_ERROR)) + { + hi_eo_client_event_log(Session, HI_EO_CLIENT_RANGE_FIELD_ERROR, NULL, NULL); + } + } + else + { + if (vlanId == 0) + hsd->resp_state.look_for_partial_content |= GET_REQ_WITH_RANGE; + } + } + } } else /* Server mode */ { @@ -4823,12 +4891,39 @@ Session->server.response.status_code, Session->server.response.status_code_size); - if (!strncmp((const char*)Session->server.response.status_code, "206", 3) && !hsd->resp_state.eoh_found) + if (!strncmp((const char*)Session->server.response.status_code, "206", 3)) { - /* If status code 206 is seen but EOH is not seen, then look for partial content - * in subsequent packets - */ - hsd->resp_state.look_for_partial_content = true; + if ((Session->server.response.range_flag == RANGE_WITH_RESP_ERROR) && + hi_eo_generate_event(Session, HI_EO_SERVER_RANGE_FIELD_ERROR)) + { + hi_eo_server_event_log(Session, HI_EO_SERVER_RANGE_FIELD_ERROR, NULL, NULL); + } + if ((vlanId == 0) && !(hsd->resp_state.look_for_partial_content &= GET_REQ_WITH_RANGE) && + hi_eo_generate_event(Session, HI_EO_SERVER_NON_RANGE_GET_PARTIAL_METHOD)) + { + hi_eo_server_event_log(Session, HI_EO_SERVER_NON_RANGE_GET_PARTIAL_METHOD, NULL, NULL); + } + + if (Session->server.response.range_flag == HTTP_RESP_RANGE_NONE) + { + hsd->resp_state.look_for_partial_content |= CONTENT_NONE; + } + else if (Session->server.response.range_flag == RANGE_WITH_RESP_FULL_CONTENT) + { + hsd->resp_state.look_for_partial_content |= FULL_CONTENT; + } + else + { + hsd->resp_state.look_for_partial_content |= PARTIAL_CONTENT; + } + + if ((Session->client.request.range_flag == HTTP_RANGE_WITH_FULL_CONTENT_REQ) && + ((Session->server.response.range_flag == RANGE_WITH_RESP_UNKNOWN_CONTENT_SIZE) || + (Session->server.response.range_flag == RANGE_WITH_UNKNOWN_CONTENT_RANGE) || + (Session->server.response.range_flag == RANGE_WITH_RESP_ERROR))) + { + hsd->resp_state.look_for_partial_content |= FULL_CONTENT; + } } #ifdef DUMP_BUFFER @@ -4921,9 +5016,11 @@ #endif } - if (ScPafEnabled() && PacketHasPAFPayload(p)) + if (ScPafEnabled() && PacketHasPAFPayload(p) && !(p->packet_flags & PKT_PSEUDO_FLUSH)) { bool decomp_more = (hsd->decomp_state && hsd->decomp_state->stage == HTTP_DECOMP_MID)?true:false; + char *pfile_type = NULL; + int file_data_position = get_file_current_position(p,decomp_more,is_first); if (file_data_position == SNORT_FILE_POSITION_UNKNOWN && hsd->resp_state.eoh_found) @@ -4936,6 +5033,23 @@ { setFileName(p); } + if (GlobalConf->normalize_nulls) + { + /* Call File API to get the file type */ + pfile_type = file_api->file_get_filetype (p->ssnptr); + if (pfile_type) + { + if (SnortStrcasestr(pfile_type,strlen(pfile_type), "Unknown" ) || + SnortStrcasestr(pfile_type,strlen(pfile_type), "RTF" )) + { + + Session->server.response.body_size = NormalizeRandomNulls( + (uint8_t*) Session->server.response.body, + Session->server.response.body_size, + (uint8_t*) Session->server.response.body); + } + } + } } is_first = false; #ifdef DUMP_BUFFER @@ -5066,15 +5180,18 @@ if (p->ssnptr == NULL) return NULL; + hi_stats.session_count++; - hsd = (HttpSessionData *)SnortAlloc(sizeof(HttpSessionData)); + hsd = (HttpSessionData *)SnortPreprocAlloc(1, sizeof(HttpSessionData), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + hi_stats.mem_used += (sizeof(HttpSessionData) + sizeof(DECOMPRESS_STATE) + sizeof(HTTP_LOG_STATE)); init_decode_utf_state(&hsd->utf_state); session_api->set_application_data(p->ssnptr, PP_HTTPINSPECT, hsd, FreeHttpSessionData); hsd->fd_state = (fd_session_p_t)NULL; hsd->resp_state.eoh_found = false; - hsd->resp_state.look_for_partial_content = false; + hsd->resp_state.look_for_partial_content = CONTENT_NONE; hsd->resp_state.chunk_len_state = CHUNK_LEN_DEFAULT; return hsd; @@ -5086,6 +5203,7 @@ if (hsd == NULL) return; + hi_stats.session_count--; if (hsd->decomp_state != NULL) { @@ -5096,7 +5214,8 @@ if (hsd->log_state != NULL) { mempool_free(http_mempool, hsd->log_state->log_bucket); - free(hsd->log_state); + SnortPreprocFree(hsd->log_state, sizeof(HTTP_LOG_STATE), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); } while(hsd->tList_start != NULL ) @@ -5110,7 +5229,8 @@ hsd->fd_state = NULL; // ...just for good measure } - free(hsd); + hi_stats.mem_used -= (sizeof(HttpSessionData) + sizeof(DECOMPRESS_STATE) + sizeof(HTTP_LOG_STATE)); + SnortPreprocFree(hsd, sizeof(HttpSessionData), PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); } int GetHttpTrueIP(void *data, uint8_t **buf, uint32_t *len, uint32_t *type) @@ -5298,6 +5418,17 @@ return 1; } +bool GetHttpFastBlockingStatus() +{ + HTTPINSPECT_GLOBAL_CONF *http_conf = NULL; + tSfPolicyId policyId = getNapRuntimePolicy(); + + sfPolicyUserPolicySet(hi_config, policyId); + http_conf = (HTTPINSPECT_GLOBAL_CONF *)sfPolicyUserDataGetCurrent(hi_config); + + return(http_conf->fast_blocking); +} + static int GetHttpInspectConf( void *ssn, uint32_t flags, HTTPINSPECT_CONF **serverConf, HTTPINSPECT_CONF **clientConf ) { int iRet = HI_SUCCESS; @@ -5385,17 +5516,17 @@ return flow_depth; } -bool isHttpRespPartialCont(void *data) +uint8_t isHttpRespPartialCont(void *data) { HttpSessionData *hsd = NULL; if (data == NULL) { - return false; + return CONTENT_NONE; } hsd = (HttpSessionData *)session_api->get_application_data(data, PP_HTTPINSPECT); if (hsd == NULL) { - return false; + return CONTENT_NONE; } return hsd->resp_state.look_for_partial_content; diff -Nru snort-2.9.15.1/src/preprocessors/snort_httpinspect.h snort-2.9.20/src/preprocessors/snort_httpinspect.h --- snort-2.9.15.1/src/preprocessors/snort_httpinspect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/snort_httpinspect.h 2022-05-18 05:04:00.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ #include "mempool.h" #include "str_search.h" #include "util_jsnorm.h" +#include "memory_stats.h" #include @@ -47,6 +48,7 @@ extern PreprocStats hi2PayloadPerfStats; extern PreprocStats hi2PseudoPerfStats; #endif + /** ** The definition of the configuration separators in the snort.conf ** configure line. @@ -83,6 +85,12 @@ #define XFF_MAX_PIPELINE_REQ 255 + +#define CONTENT_NONE 0x00 +#define PARTIAL_CONTENT 0x01 +#define FULL_CONTENT 0x02 +#define GET_REQ_WITH_RANGE 0x04 + typedef enum _HttpRespCompressType { HTTP_RESP_COMPRESS_TYPE__GZIP = 0x00000001, @@ -100,12 +108,12 @@ typedef struct s_DECOMPRESS_STATE { uint8_t inflate_init; + uint16_t compress_fmt; + uint8_t decompress_data; int compr_bytes_read; int decompr_bytes_read; int compr_depth; int decompr_depth; - uint16_t compress_fmt; - uint8_t decompress_data; z_stream d_stream; MemBucket *bkt; bool deflate_initialized; @@ -130,7 +138,7 @@ uint32_t max_seq; bool flow_depth_excd; bool eoh_found; - bool look_for_partial_content; + uint8_t look_for_partial_content; uint8_t chunk_len_state; }HTTP_RESP_STATE; @@ -160,12 +168,12 @@ uint8_t log_flags; uint8_t cli_small_chunk_count; uint8_t srv_small_chunk_count; - MimeState *mime_ssn; - fd_session_p_t fd_state; uint8_t http_req_id; uint8_t http_resp_id; uint8_t is_response; uint8_t tList_count; + MimeState *mime_ssn; + fd_session_p_t fd_state; Transaction *tList_start; Transaction *tList_end; } HttpSessionData; @@ -241,7 +249,8 @@ void HI_SearchFree(void); int HI_SearchStrFound(void *, void *, int , void *, void *); int GetHttpFlowDepth(void *, uint32_t); -bool isHttpRespPartialCont(void *data); +uint8_t isHttpRespPartialCont(void *data); +bool GetHttpFastBlockingStatus(); static inline HttpSessionData * GetHttpSessionData(Packet *p) { @@ -254,7 +263,8 @@ { if(tPtr->true_ip) sfaddr_free(tPtr->true_ip); - free(tPtr); + SnortPreprocFree(tPtr, sizeof (Transaction), PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); + hi_stats.mem_used -= sizeof(Transaction); } static inline void deleteNode_tList(HttpSessionData *hsd) @@ -327,7 +337,8 @@ if (bkt != NULL) { - hsd->log_state = (HTTP_LOG_STATE *)calloc(1, sizeof(HTTP_LOG_STATE)); + hsd->log_state = (HTTP_LOG_STATE *)SnortPreprocAlloc(1, sizeof(HTTP_LOG_STATE), + PP_HTTPINSPECT, PP_MEM_CATEGORY_SESSION); if( hsd->log_state != NULL ) { bkt->scbPtr = scbPtr; diff -Nru snort-2.9.15.1/src/preprocessors/spp_arpspoof.c snort-2.9.20/src/preprocessors/spp_arpspoof.c --- snort-2.9.15.1/src/preprocessors/spp_arpspoof.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_arpspoof.c 2022-05-18 05:04:01.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2004-2013 Sourcefire, Inc. ** Copyright (C) 2001-2004 Jeff Nathan ** diff -Nru snort-2.9.15.1/src/preprocessors/spp_arpspoof.h snort-2.9.20/src/preprocessors/spp_arpspoof.h --- snort-2.9.15.1/src/preprocessors/spp_arpspoof.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_arpspoof.h 2022-05-18 05:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** Copyright (C) 2001-2003 Jeff Nathan ** diff -Nru snort-2.9.15.1/src/preprocessors/spp_bo.c snort-2.9.20/src/preprocessors/spp_bo.c --- snort-2.9.15.1/src/preprocessors/spp_bo.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_bo.c 2022-05-18 05:04:03.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** Copyright (C) 1998-2005 Martin Roesch ** diff -Nru snort-2.9.15.1/src/preprocessors/spp_bo.h snort-2.9.20/src/preprocessors/spp_bo.h --- snort-2.9.15.1/src/preprocessors/spp_bo.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_bo.h 2022-05-18 05:04:04.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/preprocessors/spp_frag3.c snort-2.9.20/src/preprocessors/spp_frag3.c --- snort-2.9.15.1/src/preprocessors/spp_frag3.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_frag3.c 2022-05-18 05:04:05.000000000 +0000 @@ -9,7 +9,7 @@ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2004-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -110,6 +110,7 @@ #include "sfutil/sfxhash.h" #include "snort.h" +#include "memory_stats.h" #include "profiler.h" #include "active.h" @@ -252,7 +253,7 @@ /* For 64 bit alignment since this is allocated in front of a FragTracker * and the structures are laid on top of that allocated memory */ #ifdef HAVE_DAQ_ADDRESS_SPACE_ID -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src; uint16_t address_space_id_dst; #else @@ -264,7 +265,7 @@ #endif #else #ifdef HAVE_DAQ_ADDRESS_SPACE_ID -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src; uint16_t address_space_id_dst; #else @@ -274,6 +275,9 @@ uint32_t addressSpaceIdPad2; #endif #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierId; +#endif } FRAGKEY; /* Only track a certain number of alerts per session */ @@ -542,6 +546,9 @@ #ifdef HAVE_DAQ_ADDRESS_SPACE_ID LogMessage(" addr id: %d\n", fkey->addressSpaceId); #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + LogMessage(" carrier id: %u\n", fkey->carrierId); +#endif } } @@ -899,6 +906,50 @@ f3stats.alerts++; } +int frag3_print_mem_stats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + int len = 0; + time_t curr_time; + + if (fd) + { + len = fprintf(fd, ",%lu,%u" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu" + , frag3_mem_in_use + , prealloc_nodes_in_use + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory); + + return len; + } + + curr_time = time(NULL); + + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of Frag3 on: %s\n" + " Memory in use : %lu\n" + " prealloc nodes in use : %u\n\n" + , ctime(&curr_time) + , frag3_mem_in_use + , prealloc_nodes_in_use); + } else { + LogMessage("\n"); + LogMessage("Memory Statistics of Frag3 on: %s\n", ctime(&curr_time)); + LogMessage(" Memory in use : %lu\n", frag3_mem_in_use); + LogMessage(" prealloc nodes in use : %u\n\n", prealloc_nodes_in_use); + } + + return len; +} + /** * Main setup function to register frag3 with the rest of Snort. * @@ -908,6 +959,7 @@ */ void SetupFrag3(void) { + RegisterMemoryStatsFunction(PP_FRAG3, frag3_print_mem_stats); #ifndef SNORT_RELOAD RegisterPreprocessor("frag3_global", Frag3GlobalInit); RegisterPreprocessor("frag3_engine", Frag3Init); @@ -966,6 +1018,10 @@ tmp2 = *(uint32_t*)(d+offset); /* after offset that has been moved */ c += tmp2; /* address space id and 16bits of zero'd pad */ #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + mix(a,b,c); + a += *(uint32_t*)(d+offset+4); +#endif final(a,b,c); @@ -1027,6 +1083,16 @@ } #endif #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + a++; + b++; + { + uint32_t *x, *y; + x = (uint32_t *)a; + y = (uint32_t *)b; + if (*x - *y) return 1; /* Compares carrierID */ + } +#endif #else /* SPARCV9 */ uint32_t *a,*b; @@ -1081,6 +1147,16 @@ if (*x - *y) return 1; /* Compares addressSpaceID, no pad */ } #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + a++; + b++; + { + uint32_t *x, *y; + x = (uint32_t *)a; + y = (uint32_t *)b; + if (*x - *y) return 1; /* Compares carrierID */ + } +#endif #endif /* SPARCV9 */ return 0; @@ -1141,7 +1217,8 @@ "configured once.\n", file_name, file_line); } - pCurrentPolicyConfig = (Frag3Config *)SnortAlloc(sizeof(Frag3Config)); + pCurrentPolicyConfig = (Frag3Config *)SnortPreprocAlloc(1, sizeof(Frag3Config), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); sfPolicyUserDataSetCurrent(frag3_config, pCurrentPolicyConfig); /* setup default values */ @@ -1248,7 +1325,8 @@ * BSD since Win32/Linux have a higher incidence of occurrence. Anyone * with an opinion on the matter feel free to email me... */ - context = (Frag3Context *) SnortAlloc(sizeof(Frag3Context)); + context = (Frag3Context *) SnortPreprocAlloc(1, sizeof(Frag3Context), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); context->frag_policy = FRAG_POLICY_DEFAULT; context->frag_timeout = FRAG_PRUNE_QUANTA; /* 60 seconds */ context->min_ttl = FRAG3_MIN_TTL; @@ -1270,7 +1348,8 @@ { config->numFrag3Contexts = 1; config->frag3ContextList = - (Frag3Context **)SnortAlloc(sizeof (Frag3Context *)); + (Frag3Context **)SnortPreprocAlloc(1, sizeof (Frag3Context *), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); } else { @@ -1278,12 +1357,15 @@ config->numFrag3Contexts++; tmpContextList = (Frag3Context **) - SnortAlloc(sizeof (Frag3Context *) * (config->numFrag3Contexts)); + SnortPreprocAlloc(config->numFrag3Contexts, sizeof (Frag3Context *), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); memcpy(tmpContextList, config->frag3ContextList, sizeof(Frag3Context *) * (config->numFrag3Contexts - 1)); - free(config->frag3ContextList); + SnortPreprocFree(config->frag3ContextList, + (config->numFrag3Contexts-1) * sizeof (Frag3Context *), PP_FRAG3, + PP_MEM_CATEGORY_CONFIG); config->frag3ContextList = tmpContextList; } @@ -1429,8 +1511,10 @@ for (i = 0; i < config->static_frags; i++) { - tmp = (Frag3Frag *) SnortAlloc(sizeof(Frag3Frag)); - tmp->fptr = (uint8_t *) SnortAlloc(sizeof(uint8_t) * pkt_snaplen); + tmp = (Frag3Frag *) SnortPreprocAlloc(1, sizeof(Frag3Frag), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); + tmp->fptr = (uint8_t *) SnortPreprocAlloc(pkt_snaplen, sizeof(uint8_t), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); Frag3PreallocPush(tmp); } @@ -2313,7 +2397,7 @@ #endif #ifdef HAVE_DAQ_ADDRESS_SPACE_ID -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) fkey->address_space_id_dst = DAQ_GetDestinationAddressSpaceID(p->pkth); fkey->address_space_id_src = DAQ_GetSourceAddressSpaceID(p->pkth); #else @@ -2323,6 +2407,9 @@ fkey->addressSpaceId = 0; #endif #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + fkey->carrierId = GET_OUTER_IPH_PROTOID(p, pkth); +#endif /* * if the hash table is empty we're done @@ -2380,7 +2467,8 @@ else { /* Allocate and copy in the options */ - ft->ip_options_data = SnortAlloc(p->ip_options_len); + ft->ip_options_data = SnortPreprocAlloc(1, p->ip_options_len, PP_FRAG3, + PP_MEM_CATEGORY_SESSION); memcpy(ft->ip_options_data, p->ip_options_data, p->ip_options_len); ft->ip_options_len = p->ip_options_len; ft->ip_option_count = p->ip_option_count; @@ -2573,10 +2661,12 @@ } } - f = (Frag3Frag *) SnortAlloc(sizeof(Frag3Frag)); + f = (Frag3Frag *) SnortPreprocAlloc(1, sizeof(Frag3Frag), PP_FRAG3, + PP_MEM_CATEGORY_SESSION); frag3_mem_in_use += sizeof(Frag3Frag); - f->fptr = (uint8_t *) SnortAlloc(fragLength); + f->fptr = (uint8_t *) SnortPreprocAlloc(1, fragLength, PP_FRAG3, + PP_MEM_CATEGORY_SESSION); frag3_mem_in_use += fragLength; sfBase.frag3_mem_in_use = frag3_mem_in_use; @@ -2765,13 +2855,15 @@ /* * build a frag struct to track this particular fragment */ - newfrag = (Frag3Frag *) SnortAlloc(sizeof(Frag3Frag)); + newfrag = (Frag3Frag *) SnortPreprocAlloc(1, sizeof(Frag3Frag), + PP_FRAG3, PP_MEM_CATEGORY_SESSION); frag3_mem_in_use += sizeof(Frag3Frag); /* * allocate some space to hold the actual data */ - newfrag->fptr = (uint8_t*)SnortAlloc(fragLength); + newfrag->fptr = (uint8_t*)SnortPreprocAlloc(1, fragLength, PP_FRAG3, + PP_MEM_CATEGORY_SESSION); frag3_mem_in_use += fragLength; sfBase.frag3_mem_in_use = frag3_mem_in_use; @@ -2876,13 +2968,15 @@ /* * build a frag struct to track this particular fragment */ - newfrag = (Frag3Frag *) SnortAlloc(sizeof(Frag3Frag)); + newfrag = (Frag3Frag *) SnortPreprocAlloc(1, sizeof(Frag3Frag), + PP_FRAG3, PP_MEM_CATEGORY_SESSION); frag3_mem_in_use += sizeof(Frag3Frag); /* * allocate some space to hold the actual data */ - newfrag->fptr = (uint8_t*)SnortAlloc(left->flen); + newfrag->fptr = (uint8_t*)SnortPreprocAlloc(1, left->flen, + PP_FRAG3, PP_MEM_CATEGORY_SESSION); frag3_mem_in_use += left->flen; sfBase.frag3_mem_in_use = frag3_mem_in_use; @@ -4057,10 +4151,10 @@ */ if(!frag3_eval_config->use_prealloc) { - free(frag->fptr); + SnortPreprocFree(frag->fptr, frag->flen, PP_FRAG3, PP_MEM_CATEGORY_SESSION); frag3_mem_in_use -= frag->flen; - free(frag); + SnortPreprocFree(frag, sizeof(Frag3Frag), PP_FRAG3, PP_MEM_CATEGORY_SESSION); frag3_mem_in_use -= sizeof(Frag3Frag); sfBase.frag3_mem_in_use = frag3_mem_in_use; @@ -4103,7 +4197,8 @@ ft->fraglist = NULL; if (ft->ip_options_data) { - free(ft->ip_options_data); + SnortPreprocFree(ft->ip_options_data, ft->ip_options_len, PP_FRAG3, + PP_MEM_CATEGORY_SESSION); ft->ip_options_data = NULL; } @@ -4448,13 +4543,16 @@ sfvar_free(f3context->bound_addrs); } - free(f3context); + SnortPreprocFree(f3context, sizeof(Frag3Context), PP_FRAG3, + PP_MEM_CATEGORY_CONFIG); } if (config->frag3ContextList != NULL) - free(config->frag3ContextList); + SnortPreprocFree(config->frag3ContextList, + config->numFrag3Contexts * sizeof (Frag3Context *), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); - free(config); + SnortPreprocFree(config, sizeof(Frag3Config), PP_FRAG3, PP_MEM_CATEGORY_CONFIG); } /** @@ -4476,8 +4574,10 @@ tmp = Frag3PreallocPop(); while (tmp) { - free(tmp->fptr); - free(tmp); + SnortPreprocFree(tmp->fptr, pkt_snaplen * sizeof(uint8_t), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); + SnortPreprocFree(tmp, sizeof(Frag3Frag), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); tmp = Frag3PreallocPop(); } } @@ -4841,7 +4941,8 @@ "configured once.\n", file_name, file_line); } - pCurrentPolicyConfig = (Frag3Config *)SnortAlloc(sizeof(Frag3Config)); + pCurrentPolicyConfig = (Frag3Config *)SnortPreprocAlloc(1, sizeof(Frag3Config), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); sfPolicyUserDataSetCurrent(frag3_swap_config, pCurrentPolicyConfig); /* setup default values */ @@ -4901,7 +5002,8 @@ "please issue a \"preprocessor frag3_global\" directive\n"); } - context = (Frag3Context *) SnortAlloc(sizeof(Frag3Context)); + context = (Frag3Context *) SnortPreprocAlloc(1, sizeof(Frag3Context), PP_FRAG3, + PP_MEM_CATEGORY_CONFIG); context->frag_policy = FRAG_POLICY_DEFAULT; context->frag_timeout = FRAG_PRUNE_QUANTA; /* 60 seconds */ @@ -4922,7 +5024,8 @@ { config->numFrag3Contexts = 1; config->frag3ContextList = - (Frag3Context **)SnortAlloc(sizeof (Frag3Context *)); + (Frag3Context **)SnortPreprocAlloc(1, sizeof (Frag3Context *), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); } else { @@ -4930,12 +5033,15 @@ config->numFrag3Contexts++; tmpContextList = (Frag3Context **) - SnortAlloc(sizeof (Frag3Context *) * (config->numFrag3Contexts)); + SnortPreprocAlloc(config->numFrag3Contexts, sizeof (Frag3Context *), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); memcpy(tmpContextList, config->frag3ContextList, sizeof(Frag3Context *) * (config->numFrag3Contexts - 1)); - free(config->frag3ContextList); + SnortPreprocFree(config->frag3ContextList, + (config->numFrag3Contexts - 1) * sizeof (Frag3Context *), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); config->frag3ContextList = tmpContextList; } @@ -4987,8 +5093,10 @@ { for(;maxWork && (newConfig->static_frags > old_static_frags); maxWork--,old_static_frags++) { - tmp = (Frag3Frag *) SnortAlloc(sizeof(Frag3Frag)); - tmp->fptr = (uint8_t *) SnortAlloc(sizeof(uint8_t) * pkt_snaplen); + tmp = (Frag3Frag *) SnortPreprocAlloc(1, sizeof(Frag3Frag), PP_FRAG3, + PP_MEM_CATEGORY_CONFIG); + tmp->fptr = (uint8_t *) SnortPreprocAlloc(pkt_snaplen, sizeof(uint8_t), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); Frag3PreallocPush(tmp); prealloc_nodes_in_use++; #ifdef REG_TEST @@ -5004,8 +5112,10 @@ tmp = Frag3PreallocPop(); if (tmp) { - free(tmp->fptr); - free(tmp); + SnortPreprocFree(tmp->fptr, pkt_snaplen * sizeof(uint8_t), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); + SnortPreprocFree(tmp, sizeof(Frag3Frag), PP_FRAG3, + PP_MEM_CATEGORY_CONFIG); prealloc_nodes_in_use--; #ifdef REG_TEST delstaticfrag_cnt++; @@ -5028,8 +5138,10 @@ tmp = Frag3PreallocPop(); if (tmp) { - free(tmp->fptr); - free(tmp); + SnortPreprocFree(tmp->fptr, pkt_snaplen * sizeof(uint8_t), + PP_FRAG3, PP_MEM_CATEGORY_CONFIG); + SnortPreprocFree(tmp, sizeof(Frag3Frag), PP_FRAG3, + PP_MEM_CATEGORY_CONFIG); prealloc_nodes_in_use--; } #ifdef REG_TEST diff -Nru snort-2.9.15.1/src/preprocessors/spp_frag3.h snort-2.9.20/src/preprocessors/spp_frag3.h --- snort-2.9.15.1/src/preprocessors/spp_frag3.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_frag3.h 2022-05-18 05:04:06.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2004-2013 Sourcefire, Inc. ** Copyright (C) 1998-2004 Martin Roesch ** diff -Nru snort-2.9.15.1/src/preprocessors/spp_httpinspect.c snort-2.9.20/src/preprocessors/spp_httpinspect.c --- snort-2.9.15.1/src/preprocessors/spp_httpinspect.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_httpinspect.c 2022-05-18 05:04:07.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -55,6 +55,7 @@ #include "snort_debug.h" #include "util.h" #include "parser.h" +#include "memory_stats.h" #include "hi_ui_config.h" #include "hi_ui_server_lookup.h" @@ -280,6 +281,152 @@ return; } + +size_t hi_get_free_mempool(MemPool *mempool) +{ + if (mempool) + return mempool->max_memory - mempool->used_memory; + return 0; +} + +size_t hi_get_used_mempool(MemPool *mempool) +{ + if (mempool) + return mempool->used_memory; + return 0; +} + +size_t hi_get_max_mempool(MemPool *mempool) +{ + if (mempool) + return mempool->max_memory; + return 0; +} + +int HttpPrintMemStats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time = time(NULL); + int len = 0; + // Adding stats to be printed , place holder + if (fd) + { + len = fprintf(fd, ",%lu,%lu,%lu,%lu,%lu,%lu" + ",%zu,%zu,%zu" + ",%zu,%zu,%zu" + ",%zu,%zu,%zu" + ",%zu,%zu,%zu" + ",%lu,%u,%u" + ",%lu,%u,%u" + ",%lu,%u,%u" + , hi_stats.session_count + , hi_stats.post + , hi_stats.get + , hi_stats.post_params + , hi_stats.req_headers + , hi_stats.resp_headers + , hi_get_free_mempool(http_mempool) + , hi_get_used_mempool(http_mempool) + , hi_get_max_mempool(http_mempool) + , hi_get_free_mempool(mime_decode_mempool) + , hi_get_used_mempool(mime_decode_mempool) + , hi_get_max_mempool(mime_decode_mempool) + , hi_get_free_mempool(hi_gzip_mempool) + , hi_get_used_mempool(hi_gzip_mempool) + , hi_get_max_mempool(hi_gzip_mempool) + , hi_get_free_mempool(mime_log_mempool) + , hi_get_used_mempool(mime_log_mempool) + , hi_get_max_mempool(mime_log_mempool) + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , meminfo[PP_MEM_CATEGORY_MEMPOOL].used_memory + , meminfo[PP_MEM_CATEGORY_MEMPOOL].num_of_alloc + , meminfo[PP_MEM_CATEGORY_MEMPOOL].num_of_free + ); + return len; + } + + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, "Memory Statistics of httpinspect on: %s\n" + " Http Inspect Statistics\n" + " Current active session : %lu\n" + " No of POST methods encountered : %lu\n" + " No of GET methods encountered : %lu\n" + " No of successfully extract post params : %lu\n" + " No of successfully extract request params : %lu\n" + " No of successfully extract response params : %lu\n" + "\n Http Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + "\n Mime Decode Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + "\n Http gzip Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + "\n Http Mime log Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + , ctime(&curr_time) + , hi_stats.session_count + , hi_stats.post + , hi_stats.get + , hi_stats.post_params + , hi_stats.req_headers + , hi_stats.resp_headers + , hi_get_free_mempool(http_mempool) + , hi_get_used_mempool(http_mempool) + , hi_get_max_mempool(http_mempool) + , hi_get_free_mempool(mime_decode_mempool) + , hi_get_used_mempool(mime_decode_mempool) + , hi_get_max_mempool(mime_decode_mempool) + , hi_get_free_mempool(hi_gzip_mempool) + , hi_get_used_mempool(hi_gzip_mempool) + , hi_get_max_mempool(hi_gzip_mempool) + , hi_get_free_mempool(mime_log_mempool) + , hi_get_used_mempool(mime_log_mempool) + , hi_get_max_mempool(mime_log_mempool) + ); + + } else { + + LogMessage(" Memory Statistics of Http Inspect on: %s\n ",ctime(&curr_time)); + LogMessage(" Current active session : %lu\n", hi_stats.session_count); + LogMessage(" No of POST methods encountered : %lu\n", hi_stats.post); + LogMessage(" No of GET methods encountered : %lu\n", hi_stats.get); + LogMessage(" No of successfully extract post params : %lu\n", hi_stats.post_params); + LogMessage(" No of successfully extract request params : %lu\n", hi_stats.req_headers); + LogMessage(" No of successfully extract response params : %lu\n", hi_stats.resp_headers); + LogMessage(" Http Memory Pool :\n"); + LogMessage(" Free Memory: %14zu bytes\n", hi_get_free_mempool(http_mempool)); + LogMessage(" Used Memory: %14zu bytes\n", hi_get_used_mempool(http_mempool)); + LogMessage(" Max Memory : %14zu bytes\n", hi_get_max_mempool(http_mempool)); + LogMessage(" Mime Decode Memory Pool :\n"); + LogMessage(" Free Memory: %14zu bytes\n", hi_get_free_mempool(mime_decode_mempool)); + LogMessage(" Used Memory: %14zu bytes\n", hi_get_used_mempool(mime_decode_mempool)); + LogMessage(" Max Memory : %14zu bytes\n", hi_get_max_mempool(mime_decode_mempool)); + LogMessage(" Http Gzip Memory Pool :\n"); + LogMessage(" Free Memory: %14zu bytes\n", hi_get_free_mempool(hi_gzip_mempool)); + LogMessage(" Used Memory: %14zu bytes\n", hi_get_used_mempool(hi_gzip_mempool)); + LogMessage(" Max Memory : %14zu bytes\n", hi_get_max_mempool(hi_gzip_mempool)); + LogMessage(" Http Mime log Memory Pool :\n"); + LogMessage(" Free Memory: %14zu bytes\n", hi_get_free_mempool(mime_log_mempool)); + LogMessage(" Used Memory: %14zu bytes\n", hi_get_used_mempool(mime_log_mempool)); + LogMessage(" Max Memory : %14zu bytes\n", hi_get_max_mempool(mime_log_mempool)); + + } + + return len; +} + static void HttpInspectDropStats(int exiting) { if(!hi_stats.total) @@ -339,6 +486,17 @@ } LogMessage(" Http/2 Rebuilt Packets: %-10I64u\n", hi_stats.h2_rebuilt_packets); LogMessage(" Total packets processed: %-10I64u\n", hi_stats.total); + LogMessage(" Non-mempool session memory: %-10I64u\n", hi_stats.mem_used + + (hi_paf_get_size() * hi_stats.session_count)); + LogMessage(" http_mempool used: %-10I64u\n", + http_mempool ? http_mempool->used_memory:0); + LogMessage(" hi_gzip_mempool used: %-10I64u\n", + hi_gzip_mempool ? hi_gzip_mempool->used_memory:0); + LogMessage(" mime_decode_mempool used: %-10I64u\n", + mime_decode_mempool ? mime_decode_mempool->used_memory:0); + LogMessage(" mime_log_mempool used: %-10I64u\n", + mime_log_mempool ? mime_log_mempool->used_memory:0); + LogMessage(" Current active session: %-10I64u\n", hi_stats.session_count); #else LogMessage(" POST methods: "FMTu64("-10")"\n", hi_stats.post); LogMessage(" GET methods: "FMTu64("-10")"\n", hi_stats.get); @@ -390,6 +548,17 @@ } LogMessage(" Http/2 Rebuilt Packets: "FMTu64("-10")"\n", hi_stats.h2_rebuilt_packets); LogMessage(" Total packets processed: "FMTu64("-10")"\n", hi_stats.total); + LogMessage(" Non-mempool session memory: "FMTu64("-10")"\n", hi_stats.mem_used + + (hi_paf_get_size() * hi_stats.session_count)); + LogMessage(" http_mempool used: "FMTu64("-10")"\n", + http_mempool ? http_mempool->used_memory:0); + LogMessage(" hi_gzip_mempool used: "FMTu64("-10")"\n", + hi_gzip_mempool ? hi_gzip_mempool->used_memory:0); + LogMessage(" mime_decode_mempool used: "FMTu64("-10")"\n", + mime_decode_mempool ? mime_decode_mempool->used_memory:0); + LogMessage(" mime_log_mempool used: "FMTu64("-10")"\n", + mime_log_mempool ? mime_log_mempool->used_memory:0); + LogMessage(" Current active session: "FMTu64("-10")"\n", hi_stats.session_count); #endif } @@ -406,13 +575,15 @@ if (mempool_destroy(hi_gzip_mempool) == 0) { - free(hi_gzip_mempool); + SnortPreprocFree(hi_gzip_mempool, sizeof(MemPool), PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); hi_gzip_mempool = NULL; } if (mempool_destroy(http_mempool) == 0) { - free(http_mempool); + SnortPreprocFree(http_mempool, sizeof(MemPool), PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); http_mempool = NULL; } if (mempool_destroy(mime_decode_mempool) == 0) @@ -575,7 +746,9 @@ if (!xffFields) { - if ((xffFields = calloc(1, HTTP_MAX_XFF_FIELDS * sizeof(char *))) == NULL) + xffFields = SnortPreprocAlloc(1, HTTP_MAX_XFF_FIELDS * sizeof(char *), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); + if (xffFields == NULL) { FatalError("http_inspect: %s(%d) failed to allocate memory for XFF fields\n", __FILE__, __LINE__); @@ -638,7 +811,10 @@ HttpInspectRegisterRuleOptions(sc); - pPolicyConfig = (HTTPINSPECT_GLOBAL_CONF *)SnortAlloc(sizeof(HTTPINSPECT_GLOBAL_CONF)); + pPolicyConfig = (HTTPINSPECT_GLOBAL_CONF *) SnortPreprocAlloc(1, + sizeof(HTTPINSPECT_GLOBAL_CONF), + PP_HTTPINSPECT, + PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { ParseError("HTTP INSPECT preprocessor: memory allocate failed.\n"); @@ -744,6 +920,8 @@ */ void SetupHttpInspect(void) { +RegisterMemoryStatsFunction(PP_HTTPINSPECT, HttpPrintMemStats); + #ifndef SNORT_RELOAD RegisterPreprocessor(GLOBAL_KEYWORD, HttpInspectInit); RegisterPreprocessor(SERVER_KEYWORD, HttpInspectInit); @@ -996,7 +1174,9 @@ unsigned pos; HttpEncodeData *idx= NULL; - idx = (HttpEncodeData *) SnortAlloc(sizeof(HttpEncodeData)); + idx = (HttpEncodeData *) SnortPreprocAlloc(1, sizeof(HttpEncodeData), PP_HTTPINSPECT, + PP_MEM_CATEGORY_CONFIG); + hi_stats.mem_used += sizeof(HttpEncodeData); if(idx == NULL) { @@ -1173,7 +1353,9 @@ HttpEncodeData *idx = dataPtr; if (idx) { - free(idx); + SnortPreprocFree(idx, sizeof(HttpEncodeData), PP_HTTPINSPECT, + PP_MEM_CATEGORY_SESSION); + hi_stats.mem_used -= sizeof(HttpEncodeData); } } @@ -1378,7 +1560,9 @@ if( have_gzip ) { - hi_gzip_mempool = (MemPool *)SnortAlloc(sizeof(MemPool)); + hi_gzip_mempool = (MemPool *)SnortPreprocAlloc(1, sizeof(MemPool), + PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); if( (hi_gzip_mempool == 0) || (mempool_init(hi_gzip_mempool, max_sessions, @@ -1448,7 +1632,8 @@ max_sessions_logged = defaultConfig->memcap / (MAX_URI_EXTRACTED + MAX_HOSTNAME); - http_mempool = (MemPool *)SnortAlloc(sizeof(MemPool)); + http_mempool = (MemPool *)SnortPreprocAlloc(1, sizeof(MemPool), PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); if (mempool_init(http_mempool, max_sessions_logged, (MAX_URI_EXTRACTED + MAX_HOSTNAME)) != 0) { FatalError("http_inspect: Could not allocate HTTP mempool.\n"); @@ -1502,8 +1687,9 @@ free(oldXffFields[i]); oldXffFields[i] = NULL; } - - free(oldXffFields); + + SnortPreprocFree(oldXffFields, HTTP_MAX_XFF_FIELDS * sizeof(char *), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); oldXffFields = NULL; } @@ -1530,15 +1716,17 @@ for( i=0; iglobal_server->xff_headers[i] != NULL ) { - free( config->global_server->xff_headers[i] ); + free( config->global_server->xff_headers[i] ); config->global_server->xff_headers[i] = NULL; } http_cmd_lookup_cleanup(&(config->global_server->cmd_lookup)); - free(config->global_server); + SnortPreprocFree(config->global_server, sizeof(HTTPINSPECT_CONF), PP_HTTPINSPECT, + PP_MEM_CATEGORY_CONFIG); } - free(config); + SnortPreprocFree(config, sizeof(HTTPINSPECT_GLOBAL_CONF), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); } #ifdef SNORT_RELOAD @@ -1568,7 +1756,9 @@ if (!oldXffFields) { oldXffFields = xffFields; - if ((xffFields = calloc(1, HTTP_MAX_XFF_FIELDS * sizeof(char *))) == NULL) + xffFields = SnortPreprocAlloc(1, HTTP_MAX_XFF_FIELDS * sizeof(char *), + PP_HTTPINSPECT, PP_MEM_CATEGORY_CONFIG); + if (xffFields == NULL) { FatalError("http_inspect: %s(%d) failed to allocate memory for XFF fields\n", __FILE__, __LINE__); @@ -1591,7 +1781,10 @@ HttpInspectRegisterRuleOptions(sc); - pPolicyConfig = (HTTPINSPECT_GLOBAL_CONF *)SnortAlloc(sizeof(HTTPINSPECT_GLOBAL_CONF)); + pPolicyConfig = (HTTPINSPECT_GLOBAL_CONF *) SnortPreprocAlloc(1, + sizeof(HTTPINSPECT_GLOBAL_CONF), + PP_HTTPINSPECT, + PP_MEM_CATEGORY_CONFIG); if (!pPolicyConfig) { ParseError("HTTP INSPECT preprocessor: memory allocate failed.\n"); @@ -1733,7 +1926,8 @@ /* This check will be true, when the gzip_mempool is disabled and mempool cleaning is also completed */ if( hi_gzip_mempool->used_memory + hi_gzip_mempool->free_memory == 0 ) { - free(hi_gzip_mempool); + SnortPreprocFree(hi_gzip_mempool, sizeof(MemPool), PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); hi_gzip_mempool = NULL; return true; } @@ -1750,7 +1944,8 @@ /* This check will be true, when the fd_mempool is disabled and mempool cleaning is also completed */ if( hi_fd_conf.fd_MemPool->used_memory + hi_fd_conf.fd_MemPool->free_memory == 0 ) { - free(hi_fd_conf.fd_MemPool); + SnortPreprocFree(hi_fd_conf.fd_MemPool, hi_fd_conf.Max_Memory, PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); hi_fd_conf.fd_MemPool = NULL; return true; } @@ -1898,7 +2093,8 @@ max_sessions_logged = defaultSwapConfig->memcap / (MAX_URI_EXTRACTED + MAX_HOSTNAME); - http_mempool = (MemPool *)SnortAlloc(sizeof(MemPool)); + http_mempool = (MemPool *) SnortPreprocAlloc(1, sizeof(MemPool), PP_HTTPINSPECT, + PP_MEM_CATEGORY_MEMPOOL); if (mempool_init(http_mempool, max_sessions_logged,(MAX_URI_EXTRACTED + MAX_HOSTNAME)) != 0) { diff -Nru snort-2.9.15.1/src/preprocessors/spp_httpinspect.h snort-2.9.20/src/preprocessors/spp_httpinspect.h --- snort-2.9.15.1/src/preprocessors/spp_httpinspect.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_httpinspect.h 2022-05-18 05:04:09.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/spp_normalize.c snort-2.9.20/src/preprocessors/spp_normalize.c --- snort-2.9.15.1/src/preprocessors/spp_normalize.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_normalize.c 2022-05-18 05:04:10.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2010-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/spp_normalize.h snort-2.9.20/src/preprocessors/spp_normalize.h --- snort-2.9.15.1/src/preprocessors/spp_normalize.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_normalize.h 2022-05-18 05:04:11.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2010-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/spp_perfmonitor.c snort-2.9.20/src/preprocessors/spp_perfmonitor.c --- snort-2.9.15.1/src/preprocessors/spp_perfmonitor.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_perfmonitor.c 2022-05-18 05:04:12.000000000 +0000 @@ -2,7 +2,7 @@ ** ** spp_perfmonitor.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker diff -Nru snort-2.9.15.1/src/preprocessors/spp_perfmonitor.h snort-2.9.20/src/preprocessors/spp_perfmonitor.h --- snort-2.9.15.1/src/preprocessors/spp_perfmonitor.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_perfmonitor.h 2022-05-18 05:04:13.000000000 +0000 @@ -2,7 +2,7 @@ ** ** spp_perfmonitor.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** Dan Roelker diff -Nru snort-2.9.15.1/src/preprocessors/spp_rpc_decode.c snort-2.9.20/src/preprocessors/spp_rpc_decode.c --- snort-2.9.15.1/src/preprocessors/spp_rpc_decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_rpc_decode.c 2022-05-18 05:04:14.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/preprocessors/spp_rpc_decode.h snort-2.9.20/src/preprocessors/spp_rpc_decode.h --- snort-2.9.15.1/src/preprocessors/spp_rpc_decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_rpc_decode.h 2022-05-18 05:04:15.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/preprocessors/spp_session.c snort-2.9.20/src/preprocessors/spp_session.c --- snort-2.9.15.1/src/preprocessors/spp_session.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_session.c 2022-05-18 05:04:16.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -48,6 +48,7 @@ #include "snort_debug.h" #include "mempool.h" #include "mstring.h" +#include "memory_stats.h" #include "detect.h" #include "active.h" #include "sp_flowbits.h" @@ -89,9 +90,9 @@ static SessionConfiguration *session_reload_configuration = NULL; static GetHttpXffPrecedenceFunc getHttpXffPrecedenceFunc = NULL; -static SessionCache *proto_session_caches[ SESSION_PROTO_MAX ]; +SessionCache *proto_session_caches[ SESSION_PROTO_MAX ]; -static MemPool sessionFlowMempool; +MemPool sessionFlowMempool; static PreprocEnableMask appHandlerDispatchMask[ INT16_MAX ]; @@ -140,12 +141,15 @@ static int initSessionKeyFromPktHeader( sfaddr_t* srcIP, uint16_t srcPort, sfaddr_t* dstIP, uint16_t dstPort, char proto, uint16_t vlan, uint32_t mplsId, -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src, uint16_t address_space_id_dst, #else uint16_t addressSpaceId, #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierId, +#endif SessionKey *key); static void *getSessionControlBlockFromKey(SessionCache*, const SessionKey *); static void *getSessionHandle(const SessionKey *key); @@ -186,12 +190,15 @@ static void * getApplicationDataFromSessionKey( const StreamSessionKey *key, uint32_t protocol); static void *getApplicationDataFromIpPort( sfaddr_t* srcIP, uint16_t srcPort, sfaddr_t* dstIP, uint16_t dstPort, -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src, uint16_t address_space_id_dst, #else uint16_t addressSpaceId, #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierId, +#endif char ip_protocol, uint16_t vlan, uint32_t mplsId, uint32_t protocol ); static void setSessionExpirationTime(Packet *p, void *scbptr, uint32_t timeout); @@ -221,20 +228,25 @@ sfaddr_t* dstIP, uint16_t dstPort, char ip_protocol, uint16_t vlan, uint32_t mplsId, -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src, uint16_t address_space_id_dst #else uint16_t addressSpaceId -#endif +#endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + , uint32_t carrierId +#endif ); static const StreamSessionKey *getKeyFromSession(const void *scbptr); +#ifdef TARGET_BASED #ifdef ACTIVE_RESPONSE static void initActiveResponse( Packet*, void* scbptr ); #endif static uint8_t getHopLimit ( void* scbptr, char dir, int outer ); +#endif static void deleteSessionIfClosed( Packet* ); static void disablePreprocForSession( void *scbptr, uint32_t preproc_id ); static void enablePreprocForPort( SnortConfig *sc, uint32_t preproc_id, uint32_t proto, uint16_t port ); @@ -299,10 +311,12 @@ /* .get_session_ports = */ getSessionPorts, #endif /* .get_preprocessor_status_bit = */ getPreprocessorStatusBit, +#ifdef TARGET_BASED #ifdef ACTIVE_RESPONSE /* .init_active_response = */ initActiveResponse, #endif /* .get_session_ttl = */ getHopLimit, +#endif /* .set_application_protocol_id_expected = */ setAppProtocolIdExpected, #ifdef ENABLE_HA /* .register_ha_funcs = */ RegisterSessionHAFuncs, @@ -392,7 +406,8 @@ static SessionConfiguration *initSessionConfiguration( void ) { SessionConfiguration *sessionConfig = - (SessionConfiguration *)SnortAlloc(sizeof(SessionConfiguration)); + (SessionConfiguration *)SnortPreprocAlloc(1, sizeof(SessionConfiguration), + PP_STREAM, PP_MEM_CATEGORY_CONFIG ); sessionConfig->track_tcp_sessions = STREAM_TRACK_YES; sessionConfig->max_tcp_sessions = STREAM_DEFAULT_MAX_TCP_SESSIONS; @@ -1091,7 +1106,9 @@ session_configuration->max_sessions = total_sessions; session_configuration->numSnortPolicies = sc->num_policies_allocated; - session_configuration->policy_ref_count = calloc( sc->num_policies_allocated, sizeof( uint32_t ) ); + session_configuration->policy_ref_count = SnortPreprocAlloc( sc->num_policies_allocated, + sizeof( uint32_t ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG ); if( !session_configuration->policy_ref_count ) { FatalError( "%s(%d) Could not allocate policy ref count.\n", __FILE__, __LINE__ ); @@ -1395,18 +1412,18 @@ scb = p->ssnptr = NULL; } #if defined(DAQ_CAPA_CST_TIMEOUT) - else if (Daq_Capa_Timeout && scb && (p->pkth->flags & DAQ_PKT_FLAG_NEW_FLOW)) - { - //We retrieved a scb but this is a new flow, which means this is stale scb, Delete it - deleteSessionByKey (scb, "stale and not cleaned") ; - scb = p->ssnptr = NULL; - } -#endif - else - { - // Update the time of last data seen in the SCB - updateSessionControlBlockTime(scb, p); - } + else if (scb && (p->pkth->flags & DAQ_PKT_FLAG_NEW_FLOW)) + { + //We retrieved a scb but this is a new flow, which means this is stale scb, Delete it + deleteSessionByKey (scb, "stale and not cleaned") ; + scb = p->ssnptr = NULL; + } +#endif + else + { + // Update the time of last data seen in the SCB + updateSessionControlBlockTime(scb, p); + } #if defined(ENABLE_HA) && defined(HAVE_DAQ_QUERYFLOW) if ((!scb || !scb->appDataList) && session_configuration->enable_ha && session_configuration->ha_config->use_daq && @@ -1519,7 +1536,10 @@ if ( ( scb == NULL ) && SessionTrackingEnabled( session_configuration, SESSION_PROTO_TCP ) ) { #if defined(HAVE_DAQ_QUERYFLOW) && defined (DAQ_QUERYFLOW_TYPE_IS_CONN_META_VALID) - if (SessionConnMetaQuery(p->pkth)) { + /* It is observed for non-IP packets, conn meta check fails. In case of conn meta check failure, + * check if non_ip_pkt is set to allow flow creation. + */ + if (SessionConnMetaQuery(p->pkth) || p->non_ip_pkt) { scb = createSession( proto_session_caches[ SESSION_PROTO_TCP ], p, &key ); } else { if (pkt_trace_enabled) @@ -1554,7 +1574,10 @@ if( ( scb == NULL ) && SessionTrackingEnabled( session_configuration, SESSION_PROTO_UDP ) ) { #if defined(HAVE_DAQ_QUERYFLOW) && defined (DAQ_QUERYFLOW_TYPE_IS_CONN_META_VALID) - if (SessionConnMetaQuery(p->pkth)) { + /* It is observed for non-IP packets, conn meta check fails. In case of conn meta check failure, + * check if non_ip_pkt is set to allow flow creation. + */ + if (SessionConnMetaQuery(p->pkth) || p->non_ip_pkt) { scb = createSession( proto_session_caches[ SESSION_PROTO_UDP ], p, &key ); } else { if (pkt_trace_enabled) @@ -1735,12 +1758,15 @@ char proto, uint16_t vlan, uint32_t mplsId, -#ifndef DAQ_CAPA_VRF +#if !defined(DAQ_CAPA_VRF) || defined(SFLINUX) uint16_t addressSpaceId, #else uint16_t address_space_id_src, uint16_t address_space_id_dst, -#endif +#endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierId, +#endif SessionKey *key ) { @@ -1817,7 +1843,7 @@ { COPY4(key->ip_l, sfaddr_get_ip6_ptr(src)); key->port_l = sport; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) key->addressSpaceId_l = address_space_id_src; key->addressSpaceId_h = address_space_id_dst; #endif @@ -1832,7 +1858,7 @@ { key->port_l = sport; key->port_h = dport; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) key->addressSpaceId_l = address_space_id_src; key->addressSpaceId_h = address_space_id_dst; #endif @@ -1841,7 +1867,7 @@ { key->port_l = dport; key->port_h = sport; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) key->addressSpaceId_l = address_space_id_dst; key->addressSpaceId_h = address_space_id_src; #endif @@ -1853,7 +1879,7 @@ key->port_l = dport; COPY4(key->ip_h, sfaddr_get_ip6_ptr(src)); key->port_h = sport; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) key->addressSpaceId_l = address_space_id_dst; key->addressSpaceId_h = address_space_id_src; #endif @@ -1879,7 +1905,7 @@ key->vlan_tag = 0; key->pad = 0; -#ifndef DAQ_CAPA_VRF +#if !defined(DAQ_CAPA_VRF) || defined(SFLINUX) #ifdef HAVE_DAQ_ADDRESS_SPACE_ID if (!ScAddressSpaceAgnostic()) key->addressSpaceId = addressSpaceId; @@ -1890,6 +1916,9 @@ #endif key->addressSpaceIdPad1 = 0; #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + key->carrierId = carrierId; +#endif return 1; } @@ -1913,20 +1942,39 @@ /* ICMP */ sport = p->icmph->type; } -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_OUTER_IPH_PROTOID(p, pkth); + +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + uint16_t sAsId = DAQ_GetSourceAddressSpaceID(p->pkth); + uint16_t dAsId = DAQ_GetDestinationAddressSpaceID(p->pkth); + + return initSessionKeyFromPktHeader(GET_SRC_IP(p), sport, GET_DST_IP(p), p->dp, + proto, vlanId, mplsId, sAsId, dAsId, cid, key); +#else + uint16_t addressSpaceId = 0; +#ifdef HAVE_DAQ_ADDRESS_SPACE_ID + addressSpaceId = DAQ_GetAddressSpaceID(p->pkth); +#endif + return initSessionKeyFromPktHeader(GET_SRC_IP(p), sport, GET_DST_IP(p), p->dp, + proto, vlanId, mplsId, addressSpaceId, cid, key); +#endif +#else /* No CarrierId support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId = DAQ_GetSourceAddressSpaceID(p->pkth); uint16_t dAsId = DAQ_GetDestinationAddressSpaceID(p->pkth); return initSessionKeyFromPktHeader(GET_SRC_IP(p), sport, GET_DST_IP(p), p->dp, proto, vlanId, mplsId, sAsId, dAsId, key); -#else +#else uint16_t addressSpaceId = 0; #ifdef HAVE_DAQ_ADDRESS_SPACE_ID addressSpaceId = DAQ_GetAddressSpaceID(p->pkth); #endif return initSessionKeyFromPktHeader(GET_SRC_IP(p), sport, GET_DST_IP(p), p->dp, proto, vlanId, mplsId, addressSpaceId, key); -#endif +#endif +#endif } static inline void determinePacketDirection( Packet *p, uint16_t p_port, uint16_t scb_port, int is_sport ) @@ -2019,9 +2067,29 @@ if (!key || !p) return; + +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_OUTER_IPH_PROTOID(p, pkth); + +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + uint16_t sAsId = DAQ_GetSourceAddressSpaceID(p->pkth); + uint16_t dAsId = DAQ_GetDestinationAddressSpaceID(p->pkth); + initSessionKeyFromPktHeader( GET_SRC_IP( p ), p->sp, GET_DST_IP( p ), p->dp, + GET_IPH_PROTO( p ), p->vh ? VTH_VLAN( p->vh ) : 0, + p->mplsHdr.label, sAsId, dAsId, cid, key); +#else + uint16_t addressSpaceId = 0; +#ifdef HAVE_DAQ_ADDRESS_SPACE_ID + addressSpaceId = DAQ_GetAddressSpaceID( p->pkth ); +#endif -#ifdef DAQ_CAPA_VRF + initSessionKeyFromPktHeader( GET_SRC_IP( p ), p->sp, GET_DST_IP( p ), p->dp, + GET_IPH_PROTO( p ), p->vh ? VTH_VLAN( p->vh ) : 0, + p->mplsHdr.label, addressSpaceId, cid, key); +#endif +#else /* No Carrierid support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId = DAQ_GetSourceAddressSpaceID(p->pkth); uint16_t dAsId = DAQ_GetDestinationAddressSpaceID(p->pkth); @@ -2037,7 +2105,8 @@ initSessionKeyFromPktHeader( GET_SRC_IP( p ), p->sp, GET_DST_IP( p ), p->dp, GET_IPH_PROTO( p ), p->vh ? VTH_VLAN( p->vh ) : 0, p->mplsHdr.label, addressSpaceId, key); -#endif +#endif +#endif } static void *getSessionControlBlockFromKey( SessionCache* session_cache, const SessionKey *key ) @@ -2072,7 +2141,8 @@ appData->freeFunc( appData->dataPointer ); tmpData = appData->next; - free(appData); + SnortPreprocFree(appData, sizeof(StreamAppData), PP_STREAM, + PP_MEM_CATEGORY_SESSION); appData = tmpData; scb->appDataList = appData; } @@ -2525,24 +2595,32 @@ { if ( scb->clientMplsHeader->start != NULL ) { - free(scb->clientMplsHeader->start); + SnortPreprocFree(scb->clientMplsHeader->start, + scb->clientMplsHeader->length, PP_STREAM, + PP_MEM_CATEGORY_SESSION); scb->clientMplsHeader->start = NULL; } - free(scb->clientMplsHeader); + SnortPreprocFree(scb->clientMplsHeader, sizeof(MPLS_Hdr), PP_STREAM, + PP_MEM_CATEGORY_SESSION); scb->clientMplsHeader = NULL; if (scb->serverMplsHeader->start != NULL ) { - free(scb->serverMplsHeader->start); + SnortPreprocFree(scb->serverMplsHeader->start, + scb->serverMplsHeader->length, PP_STREAM, + PP_MEM_CATEGORY_SESSION); scb->serverMplsHeader->start = NULL; } - free(scb->serverMplsHeader); + SnortPreprocFree(scb->serverMplsHeader, sizeof(MPLS_Hdr), + PP_STREAM, 0); scb->serverMplsHeader = NULL; } static void initMplsHeaders(SessionControlBlock *scb) { - scb->clientMplsHeader = (MPLS_Hdr*)SnortAlloc(sizeof(MPLS_Hdr)); - scb->serverMplsHeader = (MPLS_Hdr*)SnortAlloc(sizeof(MPLS_Hdr)); + scb->clientMplsHeader = (MPLS_Hdr*)SnortPreprocAlloc(1, sizeof(MPLS_Hdr), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); + scb->serverMplsHeader = (MPLS_Hdr*)SnortPreprocAlloc(1, sizeof(MPLS_Hdr), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); } @@ -2764,6 +2842,11 @@ tmp2 = *(uint32_t*)(d+offset); /* after offset that has been moved */ c += tmp2; /* address space id and 16bits of zero'd pad */ #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + mix(a,b,c); + a += *(uint32_t*)(d+offset+4); +#endif + final(a,b,c); return c; @@ -2825,6 +2908,16 @@ } #endif #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + a++; + b++; + { + uint32_t *x, *y; + x = (uint32_t *)a; + y = (uint32_t *)b; + if (*x - *y) return 1; /* Compares carrierID */ + } +#endif #else /* SPARCV9 */ uint32_t *a,*b; @@ -2880,6 +2973,16 @@ if (*x - *y) return 1; /* Compares addressSpaceID, no pad */ } #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + a++; + b++; + { + uint32_t *x, *y; + x = (uint32_t *)a; + y = (uint32_t *)b; + if (*x - *y) return 1; /* Compares carrierID */ + } +#endif #endif /* SPARCV9 */ return 0; @@ -2898,6 +3001,9 @@ if( session_configuration->track_tcp_sessions == STREAM_TRACK_YES ) { max_sessions = session_configuration->max_tcp_sessions; + if (session_configuration->memcap > (max_sessions * protocol_scb_size)) + session_configuration->memcap = session_configuration->memcap + - (max_sessions * protocol_scb_size); session_timeout_min = session_configuration->tcp_cache_pruning_timeout; session_timeout_max = session_configuration->tcp_cache_nominal_timeout; } @@ -2942,7 +3048,8 @@ // set hash table size to max sessions value...adjust up to avoid collisions???? hashTableSize = max_sessions; - sessionCache = SnortAlloc( sizeof( SessionCache ) ); + sessionCache = SnortPreprocAlloc( 1, sizeof( SessionCache ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG ); if( sessionCache ) { sessionCache->timeoutAggressive = session_timeout_min; @@ -3126,7 +3233,8 @@ /* If there isn't one for this protocol, allocate */ if (!appData) { - appData = SnortAlloc(sizeof(StreamAppData)); + appData = SnortPreprocAlloc(1, sizeof(StreamAppData), PP_STREAM, + PP_MEM_CATEGORY_SESSION); /* And add it to the list */ if (scb->appDataList) @@ -3197,24 +3305,38 @@ sfaddr_t* dstIP, uint16_t dstPort, char ip_protocol, uint16_t vlan, uint32_t mplsId, -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src, - uint16_t address_space_id_dst + uint16_t address_space_id_dst #else uint16_t addressSpaceId #endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + , uint32_t carrierId +#endif ) { SessionKey key; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) initSessionKeyFromPktHeader(srcIP, srcPort, dstIP, dstPort, ip_protocol, vlan, mplsId, address_space_id_src, - address_space_id_dst, &key); + address_space_id_dst, carrierId, &key); #else initSessionKeyFromPktHeader(srcIP, srcPort, dstIP, dstPort, ip_protocol, + vlan, mplsId, addressSpaceId, carrierId, &key); +#endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + initSessionKeyFromPktHeader(srcIP, srcPort, dstIP, dstPort, ip_protocol, + vlan, mplsId, address_space_id_src, + address_space_id_dst, &key); +#else + initSessionKeyFromPktHeader(srcIP, srcPort, dstIP, dstPort, ip_protocol, vlan, mplsId, addressSpaceId, &key); -#endif +#endif +#endif return (void*)getSessionHandle(&key); } @@ -3226,19 +3348,22 @@ static StreamSessionKey *getSessionKeyFromPacket( Packet *p ) { - SessionKey *key = calloc(1, sizeof(*key)); + SessionKey *key = SnortPreprocAlloc(1, sizeof(*key), PP_STREAM, + PP_MEM_CATEGORY_SESSION); if (!key) return NULL; +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t cid = GET_OUTER_IPH_PROTOID(p, pkth); -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t sAsId = DAQ_GetSourceAddressSpaceID(p->pkth); uint16_t dAsId = DAQ_GetDestinationAddressSpaceID(p->pkth); initSessionKeyFromPktHeader(GET_SRC_IP(p), p->sp, GET_DST_IP(p), p->dp, GET_IPH_PROTO(p), p->vh ? VTH_VLAN(p->vh) : 0, - p->mplsHdr.label, sAsId, dAsId, key); + p->mplsHdr.label, sAsId, dAsId, cid, key); #else uint16_t addressSpaceId = 0; #ifdef HAVE_DAQ_ADDRESS_SPACE_ID @@ -3247,9 +3372,27 @@ initSessionKeyFromPktHeader( GET_SRC_IP(p), p->sp, GET_DST_IP(p), p->dp, GET_IPH_PROTO(p), p->vh ? VTH_VLAN(p->vh) : 0, - p->mplsHdr.label, addressSpaceId, key); + p->mplsHdr.label, addressSpaceId, cid, key); #endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + uint16_t sAsId = DAQ_GetSourceAddressSpaceID(p->pkth); + uint16_t dAsId = DAQ_GetDestinationAddressSpaceID(p->pkth); + initSessionKeyFromPktHeader(GET_SRC_IP(p), p->sp, GET_DST_IP(p), p->dp, + GET_IPH_PROTO(p), p->vh ? VTH_VLAN(p->vh) : 0, + p->mplsHdr.label, sAsId, dAsId, key); +#else + uint16_t addressSpaceId = 0; +#ifdef HAVE_DAQ_ADDRESS_SPACE_ID + addressSpaceId = DAQ_GetAddressSpaceID(p->pkth); +#endif + + initSessionKeyFromPktHeader( GET_SRC_IP(p), p->sp, GET_DST_IP(p), p->dp, GET_IPH_PROTO(p), + p->vh ? VTH_VLAN(p->vh) : 0, + p->mplsHdr.label, addressSpaceId, key); +#endif +#endif return key; } @@ -3261,28 +3404,45 @@ static void *getApplicationDataFromIpPort( sfaddr_t* srcIP, uint16_t srcPort, sfaddr_t* dstIP, uint16_t dstPort, -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) uint16_t address_space_id_src, uint16_t address_space_id_dst, #else uint16_t addressSpaceID, -#endif +#endif +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) + uint32_t carrierId, +#endif char ip_protocol, uint16_t vlan, - uint32_t mplsId, uint32_t protocol ) + uint32_t mplsId, uint32_t protocol + ) { SessionControlBlock *scb; -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_CARRIER_ID) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) scb = (SessionControlBlock *) getSessionHandleFromIpPort(srcIP, srcPort, dstIP, dstPort, ip_protocol, vlan, - mplsId, address_space_id_src, + mplsId, carrierId, address_space_id_src, address_space_id_dst); #else scb = (SessionControlBlock *) getSessionHandleFromIpPort(srcIP, srcPort, dstIP, dstPort, ip_protocol, vlan, - mplsId, addressSpaceID); + mplsId, carrierId, addressSpaceID); #endif +#else /* No carrier id support */ +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + scb = (SessionControlBlock *) getSessionHandleFromIpPort(srcIP, srcPort, + dstIP, dstPort, + ip_protocol, vlan, + mplsId, address_space_id_src, address_space_id_dst); +#else + scb = (SessionControlBlock *) getSessionHandleFromIpPort(srcIP, srcPort, dstIP, + dstPort, ip_protocol, vlan, + mplsId, addressSpaceID); +#endif +#endif return getApplicationData(scb, protocol); } @@ -3678,6 +3838,7 @@ } } +#ifdef TARGET_BASED #ifdef ACTIVE_RESPONSE static void initActiveResponse( Packet *p, void *pv ) { @@ -3697,7 +3858,9 @@ } } #endif +#endif +#ifdef TARGET_BASED static uint8_t getHopLimit( void* pv, char dir, int outer ) { SessionControlBlock *scb = (SessionControlBlock*)pv; @@ -3710,6 +3873,7 @@ return outer ? scb->outer_server_ttl : scb->inner_server_ttl; } +#endif static void registerApplicationHandler( uint32_t preproc_id, int16_t app_id ) @@ -3805,6 +3969,11 @@ if( !(scb->protocol == IPPROTO_TCP) || !StreamIsSessionDecryptedTcp( scb ) ) SFAT_UpdateApplicationProtocol( IP_ARG( scb->server_ip ), ntohs( scb->server_port ), scb->ha_state.ipprotocol, id ); + + if( scb->protocol == IPPROTO_TCP && + scb->ha_state.application_protocol > 0 ) + set_service_based_flush_policy(scb); + return id; } @@ -4259,7 +4428,9 @@ initializeMaxExpectedFlows( session_configuration ); ssc->numSnortPolicies = sc->num_policies_allocated; - ssc->policy_ref_count = calloc( sc->num_policies_allocated, sizeof( uint32_t ) ); + ssc->policy_ref_count = SnortPreprocAlloc( sc->num_policies_allocated, + sizeof( uint32_t ), PP_STREAM, + PP_MEM_CATEGORY_SESSION ); if (!ssc->policy_ref_count) FatalError("%s(%d) policy_ref_count allocation failed.\n", __FILE__, __LINE__); diff -Nru snort-2.9.15.1/src/preprocessors/spp_session.h snort-2.9.20/src/preprocessors/spp_session.h --- snort-2.9.15.1/src/preprocessors/spp_session.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_session.h 2022-05-18 05:04:17.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. ** ** Author: davis mcpherson diff -Nru snort-2.9.15.1/src/preprocessors/spp_sfportscan.c snort-2.9.20/src/preprocessors/spp_sfportscan.c --- snort-2.9.15.1/src/preprocessors/spp_sfportscan.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_sfportscan.c 2022-05-18 05:04:18.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -442,7 +442,7 @@ { #if defined(HAVE_DAQ_ADDRESS_SPACE_ID) && defined(DAQ_VERSION) && DAQ_VERSION > 6 DAQ_PktHdr_t phdr; - memcpy(&phdr, &p->pkth, sizeof(p->pkth)); + memcpy(&phdr, &p->pkth, sizeof(*p->pkth)); if (p->pkth->flags & DAQ_PKT_FLAG_REAL_ADDRESSES) { phdr.flags &= ~(DAQ_PKT_FLAG_REAL_SIP_V6 | DAQ_PKT_FLAG_REAL_DIP_V6); diff -Nru snort-2.9.15.1/src/preprocessors/spp_sfportscan.h snort-2.9.20/src/preprocessors/spp_sfportscan.h --- snort-2.9.15.1/src/preprocessors/spp_sfportscan.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_sfportscan.h 2022-05-18 05:04:19.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/spp_stream6.c snort-2.9.20/src/preprocessors/spp_stream6.c --- snort-2.9.15.1/src/preprocessors/spp_stream6.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_stream6.c 2022-05-18 05:04:20.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -54,10 +54,12 @@ #include "stream_api.h" #include "stream_paf.h" #include "stream_common.h" +#include "session_common.h" #include "snort_stream_tcp.h" #include "snort_stream_udp.h" #include "snort_stream_icmp.h" #include "snort_stream_ip.h" +#include "snort_session.h" #include "checksum.h" #include "mstring.h" #include "parser/IpAddrSet.h" @@ -73,6 +75,8 @@ #include "sfPolicy.h" #include "sp_flowbits.h" #include "stream5_ha.h" +#include "memory_stats.h" +#include "mempool.h" #include "control/sfcontrol_funcs.h" #ifdef TARGET_BASED @@ -89,6 +93,9 @@ extern PreprocStats s5IpPerfStats; #endif +extern SessionCache *proto_session_caches[SESSION_PROTO_MAX]; +extern MemPool sessionFlowMempool; + extern OptTreeNode *otn_tmp; extern FlushConfig ignore_flush_policy[MAX_PORTS]; @@ -119,7 +126,7 @@ #ifdef MPLS static void updateMplsHeaders(Packet *, SessionControlBlock *); #endif - +int stream_print_mem_stats(FILE *, char *, PreprocMemInfo *); static void StreamPolicyInitTcp(struct _SnortConfig *, char *); static void StreamPolicyInitUdp(struct _SnortConfig *, char *); static void StreamPolicyInitIcmp(struct _SnortConfig *, char *); @@ -310,6 +317,7 @@ void SetupStream6(void) { + RegisterMemoryStatsFunction(PP_STREAM, stream_print_mem_stats); #ifndef SNORT_RELOAD RegisterPreprocessor("stream5_tcp", StreamPolicyInitTcp); RegisterPreprocessor("stream5_udp", StreamPolicyInitUdp); @@ -379,7 +387,9 @@ pCurrentPolicyConfig = ( StreamConfig * ) sfPolicyUserDataGetCurrent( stream_parsing_config ); if( pCurrentPolicyConfig == NULL ) { - pCurrentPolicyConfig = ( StreamConfig * ) SnortAlloc( sizeof( StreamConfig ) ); + pCurrentPolicyConfig = ( StreamConfig * ) SnortPreprocAlloc( 1, + sizeof( StreamConfig ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG ); sfPolicyUserDataSetCurrent( stream_parsing_config, pCurrentPolicyConfig ); // get pointer to the session configuration...if it's NULL bad news, session not // configured so Fatal Error... @@ -494,7 +504,9 @@ if( config->tcp_config == NULL ) { - config->tcp_config = ( StreamTcpConfig * ) SnortAlloc( sizeof( StreamTcpConfig ) ); + config->tcp_config = ( StreamTcpConfig * ) SnortPreprocAlloc( 1, + sizeof( StreamTcpConfig ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG ); StreamInitTcp( ); StreamTcpInitFlushPoints( ); StreamTcpRegisterRuleOptions( sc ); @@ -515,7 +527,9 @@ if( config->udp_config == NULL ) { - config->udp_config = ( StreamUdpConfig * ) SnortAlloc( sizeof( StreamUdpConfig ) ); + config->udp_config = ( StreamUdpConfig * ) SnortPreprocAlloc(1, + sizeof( StreamUdpConfig ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG); StreamInitUdp( ); } @@ -533,7 +547,9 @@ if( config->icmp_config == NULL ) { - config->icmp_config = ( StreamIcmpConfig * ) SnortAlloc( sizeof( StreamIcmpConfig ) ); + config->icmp_config = ( StreamIcmpConfig * ) SnortPreprocAlloc( 1, + sizeof( StreamIcmpConfig ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG ); StreamInitIcmp( ); } @@ -551,7 +567,9 @@ if( config->ip_config == NULL ) { - config->ip_config = ( StreamIpConfig * ) SnortAlloc( sizeof( StreamIpConfig ) ); + config->ip_config = ( StreamIpConfig * ) SnortPreprocAlloc( 1, + sizeof( StreamIpConfig ), PP_STREAM, + PP_MEM_CATEGORY_CONFIG ); StreamInitIp( ); } @@ -643,8 +661,11 @@ if( rval ) return rval; - stream_online_config = stream_parsing_config; - stream_parsing_config = NULL; + if (!stream_online_config) + { + stream_online_config = stream_parsing_config; + stream_parsing_config = NULL; + } #ifdef TARGET_BASED initServiceFilterStatus( sc ); @@ -675,6 +696,10 @@ static void StreamCleanExit(int signal, void *foo) { +#ifdef ENABLE_QUICK_EXIT + LogMessage("Snort quick exit enabled\n"); + return; +#else /* Protocol specific cleanup actions */ StreamCleanTcp(); StreamCleanUdp(); @@ -683,6 +708,7 @@ StreamFreeConfigs(stream_online_config); stream_online_config = NULL; +#endif } static void DisplayStreamStatistics (uint16_t type, void *old_context, struct _THREAD_ELEMENT *te, ControlDataSendFunc f) @@ -774,10 +800,20 @@ s5stats.total_udp_sessions + s5stats.total_icmp_sessions + s5stats.total_ip_sessions); + LogMessage(" TCP sessions: %u\n", s5stats.total_tcp_sessions); + LogMessage(" Active TCP sessions: %u\n", s5stats.active_tcp_sessions); + LogMessage(" Non mempool TCP sess mem: %u\n", session_mem_in_use); + LogMessage(" TCP mempool used: %"PRIu64"\n", get_tcp_used_mempool()); LogMessage(" UDP sessions: %u\n", s5stats.total_udp_sessions); + LogMessage(" Active UDP sessions: %u\n", s5stats.active_udp_sessions); + LogMessage(" UDP mempool used: %"PRIu64"\n", get_udp_used_mempool()); LogMessage(" ICMP sessions: %u\n", s5stats.total_icmp_sessions); + LogMessage(" Active ICMP sessions: %u\n", s5stats.active_icmp_sessions); + LogMessage(" ICMP mempool used: %"PRIu64"\n", get_icmp_used_mempool()); LogMessage(" IP sessions: %u\n", s5stats.total_ip_sessions); + LogMessage(" Active IP sessions: %u\n", s5stats.active_ip_sessions); + LogMessage(" IP mempool used: %"PRIu64"\n", get_ip_used_mempool()); LogMessage(" TCP Prunes: %u\n", StreamGetTcpPrunes()); LogMessage(" UDP Prunes: %u\n", StreamGetUdpPrunes()); @@ -797,6 +833,8 @@ LogMessage(" UDP Sessions Deleted: %u\n", s5stats.udp_sessions_released); LogMessage(" UDP Timeouts: %u\n", s5stats.udp_timeouts); LogMessage(" UDP Discards: %u\n", s5stats.udp_discards); + LogMessage(" ICMP Dest unreachable: %u\n", s5stats.icmp_unreachable); + LogMessage(" ICMP Fragmentation needed: %u\n", s5stats.icmp_unreachable_code4); LogMessage(" Events: %u\n", s5stats.events); LogMessage(" Internal Events: %u\n", s5stats.internalEvents); LogMessage(" TCP Port Filter\n"); @@ -815,6 +853,190 @@ } +#define GET_MEMPOOL(protocol) \ + proto_session_caches[protocol] ? \ + proto_session_caches[protocol]->protocol_session_pool : NULL + +size_t stream_get_free_mempool(MemPool *mempool) +{ + if (mempool) + return mempool->max_memory - mempool->used_memory; + + return 0; +} + +size_t stream_get_used_mempool(MemPool *mempool) +{ + if (mempool) + return mempool->used_memory; + + return 0; +} + +size_t stream_get_max_mempool(MemPool *mempool) +{ + if (mempool) + return mempool->max_memory; + + return 0; +} + +int stream_print_mem_stats(FILE *fd, char* buffer, PreprocMemInfo *meminfo) +{ + time_t curr_time; + int len = 0; + uint32_t total_sessions = s5stats.total_tcp_sessions + s5stats.total_udp_sessions + + s5stats.total_icmp_sessions + s5stats.total_ip_sessions; + + if (fd) + { + size_t total_heap_memory = meminfo[PP_MEM_CATEGORY_SESSION].used_memory + + meminfo[PP_MEM_CATEGORY_CONFIG].used_memory; + size_t total_pool_memory = stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_TCP)) + + stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_UDP)) + + stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_ICMP)) + + stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_IP)) + + stream_get_max_mempool(&sessionFlowMempool); + + len = fprintf(fd, ",%u,%u,%u" + ",%u,%u,%u" + ",%u,%u,%u" + ",%lu,%u,%u" + ",%lu,%u,%u,%lu,%lu" + , total_sessions + , s5stats.total_tcp_sessions + , s5stats.active_tcp_sessions + , s5stats.total_udp_sessions + , s5stats.active_udp_sessions + , s5stats.total_icmp_sessions + , s5stats.active_icmp_sessions + , s5stats.total_ip_sessions + , s5stats.active_ip_sessions + , meminfo[PP_MEM_CATEGORY_SESSION].used_memory + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_alloc + , meminfo[PP_MEM_CATEGORY_SESSION].num_of_free + , meminfo[PP_MEM_CATEGORY_CONFIG].used_memory + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_alloc + , meminfo[PP_MEM_CATEGORY_CONFIG].num_of_free + , total_pool_memory + , total_pool_memory + total_heap_memory); + + return len; + } + + curr_time = time(NULL); + + if (buffer) + { + len = snprintf(buffer, CS_STATS_BUF_SIZE, "\n\nMemory Statistics of Stream on: %s\n" + "Stream Session Statistics:\n" + " Total sessions: %u\n" + " TCP sessions: %u\n" + " Active TCP sessions: %u\n" + " UDP sessions: %u\n" + " Active UDP sessions: %u\n" + " ICMP sessions: %u\n" + " Active ICMP sessions: %u\n" + " IP sessions: %u\n" + " Active IP sessions: %u\n" + "\n TCP Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + "\n UDP Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + "\n ICMP Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + "\n IP Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + "\n Session Flow Memory Pool:\n" + " Free Memory: %14zu bytes\n" + " Used Memory: %14zu bytes\n" + " Max Memory : %14zu bytes\n" + , ctime(&curr_time) + , total_sessions + , s5stats.total_tcp_sessions + , s5stats.active_tcp_sessions + , s5stats.total_udp_sessions + , s5stats.active_udp_sessions + , s5stats.total_icmp_sessions + , s5stats.active_icmp_sessions + , s5stats.total_ip_sessions + , s5stats.active_ip_sessions + , stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_TCP)) + , stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_TCP)) + , stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_TCP)) + , stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_UDP)) + , stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_UDP)) + , stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_UDP)) + , stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_ICMP)) + , stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_ICMP)) + , stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_ICMP)) + , stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_IP)) + , stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_IP)) + , stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_IP)) + , stream_get_free_mempool(&sessionFlowMempool) + , stream_get_used_mempool(&sessionFlowMempool) + , stream_get_max_mempool(&sessionFlowMempool)); + } else { + LogMessage("\n"); + LogMessage("Memory Statistics of Stream on: %s\n",ctime(&curr_time)); + LogMessage("Stream Session Statistics:\n"); + LogMessage(" Total sessions: %u\n", total_sessions); + LogMessage(" TCP sessions: %u\n", s5stats.total_tcp_sessions); + LogMessage(" Active TCP sessions: %u\n", s5stats.active_tcp_sessions); + LogMessage(" UDP sessions: %u\n", s5stats.total_udp_sessions); + LogMessage(" Active UDP sessions: %u\n", s5stats.active_udp_sessions); + LogMessage(" ICMP sessions: %u\n", s5stats.total_icmp_sessions); + LogMessage(" Active ICMP sessions: %u\n", s5stats.active_icmp_sessions); + LogMessage(" IP sessions: %u\n", s5stats.total_ip_sessions); + LogMessage(" Active IP sessions: %u\n", s5stats.active_ip_sessions); + LogMessage(" TCP Memory Pool:\n"); + LogMessage(" Free Memory: %14zu bytes\n", + stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_TCP))); + LogMessage(" Used Memory: %14zu bytes\n", + stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_TCP))); + LogMessage(" Max Memory : %14zu bytes\n", + stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_TCP))); + LogMessage(" UDP Memory Pool:\n"); + LogMessage(" Free Memory: %14zu bytes\n", + stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_UDP))); + LogMessage(" Used Memory: %14zu bytes\n", + stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_UDP))); + LogMessage(" Max Memory : %14zu bytes\n", + stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_UDP))); + LogMessage(" ICMP Memory Pool:\n"); + LogMessage(" Free Memory: %14zu bytes\n", + stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_ICMP))); + LogMessage(" Used Memory: %14zu bytes\n", + stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_ICMP))); + LogMessage(" Max Memory : %14zu bytes\n", + stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_ICMP))); + LogMessage(" IP Memory Pool:\n"); + LogMessage(" Free Memory: %14zu bytes\n", + stream_get_free_mempool(GET_MEMPOOL(SESSION_PROTO_IP))); + LogMessage(" Used Memory: %14zu bytes\n", + stream_get_used_mempool(GET_MEMPOOL(SESSION_PROTO_IP))); + LogMessage(" Max Memory : %14zu bytes\n", + stream_get_max_mempool(GET_MEMPOOL(SESSION_PROTO_IP))); + LogMessage(" Session Flow Memory Pool:\n"); + LogMessage(" Free Memory: %14zu bytes\n", + stream_get_free_mempool(&sessionFlowMempool)); + LogMessage(" Used Memory: %14zu bytes\n", + stream_get_used_mempool(&sessionFlowMempool)); + LogMessage(" Max Memory : %14zu bytes\n", + stream_get_max_mempool(&sessionFlowMempool)); + } + + return len; +} + static void checkOnewayStatus( uint32_t protocol, SessionControlBlock *scb ) { if( scb->in_oneway_list && scb->session_established ) @@ -833,7 +1055,8 @@ if( p->layers[layerIndex].proto == PROTO_MPLS && p->layers[layerIndex].start != NULL ) { scb->clientMplsHeader->length = p->layers[layerIndex].length; - scb->clientMplsHeader->start = (uint8_t*)SnortMalloc(scb->clientMplsHeader->length); + scb->clientMplsHeader->start = (uint8_t*)SnortPreprocAlloc(1, scb->clientMplsHeader->length, + PP_STREAM, PP_MEM_CATEGORY_SESSION); memcpy(scb->clientMplsHeader->start,p->layers[layerIndex].start,scb->clientMplsHeader->length); break; } @@ -846,7 +1069,8 @@ if( p->layers[layerIndex].proto == PROTO_MPLS && p->layers[layerIndex].start != NULL ) { scb->serverMplsHeader->length = p->layers[layerIndex].length; - scb->serverMplsHeader->start = (uint8_t*)SnortMalloc(scb->serverMplsHeader->length); + scb->serverMplsHeader->start = (uint8_t*)SnortPreprocAlloc(1, scb->serverMplsHeader->length, + PP_STREAM, 0); memcpy(scb->serverMplsHeader->start,p->layers[layerIndex].start, scb->serverMplsHeader->length); break; } @@ -1513,6 +1737,69 @@ return PORT_MONITOR_PACKET_PROCESS; } +int isPacketFilterDiscardUdp ( Packet *p, int ignore_any_rules ) +{ + uint8_t action_ips = 0, action_nap = 0; + tPortFilterStats *pPortFilterStats = NULL; + SessionControlBlock *scb; + tSfPolicyId policy_id_ips = getIpsRuntimePolicy(); + tSfPolicyId policy_id_nap = getNapRuntimePolicy(); + SnortPolicy *policy; + PreprocEnableMask enabled_pps; + bool nap_inspect = false; + + scb = p->ssnptr; + if ( !scb ) { + DEBUG_WRAP(DebugMessage(DEBUG_STREAM, "Session control block of packet is NULL.\n");); + return PORT_MONITOR_PACKET_DISCARD; + } + + if ( session_api->protocol_tracking_enabled( SESSION_PROTO_UDP ) && + ( snort_conf->udp_ips_port_filter_list ) ) { + action_ips = s5UdpGetIPSPortFilterStatus (snort_conf, p->sp, p->dp, policy_id_ips); + } + + pPortFilterStats = &s5stats.udp_port_filter; + + // Check if NAP has marked it as inspect/filter. + action_nap = s5UdpGetPortFilterStatus (NULL, p->sp, policy_id_nap, 0) | + s5UdpGetPortFilterStatus (NULL, p->dp, policy_id_nap, 0); + if ( !( action_nap & PORT_MONITOR_SESSION_BITS ) && ( action_nap & PORT_MONITOR_INSPECT ) && ignore_any_rules ) { + nap_inspect = true ; + } + + if ( !( action_ips & PORT_MONITOR_SESSION_BITS ) ) { + if ( !( action_ips & PORT_MONITOR_INSPECT ) && ignore_any_rules ) { + // Port not present in IPS port list too, disable detection. + DisableDetect( p ); + } else { + /* + * If nap_inspect is true it implies NAP marked it for inspect, now IPS too marking for inspect, + * so no change in counter. + * If nap_inspect is false ie: NAP marked for filter, now IPS marks it to inspect undo the NAP counter. + */ + if ( !nap_inspect ) { + sfBase.total_udp_filtered_packets--; + pPortFilterStats->filtered--; + pPortFilterStats->inspected++; + } + } + return PORT_MONITOR_PACKET_DISCARD; + } + // Undo NAPs increment and enable detection + if ( nap_inspect ) + pPortFilterStats->inspected--; + else + pPortFilterStats->filtered--; + + pPortFilterStats->session_tracked++; + policy = snort_conf->targeted_policies[ getNapRuntimePolicy() ]; + enabled_pps = policy->pp_enabled[ p->dp ] | policy->pp_enabled[ p->sp ]; + EnableContentPreprocDetection (p,enabled_pps); + + return PORT_MONITOR_PACKET_PROCESS; +} + static uint8_t StreamRegisterPAFPort( struct _SnortConfig *sc, tSfPolicyId id, uint16_t server_port, bool to_server, PAF_Callback cb, bool autoEnable) { @@ -1929,10 +2216,13 @@ if( config->tcp_config == NULL ) { - config->tcp_config = ( StreamTcpConfig * ) SnortAlloc( sizeof( StreamTcpConfig ) ); + config->tcp_config = ( StreamTcpConfig * ) SnortPreprocAlloc( 1, + sizeof( StreamTcpConfig ), + PP_STREAM, PP_MEM_CATEGORY_CONFIG ); StreamTcpInitFlushPoints(); StreamTcpRegisterRuleOptions( sc ); + AddFuncToPreprocPostConfigList( sc, StreamPostConfigTcp, config->tcp_config ); } /* Call the protocol specific initializer */ @@ -1950,7 +2240,9 @@ return; if( config->udp_config == NULL ) - config->udp_config = ( StreamUdpConfig * ) SnortAlloc( sizeof( StreamUdpConfig ) ); + config->udp_config = ( StreamUdpConfig * ) SnortPreprocAlloc( 1, + sizeof( StreamUdpConfig ), + PP_STREAM, PP_MEM_CATEGORY_CONFIG ); /* Call the protocol specific initializer */ StreamUdpPolicyInit( config->udp_config, args ); @@ -1967,7 +2259,8 @@ return; if( config->icmp_config == NULL ) - config->icmp_config = ( StreamIcmpConfig * ) SnortAlloc( sizeof( StreamIcmpConfig ) ); + config->icmp_config = ( StreamIcmpConfig * ) SnortPreprocAlloc(1, sizeof( StreamIcmpConfig ), + PP_STREAM, PP_MEM_CATEGORY_CONFIG); /* Call the protocol specific initializer */ StreamIcmpPolicyInit( config->icmp_config, args ); @@ -1984,7 +2277,9 @@ return; if( config->ip_config == NULL ) - config->ip_config = ( StreamIpConfig * ) SnortAlloc( sizeof( *config->ip_config ) ); + config->ip_config = ( StreamIpConfig * ) SnortPreprocAlloc( 1, + sizeof( *config->ip_config ), + PP_STREAM, PP_MEM_CATEGORY_CONFIG ); /* Call the protocol specific initializer */ StreamIpPolicyInit( config->ip_config, args ); diff -Nru snort-2.9.15.1/src/preprocessors/spp_stream6.h snort-2.9.20/src/preprocessors/spp_stream6.h --- snort-2.9.15.1/src/preprocessors/spp_stream6.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/spp_stream6.h 2022-05-18 05:04:22.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. ** ** Author: Steven Sturges diff -Nru snort-2.9.15.1/src/preprocessors/str_search.c snort-2.9.20/src/preprocessors/str_search.c --- snort-2.9.15.1/src/preprocessors/str_search.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/str_search.c 2022-05-18 05:04:23.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/str_search.h snort-2.9.20/src/preprocessors/str_search.h --- snort-2.9.15.1/src/preprocessors/str_search.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/str_search.h 2022-05-18 05:04:24.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/preprocessors/stream_api.c snort-2.9.20/src/preprocessors/stream_api.c --- snort-2.9.15.1/src/preprocessors/stream_api.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/stream_api.c 2022-05-18 05:04:38.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * ** Copyright (C) 2005-2013 Sourcefire, Inc. * ** AUTHOR: Steven Sturges * ** diff -Nru snort-2.9.15.1/src/preprocessors/stream_api.h snort-2.9.20/src/preprocessors/stream_api.h --- snort-2.9.15.1/src/preprocessors/stream_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocessors/stream_api.h 2022-05-18 05:04:39.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * ** Copyright (C) 2005-2013 Sourcefire, Inc. * ** AUTHOR: Steven Sturges * ** @@ -119,6 +119,8 @@ PAF_PERFORMED_LMT_FLUSH, /* previously performed PAF_LIMIT */ PAF_DISCARD_START, /*start of the discard point */ PAF_DISCARD_END, /*end of the discard point */ + PAF_PSEUDO_FLUSH_SEARCH, /* payload can be pseudo flushed before flushing */ + PAF_PSEUDO_FLUSH_SKIP, /* HTTP chunked payload can be pseudo flushed */ PAF_IGNORE, /* Used for HTTP2.0*/ } PAF_Status; diff -Nru snort-2.9.15.1/src/preprocids.h snort-2.9.20/src/preprocids.h --- snort-2.9.15.1/src/preprocids.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/preprocids.h 2022-05-18 05:04:40.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -81,7 +81,8 @@ #define PP_HTTPMOD 34 #define PP_HTTP2 35 #define PP_CIP 36 -#define PP_MAX 37 +#define PP_S7COMMPLUS 37 +#define PP_MAX 38 #define PP_ALL 50 #define PP_ENABLE_ALL (~0) #define PP_DISABLE_ALL 0x0 diff -Nru snort-2.9.15.1/src/profiler.c snort-2.9.20/src/profiler.c --- snort-2.9.15.1/src/profiler.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/profiler.c 2022-05-18 05:04:41.000000000 +0000 @@ -3,7 +3,7 @@ ** ** profiler.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** Steven Sturges ** diff -Nru snort-2.9.15.1/src/profiler.h snort-2.9.20/src/profiler.h --- snort-2.9.15.1/src/profiler.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/profiler.h 2022-05-18 05:04:42.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** Author: Steven Sturges ** diff -Nru snort-2.9.15.1/src/rate_filter.c snort-2.9.20/src/rate_filter.c --- snort-2.9.15.1/src/rate_filter.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/rate_filter.c 2022-05-18 05:04:43.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/rate_filter.h snort-2.9.20/src/rate_filter.h --- snort-2.9.15.1/src/rate_filter.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/rate_filter.h 2022-05-18 05:04:44.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/reg_test.c snort-2.9.20/src/reg_test.c --- snort-2.9.15.1/src/reg_test.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/reg_test.c 2022-05-18 05:04:45.000000000 +0000 @@ -2,7 +2,7 @@ ** ** reg_test.c ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/reg_test.h snort-2.9.20/src/reg_test.h --- snort-2.9.15.1/src/reg_test.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/reg_test.h 2022-05-18 05:04:47.000000000 +0000 @@ -2,7 +2,7 @@ ** ** reg_test.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/reload-adjust/Makefile.in snort-2.9.20/src/reload-adjust/Makefile.in --- snort-2.9.15.1/src/reload-adjust/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/reload-adjust/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/reload-adjust -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -317,14 +329,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/reload-adjust/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/reload-adjust/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -351,10 +362,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -417,7 +428,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -566,6 +580,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/reload.c snort-2.9.20/src/reload.c --- snort-2.9.15.1/src/reload.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/reload.c 2022-05-18 05:04:50.000000000 +0000 @@ -2,7 +2,7 @@ ** ** reload.c ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as @@ -134,8 +134,8 @@ #endif -#if defined(SNORT_RELOAD) && !defined(WIN32) && defined(CONTROL_SOCKET) -static volatile bool reloadInProgress = false; +#if defined(SNORT_RELOAD) && !defined(WIN32) +volatile bool reloadInProgress = false; static pthread_mutex_t reload_mutex = PTHREAD_MUTEX_INITIALIZER; #endif @@ -147,9 +147,10 @@ bool SnortDynamicLibsChanged(void) { +#ifdef SNORT_RELOAD if (detection_lib_changed) return true; - +#endif return false; } @@ -239,8 +240,8 @@ if ((strcmp(old_path->path, new_path->path) == 0) && (old_path->ptype == new_path->ptype)) { - if (old_path->last_mod_time != new_path->last_mod_time) - return -1; + if (old_path->last_mod_time != new_path->last_mod_time) + return -1; break; } @@ -258,6 +259,30 @@ return 0; } +#if defined(SFLINUX) || defined(WRLINUX) +static int VerifyDynamicLibInfo(DynamicLibInfo *old_info, DynamicLibInfo *new_info) +{ + if ((old_info != NULL) && (new_info != NULL)) + { + if (old_info->type != new_info->type) + { + FatalError("%s(%d) Incompatible library types.\n", + __FILE__, __LINE__); + } + if (strcmp(old_info->lib_paths[0]->path, new_info->lib_paths[0]->path) != 0) + { + return -1; + } + } + else if (old_info != new_info) + { + return -1; + } + + return 0; +} +#endif + static int VerifyOutputs(SnortConfig *old_config, SnortConfig *new_config) { OutputConfig *old_output_config, *new_output_config; @@ -648,7 +673,11 @@ return -1; } +#if defined(SFLINUX) || defined(WRLINUX) + if (VerifyDynamicLibInfo(snort_conf->dyn_rules, sc->dyn_rules) == -1) +#else if (VerifyLibInfos(snort_conf->dyn_rules, sc->dyn_rules) == -1) +#endif { LogMessage("Snort Reload: Dynamic detection libs have changed.\n"); detection_lib_changed = 1; @@ -790,6 +819,8 @@ FilterConfigPreprocessors(sc); PostConfigPreprocessors(sc); + + sc->udp_ips_port_filter_list = ParseIpsPortList(sc, IPPROTO_UDP); /* Need to do this after dynamic detection stuff is initialized, too */ FlowBitsVerify(); diff -Nru snort-2.9.15.1/src/reload.h snort-2.9.20/src/reload.h --- snort-2.9.15.1/src/reload.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/reload.h 2022-05-18 05:04:51.000000000 +0000 @@ -2,7 +2,7 @@ ** ** reload.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/reload_api.h snort-2.9.20/src/reload_api.h --- snort-2.9.15.1/src/reload_api.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/reload_api.h 2022-05-18 05:04:52.000000000 +0000 @@ -2,7 +2,7 @@ ** ** reload_api.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as diff -Nru snort-2.9.15.1/src/rule_option_types.h snort-2.9.20/src/rule_option_types.h --- snort-2.9.15.1/src/rule_option_types.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/rule_option_types.h 2022-05-18 05:04:53.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/rules.h snort-2.9.20/src/rules.h --- snort-2.9.15.1/src/rules.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/rules.h 2022-05-18 05:04:54.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/sf_protocols.h snort-2.9.20/src/sf_protocols.h --- snort-2.9.15.1/src/sf_protocols.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sf_protocols.h 2022-05-18 05:04:55.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sf_sdlist.c snort-2.9.20/src/sf_sdlist.c --- snort-2.9.15.1/src/sf_sdlist.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sf_sdlist.c 2022-05-18 05:04:56.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/sf_sdlist.h snort-2.9.20/src/sf_sdlist.h --- snort-2.9.15.1/src/sf_sdlist.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sf_sdlist.h 2022-05-18 05:04:57.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/sf_sdlist_types.h snort-2.9.20/src/sf_sdlist_types.h --- snort-2.9.15.1/src/sf_sdlist_types.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sf_sdlist_types.h 2022-05-18 05:04:58.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/sf_types.h snort-2.9.20/src/sf_types.h --- snort-2.9.15.1/src/sf_types.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sf_types.h 2022-05-18 05:04:59.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfdaq.c snort-2.9.20/src/sfdaq.c --- snort-2.9.15.1/src/sfdaq.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfdaq.c 2022-05-18 05:05:01.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -444,6 +444,11 @@ return ( daq_get_capabilities(daq_mod, daq_hand) & DAQ_CAPA_INJECT ); } +uint32_t DAQ_GetCapabilities(void) +{ + return ( daq_get_capabilities(daq_mod, daq_hand)); +} + #if defined(DAQ_CAPA_CST_TIMEOUT) int DAQ_CanGetTimeout(void) { @@ -451,7 +456,7 @@ } #endif -#if defined(DAQ_CAPA_VRF) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) int DAQ_CanGetVrf(void) { return ( daq_get_capabilities(daq_mod, daq_hand) & DAQ_CAPA_VRF ); @@ -918,6 +923,15 @@ else if ( ctrlPkt->mpls ) dp_key.tunnel_type = DAQ_DP_TUNNEL_TYPE_MPLS_TUNNEL; #endif +#ifdef DAQ_DP_TUNNEL_TYPE_GRE_TUNNEL + // Checking non_ip_pkt to make sure eth-ip-gre-pppoe case doesn't hit + else if ( ctrlPkt->GREencapsulated && !ctrlPkt->non_ip_pkt) + dp_key.tunnel_type = DAQ_DP_TUNNEL_TYPE_GRE_TUNNEL; +#endif +#ifdef DAQ_DP_TUNNEL_TYPE_IPnIP_TUNNEL + else if ( ctrlPkt->IPnIPencapsulated ) + dp_key.tunnel_type = DAQ_DP_TUNNEL_TYPE_IPnIP_TUNNEL; +#endif else if ( ctrlPkt->encapsulated ) dp_key.tunnel_type = DAQ_DP_TUNNEL_TYPE_OTHER_TUNNEL; else diff -Nru snort-2.9.15.1/src/sfdaq.h snort-2.9.20/src/sfdaq.h --- snort-2.9.15.1/src/sfdaq.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfdaq.h 2022-05-18 05:05:02.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -53,10 +53,11 @@ int DAQ_CanWhitelist(void); int DAQ_CanRetry (void); int DAQ_RawInjection(void); +uint32_t DAQ_GetCapabilities(void); #if defined(DAQ_CAPA_CST_TIMEOUT) int DAQ_CanGetTimeout(void); #endif -#if defined(DAQ_CAPA_VRF) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) int DAQ_CanGetVrf(void); #endif @@ -116,7 +117,7 @@ DAQ_DC_Params* params); #endif -#ifdef DAQ_CAPA_VRF +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) static inline uint16_t DAQ_GetSourceAddressSpaceID(const DAQ_PktHdr_t *h) { return h->address_space_id_src; diff -Nru snort-2.9.15.1/src/sfthreshold.c snort-2.9.20/src/sfthreshold.c --- snort-2.9.15.1/src/sfthreshold.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfthreshold.c 2022-05-18 05:05:03.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfthreshold.h snort-2.9.20/src/sfthreshold.h --- snort-2.9.15.1/src/sfthreshold.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfthreshold.h 2022-05-18 05:05:04.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/Makefile.in snort-2.9.20/src/sfutil/Makefile.in --- snort-2.9.15.1/src/sfutil/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/sfutil/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/sfutil -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -153,7 +163,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -202,6 +212,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -247,6 +258,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -413,14 +425,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/sfutil/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/sfutil/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -447,10 +458,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -513,7 +524,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -662,6 +676,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/sfutil/Unified2_common.h snort-2.9.20/src/sfutil/Unified2_common.h --- snort-2.9.15.1/src/sfutil/Unified2_common.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/Unified2_common.h 2022-05-18 05:06:47.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/sfutil/acsmx.c snort-2.9.20/src/sfutil/acsmx.c --- snort-2.9.15.1/src/sfutil/acsmx.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/acsmx.c 2022-05-18 05:05:05.000000000 +0000 @@ -6,7 +6,7 @@ ** ** Aho-Corasick State Machine - uses a Deterministic Finite Automata - DFA ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** @@ -895,7 +895,8 @@ exit (0); } acsm = acsmNew (); - strcpy (text, argv[1]); + strncpy (text, argv[1], sizeof(text) - 1); + text[sizeof(text) - 1] = '\0'; for (i = 1; i < argc; i++) if (strcmp (argv[i], "-nocase") == 0) nocase = 1; diff -Nru snort-2.9.15.1/src/sfutil/acsmx.h snort-2.9.20/src/sfutil/acsmx.h --- snort-2.9.15.1/src/sfutil/acsmx.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/acsmx.h 2022-05-18 05:05:06.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/sfutil/acsmx2.c snort-2.9.20/src/sfutil/acsmx2.c --- snort-2.9.15.1/src/sfutil/acsmx2.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/acsmx2.c 2022-05-18 05:05:07.000000000 +0000 @@ -3,7 +3,7 @@ ** ** Copyright(C) 2002,2003,2004 Marc Norton ** Copyright(C) 2003,2004 Daniel Roelker -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/acsmx2.h snort-2.9.20/src/sfutil/acsmx2.h --- snort-2.9.15.1/src/sfutil/acsmx2.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/acsmx2.h 2022-05-18 05:05:09.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/asn1.c snort-2.9.20/src/sfutil/asn1.c --- snort-2.9.15.1/src/sfutil/asn1.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/asn1.c 2022-05-18 05:05:10.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/asn1.h snort-2.9.20/src/sfutil/asn1.h --- snort-2.9.15.1/src/sfutil/asn1.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/asn1.h 2022-05-18 05:05:11.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/bitop.h snort-2.9.20/src/sfutil/bitop.h --- snort-2.9.15.1/src/sfutil/bitop.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/bitop.h 2022-05-18 05:05:12.000000000 +0000 @@ -3,7 +3,7 @@ ** ** bitopt.c ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** Marc Norton diff -Nru snort-2.9.15.1/src/sfutil/bitop_funcs.h snort-2.9.20/src/sfutil/bitop_funcs.h --- snort-2.9.15.1/src/sfutil/bitop_funcs.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/bitop_funcs.h 2022-05-18 05:05:13.000000000 +0000 @@ -3,7 +3,7 @@ ** ** bitopt_funcs.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Dan Roelker ** Marc Norton diff -Nru snort-2.9.15.1/src/sfutil/bnfa_search.c snort-2.9.20/src/sfutil/bnfa_search.c --- snort-2.9.15.1/src/sfutil/bnfa_search.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/bnfa_search.c 2022-05-18 05:05:14.000000000 +0000 @@ -8,7 +8,7 @@ ** author: marc norton ** date: started 12/21/05 ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** General Design diff -Nru snort-2.9.15.1/src/sfutil/bnfa_search.h snort-2.9.20/src/sfutil/bnfa_search.h --- snort-2.9.15.1/src/sfutil/bnfa_search.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/bnfa_search.h 2022-05-18 05:05:15.000000000 +0000 @@ -8,7 +8,7 @@ ** ** author: marc norton ** date: 12/21/05 -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** LICENSE (GPL) diff -Nru snort-2.9.15.1/src/sfutil/getopt.h snort-2.9.20/src/sfutil/getopt.h --- snort-2.9.15.1/src/sfutil/getopt.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/getopt.h 2022-05-18 05:05:16.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/sfutil/intel-soft-cpm.c snort-2.9.20/src/sfutil/intel-soft-cpm.c --- snort-2.9.15.1/src/sfutil/intel-soft-cpm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/intel-soft-cpm.c 2022-05-18 05:05:19.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/intel-soft-cpm.h snort-2.9.20/src/sfutil/intel-soft-cpm.h --- snort-2.9.15.1/src/sfutil/intel-soft-cpm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/intel-soft-cpm.h 2022-05-18 05:05:20.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/ipobj.c snort-2.9.20/src/sfutil/ipobj.c --- snort-2.9.15.1/src/sfutil/ipobj.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/ipobj.c 2022-05-18 05:05:21.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/ipobj.h snort-2.9.20/src/sfutil/ipobj.h --- snort-2.9.15.1/src/sfutil/ipobj.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/ipobj.h 2022-05-18 05:05:22.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/mpse.c snort-2.9.20/src/sfutil/mpse.c --- snort-2.9.15.1/src/sfutil/mpse.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/mpse.c 2022-05-18 05:05:26.000000000 +0000 @@ -6,7 +6,7 @@ * An abstracted interface to the Multi-Pattern Matching routines, * thats why we're passing 'void *' objects around. * -* Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +* Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * Marc A Norton * diff -Nru snort-2.9.15.1/src/sfutil/mpse.h snort-2.9.20/src/sfutil/mpse.h --- snort-2.9.15.1/src/sfutil/mpse.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/mpse.h 2022-05-18 05:05:27.000000000 +0000 @@ -3,7 +3,7 @@ ** ** mpse.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Marc Norton ** diff -Nru snort-2.9.15.1/src/sfutil/mpse_methods.h snort-2.9.20/src/sfutil/mpse_methods.h --- snort-2.9.15.1/src/sfutil/mpse_methods.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/mpse_methods.h 2022-05-18 05:05:28.000000000 +0000 @@ -1,7 +1,7 @@ /* ** mpse.h ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/segment_mem.c snort-2.9.20/src/sfutil/segment_mem.c --- snort-2.9.15.1/src/sfutil/segment_mem.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/segment_mem.c 2022-05-18 05:05:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/sfutil/segment_mem.h snort-2.9.20/src/sfutil/segment_mem.h --- snort-2.9.15.1/src/sfutil/segment_mem.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/segment_mem.h 2022-05-18 05:05:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/sfutil/sfActionQueue.c snort-2.9.20/src/sfutil/sfActionQueue.c --- snort-2.9.15.1/src/sfutil/sfActionQueue.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfActionQueue.c 2022-05-18 05:05:50.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfActionQueue.h snort-2.9.20/src/sfutil/sfActionQueue.h --- snort-2.9.15.1/src/sfutil/sfActionQueue.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfActionQueue.h 2022-05-18 05:05:51.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfPolicy.c snort-2.9.20/src/sfutil/sfPolicy.c --- snort-2.9.15.1/src/sfutil/sfPolicy.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfPolicy.c 2022-05-18 05:06:07.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfPolicy.h snort-2.9.20/src/sfutil/sfPolicy.h --- snort-2.9.15.1/src/sfutil/sfPolicy.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfPolicy.h 2022-05-18 05:06:08.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfPolicyData.h snort-2.9.20/src/sfutil/sfPolicyData.h --- snort-2.9.15.1/src/sfutil/sfPolicyData.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfPolicyData.h 2022-05-18 05:06:09.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfPolicyUserData.c snort-2.9.20/src/sfutil/sfPolicyUserData.c --- snort-2.9.15.1/src/sfutil/sfPolicyUserData.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfPolicyUserData.c 2022-05-18 05:06:10.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfPolicyUserData.h snort-2.9.20/src/sfutil/sfPolicyUserData.h --- snort-2.9.15.1/src/sfutil/sfPolicyUserData.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfPolicyUserData.h 2022-05-18 05:06:11.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_base64decode.c snort-2.9.20/src/sfutil/sf_base64decode.c --- snort-2.9.15.1/src/sfutil/sf_base64decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_base64decode.c 2022-05-18 05:05:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/sfutil/sf_base64decode.h snort-2.9.20/src/sfutil/sf_base64decode.h --- snort-2.9.15.1/src/sfutil/sf_base64decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_base64decode.h 2022-05-18 05:05:32.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Writen by Patrick Mullen diff -Nru snort-2.9.15.1/src/sfutil/sf_email_attach_decode.c snort-2.9.20/src/sfutil/sf_email_attach_decode.c --- snort-2.9.15.1/src/sfutil/sf_email_attach_decode.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_email_attach_decode.c 2022-05-18 05:05:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Author: Bhagyashree Bantwal diff -Nru snort-2.9.15.1/src/sfutil/sf_email_attach_decode.h snort-2.9.20/src/sfutil/sf_email_attach_decode.h --- snort-2.9.15.1/src/sfutil/sf_email_attach_decode.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_email_attach_decode.h 2022-05-18 05:05:35.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Writen by Bhagyashree Bantwal diff -Nru snort-2.9.15.1/src/sfutil/sf_ip.c snort-2.9.20/src/sfutil/sf_ip.c --- snort-2.9.15.1/src/sfutil/sf_ip.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_ip.c 2022-05-18 05:05:36.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** Adam Keeton ** Kevin Liu diff -Nru snort-2.9.15.1/src/sfutil/sf_ip.h snort-2.9.20/src/sfutil/sf_ip.h --- snort-2.9.15.1/src/sfutil/sf_ip.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_ip.h 2022-05-18 05:05:37.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** Adam Keeton ** Kevin Liu @@ -311,7 +311,8 @@ /* Support function for sfip_compare */ static inline SFIP_RET _ip6_cmp(const sfaddr_t *ip1, const sfaddr_t *ip2) { SFIP_RET ret; - const uint32_t *p1, *p2; + const struct in6_addr p1 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip1); + const struct in6_addr p2 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip2); /* XXX * Argument are assumed trusted! @@ -319,13 +320,10 @@ * on validated pointers. * XXX */ - p1 = sfaddr_get_ip6_ptr(ip1); - p2 = sfaddr_get_ip6_ptr(ip2); - - if( (ret = _ip4_cmp(p1[0], p2[0])) != SFIP_EQUAL) return ret; - if( (ret = _ip4_cmp(p1[1], p2[1])) != SFIP_EQUAL) return ret; - if( (ret = _ip4_cmp(p1[2], p2[2])) != SFIP_EQUAL) return ret; - if( (ret = _ip4_cmp(p1[3], p2[3])) != SFIP_EQUAL) return ret; + if( (ret = _ip4_cmp(p1.s6_addr32[0], p2.s6_addr32[0])) != SFIP_EQUAL) return ret; + if( (ret = _ip4_cmp(p1.s6_addr32[1], p2.s6_addr32[1])) != SFIP_EQUAL) return ret; + if( (ret = _ip4_cmp(p1.s6_addr32[2], p2.s6_addr32[2])) != SFIP_EQUAL) return ret; + if( (ret = _ip4_cmp(p1.s6_addr32[3], p2.s6_addr32[3])) != SFIP_EQUAL) return ret; return ret; } @@ -404,57 +402,51 @@ } static inline int sfip_fast_lt6(const sfaddr_t *ip1, const sfaddr_t *ip2) { - const uint32_t *p1, *p2; - - p1 = sfaddr_get_ip6_ptr(ip1); - p2 = sfaddr_get_ip6_ptr(ip2); + const struct in6_addr p1 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip1); + const struct in6_addr p2 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip2); - if(*p1 < *p2) return 1; - else if(*p1 > *p2) return 0; + if(p1.s6_addr32[0] < p2.s6_addr32[0]) return 1; + else if(p1.s6_addr32[0] > p2.s6_addr32[0]) return 0; - if(p1[1] < p2[1]) return 1; - else if(p1[1] > p2[1]) return 0; + if(p1.s6_addr32[1] < p2.s6_addr32[1]) return 1; + else if(p1.s6_addr32[1] > p2.s6_addr32[1]) return 0; - if(p1[2] < p2[2]) return 1; - else if(p1[2] > p2[2]) return 0; + if(p1.s6_addr32[2] < p2.s6_addr32[2]) return 1; + else if(p1.s6_addr32[2] > p2.s6_addr32[2]) return 0; - if(p1[3] < p2[3]) return 1; - else if(p1[3] > p2[3]) return 0; + if(p1.s6_addr32[3] < p2.s6_addr32[3]) return 1; + else if(p1.s6_addr32[3] > p2.s6_addr32[3]) return 0; return 0; } static inline int sfip_fast_gt6(const sfaddr_t *ip1, const sfaddr_t *ip2) { - const uint32_t *p1, *p2; + const struct in6_addr p1 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip1); + const struct in6_addr p2 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip2); - p1 = sfaddr_get_ip6_ptr(ip1); - p2 = sfaddr_get_ip6_ptr(ip2); + if(p1.s6_addr32[0] > p2.s6_addr32[0]) return 1; + else if(p1.s6_addr32[0] < p2.s6_addr32[0]) return 0; - if(*p1 > *p2) return 1; - else if(*p1 < *p2) return 0; + if(p1.s6_addr32[1] > p2.s6_addr32[1]) return 1; + else if(p1.s6_addr32[1] < p2.s6_addr32[1]) return 0; - if(p1[1] > p2[1]) return 1; - else if(p1[1] < p2[1]) return 0; + if(p1.s6_addr32[2] > p2.s6_addr32[2]) return 1; + else if(p1.s6_addr32[2] < p2.s6_addr32[2]) return 0; - if(p1[2] > p2[2]) return 1; - else if(p1[2] < p2[2]) return 0; - - if(p1[3] > p2[3]) return 1; - else if(p1[3] < p2[3]) return 0; + if(p1.s6_addr32[3] > p2.s6_addr32[3]) return 1; + else if(p1.s6_addr32[3] < p2.s6_addr32[3]) return 0; return 0; } static inline int sfip_fast_eq6(const sfaddr_t *ip1, const sfaddr_t *ip2) { - const uint32_t *p1, *p2; - - p1 = sfaddr_get_ip6_ptr(ip1); - p2 = sfaddr_get_ip6_ptr(ip2); + const struct in6_addr p1 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip1); + const struct in6_addr p2 = *(struct in6_addr *)sfaddr_get_ip6_ptr(ip2); - if(*p1 != *p2) return 0; - if(p1[1] != p2[1]) return 0; - if(p1[2] != p2[2]) return 0; - if(p1[3] != p2[3]) return 0; + if(p1.s6_addr32[0] != p2.s6_addr32[0]) return 0; + if(p1.s6_addr32[1] != p2.s6_addr32[1]) return 0; + if(p1.s6_addr32[2] != p2.s6_addr32[2]) return 0; + if(p1.s6_addr32[3] != p2.s6_addr32[3]) return 0; return 1; } diff -Nru snort-2.9.15.1/src/sfutil/sf_iph.c snort-2.9.20/src/sfutil/sf_iph.c --- snort-2.9.15.1/src/sfutil/sf_iph.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_iph.c 2022-05-18 05:05:38.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2007-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_iph.h snort-2.9.20/src/sfutil/sf_iph.h --- snort-2.9.15.1/src/sfutil/sf_iph.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_iph.h 2022-05-18 05:05:40.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_ipvar.c snort-2.9.20/src/sfutil/sf_ipvar.c --- snort-2.9.15.1/src/sfutil/sf_ipvar.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_ipvar.c 2022-05-18 05:05:41.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_ipvar.h snort-2.9.20/src/sfutil/sf_ipvar.h --- snort-2.9.15.1/src/sfutil/sf_ipvar.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_ipvar.h 2022-05-18 05:05:42.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_sechash.c snort-2.9.20/src/sfutil/sf_sechash.c --- snort-2.9.15.1/src/sfutil/sf_sechash.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_sechash.c 2022-05-18 05:05:43.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_sechash.h snort-2.9.20/src/sfutil/sf_sechash.h --- snort-2.9.15.1/src/sfutil/sf_sechash.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_sechash.h 2022-05-18 05:05:44.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_seqnums.h snort-2.9.20/src/sfutil/sf_seqnums.h --- snort-2.9.15.1/src/sfutil/sf_seqnums.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_seqnums.h 2022-05-18 05:05:45.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_textlog.c snort-2.9.20/src/sfutil/sf_textlog.c --- snort-2.9.15.1/src/sfutil/sf_textlog.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_textlog.c 2022-05-18 05:05:46.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_textlog.h snort-2.9.20/src/sfutil/sf_textlog.h --- snort-2.9.15.1/src/sfutil/sf_textlog.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_textlog.h 2022-05-18 05:05:47.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_vartable.c snort-2.9.20/src/sfutil/sf_vartable.c --- snort-2.9.15.1/src/sfutil/sf_vartable.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_vartable.c 2022-05-18 05:05:48.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sf_vartable.h snort-2.9.20/src/sfutil/sf_vartable.h --- snort-2.9.15.1/src/sfutil/sf_vartable.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sf_vartable.h 2022-05-18 05:05:49.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfdebug.h snort-2.9.20/src/sfutil/sfdebug.h --- snort-2.9.15.1/src/sfutil/sfdebug.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfdebug.h 2022-05-18 05:05:52.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfeventq.c snort-2.9.20/src/sfutil/sfeventq.c --- snort-2.9.15.1/src/sfutil/sfeventq.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfeventq.c 2022-05-18 05:05:53.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfeventq.h snort-2.9.20/src/sfutil/sfeventq.h --- snort-2.9.15.1/src/sfutil/sfeventq.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfeventq.h 2022-05-18 05:05:55.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfghash.c snort-2.9.20/src/sfutil/sfghash.c --- snort-2.9.15.1/src/sfutil/sfghash.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfghash.c 2022-05-18 05:05:56.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfghash.h snort-2.9.20/src/sfutil/sfghash.h --- snort-2.9.15.1/src/sfutil/sfghash.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfghash.h 2022-05-18 05:05:57.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfhashfcn.c snort-2.9.20/src/sfutil/sfhashfcn.c --- snort-2.9.15.1/src/sfutil/sfhashfcn.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfhashfcn.c 2022-05-18 05:05:58.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfhashfcn.h snort-2.9.20/src/sfutil/sfhashfcn.h --- snort-2.9.15.1/src/sfutil/sfhashfcn.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfhashfcn.h 2022-05-18 05:05:59.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfksearch.c snort-2.9.20/src/sfutil/sfksearch.c --- snort-2.9.15.1/src/sfutil/sfksearch.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfksearch.c 2022-05-18 05:06:00.000000000 +0000 @@ -11,7 +11,7 @@ * * ** Copyright (C) 2001 Marc Norton -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfksearch.h snort-2.9.20/src/sfutil/sfksearch.h --- snort-2.9.15.1/src/sfutil/sfksearch.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfksearch.h 2022-05-18 05:06:01.000000000 +0000 @@ -5,7 +5,7 @@ * * * Copyright (C) 2001 Marc Norton -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sflsq.c snort-2.9.20/src/sfutil/sflsq.c --- snort-2.9.15.1/src/sfutil/sflsq.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sflsq.c 2022-05-18 05:06:02.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sflsq.h snort-2.9.20/src/sfutil/sflsq.h --- snort-2.9.15.1/src/sfutil/sflsq.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sflsq.h 2022-05-18 05:06:03.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfmemcap.c snort-2.9.20/src/sfutil/sfmemcap.c --- snort-2.9.15.1/src/sfutil/sfmemcap.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfmemcap.c 2022-05-18 05:06:04.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfmemcap.h snort-2.9.20/src/sfutil/sfmemcap.h --- snort-2.9.15.1/src/sfutil/sfmemcap.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfmemcap.h 2022-05-18 05:06:05.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfportobject.c snort-2.9.20/src/sfutil/sfportobject.c --- snort-2.9.15.1/src/sfutil/sfportobject.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfportobject.c 2022-05-18 05:06:12.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -705,7 +705,11 @@ { poinew = PortObjectItemDup( poi ); if(!poinew) - return 0; + { + free (ponew->name); + free (ponew); + return NULL; + } PortObjectAddItem( ponew, poinew, NULL ); } } diff -Nru snort-2.9.15.1/src/sfutil/sfportobject.h snort-2.9.20/src/sfutil/sfportobject.h --- snort-2.9.15.1/src/sfutil/sfportobject.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfportobject.h 2022-05-18 05:06:16.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfprimetable.c snort-2.9.20/src/sfutil/sfprimetable.c --- snort-2.9.15.1/src/sfutil/sfprimetable.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfprimetable.c 2022-05-18 05:06:17.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfprimetable.h snort-2.9.20/src/sfutil/sfprimetable.h --- snort-2.9.15.1/src/sfutil/sfprimetable.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfprimetable.h 2022-05-18 05:06:18.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrf.c snort-2.9.20/src/sfutil/sfrf.c --- snort-2.9.15.1/src/sfutil/sfrf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrf.c 2022-05-18 05:06:19.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrf.h snort-2.9.20/src/sfutil/sfrf.h --- snort-2.9.15.1/src/sfutil/sfrf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrf.h 2022-05-18 05:06:21.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrim.c snort-2.9.20/src/sfutil/sfrim.c --- snort-2.9.15.1/src/sfutil/sfrim.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrim.c 2022-05-18 05:06:22.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrim.h snort-2.9.20/src/sfutil/sfrim.h --- snort-2.9.15.1/src/sfutil/sfrim.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrim.h 2022-05-18 05:06:23.000000000 +0000 @@ -4,7 +4,7 @@ * Rule Index Map * * author: marc norton - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. */ #ifndef SFRIM_H diff -Nru snort-2.9.15.1/src/sfutil/sfrt.c snort-2.9.20/src/sfutil/sfrt.c --- snort-2.9.15.1/src/sfutil/sfrt.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt.c 2022-05-18 05:06:24.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrt.h snort-2.9.20/src/sfutil/sfrt.h --- snort-2.9.15.1/src/sfutil/sfrt.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt.h 2022-05-18 05:06:25.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrt_dir.c snort-2.9.20/src/sfutil/sfrt_dir.c --- snort-2.9.15.1/src/sfutil/sfrt_dir.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt_dir.c 2022-05-18 05:06:26.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrt_dir.h snort-2.9.20/src/sfutil/sfrt_dir.h --- snort-2.9.15.1/src/sfutil/sfrt_dir.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt_dir.h 2022-05-18 05:06:27.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfrt_flat.c snort-2.9.20/src/sfutil/sfrt_flat.c --- snort-2.9.15.1/src/sfutil/sfrt_flat.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt_flat.c 2022-05-18 05:06:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/sfutil/sfrt_flat.h snort-2.9.20/src/sfutil/sfrt_flat.h --- snort-2.9.15.1/src/sfutil/sfrt_flat.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt_flat.h 2022-05-18 05:06:30.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/sfutil/sfrt_flat_dir.c snort-2.9.20/src/sfutil/sfrt_flat_dir.c --- snort-2.9.15.1/src/sfutil/sfrt_flat_dir.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt_flat_dir.c 2022-05-18 05:06:31.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/sfutil/sfrt_flat_dir.h snort-2.9.20/src/sfutil/sfrt_flat_dir.h --- snort-2.9.15.1/src/sfutil/sfrt_flat_dir.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt_flat_dir.h 2022-05-18 05:06:32.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2011-2013 Sourcefire, Inc. ** ** diff -Nru snort-2.9.15.1/src/sfutil/sfrt_trie.h snort-2.9.20/src/sfutil/sfrt_trie.h --- snort-2.9.15.1/src/sfutil/sfrt_trie.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfrt_trie.h 2022-05-18 05:06:35.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2006-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfsnprintfappend.c snort-2.9.20/src/sfutil/sfsnprintfappend.c --- snort-2.9.15.1/src/sfutil/sfsnprintfappend.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfsnprintfappend.c 2022-05-18 05:06:36.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfsnprintfappend.h snort-2.9.20/src/sfutil/sfsnprintfappend.h --- snort-2.9.15.1/src/sfutil/sfsnprintfappend.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfsnprintfappend.h 2022-05-18 05:06:37.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfthd.c snort-2.9.20/src/sfutil/sfthd.c --- snort-2.9.15.1/src/sfutil/sfthd.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfthd.c 2022-05-18 05:06:38.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfthd.h snort-2.9.20/src/sfutil/sfthd.h --- snort-2.9.15.1/src/sfutil/sfthd.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfthd.h 2022-05-18 05:06:39.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfxhash.c snort-2.9.20/src/sfutil/sfxhash.c --- snort-2.9.15.1/src/sfutil/sfxhash.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfxhash.c 2022-05-18 05:06:40.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/sfxhash.h snort-2.9.20/src/sfutil/sfxhash.h --- snort-2.9.15.1/src/sfutil/sfxhash.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/sfxhash.h 2022-05-18 05:06:41.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/strvec.c snort-2.9.20/src/sfutil/strvec.c --- snort-2.9.15.1/src/sfutil/strvec.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/strvec.c 2022-05-18 05:06:44.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/strvec.h snort-2.9.20/src/sfutil/strvec.h --- snort-2.9.15.1/src/sfutil/strvec.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/strvec.h 2022-05-18 05:06:46.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2009-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_jsnorm.c snort-2.9.20/src/sfutil/util_jsnorm.c --- snort-2.9.15.1/src/sfutil/util_jsnorm.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_jsnorm.c 2022-05-18 05:06:48.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Writen by Bhagyashree Bantwal @@ -90,7 +90,7 @@ ACT_UNESCAPE } ActionJSNorm; -int hex_lookup[256]; +static int hex_lookup[256]; int valid_chars[256]; char decoded_out[6335]; diff -Nru snort-2.9.15.1/src/sfutil/util_jsnorm.h snort-2.9.20/src/sfutil/util_jsnorm.h --- snort-2.9.15.1/src/sfutil/util_jsnorm.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_jsnorm.h 2022-05-18 05:06:49.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Writen by Bhagyashree Bantwal diff -Nru snort-2.9.15.1/src/sfutil/util_math.c snort-2.9.20/src/sfutil/util_math.c --- snort-2.9.15.1/src/sfutil/util_math.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_math.c 2022-05-18 05:06:50.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_math.h snort-2.9.20/src/sfutil/util_math.h --- snort-2.9.15.1/src/sfutil/util_math.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_math.h 2022-05-18 05:06:51.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_net.c snort-2.9.20/src/sfutil/util_net.c --- snort-2.9.15.1/src/sfutil/util_net.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_net.c 2022-05-18 05:06:52.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_net.h snort-2.9.20/src/sfutil/util_net.h --- snort-2.9.15.1/src/sfutil/util_net.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_net.h 2022-05-18 05:06:53.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_str.c snort-2.9.20/src/sfutil/util_str.c --- snort-2.9.15.1/src/sfutil/util_str.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_str.c 2022-05-18 05:06:54.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_str.h snort-2.9.20/src/sfutil/util_str.h --- snort-2.9.15.1/src/sfutil/util_str.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_str.h 2022-05-18 05:06:55.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_unfold.c snort-2.9.20/src/sfutil/util_unfold.c --- snort-2.9.15.1/src/sfutil/util_unfold.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_unfold.c 2022-05-18 05:06:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Writen by Bhagyashree Bantwal diff -Nru snort-2.9.15.1/src/sfutil/util_unfold.h snort-2.9.20/src/sfutil/util_unfold.h --- snort-2.9.15.1/src/sfutil/util_unfold.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_unfold.h 2022-05-18 05:06:57.000000000 +0000 @@ -1,5 +1,5 @@ /* - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 1998-2013 Sourcefire, Inc. ** ** Writen by Bhagyashree Bantwal diff -Nru snort-2.9.15.1/src/sfutil/util_utf.c snort-2.9.20/src/sfutil/util_utf.c --- snort-2.9.15.1/src/sfutil/util_utf.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_utf.c 2022-05-18 05:06:59.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2010-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/sfutil/util_utf.h snort-2.9.20/src/sfutil/util_utf.h --- snort-2.9.15.1/src/sfutil/util_utf.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/sfutil/util_utf.h 2022-05-18 05:07:00.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2010-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/side-channel/Makefile.in snort-2.9.20/src/side-channel/Makefile.in --- snort-2.9.15.1/src/side-channel/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/side-channel/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/side-channel -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -113,7 +123,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -158,7 +168,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -179,6 +189,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -249,6 +260,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -358,14 +370,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/side-channel/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/side-channel/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -392,10 +403,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -505,7 +516,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -681,6 +695,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/side-channel/dmq.c snort-2.9.20/src/side-channel/dmq.c --- snort-2.9.15.1/src/side-channel/dmq.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/dmq.c 2022-05-18 05:07:01.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/dmq.h snort-2.9.20/src/side-channel/dmq.h --- snort-2.9.15.1/src/side-channel/dmq.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/dmq.h 2022-05-18 05:07:02.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/dynamic-plugins/Makefile.in snort-2.9.20/src/side-channel/dynamic-plugins/Makefile.in --- snort-2.9.15.1/src/side-channel/dynamic-plugins/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/side-channel/dynamic-plugins/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,7 +17,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,13 +91,12 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/side-channel/dynamic-plugins -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/snort_side_channel.pc.in \ - $(am__sidechannellibinclude_HEADERS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am \ + $(am__sidechannellibinclude_HEADERS_DIST) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = snort_side_channel.pc @@ -154,7 +163,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -204,6 +213,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(srcdir)/snort_side_channel.pc.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -249,6 +260,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -376,14 +388,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/side-channel/dynamic-plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/side-channel/dynamic-plugins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -442,10 +453,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -574,7 +585,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -736,6 +750,8 @@ uninstall-pkgconfigDATA uninstall-sidechannellibLTLIBRARIES \ uninstall-sidechannellibincludeHEADERS +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.c snort-2.9.20/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.c --- snort-2.9.15.1/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.c 2022-05-18 05:07:03.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.h snort-2.9.20/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.h --- snort-2.9.15.1/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/dynamic-plugins/sf_dynamic_side_channel_lib.h 2022-05-18 05:07:04.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/dynamic-plugins/sf_side_channel_info.h snort-2.9.20/src/side-channel/dynamic-plugins/sf_side_channel_info.h --- snort-2.9.15.1/src/side-channel/dynamic-plugins/sf_side_channel_info.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/dynamic-plugins/sf_side_channel_info.h 2022-05-18 05:07:05.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/plugins/Makefile.in snort-2.9.20/src/side-channel/plugins/Makefile.in --- snort-2.9.15.1/src/side-channel/plugins/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/side-channel/plugins/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/side-channel/plugins -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -112,7 +122,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -161,6 +171,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -206,6 +217,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -316,14 +328,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/side-channel/plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/side-channel/plugins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -350,10 +361,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -416,7 +427,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -565,6 +579,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/side-channel/plugins/sscm_logger.c snort-2.9.20/src/side-channel/plugins/sscm_logger.c --- snort-2.9.15.1/src/side-channel/plugins/sscm_logger.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/plugins/sscm_logger.c 2022-05-18 05:07:06.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/plugins/sscm_logger.h snort-2.9.20/src/side-channel/plugins/sscm_logger.h --- snort-2.9.15.1/src/side-channel/plugins/sscm_logger.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/plugins/sscm_logger.h 2022-05-18 05:07:07.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/rbmq.c snort-2.9.20/src/side-channel/rbmq.c --- snort-2.9.15.1/src/side-channel/rbmq.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/rbmq.c 2022-05-18 05:07:08.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/rbmq.h snort-2.9.20/src/side-channel/rbmq.h --- snort-2.9.15.1/src/side-channel/rbmq.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/rbmq.h 2022-05-18 05:07:09.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/sidechannel.c snort-2.9.20/src/side-channel/sidechannel.c --- snort-2.9.15.1/src/side-channel/sidechannel.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/sidechannel.c 2022-05-18 05:07:10.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer @@ -378,6 +378,13 @@ int rval; /* + * During snort exit, any messages need not to be processed. So checking + * stop_processing before processing the message. + */ + if (stop_processing) { + return -1; + } + /* * Because the Snort main thread relinquishes control to DAQ_Acquire for up to a second, * we potentially need to preempt it and process RX messages as they are being enqueued * to avoid backups and overruns. @@ -589,6 +596,7 @@ } done: pthread_mutex_unlock(&tx_queue.mutex); + tx_thread_running = 0; LogMessage("Side Channel thread exiting...\n"); diff -Nru snort-2.9.15.1/src/side-channel/sidechannel.h snort-2.9.20/src/side-channel/sidechannel.h --- snort-2.9.15.1/src/side-channel/sidechannel.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/sidechannel.h 2022-05-18 05:07:11.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/side-channel/sidechannel_define.h snort-2.9.20/src/side-channel/sidechannel_define.h --- snort-2.9.15.1/src/side-channel/sidechannel_define.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/side-channel/sidechannel_define.h 2022-05-18 05:07:12.000000000 +0000 @@ -14,7 +14,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2012-2013 Sourcefire, Inc. * * Author: Michael Altizer diff -Nru snort-2.9.15.1/src/signature.c snort-2.9.20/src/signature.c --- snort-2.9.15.1/src/signature.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/signature.c 2022-05-18 05:07:14.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Andrew R. Baker ** diff -Nru snort-2.9.15.1/src/signature.h snort-2.9.20/src/signature.h --- snort-2.9.15.1/src/signature.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/signature.h 2022-05-18 05:07:15.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Andrew R. Baker ** diff -Nru snort-2.9.15.1/src/smtp_api.h snort-2.9.20/src/smtp_api.h --- snort-2.9.15.1/src/smtp_api.h 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/smtp_api.h 2022-05-18 05:07:16.000000000 +0000 @@ -0,0 +1,36 @@ +/* + ** Copyright (C) 2021-2022 Cisco and/or its affiliates. All rights reserved. + * ** This program is free software; you can redistribute it and/or modify + * ** it under the terms of the GNU General Public License Version 2 as + * ** published by the Free Software Foundation. You may not use, modify or + * ** distribute this program under any other version of the GNU General + * ** Public License. + * ** + * ** This program is distributed in the hope that it will be useful, + * ** but WITHOUT ANY WARRANTY; without even the implied warranty of + * ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * ** GNU General Public License for more details. + * ** + * ** You should have received a copy of the GNU General Public License + * ** along with this program; if not, write to the Free Software + * ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * */ + +/**************************************************************************/ + +#ifndef __SMTP_API_H__ +#define __SMTP_API_H__ + +typedef struct _smtp_api { + int (*smtp_session_exists)(void *data); + int (*smtp_get_file_name)(void *data, uint8_t **buf, uint32_t *len, + uint32_t *type); + int (*smtp_get_mail_from)(void *data, uint8_t **buf, uint32_t *len, + uint32_t *type); + int (*smtp_get_recv_to)(void *data, uint8_t **buf, uint32_t *len, + uint32_t *type); + int (*smtp_get_email_hdr)(void *data, uint8_t **buf, uint32_t *len, + uint32_t *type); +} SmtpAPI; +#endif + diff -Nru snort-2.9.15.1/src/snort.c snort-2.9.20/src/snort.c --- snort-2.9.15.1/src/snort.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/snort.c 2022-05-18 05:07:17.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** @@ -139,6 +139,7 @@ #include "reload.h" #include "reg_test.h" #include "memory_stats.h" +#include "pthread.h" #ifdef SIDE_CHANNEL # include "sidechannel.h" #endif @@ -222,6 +223,10 @@ #define TIME_TO_PRUNE_ONE_SESSION 0.2 const uint32_t FLOW_COUNT = (AAB_THRESHOLD/TIME_TO_PRUNE_ONE_SESSION) / 3; volatile int detection_lib_changed = 0; +#ifdef SNORT_RELOAD +extern volatile bool reloadInProgress; +#endif + /* Data types *****************************************************************/ @@ -336,6 +341,8 @@ #endif uint8_t iprep_current_update_counter; +bool periodic_dump_enable = false; + /* Locals/Private ************************************************************/ static long int pcap_loop_count = 0; static SF_QUEUE *pcap_save_queue = NULL; @@ -407,7 +414,7 @@ #ifdef WIN32 "W" #endif - "XxyZ:" + "XxyZ:z:" ; static struct option long_options[] = @@ -744,11 +751,6 @@ #endif SnortInit(argc, argv); - -#if 0 - sleep(10); -#endif - intf = GetPacketSource(&tmp_ptr); daqInit = intf || snort_conf->daq_type; @@ -805,6 +807,14 @@ { LogMessage("Failed to register the memory stats display handler.\n"); } + if (ControlSocketRegisterHandler(CS_TYPE_MEM_STATS_CFG, &PPMemoryStatsDumpCfg, NULL, NULL)) + { + LogMessage("Failed to register the preprocessor memory stats dump enable/disable handler.\n"); + } + if (ControlSocketRegisterHandler(CS_TYPE_MEM_STATS_SHOW, NULL, NULL, &PPMemoryStatsDumpShow)) + { + LogMessage("Failed to register the preprocessor memory stats dump show handler.\n"); + } if ( ScTestMode() ) { @@ -842,7 +852,7 @@ getDaqCapaTimeoutFnPtr(Daq_Capa_Timeout); } #endif -#if defined(DAQ_CAPA_VRF) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) Daq_Capa_Vrf = DAQ_CanGetVrf(); #endif @@ -1549,6 +1559,8 @@ PREPROC_PROFILE_END(metaPerfStats); + Active_Reset(); + #if defined(WIN32) && defined(ENABLE_WIN32_SERVICE) if (ScTerminateService() || ScPauseService()) { @@ -1588,6 +1600,11 @@ verdict_reason = VERDICT_REASON_NO_BLOCK; PROFILE_VARS; + /* The active_drop_pkt is reset to default value to make sure stale + * value from previous session packet processing is not set + */ + Active_Reset(); + PREPROC_PROFILE_START_PI(totalPerfStats); #ifdef SIDE_CHANNEL @@ -1750,6 +1767,12 @@ if( session_api ) session_api->check_session_timeout(4, pkthdr->ts.tv_sec); + + /* Reset the active_drop_pkt value as during timeout/EOF the stale value gets set and + * need to be reset for next packet processing + */ + Active_Reset(); + #ifdef SNORT_RELOAD ReloadAdjust(false, pkthdr->ts.tv_sec); #endif @@ -1885,8 +1908,9 @@ PacketDumpClose(); else if (packet_dump_file && #ifdef HAVE_DAQ_ADDRESS_SPACE_ID -#ifdef DAQ_CAPA_VRF - (pkthdr->address_space_id_src == packet_dump_address_space_id) && +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) + ((pkthdr->address_space_id_src == packet_dump_address_space_id) || + (pkthdr->address_space_id_dst == packet_dump_address_space_id)) && #else pkthdr->address_space_id == packet_dump_address_space_id && #endif @@ -2025,6 +2049,7 @@ FPUTS_BOTH (" -X Dump the raw packet data starting at the link layer\n"); FPUTS_BOTH (" -x Exit if Snort configuration problems occur\n"); FPUTS_BOTH (" -y Include year in timestamp in the alert and log files\n"); + FPUTS_BOTH (" -z Set the preproc_memstats file path and name\n"); FPUTS_BOTH (" -Z Set the performonitor preprocessor file path and name\n"); FPUTS_BOTH (" -? Show this information\n"); FPUTS_BOTH (" are standard BPF options, as seen in TCPDump\n"); @@ -2819,6 +2844,12 @@ ConfigPerfFile(sc, optarg); break; + case 'z': /* Set preprocessor memory stats path/filename */ + ConfigDumpPeriodicMemStatsFile(sc, optarg); + if (sc->memdump_file) + periodic_dump_enable = true; + break; + case PCAP_FILE_LIST: case PCAP_LIST: #ifndef WIN32 @@ -3262,6 +3293,7 @@ nanosleep(&packet_sleep, NULL); #endif #endif + rotate_preproc_stats(); #ifndef REG_TEST if( session_api ) @@ -3338,6 +3370,9 @@ // Check if its time to dump perf data sfPerformanceStatsOOB(perfmon_config, curr_time); + + if (periodic_dump_enable) + dump_preproc_stats(curr_time); } // check for signals @@ -3391,6 +3426,7 @@ error = 0; else if ( error > 0 ) { + SnortShutdownThreads(error); DAQ_Abort(); exit(1); } @@ -3505,9 +3541,21 @@ /* Signal Handlers ************************************************************/ static void SigExitHandler(int signal) { + if (exit_signal != 0) return; - + + /* If snort received signal to exit before its initialization, + * we can just close DAQ interfaces and exit quickly, otherwise + * lets follow normal path. Snort will not print stats when + * it is asked to exit during initialization. + */ + if (snort_initializing) + { + DAQ_Abort(); + _exit(0); + } + exit_signal = signal; } @@ -3631,6 +3679,78 @@ exit(exit_val); } +void SnortShutdownThreads(int exit_val) +{ + LogMessage("Snort is shutting down other threads, exit_val %d", exit_val); + + if (!InMainThread()) + { + LogMessage("Snort shutdown thread is not called at main thread, so exiting..!"); + return; + } + + if (already_exiting != 0) + { + LogMessage("Exiting shutdown Threads, exit processing by another thread"); + return; + } + + if (pthread_mutex_trylock(&cleanup_mutex) != 0) + { + LogMessage("Exiting shutdown Threads, as someother thread is cleaning!"); + return; + } + + already_exiting = 1; + snort_exiting = 1; + snort_initializing = false; +#if defined(INLINE_FAILOPEN) && !defined(WIN32) + if (inline_failopen_thread_running) + { + pthread_kill(inline_failopen_thread_id, SIGKILL); + } +#endif + + if (DAQ_WasStarted()) + { +#ifdef EXIT_CHECK + if (snort_conf->exit_check) + ExitCheckEnd(); +#endif + } + + ControlSocketCleanUp(); +#ifdef SIDE_CHANNEL + if (ScSideChannelEnabled()) + { + SideChannelStopTXThread(); + SideChannelCleanUp(); + } +#endif + +#if defined(SNORT_RELOAD) && !defined(WIN32) + if (snort_reload_thread_created) + { + pthread_join(snort_reload_thread_id, NULL); + } +#endif + +#if defined(TARGET_BASED) && !defined(WIN32) + if (attribute_reload_thread_running) + { + attribute_reload_thread_stop = 1; + pthread_kill(attribute_reload_thread_id, SIGVTALRM); + while (attribute_reload_thread_running) + nanosleep(&thread_sleep, NULL); + pthread_join(attribute_reload_thread_id, NULL); + } +#endif + + PrintStatistics(); + pthread_mutex_unlock(&cleanup_mutex); + LogMessage("Shutting down the threads -- Done"); +} + static void SnortCleanup(int exit_val) { PreprocSignalFuncNode *idxPreproc = NULL; @@ -3722,7 +3842,7 @@ pthread_join(attribute_reload_thread_id, NULL); } #endif - + /* Do some post processing on any incomplete Preprocessor Data */ idxPreproc = preproc_shutdown_funcs; while (idxPreproc) @@ -3769,7 +3889,6 @@ memset(&decoderAlertMemPool, 0, sizeof(decoderAlertMemPool)); } - MemoryStatsFree(); DAQ_Delete(); DAQ_Term(); ScRestoreInternalLogLevel(); // Do we need this? @@ -3821,8 +3940,17 @@ { SnortConfFree(snort_cmd_line_conf); snort_cmd_line_conf = NULL; +#ifdef SNORT_RELOAD + if (!reloadInProgress) + { + SnortConfFree(snort_conf); + snort_conf = NULL; + } +#else SnortConfFree(snort_conf); snort_conf = NULL; +#endif + } #ifdef SNORT_RELOAD @@ -3844,20 +3972,28 @@ sfthreshold_free(); RateFilter_Cleanup(); asn1_free_mem(); - FreeOutputConfigFuncs(); - FreePreprocConfigFuncs(); - FreeRuleOptConfigFuncs(rule_opt_config_funcs); - rule_opt_config_funcs = NULL; +#ifdef SNORT_RELOAD + if (!reloadInProgress) + { +#endif + FreeOutputConfigFuncs(); + FreePreprocConfigFuncs(); - FreeRuleOptOverrideInitFuncs(rule_opt_override_init_funcs); - rule_opt_override_init_funcs = NULL; + FreeRuleOptConfigFuncs(rule_opt_config_funcs); + rule_opt_config_funcs = NULL; - FreeRuleOptByteOrderFuncs(rule_opt_byte_order_funcs); - rule_opt_byte_order_funcs = NULL; + FreeRuleOptOverrideInitFuncs(rule_opt_override_init_funcs); + rule_opt_override_init_funcs = NULL; - FreeRuleOptParseCleanupList(rule_opt_parse_cleanup_list); - rule_opt_parse_cleanup_list = NULL; + FreeRuleOptByteOrderFuncs(rule_opt_byte_order_funcs); + rule_opt_byte_order_funcs = NULL; + + FreeRuleOptParseCleanupList(rule_opt_parse_cleanup_list); + rule_opt_parse_cleanup_list = NULL; +#ifdef SNORT_RELOAD + } +#endif FreeOutputList(AlertList); AlertList = NULL; @@ -4183,7 +4319,9 @@ sc->max_metadata_services = DEFAULT_MAX_METADATA_SERVICES; #endif #if defined(FEAT_OPEN_APPID) +#ifdef TARGET_BASED sc->max_metadata_appid = DEFAULT_MAX_METADATA_APPID; +#endif #endif /* defined(FEAT_OPEN_APPID) */ #ifdef MPLS @@ -4239,6 +4377,9 @@ if (sc->perf_file != NULL) free(sc->perf_file); + if (sc->memdump_file!= NULL) + free(sc->memdump_file); + if (sc->bpf_filter != NULL) free(sc->bpf_filter); @@ -4340,8 +4481,17 @@ if (p != NULL) free(p); + + if (sc->udp_ips_port_filter_list) { + IpsPortFilter *ips_portfilter = sc->udp_ips_port_filter_list[i]; + if (ips_portfilter) + free(ips_portfilter); + } } + if (sc->udp_ips_port_filter_list) + free (sc->udp_ips_port_filter_list); + free(sc->targeted_policies); if ( sc->react_page ) @@ -4780,6 +4930,13 @@ config_file->perf_file = SnortStrdup(cmd_line->perf_file); } + if (cmd_line->memdump_file != NULL) + { + if (config_file->memdump_file != NULL) + free(config_file->memdump_file); + config_file->memdump_file = SnortStrdup(cmd_line->memdump_file); + } + if ( cmd_line->daq_type ) config_file->daq_type = SnortStrdup(cmd_line->daq_type); @@ -5081,7 +5238,7 @@ } init_fileAPI(); - + initMemoryStatsApi(); /* if we're using the rules system, it gets initialized here */ if (snort_conf_file != NULL) { @@ -5115,6 +5272,7 @@ #endif LogMessage("Parsing Rules file \"%s\"\n", snort_conf_file); + sc = ParseSnortConf(); /* Merge the command line and config file confs to take care of @@ -5321,6 +5479,8 @@ FlowBitsVerify(); } + snort_conf->udp_ips_port_filter_list = ParseIpsPortList(snort_conf, IPPROTO_UDP); + if (snort_conf->file_mask != 0) umask(snort_conf->file_mask); else @@ -5428,6 +5588,11 @@ // function to those things that depend on DAQ startup or non-root user/group. static void SnortUnprivilegedInit(void) { + +#ifndef REG_TEST + struct rusage ru; +#endif + #ifdef ACTIVE_RESPONSE // this depends on instantiated daq capabilities // so it is done here instead of SnortInit() @@ -5463,6 +5628,11 @@ if (ScTestMode()) { +#ifndef REG_TEST + LogMessage("\n"); + getrusage(RUSAGE_SELF, &ru); + LogMessage("Total snort Fixed Memory Cost - MaxRss:%li", ru.ru_maxrss); +#endif LogMessage("\n"); LogMessage("Snort successfully validated the configuration!\n"); CleanExit(0); @@ -5715,8 +5885,8 @@ "ALLOW", "BLOCK", "REPLACE", - "WHITELIST", - "BLACKLSIT", + "ALLOWFLOW", + "BLOCKFLOW", "IGNORE", "RETRY" }; diff -Nru snort-2.9.15.1/src/snort.h snort-2.9.20/src/snort.h --- snort-2.9.15.1/src/snort.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/snort.h 2022-05-18 05:07:18.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** Copyright (C) 1998-2005 Martin Roesch ** @@ -73,8 +73,12 @@ /* D E F I N E S ************************************************************/ /* Mark this as a modern version of snort */ #define SNORT_20 - -#define MIN_SNAPLEN 68 +/* + * The original Ethernet IEEE 802.3 standard defined the minimum Ethernet + * frame size as 64 bytes. The snaplen is L2 MRU for snort and hence following + * standard, the MIN_SNAPLEN should be 64. + */ +#define MIN_SNAPLEN 64 #define MAX_SNAPLEN UINT16_MAX #define MAX_IFS 1 @@ -695,6 +699,13 @@ #endif struct _fileConfig; struct _DynamicRuleNode; + +typedef struct _IpsPortFilter +{ + tSfPolicyId parserPolicyId; + uint16_t port_filter[MAX_PORTS + 1]; +} IpsPortFilter; + typedef struct _SnortConfig { RunMode run_mode; @@ -811,7 +822,7 @@ # endif #endif - uint8_t ignore_ports[UINT16_MAX]; /* config ignore_ports */ + uint8_t ignore_ports[UINT16_MAX + 1]; /* config ignore_ports */ long int tagged_packet_limit; /* config tagged_packet_limit */ long int pcre_match_limit; /* config pcre_match_limit */ long int pcre_match_limit_recursion; /* config pcre_match_limit_recursion */ @@ -942,6 +953,7 @@ tSfPolicyConfig *policy_config; SnortPolicy **targeted_policies; + IpsPortFilter **udp_ips_port_filter_list; unsigned int num_policies_allocated; char *base_version; @@ -1011,6 +1023,7 @@ #endif DynamicDetectionPlugin *loadedDetectionPlugins; struct _DynamicRuleNode *dynamic_rules; + char *memdump_file; } SnortConfig; /* struct to collect packet statistics */ @@ -1162,7 +1175,7 @@ bool Daq_Capa_Timeout; #endif -#if defined(DAQ_CAPA_VRF) +#if !defined(SFLINUX) && defined(DAQ_CAPA_VRF) bool Daq_Capa_Vrf; #endif @@ -1239,6 +1252,7 @@ void CleanupPlugins(SnortConfig *); void CleanExit(int); SnortConfig * MergeSnortConfs(SnortConfig *, SnortConfig *); +void SnortShutdownThreads(int); typedef void (*sighandler_t)(int); int SnortAddSignal(int sig, sighandler_t handler, int); diff -Nru snort-2.9.15.1/src/snort_bounds.h snort-2.9.20/src/snort_bounds.h --- snort-2.9.15.1/src/snort_bounds.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/snort_bounds.h 2022-05-18 05:07:19.000000000 +0000 @@ -1,7 +1,7 @@ #ifndef _BOUNDS_H #define _BOUNDS_H /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2003-2013 Sourcefire, Inc. ** Chris Green ** diff -Nru snort-2.9.15.1/src/snort_debug.h snort-2.9.20/src/snort_debug.h --- snort-2.9.15.1/src/snort_debug.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/snort_debug.h 2022-05-18 05:07:20.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/spo_plugbase.h snort-2.9.20/src/spo_plugbase.h --- snort-2.9.15.1/src/spo_plugbase.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/spo_plugbase.h 2022-05-18 05:07:23.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/tag.c snort-2.9.20/src/tag.c --- snort-2.9.15.1/src/tag.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/tag.c 2022-05-18 05:07:28.000000000 +0000 @@ -1,6 +1,6 @@ /* ** Copyright (C) 1998-2002 Martin Roesch -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Chris Green ** diff -Nru snort-2.9.15.1/src/tag.h snort-2.9.20/src/tag.h --- snort-2.9.15.1/src/tag.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/tag.h 2022-05-18 05:07:30.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 1998-2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/target-based/Makefile.in snort-2.9.20/src/target-based/Makefile.in --- snort-2.9.15.1/src/target-based/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/target-based/Makefile.in 2022-05-23 15:42:31.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,13 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/target-based -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - sf_attribute_table_parser.c sf_attribute_table.c \ - $(top_srcdir)/ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -129,7 +137,7 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -196,6 +204,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ylwrap \ + sf_attribute_table.c sf_attribute_table_parser.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -241,6 +251,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -369,14 +380,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/target-based/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/target-based/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -403,10 +413,10 @@ -rm -f *.tab.c .c.o: - $(AM_V_CC)$(COMPILE) -c $< + $(AM_V_CC)$(COMPILE) -c -o $@ $< .c.obj: - $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'` + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< @@ -469,7 +479,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -620,6 +633,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + .y.c: $(YACC) -d -psfat_ -o$@ $? diff -Nru snort-2.9.15.1/src/target-based/sf_attribute_table.c snort-2.9.20/src/target-based/sf_attribute_table.c --- snort-2.9.15.1/src/target-based/sf_attribute_table.c 2019-12-03 09:39:32.000000000 +0000 +++ snort-2.9.20/src/target-based/sf_attribute_table.c 2022-05-23 15:44:16.000000000 +0000 @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.0.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -1170,6 +1170,7 @@ case N: \ yyformat = S; \ break + default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); @@ -1486,100 +1487,100 @@ switch (yyn) { case 2: -#line 145 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 145 "sf_attribute_table.y" /* yacc.c:1648 */ { YYACCEPT; } -#line 1494 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1495 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 3: -#line 151 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 151 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "SnortAttributes: Got Attribute Map & Table\n");); } -#line 1502 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1503 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 4: -#line 156 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 156 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "SnortAttributes: Got Attribute Table\n");); } -#line 1510 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1511 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 5: -#line 163 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 163 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Got Attribute Map\n");); } -#line 1518 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1519 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 6: -#line 168 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 168 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Empty Mapping Table\n");); } -#line 1526 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1527 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 8: -#line 175 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 175 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "MapEntry: Name: %s, Id %d\n", (yyvsp[-1].mapEntry).s_mapvalue, (yyvsp[-1].mapEntry).l_mapid);); SFAT_AddMapEntry(&(yyvsp[-1].mapEntry)); } -#line 1536 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1537 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 11: -#line 189 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 189 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.mapEntry).l_mapid = (yyvsp[-1].numericValue); SnortStrncpy((yyval.mapEntry).s_mapvalue, (yyvsp[0].stringValue), STD_BUF); } -#line 1545 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1546 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 12: -#line 196 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 196 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "MapValue: %s\n", (yyvsp[-1].stringValue));) SnortStrncpy((yyval.stringValue), (yyvsp[-1].stringValue), STD_BUF); } -#line 1554 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1555 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 13: -#line 203 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 203 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.numericValue) = (yyvsp[-1].numericValue); DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "MapId: %d\n", (yyvsp[-1].numericValue));); } -#line 1563 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1564 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 14: -#line 211 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 211 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Got Attribute Table\n");); } -#line 1571 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1572 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 15: -#line 216 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 216 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "EmptyHostEntry\n");); } -#line 1579 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1580 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 17: -#line 223 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 223 "sf_attribute_table.y" /* yacc.c:1648 */ { if (SFAT_AddHostEntryToMap() != SFAT_OK) { @@ -1587,52 +1588,52 @@ } DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Host Added\n");); } -#line 1591 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1592 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 18: -#line 233 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 233 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Callback to create a host entry object */ SFAT_CreateHostEntry(); } -#line 1600 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1601 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 20: -#line 243 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 243 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "HostEntryData\n");); } -#line 1608 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1609 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 21: -#line 248 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 248 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "HostEntryData: No Services\n");); } -#line 1616 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1617 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 22: -#line 253 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 253 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "HostEntryData: No Clients\n");); } -#line 1624 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1625 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 23: -#line 258 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 258 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "HostEntryData: No Services or Clients\n");); } -#line 1632 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1633 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 24: -#line 265 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 265 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Convert IP/CIDR to Snort IPCidr Object */ /* determine the number of bits (done in SetHostIp4) */ @@ -1641,101 +1642,101 @@ YYABORT; } } -#line 1645 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1646 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 33: -#line 283 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 283 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Copy OSName */ DEBUG_WRAP(PrintAttributeData("OS:Name", &(yyvsp[-1].data));); SFAT_SetOSAttribute(&(yyvsp[-1].data), HOST_INFO_OS); } -#line 1655 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1656 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 34: -#line 291 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 291 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Copy OSVendor */ DEBUG_WRAP(PrintAttributeData("OS:Vendor", &(yyvsp[-1].data));); SFAT_SetOSAttribute(&(yyvsp[-1].data), HOST_INFO_VENDOR); } -#line 1665 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1666 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 35: -#line 299 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 299 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Copy OSVersion */ DEBUG_WRAP(PrintAttributeData("OS:Version", &(yyvsp[-1].data));); SFAT_SetOSAttribute(&(yyvsp[-1].data), HOST_INFO_VERSION); } -#line 1675 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1676 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 36: -#line 307 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 307 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Copy OSFragPolicy */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "OS:FragPolicy: %s\n", (yyvsp[-1].stringValue));); SFAT_SetOSPolicy((yyvsp[-1].stringValue), HOST_INFO_FRAG_POLICY); } -#line 1685 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1686 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 37: -#line 315 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 315 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Copy OSStreamPolicy */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "OS:StreamPolicy: %s\n", (yyvsp[-1].stringValue));); SFAT_SetOSPolicy((yyvsp[-1].stringValue), HOST_INFO_STREAM_POLICY); } -#line 1695 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1696 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 38: -#line 323 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 323 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.data).type = ATTRIBUTE_NAME; (yyval.data).confidence = 100; SnortStrncpy((yyval.data).value.s_value, (yyvsp[0].stringValue), STD_BUF); } -#line 1705 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1706 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 39: -#line 329 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 329 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.data).type = ATTRIBUTE_NAME; (yyval.data).confidence = (yyvsp[0].numericValue); SnortStrncpy((yyval.data).value.s_value, (yyvsp[-1].stringValue), STD_BUF); } -#line 1715 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1716 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 40: -#line 335 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 335 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.data).type = ATTRIBUTE_NAME; (yyval.data).confidence = (yyvsp[0].numericValue); SnortSnprintf((yyval.data).value.s_value, STD_BUF, "%d", (yyvsp[-1].numericValue)); } -#line 1725 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1726 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 41: -#line 341 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 341 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.data).type = ATTRIBUTE_NAME; (yyval.data).confidence = 100; SnortSnprintf((yyval.data).value.s_value, STD_BUF, "%d", (yyvsp[0].numericValue)); } -#line 1735 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1736 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 42: -#line 347 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 347 "sf_attribute_table.y" /* yacc.c:1648 */ { char *mapped_name; (yyval.data).confidence = (yyvsp[0].numericValue); @@ -1755,11 +1756,11 @@ SnortStrncpy((yyval.data).value.s_value, mapped_name, STD_BUF); } } -#line 1759 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1760 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 43: -#line 367 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 367 "sf_attribute_table.y" /* yacc.c:1648 */ { char *mapped_name; (yyval.data).confidence = 100; @@ -1779,364 +1780,364 @@ SnortStrncpy((yyval.data).value.s_value, mapped_name, STD_BUF); } } -#line 1783 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1784 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 44: -#line 389 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 389 "sf_attribute_table.y" /* yacc.c:1648 */ { SnortStrncpy((yyval.stringValue), (yyvsp[-1].stringValue), STD_BUF); } -#line 1791 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1792 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 45: -#line 395 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 395 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.numericValue) = 0; } -#line 1799 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1800 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 46: -#line 399 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 399 "sf_attribute_table.y" /* yacc.c:1648 */ { (yyval.numericValue) = (yyvsp[-1].numericValue); } -#line 1807 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1808 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 47: -#line 405 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 405 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Copy numeric */ (yyval.numericValue) = (yyvsp[-1].numericValue); } -#line 1816 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1817 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 48: -#line 412 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 412 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Copy numeric */ (yyval.numericValue) = (yyvsp[-1].numericValue); } -#line 1825 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1826 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 49: -#line 419 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 419 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "ServiceList (complete)\n");); } -#line 1833 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1834 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 50: -#line 425 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 425 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Start ServiceList\n");); sfat_client_or_service = ATTRIBUTE_SERVICE; } -#line 1842 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1843 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 51: -#line 432 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 432 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "End ServiceList\n");); } -#line 1850 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1851 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 52: -#line 437 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 437 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "EmptyService\n");); } -#line 1858 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1859 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 53: -#line 441 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 441 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service ServiceListData\n");); } -#line 1866 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1867 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 54: -#line 447 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 447 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Adding Complete\n");); SFAT_AddApplicationData(); DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Added\n");); } -#line 1876 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1877 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 55: -#line 455 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 455 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Start\n");); SFAT_CreateApplicationEntry(); } -#line 1885 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1886 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 56: -#line 462 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 462 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service End\n");); } -#line 1893 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1894 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 57: -#line 468 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 468 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data (no application)\n");); } -#line 1901 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1902 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 58: -#line 472 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 472 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data (application)\n");); } -#line 1909 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1910 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 59: -#line 478 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 478 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data Required (IPProto Proto Port)\n");); } -#line 1918 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1919 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 60: -#line 483 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 483 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data Required (IPProto Port Proto)\n");); } -#line 1927 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1928 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 61: -#line 488 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 488 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data Required (Proto IPProto Port)\n");); } -#line 1936 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1937 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 62: -#line 493 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 493 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data Required (Proto Port IPProto)\n");); } -#line 1945 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1946 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 63: -#line 498 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 498 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data Required (Port Proto IPProto)\n");); } -#line 1954 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1955 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 64: -#line 503 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 503 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Service Data Required (Port IPProto Proto)\n");); } -#line 1963 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1964 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 65: -#line 510 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 510 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Store IPProto Info */ DEBUG_WRAP(PrintAttributeData("IPProto", &(yyvsp[-1].data));); SFAT_SetApplicationAttribute(&(yyvsp[-1].data), APPLICATION_ENTRY_IPPROTO); } -#line 1973 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1974 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 66: -#line 518 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 518 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Store Protocol Info */ DEBUG_WRAP(PrintAttributeData("Protocol", &(yyvsp[-1].data));); SFAT_SetApplicationAttribute(&(yyvsp[-1].data), APPLICATION_ENTRY_PROTO); } -#line 1983 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1984 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 67: -#line 526 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 526 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Store Port Info */ DEBUG_WRAP(PrintAttributeData("Port", &(yyvsp[-1].data));); SFAT_SetApplicationAttribute(&(yyvsp[-1].data), APPLICATION_ENTRY_PORT); } -#line 1993 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 1994 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 68: -#line 534 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 534 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Store Application Info */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Application\n")); DEBUG_WRAP(PrintAttributeData("Application", &(yyvsp[-1].data));); SFAT_SetApplicationAttribute(&(yyvsp[-1].data), APPLICATION_ENTRY_APPLICATION); } -#line 2004 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2005 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 69: -#line 541 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 541 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Store Application Info */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Application with Version\n")); DEBUG_WRAP(PrintAttributeData("Application", &(yyvsp[-2].data));); SFAT_SetApplicationAttribute(&(yyvsp[-2].data), APPLICATION_ENTRY_APPLICATION); } -#line 2015 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2016 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 70: -#line 550 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 550 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Store Version Info */ DEBUG_WRAP(PrintAttributeData("Version", &(yyvsp[-1].data));); SFAT_SetApplicationAttribute(&(yyvsp[-1].data), APPLICATION_ENTRY_VERSION); } -#line 2025 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2026 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 71: -#line 558 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 558 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "ClientList (complete)\n");); } -#line 2033 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2034 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 72: -#line 564 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 564 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Start ClientList\n");); sfat_client_or_service = ATTRIBUTE_CLIENT; } -#line 2042 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2043 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 73: -#line 571 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 571 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "End ClientList\n");); } -#line 2050 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2051 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 74: -#line 576 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 576 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "EmptyClient\n");); } -#line 2058 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2059 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 75: -#line 580 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 580 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client ClientListData\n");); } -#line 2066 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2067 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 76: -#line 586 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 586 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Adding Complete\n");); SFAT_AddApplicationData(); DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Added\n");); } -#line 2076 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2077 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 77: -#line 594 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 594 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Start\n");); SFAT_CreateApplicationEntry(); } -#line 2085 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2086 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 78: -#line 601 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 601 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client End\n");); } -#line 2093 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2094 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 79: -#line 607 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 607 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Data (no application)\n");); } -#line 2101 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2102 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 80: -#line 611 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 611 "sf_attribute_table.y" /* yacc.c:1648 */ { DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Data (application)\n");); } -#line 2109 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2110 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 81: -#line 617 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 617 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Data Required (Proto)\n");); } -#line 2118 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2119 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 82: -#line 622 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 622 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Data Required (IPProto Proto)\n");); } -#line 2127 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2128 "sf_attribute_table.c" /* yacc.c:1648 */ break; case 83: -#line 627 "sf_attribute_table.y" /* yacc.c:1646 */ +#line 627 "sf_attribute_table.y" /* yacc.c:1648 */ { /* Order independent */ DEBUG_WRAP(DebugMessage(DEBUG_ATTRIBUTE, "Client Data Required (Proto IPProto)\n");); } -#line 2136 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2137 "sf_attribute_table.c" /* yacc.c:1648 */ break; -#line 2140 "sf_attribute_table.c" /* yacc.c:1646 */ +#line 2141 "sf_attribute_table.c" /* yacc.c:1648 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2364,7 +2365,7 @@ #endif return yyresult; } -#line 632 "sf_attribute_table.y" /* yacc.c:1906 */ +#line 632 "sf_attribute_table.y" /* yacc.c:1907 */ /* int yywrap(void) diff -Nru snort-2.9.15.1/src/target-based/sf_attribute_table.y snort-2.9.20/src/target-based/sf_attribute_table.y --- snort-2.9.15.1/src/target-based/sf_attribute_table.y 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sf_attribute_table.y 2022-05-18 05:07:31.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/target-based/sf_attribute_table_parser.c snort-2.9.20/src/target-based/sf_attribute_table_parser.c --- snort-2.9.15.1/src/target-based/sf_attribute_table_parser.c 2019-12-03 09:39:32.000000000 +0000 +++ snort-2.9.20/src/target-based/sf_attribute_table_parser.c 2022-05-23 15:44:16.000000000 +0000 @@ -27,8 +27,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -107,25 +107,13 @@ #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ @@ -161,7 +149,15 @@ /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -178,7 +174,7 @@ typedef size_t yy_size_t; #endif -extern yy_size_t sfatleng; +extern int sfatleng; extern FILE *sfatin, *sfatout; @@ -187,13 +183,14 @@ #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up sfattext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ @@ -216,12 +213,12 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -272,7 +269,7 @@ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -291,11 +288,11 @@ /* yy_hold_char holds the character lost when sfattext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t sfatleng; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int sfatleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ @@ -320,7 +317,7 @@ YY_BUFFER_STATE sfat_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE sfat_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE sfat_scan_bytes (yyconst char *bytes,yy_size_t len ); +YY_BUFFER_STATE sfat_scan_bytes (yyconst char *bytes,int len ); void *sfatalloc (yy_size_t ); void *sfatrealloc (void *,yy_size_t ); @@ -352,12 +349,12 @@ /* Begin user sect3 */ -#define sfatwrap() 1 +#define sfatwrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; -FILE *sfatin = (FILE *) 0, *sfatout = (FILE *) 0; +FILE *sfatin = NULL, *sfatout = NULL; typedef int yy_state_type; @@ -366,19 +363,22 @@ int sfatlineno = 1; extern char *sfattext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif #define yytext_ptr sfattext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); +static void yynoreturn yy_fatal_error (yyconst char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up sfattext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - sfatleng = (size_t) (yy_cp - yy_bp); \ + sfatleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -1344,7 +1344,7 @@ 1, 53, 1, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, @@ -1376,7 +1376,7 @@ 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[53] = +static yyconst YY_CHAR yy_meta[53] = { 0, 1, 2, 3, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1386,7 +1386,7 @@ 2, 2 } ; -static yyconst flex_int16_t yy_base[12713] = +static yyconst flex_uint16_t yy_base[12713] = { 0, 0, 11, 0, 0, 0, 0, 8934, 8935, 8931, 8935, 8929, 0, 8922, 8921, 18, 8935, 8927, 0, 8935, 8919, @@ -4192,7 +4192,7 @@ 8614, 8614 } ; -static yyconst flex_int16_t yy_nxt[8988] = +static yyconst flex_uint16_t yy_nxt[8988] = { 0, 8, 9, 10, 11, 1241, 1243, 13, 1245, 14, 15, 8, 8, 9, 10, 11, 1247, 1249, 13, 61, 14, @@ -6192,7 +6192,7 @@ char *sfattext; #line 1 "sf_attribute_table_parser.l" /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify @@ -6301,19 +6301,19 @@ FILE *sfatget_in (void ); -void sfatset_in (FILE * in_str ); +void sfatset_in (FILE * _in_str ); FILE *sfatget_out (void ); -void sfatset_out (FILE * out_str ); +void sfatset_out (FILE * _out_str ); -yy_size_t sfatget_leng (void ); + int sfatget_leng (void ); char *sfatget_text (void ); int sfatget_lineno (void ); -void sfatset_lineno (int line_number ); +void sfatset_lineno (int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -6327,6 +6327,10 @@ #endif #endif +#ifndef YY_NO_UNPUT + +#endif + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -6347,7 +6351,12 @@ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -6355,7 +6364,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( sfattext, sfatleng, 1, sfatout )) {} } while (0) +#define ECHO do { if (fwrite( sfattext, (size_t) sfatleng, 1, sfatout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -6366,7 +6375,7 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( sfatin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -6379,7 +6388,7 @@ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, sfatin))==0 && ferror(sfatin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, sfatin)) == 0 && ferror(sfatin)) \ { \ if( errno != EINTR) \ { \ @@ -6434,7 +6443,7 @@ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -6444,14 +6453,10 @@ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -#line 101 "sf_attribute_table_parser.l" - -#line 6454 "sf_attribute_table_parser.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -6478,7 +6483,12 @@ sfat_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 101 "sf_attribute_table_parser.l" + +#line 6490 "sf_attribute_table_parser.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -6494,7 +6504,7 @@ yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -6506,7 +6516,7 @@ if ( yy_current_state >= 8615 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } while ( yy_current_state != 8614 ); @@ -6844,7 +6854,7 @@ #line 187 "sf_attribute_table_parser.l" ECHO; YY_BREAK -#line 6848 "sf_attribute_table_parser.c" +#line 6858 "sf_attribute_table_parser.c" case YY_END_OF_BUFFER: { @@ -6974,6 +6984,7 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of sfatlex */ /* yy_get_next_buffer - try to read in a new buffer @@ -6985,9 +6996,9 @@ */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + yy_size_t number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -7016,7 +7027,7 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -7029,7 +7040,7 @@ else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -7043,7 +7054,7 @@ if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -7052,11 +7063,11 @@ b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - sfatrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + sfatrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -7098,10 +7109,10 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) sfatrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) sfatrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } @@ -7119,14 +7130,14 @@ static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -7138,7 +7149,7 @@ if ( yy_current_state >= 8615 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; } return yy_current_state; @@ -7151,10 +7162,10 @@ */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -7166,12 +7177,16 @@ if ( yy_current_state >= 8615 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_is_jam = (yy_current_state == 8614); return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -7196,7 +7211,7 @@ else { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -7220,7 +7235,7 @@ case EOB_ACT_END_OF_FILE: { if ( sfatwrap( ) ) - return EOF; + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -7326,7 +7341,7 @@ /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) sfatalloc(b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) sfatalloc((yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in sfat_create_buffer()" ); @@ -7468,7 +7483,7 @@ */ static void sfatensure_buffer_stack (void) { - yy_size_t num_to_alloc; + int num_to_alloc; if (!(yy_buffer_stack)) { @@ -7476,7 +7491,7 @@ * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)sfatalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); @@ -7493,7 +7508,7 @@ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)sfatrealloc @@ -7523,16 +7538,16 @@ base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; b = (YY_BUFFER_STATE) sfatalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in sfat_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -7555,7 +7570,7 @@ YY_BUFFER_STATE sfat_scan_string (yyconst char * yystr ) { - return sfat_scan_bytes(yystr,strlen(yystr) ); + return sfat_scan_bytes(yystr,(int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to sfatlex() will @@ -7565,15 +7580,15 @@ * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE sfat_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +YY_BUFFER_STATE sfat_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - yy_size_t i; + int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; + n = (yy_size_t) (_yybytes_len + 2); buf = (char *) sfatalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in sfat_scan_bytes()" ); @@ -7599,9 +7614,9 @@ #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -7612,7 +7627,7 @@ do \ { \ /* Undo effects of setting up sfattext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ sfattext[sfatleng] = (yy_hold_char); \ (yy_c_buf_p) = sfattext + yyless_macro_arg; \ @@ -7652,7 +7667,7 @@ /** Get the length of the current token. * */ -yy_size_t sfatget_leng (void) +int sfatget_leng (void) { return sfatleng; } @@ -7667,29 +7682,29 @@ } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void sfatset_lineno (int line_number ) +void sfatset_lineno (int _line_number ) { - sfatlineno = line_number; + sfatlineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * * @see sfat_switch_to_buffer */ -void sfatset_in (FILE * in_str ) +void sfatset_in (FILE * _in_str ) { - sfatin = in_str ; + sfatin = _in_str ; } -void sfatset_out (FILE * out_str ) +void sfatset_out (FILE * _out_str ) { - sfatout = out_str ; + sfatout = _out_str ; } int sfatget_debug (void) @@ -7697,9 +7712,9 @@ return sfat_flex_debug; } -void sfatset_debug (int bdebug ) +void sfatset_debug (int _bdebug ) { - sfat_flex_debug = bdebug ; + sfat_flex_debug = _bdebug ; } static int yy_init_globals (void) @@ -7708,10 +7723,10 @@ * This function is called from sfatlex_destroy(), so don't allocate here. */ - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; @@ -7720,8 +7735,8 @@ sfatin = stdin; sfatout = stdout; #else - sfatin = (FILE *) 0; - sfatout = (FILE *) 0; + sfatin = NULL; + sfatout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -7759,7 +7774,8 @@ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -7768,7 +7784,7 @@ #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -7778,11 +7794,12 @@ void *sfatalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } void *sfatrealloc (void * ptr, yy_size_t size ) { + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -7790,12 +7807,12 @@ * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void sfatfree (void * ptr ) { - free( (char *) ptr ); /* see sfatrealloc() for (char *) cast */ + free( (char *) ptr ); /* see sfatrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" diff -Nru snort-2.9.15.1/src/target-based/sf_attribute_table_parser.l snort-2.9.20/src/target-based/sf_attribute_table_parser.l --- snort-2.9.15.1/src/target-based/sf_attribute_table_parser.l 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sf_attribute_table_parser.l 2022-05-18 05:07:32.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/target-based/sftarget_hostentry.c snort-2.9.20/src/target-based/sftarget_hostentry.c --- snort-2.9.15.1/src/target-based/sftarget_hostentry.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sftarget_hostentry.c 2022-05-18 05:07:33.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/target-based/sftarget_hostentry.h snort-2.9.20/src/target-based/sftarget_hostentry.h --- snort-2.9.15.1/src/target-based/sftarget_hostentry.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sftarget_hostentry.h 2022-05-18 05:07:34.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/target-based/sftarget_protocol_reference.c snort-2.9.20/src/target-based/sftarget_protocol_reference.c --- snort-2.9.15.1/src/target-based/sftarget_protocol_reference.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sftarget_protocol_reference.c 2022-05-18 05:07:35.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/target-based/sftarget_protocol_reference.h snort-2.9.20/src/target-based/sftarget_protocol_reference.h --- snort-2.9.15.1/src/target-based/sftarget_protocol_reference.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sftarget_protocol_reference.h 2022-05-18 05:07:37.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/target-based/sftarget_reader.c snort-2.9.20/src/target-based/sftarget_reader.c --- snort-2.9.15.1/src/target-based/sftarget_reader.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sftarget_reader.c 2022-05-18 05:07:38.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/target-based/sftarget_reader.h snort-2.9.20/src/target-based/sftarget_reader.h --- snort-2.9.15.1/src/target-based/sftarget_reader.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/target-based/sftarget_reader.h 2022-05-18 05:07:39.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2006-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/treenodes.h snort-2.9.20/src/treenodes.h --- snort-2.9.15.1/src/treenodes.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/treenodes.h 2022-05-18 05:07:41.000000000 +0000 @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2008-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/util.c snort-2.9.20/src/util.c --- snort-2.9.15.1/src/util.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/util.c 2022-05-21 02:09:18.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** @@ -98,6 +98,7 @@ #endif #include "stream_common.h" +#include "memory_stats.h" #ifdef PATH_MAX #define PATH_MAX_UTIL PATH_MAX @@ -198,7 +199,7 @@ BUILD, info); LogMessage(" '''' By Martin Roesch & The Snort Team: http://www.snort.org/contact#team\n"); - LogMessage(" Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved.\n"); + LogMessage(" Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved.\n"); LogMessage(" Copyright (C) 1998-2013 Sourcefire, Inc., et al.\n"); #ifdef HAVE_PCAP_LIB_VERSION LogMessage(" Using %s\n", pcap_lib_version()); @@ -514,6 +515,57 @@ } +/* + * Function: LogThrottledByTimeCount(ThrottleInfo *,const char *, ...) + * + * Purpose: Print a message based on time and count of messages. + * + * Arguments: throttleInfo => point to the saved throttle state information + * format => the formatted message string to print out + * ... => format commands/fillers + * + * Returns: void function + */ +void LogThrottledByTimeCount(ThrottleInfo *throttleInfo, const char *format,...) +{ + char buf[STD_BUF+1]; + va_list ap; + time_t current_time = packet_time(); + + if ((!snort_conf) || (!throttleInfo)) + return; + + if (!ScCheckInternalLogLevel(INTERNAL_LOG_LEVEL__ERROR)) + return; + + throttleInfo->count++; + DEBUG_WRAP(DebugMessage(DEBUG_INIT,"current_time: %d, throttle (%p): count "STDu64", last update: %d\n", + (int)current_time, throttleInfo, throttleInfo->count, (int)throttleInfo->lastUpdate );) + + if ((throttleInfo->lastUpdate == 0) + || ((current_time - (time_t)throttleInfo->duration_to_log > throttleInfo->lastUpdate) + && ((throttleInfo->count == 1) + || throttleInfo->count > throttleInfo->count_to_log))) + { + int index; + va_start(ap, format); + index = vsnprintf(buf, STD_BUF, format, ap); + va_end(ap); + + if (index) + { + snprintf(&buf[index - 1], STD_BUF-index, + " (suppressed "STDu64" times in the last %d seconds).\n", + throttleInfo->count, throttleInfo->lastUpdate + ? ((int)(current_time - throttleInfo->lastUpdate)) + : ((int)throttleInfo->lastUpdate)); + } + + LogMessage("%s",buf); + throttleInfo->lastUpdate = current_time; + throttleInfo->count = 0; + } +} /* * Function: LogMessage(const char *, ...) @@ -716,6 +768,15 @@ if ( InMainThread() || SnortIsInitializing() ) { + if (!SnortIsInitializing()) + { + /* + * Shutdown the thread only when the snort is not + * initializing. Because FatalError api can be + * called during initialization as well. + */ + SnortShutdownThreads(1); + } DAQ_Abort(); exit(1); } @@ -1105,8 +1166,8 @@ "Allow", "Block", "Replace", - "Whitelist", - "Blacklist", + "AllowFlow", + "BlockFlow", #ifdef HAVE_DAQ_VERDICT_RETRY "Ignore", "Retry" @@ -1121,9 +1182,9 @@ mi = mallinfo(); LogMessage("%s\n", STATS_SEPARATOR); LogMessage("Memory usage summary:\n"); - LogMessage(" Total non-mmapped bytes (arena): %d\n", mi.arena); + LogMessage(" Total non-mmapped bytes (arena): %lu\n", (unsigned long)mi.arena); LogMessage(" Bytes in mapped regions (hblkhd): %d\n", mi.hblkhd); - LogMessage(" Total allocated space (uordblks): %d\n", mi.uordblks); + LogMessage(" Total allocated space (uordblks): %lu\n", (unsigned long)mi.uordblks); LogMessage(" Total free space (fordblks): %d\n", mi.fordblks); LogMessage(" Topmost releasable block (keepcost): %d\n", mi.keepcost); #ifdef DEBUG @@ -1167,10 +1228,10 @@ len += DisplayStat(buffer, s, pkt_stats->verdicts[i], pkts_recv, len); } if ( pc.internal_blacklist ) - len += DisplayStat(buffer, "Int Blklst", pc.internal_blacklist, pkts_recv, len); + len += DisplayStat(buffer, "Int Blkflw", pc.internal_blacklist, pkts_recv, len); if ( pc.internal_whitelist ) - len += DisplayStat(buffer, "Int Whtlst", pc.internal_whitelist, pkts_recv, len); + len += DisplayStat(buffer, "Int Alwflw", pc.internal_whitelist, pkts_recv, len); } else { len = snprintf(buffer, CS_STATS_BUF_SIZE, "Action Stats are not available\n Total Action Processed:"FMTu64("12") "\n", total); } @@ -1339,10 +1400,10 @@ LogStat(s, pkt_stats->verdicts[i], pkts_recv); } if ( pc.internal_blacklist > 0 ) - LogStat("Int Blklst", pc.internal_blacklist, pkts_recv); + LogStat("Int Blkflw", pc.internal_blacklist, pkts_recv); if ( pc.internal_whitelist > 0 ) - LogStat("Int Whtlst", pc.internal_whitelist, pkts_recv); + LogStat("Int Alwflw", pc.internal_whitelist, pkts_recv); } #ifdef TARGET_BASED if (ScIdsMode() && IsAdaptiveConfigured()) @@ -1382,6 +1443,10 @@ SideChannelStats(exiting, STATS_SEPARATOR); #endif /* SIDE_CHANNEL */ +#ifndef REG_TEST + memory_stats_periodic_handler(NULL, 0); +#endif /*REG_TEST*/ + LogMessage("%s\n", STATS_SEPARATOR); } diff -Nru snort-2.9.15.1/src/util.h snort-2.9.20/src/util.h --- snort-2.9.15.1/src/util.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/util.h 2022-05-18 05:07:43.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** @@ -194,8 +194,11 @@ /*Within this duration (in seconds), maximal one distinct message is logged*/ uint32_t duration_to_log; uint64_t count; + /*Till the message count reaches to count_to_log, maximal one distinct message is logged*/ + uint64_t count_to_log; }ThrottleInfo; void ErrorMessageThrottled(ThrottleInfo*,const char *, ...) __attribute__((format (printf, 2, 3))); +void LogThrottledByTimeCount(ThrottleInfo*,const char *, ...) __attribute__((format (printf, 2, 3))); NORETURN void FatalError(const char *, ...) __attribute__((format (printf, 1, 2))); NORETURN void SnortFatalExit(void); diff -Nru snort-2.9.15.1/src/win32/Makefile.am snort-2.9.20/src/win32/Makefile.am --- snort-2.9.15.1/src/win32/Makefile.am 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/win32/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -105,6 +105,11 @@ ./WIN32-Libraries/wpcap.lib \ ./WIN32-Libraries/zlib.lib \ ./WIN32-Libraries/zlib1.lib \ +../win64/WIN64-Libraries/Packet.lib \ +../win64/WIN64-Libraries/libdnet/dnet.lib \ +../win64/WIN64-Libraries/pcre.lib \ +../win64/WIN64-Libraries/wpcap.lib \ +../win64/WIN64-Libraries/zlib.lib \ ./WIN32-Prj/build_releases.bat \ ./WIN32-Prj/LibnetNT.dll \ ./WIN32-Prj/pcre.dll \ @@ -122,6 +127,14 @@ ./WIN32-Prj/build_all.dsp \ ./WIN32-Prj/sf_engine.dsp \ ./WIN32-Prj/sf_engine_initialize.dsp \ -./WIN32-Prj/snort.dsw +./WIN32-Prj/snort.dsw \ +./WIN32-Prj/build_all.vcxproj \ +./WIN32-Prj/sf_engine.vcxproj \ +./WIN32-Prj/sf_engine_initialize.vcxproj \ +./WIN32-Prj/snort.vcxproj \ +./WIN32-Prj/snort_initialize.vcxproj \ +./WIN32-Prj/snort_installer_x64.nsi \ +./WIN32-Prj/snort_x64.dsw + noinst_LIBRARIES = diff -Nru snort-2.9.15.1/src/win32/Makefile.in snort-2.9.20/src/win32/Makefile.in --- snort-2.9.15.1/src/win32/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/src/win32/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,11 +89,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = src/win32 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -102,7 +112,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -111,6 +121,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -156,6 +167,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -353,6 +365,11 @@ ./WIN32-Libraries/wpcap.lib \ ./WIN32-Libraries/zlib.lib \ ./WIN32-Libraries/zlib1.lib \ +../win64/WIN64-Libraries/Packet.lib \ +../win64/WIN64-Libraries/libdnet/dnet.lib \ +../win64/WIN64-Libraries/pcre.lib \ +../win64/WIN64-Libraries/wpcap.lib \ +../win64/WIN64-Libraries/zlib.lib \ ./WIN32-Prj/build_releases.bat \ ./WIN32-Prj/LibnetNT.dll \ ./WIN32-Prj/pcre.dll \ @@ -370,7 +387,14 @@ ./WIN32-Prj/build_all.dsp \ ./WIN32-Prj/sf_engine.dsp \ ./WIN32-Prj/sf_engine_initialize.dsp \ -./WIN32-Prj/snort.dsw +./WIN32-Prj/snort.dsw \ +./WIN32-Prj/build_all.vcxproj \ +./WIN32-Prj/sf_engine.vcxproj \ +./WIN32-Prj/sf_engine_initialize.vcxproj \ +./WIN32-Prj/snort.vcxproj \ +./WIN32-Prj/snort_initialize.vcxproj \ +./WIN32-Prj/snort_installer_x64.nsi \ +./WIN32-Prj/snort_x64.dsw noinst_LIBRARIES = all: all-am @@ -388,14 +412,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/win32/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/win32/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -422,7 +445,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -568,6 +594,8 @@ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/src/win32/WIN32-Code/getopt.c snort-2.9.20/src/win32/WIN32-Code/getopt.c --- snort-2.9.15.1/src/win32/WIN32-Code/getopt.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Code/getopt.c 2022-05-18 05:07:45.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/win32/WIN32-Code/inet_aton.c snort-2.9.20/src/win32/WIN32-Code/inet_aton.c --- snort-2.9.15.1/src/win32/WIN32-Code/inet_aton.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Code/inet_aton.c 2022-05-18 05:07:47.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id$ */ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/win32/WIN32-Code/misc.c snort-2.9.20/src/win32/WIN32-Code/misc.c --- snort-2.9.15.1/src/win32/WIN32-Code/misc.c 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Code/misc.c 2022-05-18 05:07:49.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/win32/WIN32-Code/name.h snort-2.9.20/src/win32/WIN32-Code/name.h --- snort-2.9.15.1/src/win32/WIN32-Code/name.h 2019-12-03 09:06:15.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Code/name.h 2022-05-18 05:07:50.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/src/win32/WIN32-Includes/config.h snort-2.9.20/src/win32/WIN32-Includes/config.h --- snort-2.9.15.1/src/win32/WIN32-Includes/config.h 2019-12-03 09:39:42.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Includes/config.h 2022-05-23 15:44:18.000000000 +0000 @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify @@ -101,7 +101,7 @@ * should both match the ones specified in the * AM_INIT_AUTOMAKE() macro of configure.in */ -#define VERSION "2.9.15.1"VERSION_ENABLE_RESPONSE"-WIN32"VERSION_DEBUG +#define VERSION "2.9.20"VERSION_ENABLE_RESPONSE"-WIN32"VERSION_DEBUG #define PACKAGE "snort" #define IFNAMSIZ 255 diff -Nru snort-2.9.15.1/src/win32/WIN32-Includes/getopt.h snort-2.9.20/src/win32/WIN32-Includes/getopt.h --- snort-2.9.15.1/src/win32/WIN32-Includes/getopt.h 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Includes/getopt.h 2022-05-18 05:07:55.000000000 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Copyright (C) 2002 Martin Roesch ** diff -Nru snort-2.9.15.1/src/win32/WIN32-Includes/inttypes.h snort-2.9.20/src/win32/WIN32-Includes/inttypes.h --- snort-2.9.15.1/src/win32/WIN32-Includes/inttypes.h 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Includes/inttypes.h 2022-05-18 05:07:59.000000000 +0000 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2007-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/LibnetNT.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/LibnetNT.dll differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/Packet.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/Packet.dll differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/WanPacket.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/WanPacket.dll differ diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/build_all.vcxproj snort-2.9.20/src/win32/WIN32-Prj/build_all.vcxproj --- snort-2.9.15.1/src/win32/WIN32-Prj/build_all.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/build_all.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + MakeFileProj + {A5A115AE-5223-4303-ADE1-734C30C10562} + 10.0.17763.0 + + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + + + + + + + + + + + + + + + + + + + + + .\BuildAll_Debug\ + .\BuildAll_Debug\ + + + + .\BuildAll_Release\ + .\BuildAll_Release\ + + + .\BuildAll_Release\ + .\BuildAll_Release\ + + + + .\BuildAll_Debug\build_all.tlb + + + + + .\BuildAll_Debug\build_all.tlb + + + + + .\BuildAll_Release\build_all.tlb + + + + + .\BuildAll_Release\build_all.tlb + + + + + {2baf445f-d693-41d1-acd2-3c0d8036a521} + false + + + {018ac2d2-a48d-49f4-bb98-64b5c740afc6} + false + + + {062b5218-2264-461d-b182-860d8a8f2e7d} + false + + + {81e98225-ed05-4843-8e55-0059223759cb} + false + + + {04be9f40-3fb8-4aad-8502-2e683f524f7b} + false + + + + + + \ No newline at end of file Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/npptools.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/npptools.dll differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/ntwdblib.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/ntwdblib.dll differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/pcre.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/pcre.dll differ diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/sf_engine.vcxproj snort-2.9.20/src/win32/WIN32-Prj/sf_engine.vcxproj --- snort-2.9.15.1/src/win32/WIN32-Prj/sf_engine.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/sf_engine.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,363 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {81E98225-ED05-4843-8E55-0059223759CB} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + DynamicLibrary + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\SF_Engine_Release\ + .\SF_Engine_Release\ + false + + + false + .\SF_Engine_Release\ + .\SF_Engine_Release\ + + + .\SF_Engine_Debug\ + .\SF_Engine_Debug\ + true + + + true + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\..\dynamic-plugins;..\..\dynamic-plugins\sf_engine;..\Win32-Includes;..\Win32-Includes\zlib;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_ENGINE_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;ZLIB;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\SF_Engine_Release\ + true + .\SF_Engine_Release\sf_engine.pch + .\SF_Engine_Release\ + .\SF_Engine_Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\SF_Engine_Release\sf_engine.tlb + true + Win32 + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\SF_Engine_Release\sf_engine.bsc + + + true + true + Console + .\SF_Engine_Release\sf_engine.dll + .\SF_Engine_Release\sf_engine.lib + ..\Win32-Libraries;%(AdditionalLibraryDirectories) + zlib1.lib;Ws2_32.lib;pcre.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\..\dynamic-plugins;..\..\dynamic-plugins\sf_engine;..\Win32-Includes;..\Win32-Includes\zlib;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + NDEBUG;ENABLE_PAF;SF_SNORT_ENGINE_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;ZLIB;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\SF_Engine_Release\ + true + .\SF_Engine_Release\sf_engine.pch + .\SF_Engine_Release\ + .\SF_Engine_Release\ + + + true + NDEBUG;%(PreprocessorDefinitions) + .\SF_Engine_Release\sf_engine.tlb + true + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\SF_Engine_Release\sf_engine.bsc + + + true + true + Console + .\SF_Engine_Release\sf_engine.dll + .\SF_Engine_Release\sf_engine.lib + ..\Win32-Libraries;%(AdditionalLibraryDirectories) + zlib1.lib;Ws2_32.lib;pcre.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + ..\Win32-Includes\zlib;..\..\dynamic-plugins;..\..\dynamic-plugins\sf_engine;..\Win32-Includes;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_ENGINE_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;ZLIB;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\SF_Engine_Debug\ + true + .\SF_Engine_Debug\sf_engine.pch + .\SF_Engine_Debug\ + .\SF_Engine_Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\SF_Engine_Debug\sf_engine.tlb + true + Win32 + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\SF_Engine_Debug\sf_engine.bsc + + + true + true + true + Console + .\SF_Engine_Debug\sf_engine.dll + .\SF_Engine_Debug\sf_engine.lib + ..\Win32-Libraries;%(AdditionalLibraryDirectories) + zlib1.lib;Ws2_32.lib;pcre.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + ..\Win32-Includes\zlib;..\..\dynamic-plugins;..\..\dynamic-plugins\sf_engine;..\Win32-Includes;..\..\..\daq\api;..\..\..\daq\sfbpf;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;ENABLE_PAF;SF_SNORT_ENGINE_DLL;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_RESPOND;ENABLE_REACT;ZLIB;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\SF_Engine_Debug\ + true + .\SF_Engine_Debug\sf_engine.pch + .\SF_Engine_Debug\ + .\SF_Engine_Debug\ + EnableFastChecks + + + true + _DEBUG;%(PreprocessorDefinitions) + .\SF_Engine_Debug\sf_engine.tlb + true + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\SF_Engine_Debug\sf_engine.bsc + + + true + true + true + Console + .\SF_Engine_Debug\sf_engine.dll + .\SF_Engine_Debug\sf_engine.lib + ..\Win32-Libraries;%(AdditionalLibraryDirectories) + zlib1.lib;Ws2_32.lib;pcre.lib;%(AdditionalDependencies) + + + + + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + + + + + + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + + + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + ..\..\..;..\Win32-Includes\mysql;..\Win32-Includes\libnet;..\..\output-plugins;..\..\detection-plugins;..\..\preprocessors;..\..\preprocessors\flow;..\..\preprocessors\portscan;..\..\preprocessors\flow\int-snort;..\..\preprocessors\HttpInspect\Include;%(AdditionalIncludeDirectories) + + + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + + + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + + + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + + + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + + + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + + + MODULUS_HASH;%(PreprocessorDefinitions) + MODULUS_HASH;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + {afe7c6d1-5f41-4198-a7b3-88abe6ccb623} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/sf_engine_initialize.vcxproj snort-2.9.20/src/win32/WIN32-Prj/sf_engine_initialize.vcxproj --- snort-2.9.15.1/src/win32/WIN32-Prj/sf_engine_initialize.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/sf_engine_initialize.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,329 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MakeFileProj + {AFE7C6D1-5F41-4198-A7B3-88ABE6CCB623} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\SF_Engine_Initialize_Debug\ + .\SF_Engine_Initialize_Debug\ + + + + .\SF_Engine_Initialize_Release\ + .\SF_Engine_Initialize_Release\ + + + .\SF_Engine_Initialize_Release\ + .\SF_Engine_Initialize_Release\ + + + + .\SF_Engine_Initialize_Debug\sf_engine_initialize.tlb + + + + + .\SF_Engine_Initialize_Debug\sf_engine_initialize.tlb + + + + + .\SF_Engine_Initialize_Release\sf_engine_initialize.tlb + + + + + .\SF_Engine_Initialize_Release\sf_engine_initialize.tlb + + + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../../dynamic-plugins/sf_engine/%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../../dynamic-plugins/sf_engine/%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../../dynamic-plugins/sf_engine/%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/->iph->ip_src/->ip4_header->source/" -e "s/->iph->ip_dst/->ip4_header->destination/" -e "s/->iph->/->ip4_header->/" -e "s/->iph$/->ip4_header/" -e "s/orig_iph$/orig_ip4_header/" -e "s/ip_verhl/version_headerlength/" -e "s/ip_tos/type_service/" -e "s/ip_len/data_length/" -e "s/ip_id/identifier/" -e "s/ip_off/offset/" -e "s/ip_ttl/time_to_live/" -e "s/ip_proto/proto/" -e "s/ip_csum/checksum/" -e "s/p->iph$/p->ip4_header/" ../../dynamic-plugins/sf_engine/%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_ded.debugMsgFile = /" -e "s/DebugMessageLine = /*_ded.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _ded.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _ded.debugWideMsg/" ../../dynamic-plugins/sf_engine/%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_ded.debugMsgFile = /" -e "s/DebugMessageLine = /*_ded.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _ded.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _ded.debugWideMsg/" ../../dynamic-plugins/sf_engine/%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_ded.debugMsgFile = /" -e "s/DebugMessageLine = /*_ded.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _ded.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _ded.debugWideMsg/" ../../dynamic-plugins\sf_engine\%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).h.new +c:\cygwin\bin\sed -e "s/DebugMessageFile = /*_ded.debugMsgFile = /" -e "s/DebugMessageLine = /*_ded.debugMsgLine = /" -e "s/%3b DebugMessageFunc$/%3b _ded.debugMsg/" -e "s/%3b DebugWideMessageFunc$/%3b _ded.debugWideMsg/" ../../dynamic-plugins\sf_engine\%(Filename).h.new > ../../dynamic-plugins/sf_engine/%(Filename).h + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).h;..\..\dynamic-plugins\sf_engine\$(InputName).h.new;%(Outputs) + + + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).c.new +c:\cygwin\bin\sed -e "s/\#ifndef MODULUS_HASH/\#ifdef STATIC_HASH/" ../../dynamic-plugins/sf_engine/%(Filename).c.new > ../../dynamic-plugins/sf_engine/%(Filename).c + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).c.new +c:\cygwin\bin\sed -e "s/\#ifndef MODULUS_HASH/\#ifdef STATIC_HASH/" ../../dynamic-plugins/sf_engine/%(Filename).c.new > ../../dynamic-plugins/sf_engine/%(Filename).c + ..\..\dynamic-plugins\sf_engine\$(InputName).c;..\..\dynamic-plugins\sf_engine\$(InputName).c.new;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;..\..\dynamic-plugins\sf_engine\$(InputName).c.new;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).c.new +c:\cygwin\bin\sed -e "s/\#ifndef MODULUS_HASH/\#ifdef STATIC_HASH/" ../../dynamic-plugins/sf_engine/%(Filename).c.new > ../../dynamic-plugins/sf_engine/%(Filename).c + copy %(FullPath) ..\..\dynamic-plugins\sf_engine\%(Filename).c.new +c:\cygwin\bin\sed -e "s/\#ifndef MODULUS_HASH/\#ifdef STATIC_HASH/" ../../dynamic-plugins/sf_engine/%(Filename).c.new > ../../dynamic-plugins/sf_engine/%(Filename).c + ..\..\dynamic-plugins\sf_engine\$(InputName).c;..\..\dynamic-plugins\sf_engine\$(InputName).c.new;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;..\..\dynamic-plugins\sf_engine\$(InputName).c.new;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + + + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + copy %(FullPath) ..\..\dynamic-plugins\sf_engine + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + ..\..\dynamic-plugins\sf_engine\$(InputName).c;%(Outputs) + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/snort.vcxproj snort-2.9.20/src/win32/WIN32-Prj/snort.vcxproj --- snort-2.9.15.1/src/win32/WIN32-Prj/snort.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/snort.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,812 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {04BE9F40-3FB8-4AAD-8502-2E683F524F7B} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + Application + v141 + Dynamic + MultiByte + + + Application + v141 + Dynamic + MultiByte + + + Application + v141 + Dynamic + MultiByte + + + Application + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\snort___Win32_Debug\ + .\snort___Win32_Debug\ + true + + + true + + + .\snort___Win32_Release\ + .\snort___Win32_Release\ + false + + + false + .\snort___Win32_Release\ + .\snort___Win32_Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + ..\..\dynamic-output\plugins;..\Win32-Includes\zlib;..\..\..;..\..;..\..\control;..\..\sfutil;..\..\target-based;..\Win32-Includes;..\Win32-Includes\libnet;..\Win32-Includes\WinPCAP;..\..\output-plugins;..\..\detection-plugins;..\..\dynamic-plugins;..\..\preprocessors;..\..\preprocessors\portscan;..\..\preprocessors\HttpInspect\Include;..\..\preprocessors\Stream6;..\..\preprocessors\Session;..\..\..\daq\api;..\..\..\daq\sfbpf;..\Win32-Includes\libdnet;..\..\file-process;..\..\file-process\libs;..\..\side-channel;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;OUTPUT_DLL;_CONSOLE;__BEGIN_DECLS=;__END_DECLS=;ENABLE_RESPOND;ENABLE_WIN32_SERVICE;ZLIB;ENABLE_RESPONSE3;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;ENABLE_REACT;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_PAF;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;NORMALIZER;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\snort___Win32_Debug\ + true + .\snort___Win32_Debug\snort.pch + .\snort___Win32_Debug\ + .\snort___Win32_Debug\ + EnableFastChecks + + + .\snort___Win32_Debug\snort.tlb + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\snort___Win32_Debug\snort.bsc + + + true + true + Console + .\snort___Win32_Debug\snort.exe + ..\..\..\daq\Debug;..\Win32-Libraries;..\Win32-Libraries\libdnet;%(AdditionalLibraryDirectories) + zlib.lib;dnet.lib;daq.lib;Packet.lib;iphlpapi.lib;wsock32.lib;advapi32.lib;pcre.lib;wpcap.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + ..\..\dynamic-output\plugins;..\Win32-Includes\zlib;..\..\..;..\..;..\..\control;..\..\sfutil;..\..\target-based;..\Win32-Includes;..\Win32-Includes\libnet;..\Win32-Includes\WinPCAP;..\..\output-plugins;..\..\detection-plugins;..\..\dynamic-plugins;..\..\preprocessors;..\..\preprocessors\portscan;..\..\preprocessors\HttpInspect\Include;..\..\preprocessors\Stream6;..\..\preprocessors\Session;..\..\..\daq\api;..\..\..\daq\sfbpf;..\Win32-Includes\libdnet;..\..\file-process;..\..\file-process\libs;..\..\side-channel;%(AdditionalIncludeDirectories) + _DEBUG;DEBUG;OUTPUT_DLL;_CONSOLE;__BEGIN_DECLS=;__END_DECLS=;ENABLE_RESPOND;ENABLE_WIN32_SERVICE;ZLIB;ENABLE_RESPONSE3;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;ENABLE_REACT;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_PAF;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;NORMALIZER;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\snort___Win32_Debug\ + true + .\snort___Win32_Debug\snort.pch + .\snort___Win32_Debug\ + .\snort___Win32_Debug\ + EnableFastChecks + + + .\snort___Win32_Debug\snort.tlb + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\snort___Win32_Debug\snort.bsc + + + true + true + Console + .\snort___Win32_Debug\snort.exe + ..\..\..\daq\Debug;..\Win32-Libraries;..\Win32-Libraries\libdnet;%(AdditionalLibraryDirectories) + zlib.lib;dnet.lib;daq.lib;Packet.lib;iphlpapi.lib;wsock32.lib;advapi32.lib;pcre.lib;wpcap.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\..\dynamic-output\plugins;..\Win32-Includes\zlib;..\..\..;..\..;..\..\control;..\..\sfutil;..\..\target-based;..\Win32-Includes;..\Win32-Includes\libnet;..\Win32-Includes\WinPCAP;..\..\output-plugins;..\..\detection-plugins;..\..\dynamic-plugins;..\..\preprocessors;..\..\preprocessors\portscan;..\..\preprocessors\HttpInspect\Include;..\..\preprocessors\Stream6;..\..\preprocessors\Session;..\..\..\daq\api;..\..\..\daq\sfbpf;..\Win32-Includes\libdnet;..\..\file-process;..\..\file-process\libs;..\..\side-channel;%(AdditionalIncludeDirectories) + NDEBUG;OUTPUT_DLL;_CONSOLE;__BEGIN_DECLS=;__END_DECLS=;ENABLE_RESPOND;ENABLE_WIN32_SERVICE;ZLIB;ENABLE_RESPONSE3;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;ENABLE_REACT;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_PAF;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;NORMALIZER;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\snort___Win32_Release\ + .\snort___Win32_Release\snort.pch + .\snort___Win32_Release\ + .\snort___Win32_Release\ + + + .\snort___Win32_Release\snort.tlb + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\snort___Win32_Release\snort.bsc + + + true + Console + .\snort___Win32_Release\snort.exe + ..\..\..\daq\Release;..\Win32-Libraries;..\Win32-Libraries\libdnet;%(AdditionalLibraryDirectories) + zlib.lib;dnet.lib;daq.lib;Packet.lib;iphlpapi.lib;wsock32.lib;advapi32.lib;pcre.lib;wpcap.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\..\dynamic-output\plugins;..\Win32-Includes\zlib;..\..\..;..\..;..\..\control;..\..\sfutil;..\..\target-based;..\Win32-Includes;..\Win32-Includes\libnet;..\Win32-Includes\WinPCAP;..\..\output-plugins;..\..\detection-plugins;..\..\dynamic-plugins;..\..\preprocessors;..\..\preprocessors\portscan;..\..\preprocessors\HttpInspect\Include;..\..\preprocessors\Stream6;..\..\preprocessors\Session;..\..\..\daq\api;..\..\..\daq\sfbpf;..\Win32-Includes\libdnet;..\..\file-process;..\..\file-process\libs;..\..\side-channel;%(AdditionalIncludeDirectories) + NDEBUG;OUTPUT_DLL;_CONSOLE;__BEGIN_DECLS=;__END_DECLS=;ENABLE_RESPOND;ENABLE_WIN32_SERVICE;ZLIB;ENABLE_RESPONSE3;_WINDOWS;_USRDLL;ACTIVE_RESPONSE;ENABLE_REACT;GRE;MPLS;TARGET_BASED;PERF_PROFILING;ENABLE_PAF;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;NORMALIZER;BYTE_ORDER=LITTLE_ENDIAN;%(PreprocessorDefinitions) + .\snort___Win32_Release\ + .\snort___Win32_Release\snort.pch + .\snort___Win32_Release\ + .\snort___Win32_Release\ + + + .\snort___Win32_Release\snort.tlb + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\snort___Win32_Release\snort.bsc + + + true + Console + .\snort___Win32_Release\snort.exe + ..\..\..\daq\Release;..\..\win64\WIN64-Libraries;..\..\win64\WIN64-Libraries\libdnet;%(AdditionalLibraryDirectories);C:\Python27\libs + zlib.lib;dnet.lib;daq.lib;Packet.lib;iphlpapi.lib;wsock32.lib;advapi32.lib;pcre.lib;wpcap.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + inline=__inline;%(PreprocessorDefinitions) + inline=__inline;%(PreprocessorDefinitions) + inline=__inline;%(PreprocessorDefinitions) + inline=__inline;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + c:\cygwin\bin\bison -d -psfat_ -o../../target-based/%(Filename).c ../../target-based/%(Filename).y + c:\cygwin\bin\bison -d -psfat_ -o../../target-based/%(Filename).c ../../target-based/%(Filename).y + ..\..\target-based\$(InputName).c;..\..\target-based\$(InputName).h;%(Outputs) + ..\..\target-based\$(InputName).c;..\..\target-based\$(InputName).h;%(Outputs) + c:\cygwin\bin\bison -d -psfat_ -o../../target-based/%(Filename).c ../../target-based/%(Filename).y + c:\cygwin\bin\bison -d -psfat_ -o../../target-based/%(Filename).c ../../target-based/%(Filename).y + ..\..\target-based\$(InputName).c;..\..\target-based\$(InputName).h;%(Outputs) + ..\..\target-based\$(InputName).c;..\..\target-based\$(InputName).h;%(Outputs) + + + c:\cygwin\bin\flex -i -Psfat -o../../target-based/%(Filename).c ../../target-based/%(Filename).l + c:\cygwin\bin\flex -i -Psfat -o../../target-based/%(Filename).c ../../target-based/%(Filename).l + ..\..\target-based\$(InputName).c;%(Outputs) + ..\..\target-based\$(InputName).c;%(Outputs) + c:\cygwin\bin\flex -i -Psfat -o../../target-based/%(Filename).c ../../target-based/%(Filename).l + c:\cygwin\bin\flex -i -Psfat -o../../target-based/%(Filename).c ../../target-based/%(Filename).l + ..\..\target-based\$(InputName).c;%(Outputs) + ..\..\target-based\$(InputName).c;%(Outputs) + + + + + + + + + + {74156258-05d1-4489-8be4-3ec288373c65} + false + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/snort_initialize.vcxproj snort-2.9.20/src/win32/WIN32-Prj/snort_initialize.vcxproj --- snort-2.9.15.1/src/win32/WIN32-Prj/snort_initialize.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/snort_initialize.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,165 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MakeFileProj + {74156258-05D1-4489-8BE4-3EC288373C65} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + Utility + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Snort_Initialize_Debug\ + .\Snort_Initialize_Debug\ + + + + .\Snort_Initialize_Release\ + .\Snort_Initialize_Release\ + + + .\Snort_Initialize_Release\ + .\Snort_Initialize_Release\ + + + + .\Snort_Initialize_Debug\snort_initialize.tlb + + + + + .\Snort_Initialize_Debug\snort_initialize.tlb + + + + + .\Snort_Initialize_Release\snort_initialize.tlb + + + + + .\Snort_Initialize_Release\snort_initialize.tlb + + + + + copy %(FullPath) ..\..\detection-plugins + copy %(FullPath) ..\..\detection-plugins + ..\..\detection-plugins\$(InputName).h;%(Outputs) + ..\..\detection-plugins\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\detection-plugins + copy %(FullPath) ..\..\detection-plugins + ..\..\detection-plugins\$(InputName).h;%(Outputs) + ..\..\detection-plugins\$(InputName).h;%(Outputs) + + + copy %(FullPath) ..\..\detection-plugins + copy %(FullPath) ..\..\detection-plugins + ..\..\detection-plugins\$(InputName).h;%(Outputs) + ..\..\detection-plugins\$(InputName).h;%(Outputs) + copy %(FullPath) ..\..\detection-plugins + copy %(FullPath) ..\..\detection-plugins + ..\..\detection-plugins\$(InputName).h;%(Outputs) + ..\..\detection-plugins\$(InputName).h;%(Outputs) + + + + + copy %(FullPath) ..\..\detection-plugins\%(Filename).c.new +c:\cygwin\bin\sed -e "s/_ded.errMsg/ErrorMessage/g" -e "s/sf_snort_packet.h/decode.h/g" -e "s/SFSnortPacket/Packet/g" -e "s/ip4_header/iph/g" -e "s/tcp_header/tcph/g" -e "s/proto/ip_proto/g" -e "s/type_service/ip_tos/g" -e "s/time_to_live/ip_ttl/g" -e "s/num_ip_options/ip_option_count/g" -e "s/IPOptions/Options/g" -e "s/option_code/code/g" -e "s/acknowledgement/th_ack/g" -e "s/sequence/th_seq/g" -e "s/tcph->flags/tcph->th_flags/g" -e "s/tcph->window/tcph->th_win/g" -e "s/num_tcp_options/tcp_option_count/g" -e "s/icmp_header/icmph/g" -e "s/ICMP_ECHO_REPLY/ICMP_ECHOREPLY/g" -e "s/ICMP_ECHO_REQUEST/ICMP_ECHO/g" -e "s/icmph_union.echo.id/s_icmp_id/g" -e "s/icmph_union.echo.seq/s_icmp_seq/g" ../../detection-plugins/%(Filename).c.new > ../../detection-plugins/%(Filename).c + copy %(FullPath) ..\..\detection-plugins\%(Filename).c.new +c:\cygwin\bin\sed -e "s/_ded.errMsg/ErrorMessage/g" -e "s/sf_snort_packet.h/decode.h/g" -e "s/SFSnortPacket/Packet/g" -e "s/ip4_header/iph/g" -e "s/tcp_header/tcph/g" -e "s/proto/ip_proto/g" -e "s/type_service/ip_tos/g" -e "s/time_to_live/ip_ttl/g" -e "s/num_ip_options/ip_option_count/g" -e "s/IPOptions/Options/g" -e "s/option_code/code/g" -e "s/acknowledgement/th_ack/g" -e "s/sequence/th_seq/g" -e "s/tcph->flags/tcph->th_flags/g" -e "s/tcph->window/tcph->th_win/g" -e "s/num_tcp_options/tcp_option_count/g" -e "s/icmp_header/icmph/g" -e "s/ICMP_ECHO_REPLY/ICMP_ECHOREPLY/g" -e "s/ICMP_ECHO_REQUEST/ICMP_ECHO/g" -e "s/icmph_union.echo.id/s_icmp_id/g" -e "s/icmph_union.echo.seq/s_icmp_seq/g" ../../detection-plugins/%(Filename).c.new > ../../detection-plugins/%(Filename).c + ..\..\detection-plugins\$(InputName).c;..\..\detection-plugins\$(InputName).c.new;%(Outputs) + ..\..\detection-plugins\$(InputName).c;..\..\detection-plugins\$(InputName).c.new;%(Outputs) + copy %(FullPath) ..\..\detection-plugins\%(Filename).c.new +c:\cygwin\bin\sed -e "s/_ded.errMsg/ErrorMessage/g" -e "s/sf_snort_packet.h/decode.h/g" -e "s/SFSnortPacket/Packet/g" -e "s/ip4_header/iph/g" -e "s/tcp_header/tcph/g" -e "s/proto/ip_proto/g" -e "s/type_service/ip_tos/g" -e "s/time_to_live/ip_ttl/g" -e "s/num_ip_options/ip_option_count/g" -e "s/IPOptions/Options/g" -e "s/option_code/code/g" -e "s/acknowledgement/th_ack/g" -e "s/sequence/th_seq/g" -e "s/tcph->flags/tcph->th_flags/g" -e "s/tcph->window/tcph->th_win/g" -e "s/num_tcp_options/tcp_option_count/g" -e "s/icmp_header/icmph/g" -e "s/ICMP_ECHO_REPLY/ICMP_ECHOREPLY/g" -e "s/ICMP_ECHO_REQUEST/ICMP_ECHO/g" -e "s/icmph_union.echo.id/s_icmp_id/g" -e "s/icmph_union.echo.seq/s_icmp_seq/g" -e "/sf_snort_detection_engine.h/d" ../../detection-plugins/%(Filename).c.new > ../../detection-plugins/%(Filename).c + copy %(FullPath) ..\..\detection-plugins\%(Filename).c.new +c:\cygwin\bin\sed -e "s/_ded.errMsg/ErrorMessage/g" -e "s/sf_snort_packet.h/decode.h/g" -e "s/SFSnortPacket/Packet/g" -e "s/ip4_header/iph/g" -e "s/tcp_header/tcph/g" -e "s/proto/ip_proto/g" -e "s/type_service/ip_tos/g" -e "s/time_to_live/ip_ttl/g" -e "s/num_ip_options/ip_option_count/g" -e "s/IPOptions/Options/g" -e "s/option_code/code/g" -e "s/acknowledgement/th_ack/g" -e "s/sequence/th_seq/g" -e "s/tcph->flags/tcph->th_flags/g" -e "s/tcph->window/tcph->th_win/g" -e "s/num_tcp_options/tcp_option_count/g" -e "s/icmp_header/icmph/g" -e "s/ICMP_ECHO_REPLY/ICMP_ECHOREPLY/g" -e "s/ICMP_ECHO_REQUEST/ICMP_ECHO/g" -e "s/icmph_union.echo.id/s_icmp_id/g" -e "s/icmph_union.echo.seq/s_icmp_seq/g" -e "/sf_snort_detection_engine.h/d" ../../detection-plugins/%(Filename).c.new > ../../detection-plugins/%(Filename).c + ..\..\detection-plugins\$(InputName).c;..\..\detection-plugins\$(InputName).c.new;%(Outputs) + ..\..\detection-plugins\$(InputName).c;..\..\detection-plugins\$(InputName).c.new;%(Outputs) + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/snort_installer.nsi snort-2.9.20/src/win32/WIN32-Prj/snort_installer.nsi --- snort-2.9.15.1/src/win32/WIN32-Prj/snort_installer.nsi 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/snort_installer.nsi 2022-04-29 07:12:49.000000000 +0000 @@ -1,17 +1,17 @@ ; $Id$ ; -; NSIS Installation script for Snort 2.9.15.1 Win32 +; NSIS Installation script for Snort 2.9.20 Win32 ; Written by Chris Reid ; Updated by Steven Sturges ; -; This script will create a Win32 installer for Snort 2.9.15.1 (Win32 only). +; This script will create a Win32 installer for Snort 2.9.20 (Win32 only). ; For more information about NSIS, see their homepage: ; http://nsis.sourceforge.net/ ; ; Note that this NSIS script is designed for NSIS version 2.09. ; -Name "Snort 2.9.15.1" +Name "Snort 2.9.20" CRCCheck On @@ -23,7 +23,7 @@ ;Configuration ;General - OutFile "Snort_2_9_15_1_Installer.exe" ; The name of the installer executable + OutFile "Snort_2_9_20_Installer.exe" ; The name of the installer executable ;Folder selection page InstallDir "C:\Snort" @@ -84,7 +84,7 @@ StrCpy $0 "Snort has successfully been installed.$\r$\n" StrCpy $0 "$0$\r$\n" StrCpy $0 "$0$\r$\n" - StrCpy $0 "$0Snort also requires WinPcap 4.1.1 to be installed on this machine.$\r$\n" + StrCpy $0 "$0Snort also requires WinPcap 4.1.1 or higher to be installed on this machine.$\r$\n" StrCpy $0 "$0WinPcap can be downloaded from:$\r$\n" StrCpy $0 "$0 http://www.winpcap.org/ $\r$\n" StrCpy $0 "$0$\r$\n" diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/snort_installer_x64.nsi snort-2.9.20/src/win32/WIN32-Prj/snort_installer_x64.nsi --- snort-2.9.15.1/src/win32/WIN32-Prj/snort_installer_x64.nsi 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/snort_installer_x64.nsi 2022-04-29 07:12:49.000000000 +0000 @@ -0,0 +1,260 @@ +; $Id$ +; +; NSIS Installation script for Snort 2.9.20 Win64 +; Written by Chris Reid +; Updated by Steven Sturges +; +; This script will create a Win64 installer for Snort 2.9.20 (Win64 only). +; For more information about NSIS, see their homepage: +; http://nsis.sourceforge.net/ +; +; Note that this NSIS script is designed for NSIS version 2.09. +; + +Name "Snort 2.9.20" + +CRCCheck On + +!include "MUI.nsh" + +!define TEMP $R0 + +;-------------------------------- +;Configuration + + ;General + OutFile "Snort_2_9_20_Installer.x64.exe" ; The name of the installer executable + + ;Folder selection page + InstallDir "C:\Snort" + + +;-------------------------------- +;Modern UI Configuration + + !define MUI_CUSTOMPAGECOMMANDS + + !define MUI_LICENSEPAGE + !define MUI_COMPONENTSPAGE + !define MUI_DIRECTORYPAGE + + !define MUI_ABORTWARNING + + !define MUI_UNINSTALLER + !define MUI_UNCONFIRMPAGE + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" + +;-------------------------------- +;Language Strings + + ;Description + LangString DESC_Snort ${LANG_ENGLISH} "Install snort, configuration files, and rules." + LangString DESC_Dynamic ${LANG_ENGLISH} "Install dynamic preprocessor and dynamic engine modules." + LangString DESC_Doc ${LANG_ENGLISH} "Install snort documentation." + + +;-------------------------------- +;Data + + LicenseData "..\..\..\LICENSE" + +;-------------------------------- +;Pages + + !insertmacro MUI_PAGE_LICENSE "..\..\..\LICENSE" + Page custom fnSetHeaderText + !insertmacro MUI_PAGE_COMPONENTS + Page custom fnSetHeaderText + !insertmacro MUI_PAGE_DIRECTORY + Page custom fnSetHeaderText + !insertmacro MUI_PAGE_INSTFILES + + ; Call .onDirectoryLeave whenever user leaves + ; the directory selection page + ;!define MUI_CUSTOMFUNCTION_DIRECTORY_LEAVE onDirectoryLeave + +;-------------------------------- +; Event Handlers + +Function .onInstSuccess + StrCpy $0 "Snort has successfully been installed.$\r$\n" + StrCpy $0 "$0$\r$\n" + StrCpy $0 "$0$\r$\n" + StrCpy $0 "$0Snort also requires Npcap 0.9984 to be installed on this machine.$\r$\n" + StrCpy $0 "$0Npcap can be downloaded from:$\r$\n" + StrCpy $0 "$0 https://nmap.org/npcap/ $\r$\n" + StrCpy $0 "$0$\r$\n" + StrCpy $0 "$0$\r$\n" + StrCpy $0 "$0It would also be wise to tighten the security on the Snort installation$\r$\n" + StrCpy $0 "$0directory to prevent any malicious modification of the Snort executable.$\r$\n" + StrCpy $0 "$0$\r$\n" + StrCpy $0 "$0$\r$\n" + StrCpy $0 "$0Next, you must manually edit the 'snort.conf' file to$\r$\n" + StrCpy $0 "$0specify proper paths to allow Snort to find the rules files$\r$\n" + StrCpy $0 "$0and classification files." + MessageBox MB_OK $0 +FunctionEnd + + +;-------------------------------- +;Installer Sections + +Section "Snort" Snort + ; -------------------------------------------------------------------- + ; NOTE: The installer, as delivered here, will only allow the user + ; to install configurations which can optionally be run as a + ; Windows Service. + ; -------------------------------------------------------------------- + + ; Search for a space embedded within $INSTDIR + StrCpy $R4 0 ; index within $INSTDIR + searching_for_space: + StrCpy $R5 $INSTDIR 1 $R4 ; copy 1 char from $INSTDIR[$R4] into $R5 + StrCmp $R5 " " found_space + StrCmp $R5 "" done_searching_for_space + IntOp $R4 $R4 + 1 ; increment index + Goto searching_for_space + found_space: + StrCpy $0 "The installation directory appears to contain an$\r$\n" + StrCpy $0 "$0embedded space character. You need to be aware that$\r$\n" + StrCpy $0 "$0because of this, all paths specified on the command-line$\r$\n" + StrCpy $0 "$0and in the 'snort.conf' file must be enclosed within$\r$\n" + StrCpy $0 "$0double-quotes.$\r$\n" + MessageBox MB_OK $0 + done_searching_for_space: + + + CreateDirectory "$INSTDIR" + + CreateDirectory "$INSTDIR\bin" + SetOutPath "$INSTDIR\bin" + ; File ".\LibnetNT.dll" + File ".\pcre.dll" + File ".\zlib1.dll" + File ".\ntwdblib.dll" + File ".\wpcap.dll" + File ".\WanPacket.dll" + File ".\npptools.dll" + File ".\Packet.dll" + + CreateDirectory "$INSTDIR\etc" + SetOutPath "$INSTDIR\etc" + File "..\..\..\etc\*.conf" + File "..\..\..\etc\*.config" + File "..\..\..\etc\*.map" + + CreateDirectory "$INSTDIR\rules" + SetOutPath "$INSTDIR\rules" + ;Rules are no longer part of the distribution + ;File /r "..\..\..\rules\*.rules" + + CreateDirectory "$INSTDIR\preproc_rules" + SetOutPath "$INSTDIR\preproc_rules" + File "..\..\..\preproc_rules\*.rules" + + CreateDirectory "$INSTDIR\log" + + SetOutPath "$INSTDIR\bin" + + ; -------------------------------------------------------------------- + ; Configurations + ; -------------------------------------------------------------------- + File ".\snort___Win32_Release\snort.exe" + + ;Create uninstaller + SetOutPath "$INSTDIR" + WriteUninstaller "$INSTDIR\Uninstall.exe" +SectionEnd + +Section "Dynamic Modules" Dynamic + CreateDirectory "$INSTDIR\lib" + CreateDirectory "$INSTDIR\lib\snort_dynamicpreprocessor" + SetOutPath "$INSTDIR\lib\snort_dynamicpreprocessor" + + File "..\..\dynamic-preprocessors\ftptelnet\Release\sf_ftptelnet.dll" + File "..\..\dynamic-preprocessors\smtp\Release\sf_smtp.dll" + File "..\..\dynamic-preprocessors\ssh\Release\sf_ssh.dll" + File "..\..\dynamic-preprocessors\dns\Release\sf_dns.dll" + File "..\..\dynamic-preprocessors\ssl\Release\sf_ssl.dll" + File "..\..\dynamic-preprocessors\dcerpc2\Release\sf_dce2.dll" + File "..\..\dynamic-preprocessors\sdf\Release\sf_sdf.dll" + File "..\..\dynamic-preprocessors\sip\Release\sf_sip.dll" + File "..\..\dynamic-preprocessors\imap\Release\sf_imap.dll" + File "..\..\dynamic-preprocessors\pop\Release\sf_pop.dll" + File "..\..\dynamic-preprocessors\reputation\Release\sf_reputation.dll" + File "..\..\dynamic-preprocessors\modbus\Release\sf_modbus.dll" + File "..\..\dynamic-preprocessors\dnp3\Release\sf_dnp3.dll" + File "..\..\dynamic-preprocessors\gtp\Release\sf_gtp.dll" + + CreateDirectory "$INSTDIR\lib\snort_dynamicengine" + SetOutPath "$INSTDIR\lib\snort_dynamicengine" + File ".\SF_Engine_Release\sf_engine.dll" + +SectionEnd + +Section "Documentation" Doc + CreateDirectory "$INSTDIR\doc" + SetOutPath "$INSTDIR\doc" + File "..\..\..\ChangeLog" + File "..\..\..\LICENSE" + File "..\..\..\RELEASE.NOTES" + File "..\..\..\doc\*.*" + Delete "$INSTDIR\doc\.cvsignore" + + CreateDirectory "$INSTDIR\doc\signatures" + SetOutPath "$INSTDIR\doc\signatures" + ;Rules are no longer part of the distribution + ;File "..\..\..\doc\signatures\*.*" + +SectionEnd + + +;Display the Finish header +;Insert this macro after the sections if you are not using a finish page +;!insertmacro MUI_SECTIONS_FINISHHEADER + + +;-------------------------------- +;Descriptions + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${Snort} $(DESC_Snort) + !insertmacro MUI_DESCRIPTION_TEXT ${Dynamic} $(DESC_Dynamic) + !insertmacro MUI_DESCRIPTION_TEXT ${Doc} $(DESC_Doc) +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;-------------------------------- +; Installer Functions + +Function fnSetHeaderText + !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_PAGETITLE_OPTIONS)" "" +FunctionEnd + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + + ; If Snort appears to already be installed as a Windows Service, + ; then ask the user if the uninstall should unregister the + ; Service. + + ReadRegStr $1 HKLM "Software\Snort" "CmdLineParamCount" + StrCmp $1 "" service_not_registered + MessageBox MB_YESNO "It appears that Snort is registered as a Windows Service. Should it be unregistered now?" IDNO finished_unregistering_service + ExecWait "net stop snortsvc" + ExecWait "$INSTDIR\bin\snort.exe /SERVICE /UNINSTALL" + GoTo finished_unregistering_service + + service_not_registered: + MessageBox MB_OK "Snort not installed as a service" /SD IDOK + + finished_unregistering_service: + RMDir /r "$INSTDIR" + ;!insertmacro MUI_UNFINISHHEADER + +SectionEnd diff -Nru snort-2.9.15.1/src/win32/WIN32-Prj/snort_x64.dsw snort-2.9.20/src/win32/WIN32-Prj/snort_x64.dsw --- snort-2.9.15.1/src/win32/WIN32-Prj/snort_x64.dsw 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/src/win32/WIN32-Prj/snort_x64.dsw 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,416 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "build_all"=".\build_all.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name dynamic_preprocessors + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_engine + End Project Dependency + Begin Project Dependency + Project_Dep_Name daq + End Project Dependency + Begin Project Dependency + Project_Dep_Name snort + End Project Dependency + Begin Project Dependency + Project_Dep_Name u2spewfoo + End Project Dependency +}}} + +############################################################################### + +Project: "daq"="..\..\..\daq\daq.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "dynamic_preprocessors"="..\..\dynamic-preprocessors\dynamic_preprocessors.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_ftptelnet + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_smtp + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_ssh + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_dns + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_ssl + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_dce2 + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_sdf + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_sip + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_imap + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_pop + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_dnp3 + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_modbus + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_reputation + End Project Dependency + Begin Project Dependency + Project_Dep_Name sf_gtp + End Project Dependency +}}} + +############################################################################### + +Project: "sf_dce2"="..\..\dynamic-preprocessors\dcerpc2\sf_dce2.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_dnp3"="..\..\dynamic-preprocessors\dnp3\sf_dnp3.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_dns"="..\..\dynamic-preprocessors\dns\sf_dns.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_dynamic_initialize"="..\..\dynamic-preprocessors\sf_dynamic_initialize\sf_dynamic_initialize.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sf_engine"=".\sf_engine.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_engine_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_engine_initialize"=".\sf_engine_initialize.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sf_ftptelnet"="..\..\dynamic-preprocessors\ftptelnet\sf_ftptelnet.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_gtp"="..\..\dynamic-preprocessors\gtp\sf_gtp.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sf_imap"="..\..\dynamic-preprocessors\imap\sf_imap.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_modbus"="..\..\dynamic-preprocessors\modbus\sf_modbus.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_pop"="..\..\dynamic-preprocessors\pop\sf_pop.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_reputation"="..\..\dynamic-preprocessors\reputation\sf_reputation.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_sdf"="..\..\dynamic-preprocessors\sdf\sf_sdf.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_sip"="..\..\dynamic-preprocessors\sip\sf_sip.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_smtp"="..\..\dynamic-preprocessors\smtp\sf_smtp.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency + Begin Project Dependency + Project_Dep_Name sfdynamic_preproc_libs + End Project Dependency +}}} + +############################################################################### + +Project: "sf_ssh"="..\..\dynamic-preprocessors\ssh\sf_ssh.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sf_ssl"="..\..\dynamic-preprocessors\ssl\sf_ssl.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "sfdynamic_preproc_libs"="..\..\dynamic-preprocessors\libs\sfdynamic_preproc_libs.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name sf_dynamic_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "snort"=".\snort.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name snort_initialize + End Project Dependency +}}} + +############################################################################### + +Project: "snort_initialize"=".\snort_initialize.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "u2spewfoo"="..\..\..\tools\u2spewfoo\u2spewfoo.vcxproj" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/wpcap.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/wpcap.dll differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win32/WIN32-Prj/zlib1.dll and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win32/WIN32-Prj/zlib1.dll differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win64/WIN64-Libraries/Packet.lib and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/Packet.lib differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win64/WIN64-Libraries/libdnet/dnet.lib and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/libdnet/dnet.lib differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win64/WIN64-Libraries/pcre.lib and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/pcre.lib differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win64/WIN64-Libraries/wpcap.lib and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/wpcap.lib differ Binary files /srv/release.debian.org/tmp/_5alHURNQG/snort-2.9.15.1/src/win64/WIN64-Libraries/zlib.lib and /srv/release.debian.org/tmp/NlSMQFBACB/snort-2.9.20/src/win64/WIN64-Libraries/zlib.lib differ diff -Nru snort-2.9.15.1/templates/Makefile.in snort-2.9.20/templates/Makefile.in --- snort-2.9.15.1/templates/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/templates/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,11 +88,11 @@ build_triplet = @build@ host_triplet = @host@ subdir = templates -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -100,7 +110,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +119,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -154,6 +165,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -260,14 +272,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign templates/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign templates/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -291,7 +302,10 @@ cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -435,6 +449,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/Makefile.in snort-2.9.20/tools/Makefile.in --- snort-2.9.15.1/tools/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/tools/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,12 +90,12 @@ host_triplet = @host@ @FEAT_OPEN_APPID_TRUE@am__append_1 = u2openappid u2streamer subdir = tools -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(am__dist_bin_SCRIPTS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_bin_SCRIPTS_DIST) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -133,7 +143,7 @@ am__v_at_0 = @ am__v_at_1 = depcomp = -am__depfiles_maybe = +am__maybe_remake_depfiles = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ @@ -156,7 +166,7 @@ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir + distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -178,6 +188,7 @@ CTAGS = ctags DIST_SUBDIRS = u2boat u2spewfoo control file_server u2openappid \ u2streamer +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -248,6 +259,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -358,14 +370,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -517,7 +528,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -692,6 +706,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-dist_binSCRIPTS +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/control/Makefile.in snort-2.9.20/tools/control/Makefile.in --- snort-2.9.15.1/tools/control/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/tools/control/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -82,12 +92,12 @@ bin_PROGRAMS = snort_control$(EXEEXT) \ snort_dump_packets_control$(EXEEXT) subdir = tools/control -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(dist_doc_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -127,7 +137,9 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/snort_control-sfcontrol.Po \ + ./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -203,6 +215,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -248,6 +261,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -359,14 +373,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/control/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/control/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -441,22 +454,28 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_control-sfcontrol.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_control-sfcontrol.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -572,7 +591,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -644,7 +666,8 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/snort_control-sfcontrol.Po + -rm -f ./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -690,7 +713,8 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/snort_control-sfcontrol.Po + -rm -f ./$(DEPDIR)/snort_dump_packets_control-snort_dump_packets.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -711,7 +735,7 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ @@ -726,6 +750,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-dist_docDATA +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/control/sfcontrol.c snort-2.9.20/tools/control/sfcontrol.c --- snort-2.9.15.1/tools/control/sfcontrol.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/control/sfcontrol.c 2022-05-18 05:09:19.000000000 +0000 @@ -3,7 +3,7 @@ ** ** sfcontrol.c ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Ron Dempster ** diff -Nru snort-2.9.15.1/tools/control/snort_dump_packets.c snort-2.9.20/tools/control/snort_dump_packets.c --- snort-2.9.15.1/tools/control/snort_dump_packets.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/control/snort_dump_packets.c 2022-05-18 05:09:20.000000000 +0000 @@ -3,7 +3,7 @@ ** ** snort_dump_packets.c ** - ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + ** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2002-2013 Sourcefire, Inc. ** Author(s): Ron Dempster ** diff -Nru snort-2.9.15.1/tools/file_server/Makefile.in snort-2.9.20/tools/file_server/Makefile.in --- snort-2.9.15.1/tools/file_server/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/tools/file_server/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,12 +91,12 @@ host_triplet = @host@ bin_PROGRAMS = file_server$(EXEEXT) subdir = tools/file_server -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(dist_doc_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -117,7 +127,8 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/file_server-file_server.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -191,6 +202,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -236,6 +248,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -345,14 +358,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/file_server/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/file_server/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -423,21 +435,27 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_server-file_server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_server-file_server.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -539,7 +557,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -611,7 +632,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/file_server-file_server.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -657,7 +678,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/file_server-file_server.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -678,7 +699,7 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ @@ -693,6 +714,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-dist_docDATA +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/file_server/file_server.c snort-2.9.20/tools/file_server/file_server.c --- snort-2.9.15.1/tools/file_server/file_server.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/file_server/file_server.c 2022-05-18 05:09:21.000000000 +0000 @@ -1,7 +1,7 @@ /* ** ** -** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. +** Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2012-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify diff -Nru snort-2.9.15.1/tools/u2boat/Makefile.in snort-2.9.20/tools/u2boat/Makefile.in --- snort-2.9.15.1/tools/u2boat/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/tools/u2boat/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -81,12 +91,12 @@ host_triplet = @host@ bin_PROGRAMS = u2boat$(EXEEXT) subdir = tools/u2boat -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp $(dist_doc_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -117,7 +127,8 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/u2boat-u2boat.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -191,6 +202,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -236,6 +248,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -346,14 +359,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2boat/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/u2boat/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -424,21 +436,27 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2boat-u2boat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2boat-u2boat.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -540,7 +558,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -612,7 +633,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2boat-u2boat.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -658,7 +679,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2boat-u2boat.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -679,7 +700,7 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ @@ -694,6 +715,8 @@ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-dist_docDATA +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/u2boat/u2boat.c snort-2.9.20/tools/u2boat/u2boat.c --- snort-2.9.15.1/tools/u2boat/u2boat.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/u2boat/u2boat.c 2022-05-18 05:09:22.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * Copyright (C) 1998-2002 Martin Roesch * Author: Ryan Jordan diff -Nru snort-2.9.15.1/tools/u2boat/u2boat.h snort-2.9.20/tools/u2boat/u2boat.h --- snort-2.9.15.1/tools/u2boat/u2boat.h 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/u2boat/u2boat.h 2022-05-18 05:09:23.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * Copyright (C) 1998-2002 Martin Roesch * diff -Nru snort-2.9.15.1/tools/u2openappid/Makefile.in snort-2.9.20/tools/u2openappid/Makefile.in --- snort-2.9.15.1/tools/u2openappid/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/tools/u2openappid/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,12 +90,11 @@ host_triplet = @host@ bin_PROGRAMS = u2openappid$(EXEEXT) subdir = tools/u2openappid -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -116,7 +125,8 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/u2openappid-u2openappid.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -316,14 +328,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2openappid/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/u2openappid/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -394,21 +405,27 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2openappid-u2openappid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2openappid-u2openappid.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -489,7 +506,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -561,7 +581,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2openappid-u2openappid.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -607,7 +627,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2openappid-u2openappid.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -628,7 +648,7 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ @@ -642,6 +662,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/u2openappid/u2openappid.c snort-2.9.20/tools/u2openappid/u2openappid.c --- snort-2.9.15.1/tools/u2openappid/u2openappid.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/u2openappid/u2openappid.c 2022-05-18 05:09:24.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * Copyright (C) 1998-2002 Martin Roesch * Author: Adam Keeton diff -Nru snort-2.9.15.1/tools/u2spewfoo/Makefile.am snort-2.9.20/tools/u2spewfoo/Makefile.am --- snort-2.9.15.1/tools/u2spewfoo/Makefile.am 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/u2spewfoo/Makefile.am 2022-04-20 14:15:08.000000000 +0000 @@ -5,6 +5,7 @@ u2spewfoo_CFLAGS = @CFLAGS@ $(AM_CFLAGS) EXTRA_DIST = \ +u2spewfoo.vcxproj \ u2spewfoo.dsp INCLUDES = @INCLUDES@ @extra_incl@ diff -Nru snort-2.9.15.1/tools/u2spewfoo/Makefile.in snort-2.9.20/tools/u2spewfoo/Makefile.in --- snort-2.9.15.1/tools/u2spewfoo/Makefile.in 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/tools/u2spewfoo/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,12 +90,11 @@ host_triplet = @host@ bin_PROGRAMS = u2spewfoo$(EXEEXT) subdir = tools/u2spewfoo -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -116,7 +125,8 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/u2spewfoo-u2spewfoo.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -162,6 +172,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -207,6 +218,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -300,6 +312,7 @@ u2spewfoo_SOURCES = u2spewfoo.c u2spewfoo_CFLAGS = @CFLAGS@ $(AM_CFLAGS) EXTRA_DIST = \ +u2spewfoo.vcxproj \ u2spewfoo.dsp all: all-am @@ -318,14 +331,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2spewfoo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/u2spewfoo/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -396,21 +408,27 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2spewfoo-u2spewfoo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2spewfoo-u2spewfoo.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -491,7 +509,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -563,7 +584,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2spewfoo-u2spewfoo.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -609,7 +630,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2spewfoo-u2spewfoo.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -630,7 +651,7 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ @@ -644,6 +665,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/u2spewfoo/u2spewfoo.c snort-2.9.20/tools/u2spewfoo/u2spewfoo.c --- snort-2.9.15.1/tools/u2spewfoo/u2spewfoo.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/u2spewfoo/u2spewfoo.c 2022-05-18 05:09:25.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2002-2013 Sourcefire, Inc. * Copyright (C) 1998-2002 Martin Roesch * Author: Adam Keeton diff -Nru snort-2.9.15.1/tools/u2spewfoo/u2spewfoo.vcxproj snort-2.9.20/tools/u2spewfoo/u2spewfoo.vcxproj --- snort-2.9.15.1/tools/u2spewfoo/u2spewfoo.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ snort-2.9.20/tools/u2spewfoo/u2spewfoo.vcxproj 2022-04-20 14:15:08.000000000 +0000 @@ -0,0 +1,260 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Template + Win32 + + + Template + x64 + + + + + + MFCProj + {018AC2D2-A48D-49F4-BB98-64B5C740AFC6} + 10.0.17763.0 + + + + Application + v141 + + + Application + v141 + + + Application + v141 + Dynamic + MultiByte + + + Application + v141 + Dynamic + MultiByte + + + Application + v141 + Dynamic + MultiByte + + + Application + v141 + Dynamic + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug\ + .\Debug\ + true + + + true + + + .\Release\ + .\Release\ + false + + + false + .\Release\ + .\Release\ + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + true + EditAndContinue + ..\..\src\win32\WIN32-Includes;..\..\src\sfutil;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\u2spewfoo.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + .\Debug\u2spewfoo.tlb + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\u2spewfoo.bsc + + + true + true + Console + .\Debug\u2spewfoo.exe + wsock32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDebugDLL + Default + false + Disabled + true + Level3 + ProgramDatabase + ..\..\src\win32\WIN32-Includes;..\..\src\sfutil;%(AdditionalIncludeDirectories) + _DEBUG;_CONSOLE;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Debug\ + .\Debug\u2spewfoo.pch + .\Debug\ + .\Debug\ + EnableFastChecks + + + .\Debug\u2spewfoo.tlb + + + 0x0409 + _DEBUG;%(PreprocessorDefinitions) + + + true + .\Debug\u2spewfoo.bsc + + + true + true + Console + .\Debug\u2spewfoo.exe + wsock32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\..\src\win32\WIN32-Includes;..\..\src\sfutil;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\u2spewfoo.pch + .\Release\ + .\Release\ + + + .\Release\u2spewfoo.tlb + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\u2spewfoo.bsc + + + true + Console + .\Release\u2spewfoo.exe + wsock32.lib;%(AdditionalDependencies) + + + + + MultiThreadedDLL + Default + true + true + MaxSpeed + true + Level3 + ..\..\src\win32\WIN32-Includes;..\..\src\sfutil;%(AdditionalIncludeDirectories) + NDEBUG;_CONSOLE;WIN32;HAVE_CONFIG_H;SIGNAL_SNORT_READ_ATTR_TBL=30;%(PreprocessorDefinitions) + .\Release\ + .\Release\u2spewfoo.pch + .\Release\ + .\Release\ + + + .\Release\u2spewfoo.tlb + + + 0x0409 + NDEBUG;%(PreprocessorDefinitions) + + + true + .\Release\u2spewfoo.bsc + + + true + Console + .\Release\u2spewfoo.exe + wsock32.lib;%(AdditionalDependencies) + + + + + + + + + \ No newline at end of file diff -Nru snort-2.9.15.1/tools/u2streamer/Makefile.in snort-2.9.20/tools/u2streamer/Makefile.in --- snort-2.9.15.1/tools/u2streamer/Makefile.in 2019-12-03 09:30:47.000000000 +0000 +++ snort-2.9.20/tools/u2streamer/Makefile.in 2022-05-23 15:42:32.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,12 +90,11 @@ host_triplet = @host@ bin_PROGRAMS = u2streamer$(EXEEXT) subdir = tools/u2streamer -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -121,7 +130,14 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/u2streamer-SpoolFileIterator.Po \ + ./$(DEPDIR)/u2streamer-TimestampedFile.Po \ + ./$(DEPDIR)/u2streamer-Unified2.Po \ + ./$(DEPDIR)/u2streamer-Unified2File.Po \ + ./$(DEPDIR)/u2streamer-UnifiedLog.Po \ + ./$(DEPDIR)/u2streamer-sf_error.Po \ + ./$(DEPDIR)/u2streamer-u2streamer.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -167,6 +183,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -212,6 +229,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ MAKEINFO = @MAKEINFO@ @@ -321,14 +339,13 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/u2streamer/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/u2streamer/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -399,27 +416,33 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-SpoolFileIterator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-TimestampedFile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2File.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-UnifiedLog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-sf_error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-u2streamer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-SpoolFileIterator.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-TimestampedFile.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-Unified2File.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-UnifiedLog.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-sf_error.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/u2streamer-u2streamer.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -584,7 +607,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -656,7 +682,13 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2streamer-SpoolFileIterator.Po + -rm -f ./$(DEPDIR)/u2streamer-TimestampedFile.Po + -rm -f ./$(DEPDIR)/u2streamer-Unified2.Po + -rm -f ./$(DEPDIR)/u2streamer-Unified2File.Po + -rm -f ./$(DEPDIR)/u2streamer-UnifiedLog.Po + -rm -f ./$(DEPDIR)/u2streamer-sf_error.Po + -rm -f ./$(DEPDIR)/u2streamer-u2streamer.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -702,7 +734,13 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/u2streamer-SpoolFileIterator.Po + -rm -f ./$(DEPDIR)/u2streamer-TimestampedFile.Po + -rm -f ./$(DEPDIR)/u2streamer-Unified2.Po + -rm -f ./$(DEPDIR)/u2streamer-Unified2File.Po + -rm -f ./$(DEPDIR)/u2streamer-UnifiedLog.Po + -rm -f ./$(DEPDIR)/u2streamer-sf_error.Po + -rm -f ./$(DEPDIR)/u2streamer-u2streamer.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -723,7 +761,7 @@ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ @@ -737,6 +775,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru snort-2.9.15.1/tools/u2streamer/Unified2File.c snort-2.9.20/tools/u2streamer/Unified2File.c --- snort-2.9.15.1/tools/u2streamer/Unified2File.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/u2streamer/Unified2File.c 2022-05-18 05:09:36.000000000 +0000 @@ -41,7 +41,6 @@ int Unified2File_Open(char *filepath, Unified2File **u2_file) { Unified2File *tmp; - char fn[1024]; if(!filepath || !u2_file) return SF_EINVAL; @@ -61,7 +60,7 @@ if((tmp->fd = open(filepath, O_RDONLY)) == -1) { fprintf(stderr, "Unable to open file '%s': %s", - fn, strerror(errno)); + filepath, strerror(errno)); free(tmp); return SF_EOPEN; /* XXX better return code */ } diff -Nru snort-2.9.15.1/tools/u2streamer/u2streamer.c snort-2.9.20/tools/u2streamer/u2streamer.c --- snort-2.9.15.1/tools/u2streamer/u2streamer.c 2019-12-03 09:06:16.000000000 +0000 +++ snort-2.9.20/tools/u2streamer/u2streamer.c 2022-05-18 05:09:33.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014-2022 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2003-2013 Sourcefire, Inc. All Rights Reserved * Test program for streaming a unified log file */ diff -Nru snort-2.9.15.1/ylwrap snort-2.9.20/ylwrap --- snort-2.9.15.1/ylwrap 2019-12-03 09:30:46.000000000 +0000 +++ snort-2.9.20/ylwrap 2022-05-23 15:42:31.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2012-12-21.17; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # Written by Tom Tromey . # @@ -18,7 +18,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -40,7 +40,7 @@ # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. -guard() +guard () { printf '%s\n' "$1" \ | sed \ @@ -96,17 +96,17 @@ # The input. -input="$1" +input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` -case "$input" in +case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. - input="`pwd`/$input" + input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` @@ -132,8 +132,8 @@ # guard in its implementation file. sed_fix_header_guards= -while test "$#" -ne 0; do - if test "$1" = "--"; then +while test $# -ne 0; do + if test x"$1" = x"--"; then shift break fi @@ -153,16 +153,14 @@ done # The program to run. -prog="$1" +prog=$1 shift # Make any relative path in $prog absolute. -case "$prog" in +case $prog in [\\/]* | ?:[\\/]*) ;; - *[\\/]*) prog="`pwd`/$prog" ;; + *[\\/]*) prog=`pwd`/$prog ;; esac -# FIXME: add hostname here for parallel makes that run commands on -# other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 @@ -188,7 +186,7 @@ # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; - *) target="../$to";; + *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless @@ -197,7 +195,7 @@ # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then - realtarget="$target" + realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi @@ -241,9 +239,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: