The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ArrowInvalid
Message:      Failed to parse string: 'visit repo url' as a scalar of type timestamp[s]
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1871, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 623, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2293, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2246, in cast_table_to_schema
                  arrays = [
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2247, in <listcomp>
                  cast_array_to_feature(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1796, in wrapper
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1796, in <listcomp>
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2014, in cast_array_to_feature
                  casted_array_values = _c(array.values, feature[0])
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1798, in wrapper
                  return func(array, *args, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2006, in cast_array_to_feature
                  arrays = [
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2007, in <listcomp>
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1798, in wrapper
                  return func(array, *args, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2006, in cast_array_to_feature
                  arrays = [
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2007, in <listcomp>
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1798, in wrapper
                  return func(array, *args, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2006, in cast_array_to_feature
                  arrays = [
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2007, in <listcomp>
                  _c(array.field(name) if name in array_fields else null_array, subfeature)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1798, in wrapper
                  return func(array, *args, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2103, in cast_array_to_feature
                  return array_cast(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1798, in wrapper
                  return func(array, *args, **kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1950, in array_cast
                  return array.cast(pa_type)
                File "pyarrow/array.pxi", line 996, in pyarrow.lib.Array.cast
                File "/src/services/worker/.venv/lib/python3.9/site-packages/pyarrow/compute.py", line 404, in cast
                  return call_function("cast", [arr], options, memory_pool)
                File "pyarrow/_compute.pyx", line 590, in pyarrow._compute.call_function
                File "pyarrow/_compute.pyx", line 385, in pyarrow._compute.Function.call
                File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: Failed to parse string: 'visit repo url' as a scalar of type timestamp[s]
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1433, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 989, in stream_convert_to_parquet
                  builder._prepare_split(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1742, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1898, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

cve_id
string
published_date
timestamp[us]
last_modified_date
timestamp[us]
description
string
nodes
string
severity
string
obtain_all_privilege
string
obtain_user_privilege
string
obtain_other_privilege
string
user_interaction_required
string
cvss2_vector_string
string
cvss2_access_vector
string
cvss2_access_complexity
string
cvss2_authentication
string
cvss2_confidentiality_impact
string
cvss2_integrity_impact
string
cvss2_availability_impact
string
cvss2_base_score
string
cvss3_vector_string
string
cvss3_attack_vector
string
cvss3_attack_complexity
string
cvss3_privileges_required
string
cvss3_user_interaction
string
cvss3_scope
string
cvss3_confidentiality_impact
string
cvss3_integrity_impact
string
cvss3_availability_impact
string
cvss3_base_score
string
cvss3_base_severity
string
exploitability_score
string
impact_score
string
ac_insuf_info
string
reference_json
string
problemtype_json
string
cwe_info
list
fixes_info
list
CVE-2013-7283
2014-01-09T18:07:00
2014-01-10T15:07:00
[{'lang': 'en', 'value': 'Race condition in the libreswan.spec files for Red Hat Enterprise Linux (RHEL) and Fedora packages in libreswan 3.6 has unspecified impact and attack vectors, involving the /var/tmp/libreswan-nss-pwd temporary file.'}]
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:libreswan:libreswan:3.6:*:*:*:*:*:*:*', 'cpe_name': []}]}]
HIGH
False
False
False
False
AV:N/AC:M/Au:N/C:C/I:C/A:C
NETWORK
MEDIUM
NONE
COMPLETE
COMPLETE
COMPLETE
9.3
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
[{'url': 'https://github.com/libreswan/libreswan/commit/ef2d756e73a188401c36133c2e2f7ce4f3c6ae55', 'name': 'https://github.com/libreswan/libreswan/commit/ef2d756e73a188401c36133c2e2f7ce4f3c6ae55', 'refsource': 'CONFIRM', 'tags': ['Exploit', 'Patch']}, {'url': 'http://www.osvdb.org/101575', 'name': '101575', 'refsource': 'OSVDB', 'tags': []}, {'url': 'https://lists.libreswan.org/pipermail/swan-announce/2013/000007.html', 'name': '[Swan-announce] 20131211 Libreswan 3.7 released', 'refsource': 'MLIST', 'tags': ['Vendor Advisory']}, {'url': 'http://secunia.com/advisories/56276', 'name': '56276', 'refsource': 'SECUNIA', 'tags': ['Vendor Advisory']}]
[{'description': [{'lang': 'en', 'value': 'CWE-362'}]}]
[ { "index": 500, "cwe_id": "CWE-362", "cwe_name": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.", "extended_description": "\n This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.\n A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.\n A race condition violates these properties, which are closely related:\n \n Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.\n Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.\n \n A race condition exists when an \"interfering code sequence\" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single \"x++\" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).\n The interfering code sequence could be \"trusted\" or \"untrusted.\" A trusted interfering code sequence occurs within the product; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable product.\n \n ", "url": "https://cwe.mitre.org/data/definitions/362.html", "is_category": 0 } ]
[ { "cve_id": "CVE-2013-7283", "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "repo_url": "https://github.com/libreswan/libreswan", "commit_details": { "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "repo_url": "https://github.com/libreswan/libreswan", "author": "Tuomo Soini", "author_date": "2013-11-08T08:35:00", "author_timezone": "-7200", "committer": "Tuomo Soini", "committer_date": "2013-11-08T08:35:00", "committer_timezone": "-7200", "msg": "packaging: SECURITY, insecure temp files on rpm package installation", "merge": "False", "parents": "['a83c86294dad798bbc5869e5e86fd0aa9e86391c']", "num_lines_added": "53", "num_lines_deleted": "41", "dmm_unit_complexity": "nan", "dmm_unit_interfacing": "nan", "dmm_unit_size": "nan", "repository": { "repo_url": "https://github.com/libreswan/libreswan", "repo_name": "libreswan/libreswan", "description": "libreswan", "date_created": "2013-02-20T15:09:06", "date_last_push": "2024-07-24T16:13:03", "homepage": "https://libreswan.org/", "repo_language": "C", "owner": "libreswan", "forks_count": "220.0", "stars_count": "830.0" }, "file_changes": [ { "file_change_id": "53091599580003", "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "filename": "libreswan.spec", "old_path": "packaging/fedora/17/libreswan.spec", "new_path": "packaging/fedora/17/libreswan.spec", "change_type": "ModificationType.MODIFY", "diff": "@@ -149,8 +149,8 @@ install -d %{buildroot}%{_sbindir}\n mkdir -p %{buildroot}%{_libdir}/fipscheck\n %endif\n \n-echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n-rm -fr %{buildroot}/etc/rc.d/rc*\n+echo \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n+rm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*\n \n %files \n %doc BUGS CHANGES COPYING CREDITS README LICENSE\n@@ -195,11 +195,13 @@ if [ $1 -eq 1 ] ; then\n # Initial installation \n /bin/systemctl daemon-reload >/dev/null 2>&1 || :\n fi\n-if [ ! -f /etc/ipsec.d/cert8.db ] ; then\n-echo > /var/tmp/libreswan-nss-pwd\n-certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\n-restorecon /etc/ipsec.d/*db 2>/dev/null || :\n-rm /var/tmp/libreswan-nss-pwd\n+if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n+ TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n+ [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n+ echo > ${TEMPFILE}\n+ certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n+ restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n+ rm -f ${TEMPFILE}\n fi\n \n \n", "diff_parsed": "{'added': [(152, 'echo \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (153, 'rm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*'), (198, 'if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then'), (199, ' TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)'), (200, ' [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$'), (201, ' echo > ${TEMPFILE}'), (202, ' certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d'), (203, ' restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :'), (204, ' rm -f ${TEMPFILE}')], 'deleted': [(152, 'echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (153, 'rm -fr %{buildroot}/etc/rc.d/rc*'), (198, 'if [ ! -f /etc/ipsec.d/cert8.db ] ; then'), (199, 'echo > /var/tmp/libreswan-nss-pwd'), (200, 'certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d'), (201, 'restorecon /etc/ipsec.d/*db 2>/dev/null || :'), (202, 'rm /var/tmp/libreswan-nss-pwd')]}", "num_lines_added": "9", "num_lines_deleted": "7", "code_after": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global fipscheck_version 1.3.0\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd systemd-units\nRequires(post): coreutils bash systemd-units\nRequires(preun): systemd-units\nRequires(postun): systemd-units\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\n# we need fipshmac\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck ` ls %{buildroot}%{_libexecdir}/ipsec/*|grep -v setup` \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\n%endif\n\necho \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n%endif\n\n%preun\nif [ $1 -eq 0 ] ; then\n # Package removal, not upgrade\n /bin/systemctl --no-reload disable ipsec.service > /dev/null 2>&1 || :\n /bin/systemctl stop ipsec.service > /dev/null 2>&1 || :\nfi\n\n%postun\n/bin/systemctl daemon-reload >/dev/null 2>&1 || :\nif [ $1 -ge 1 ] ; then\n # Package upgrade, not uninstall\n /bin/systemctl try-restart ipsec.service >/dev/null 2>&1 || :\nfi\n\n\n%post \nif [ $1 -eq 1 ] ; then \n # Initial installation \n /bin/systemctl daemon-reload >/dev/null 2>&1 || :\nfi\nif [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n echo > ${TEMPFILE}\n certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n rm -f ${TEMPFILE}\nfi\n\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSEBASEVERSION-1\n- Automated build from release tar ball\n", "code_before": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global fipscheck_version 1.3.0\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd systemd-units\nRequires(post): coreutils bash systemd-units\nRequires(preun): systemd-units\nRequires(postun): systemd-units\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\n# we need fipshmac\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck ` ls %{buildroot}%{_libexecdir}/ipsec/*|grep -v setup` \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\n%endif\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n%endif\n\n%preun\nif [ $1 -eq 0 ] ; then\n # Package removal, not upgrade\n /bin/systemctl --no-reload disable ipsec.service > /dev/null 2>&1 || :\n /bin/systemctl stop ipsec.service > /dev/null 2>&1 || :\nfi\n\n%postun\n/bin/systemctl daemon-reload >/dev/null 2>&1 || :\nif [ $1 -ge 1 ] ; then\n # Package upgrade, not uninstall\n /bin/systemctl try-restart ipsec.service >/dev/null 2>&1 || :\nfi\n\n\n%post \nif [ $1 -eq 1 ] ; then \n # Initial installation \n /bin/systemctl daemon-reload >/dev/null 2>&1 || :\nfi\nif [ ! -f /etc/ipsec.d/cert8.db ] ; then\necho > /var/tmp/libreswan-nss-pwd\ncertutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\nrestorecon /etc/ipsec.d/*db 2>/dev/null || :\nrm /var/tmp/libreswan-nss-pwd\nfi\n\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSEBASEVERSION-1\n- Automated build from release tar ball\n", "nloc": "nan", "complexity": "nan", "token_count": "nan", "programming_language": "Shell", "method_changes": [] }, { "file_change_id": "71899120132304", "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "filename": "libreswan.spec", "old_path": "packaging/fedora/18/libreswan.spec", "new_path": "packaging/fedora/18/libreswan.spec", "change_type": "ModificationType.MODIFY", "diff": "@@ -99,7 +99,7 @@ Libreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n USE_XAUTHPAM=true \\\n %if %{USE_FIPSCHECK}\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n- FIPSPRODUCTCHECK=/etc/system-fips \\\n+ FIPSPRODUCTCHECK=%{_sysconfdir}/system-fips \\\n %endif\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n@@ -153,8 +153,8 @@ install -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\n install -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n %endif\n \n-echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n-rm -fr %{buildroot}/etc/rc.d/rc*\n+echo \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n+rm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*\n \n %files \n %doc BUGS CHANGES COPYING CREDITS README LICENSE\n@@ -190,11 +190,13 @@ rm -fr %{buildroot}/etc/rc.d/rc*\n \n %post \n %systemd_post ipsec.service\n-if [ ! -f /etc/ipsec.d/cert8.db ] ; then\n-echo > /var/tmp/libreswan-nss-pwd\n-certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\n-restorecon /etc/ipsec.d/*db 2>/dev/null || :\n-rm /var/tmp/libreswan-nss-pwd\n+if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n+ TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n+ [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n+ echo > ${TEMPFILE}\n+ certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n+ restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n+ rm -f ${TEMPFILE}\n fi\n \n %changelog\n", "diff_parsed": "{'added': [(102, ' FIPSPRODUCTCHECK=%{_sysconfdir}/system-fips \\\\'), (156, 'echo \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (157, 'rm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*'), (193, 'if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then'), (194, ' TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)'), (195, ' [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$'), (196, ' echo > ${TEMPFILE}'), (197, ' certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d'), (198, ' restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :'), (199, ' rm -f ${TEMPFILE}')], 'deleted': [(102, ' FIPSPRODUCTCHECK=/etc/system-fips \\\\'), (156, 'echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (157, 'rm -fr %{buildroot}/etc/rc.d/rc*'), (193, 'if [ ! -f /etc/ipsec.d/cert8.db ] ; then'), (194, 'echo > /var/tmp/libreswan-nss-pwd'), (195, 'certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d'), (196, 'restorecon /etc/ipsec.d/*db 2>/dev/null || :'), (197, 'rm /var/tmp/libreswan-nss-pwd')]}", "num_lines_added": "10", "num_lines_deleted": "8", "code_after": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global fipscheck_version 1.3.0\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd systemd-units\nRequires(post): coreutils bash systemd\nRequires(preun): systemd\nRequires(postun): systemd\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n%if %{USE_FIPSCHECK}\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n FIPSPRODUCTCHECK=%{_sysconfdir}/system-fips \\\n%endif\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_libexecdir}/ipsec/* \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\ninstall -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\ninstall -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\necho \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n# We own the directory so we don't have to require prelink\n%attr(0755,root,root) %dir %{_sysconfdir}/prelink.conf.d/\n%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\n%preun\n%systemd_preun ipsec.service\n\n%postun\n%systemd_postun_with_restart ipsec.service\n\n%post \n%systemd_post ipsec.service\nif [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n echo > ${TEMPFILE}\n certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n rm -f ${TEMPFILE}\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n", "code_before": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global fipscheck_version 1.3.0\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd systemd-units\nRequires(post): coreutils bash systemd\nRequires(preun): systemd\nRequires(postun): systemd\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n%if %{USE_FIPSCHECK}\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n FIPSPRODUCTCHECK=/etc/system-fips \\\n%endif\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_libexecdir}/ipsec/* \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\ninstall -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\ninstall -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n# We own the directory so we don't have to require prelink\n%attr(0755,root,root) %dir %{_sysconfdir}/prelink.conf.d/\n%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\n%preun\n%systemd_preun ipsec.service\n\n%postun\n%systemd_postun_with_restart ipsec.service\n\n%post \n%systemd_post ipsec.service\nif [ ! -f /etc/ipsec.d/cert8.db ] ; then\necho > /var/tmp/libreswan-nss-pwd\ncertutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\nrestorecon /etc/ipsec.d/*db 2>/dev/null || :\nrm /var/tmp/libreswan-nss-pwd\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n", "nloc": "nan", "complexity": "nan", "token_count": "nan", "programming_language": "Batchfile", "method_changes": [] }, { "file_change_id": "226842398735918", "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "filename": "libreswan.spec", "old_path": "packaging/fedora/19/libreswan.spec", "new_path": "packaging/fedora/19/libreswan.spec", "change_type": "ModificationType.MODIFY", "diff": "@@ -99,7 +99,7 @@ Libreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n USE_XAUTHPAM=true \\\n %if %{USE_FIPSCHECK}\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n- FIPSPRODUCTCHECK=/etc/system-fips \\\n+ FIPSPRODUCTCHECK=%{_syconfdir}/system-fips \\\n %endif\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n@@ -153,8 +153,8 @@ install -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\n install -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n %endif\n \n-echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n-rm -fr %{buildroot}/etc/rc.d/rc*\n+echo \"include %{_syconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n+rm -fr %{buildroot}%{_syconfdir}/rc.d/rc*\n \n %files \n %doc BUGS CHANGES COPYING CREDITS README LICENSE\n@@ -190,11 +190,13 @@ rm -fr %{buildroot}/etc/rc.d/rc*\n \n %post \n %systemd_post ipsec.service\n-if [ ! -f /etc/ipsec.d/cert8.db ] ; then\n-echo > /var/tmp/libreswan-nss-pwd\n-certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\n-restorecon /etc/ipsec.d/*db 2>/dev/null || :\n-rm /var/tmp/libreswan-nss-pwd\n+if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n+ TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n+ [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n+ echo > ${TEMPFILE}\n+ certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n+ restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n+ rm -f ${TEMPFILE}\n fi\n \n %changelog\n", "diff_parsed": "{'added': [(102, ' FIPSPRODUCTCHECK=%{_syconfdir}/system-fips \\\\'), (156, 'echo \"include %{_syconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (157, 'rm -fr %{buildroot}%{_syconfdir}/rc.d/rc*'), (193, 'if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then'), (194, ' TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)'), (195, ' [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$'), (196, ' echo > ${TEMPFILE}'), (197, ' certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d'), (198, ' restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :'), (199, ' rm -f ${TEMPFILE}')], 'deleted': [(102, ' FIPSPRODUCTCHECK=/etc/system-fips \\\\'), (156, 'echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (157, 'rm -fr %{buildroot}/etc/rc.d/rc*'), (193, 'if [ ! -f /etc/ipsec.d/cert8.db ] ; then'), (194, 'echo > /var/tmp/libreswan-nss-pwd'), (195, 'certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d'), (196, 'restorecon /etc/ipsec.d/*db 2>/dev/null || :'), (197, 'rm /var/tmp/libreswan-nss-pwd')]}", "num_lines_added": "10", "num_lines_deleted": "8", "code_after": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global fipscheck_version 1.3.0\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd systemd-units\nRequires(post): coreutils bash systemd\nRequires(preun): systemd\nRequires(postun): systemd\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n%if %{USE_FIPSCHECK}\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n FIPSPRODUCTCHECK=%{_syconfdir}/system-fips \\\n%endif\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_libexecdir}/ipsec/* \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\ninstall -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\ninstall -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\necho \"include %{_syconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}%{_syconfdir}/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n# We own the directory so we don't have to require prelink\n%attr(0755,root,root) %dir %{_sysconfdir}/prelink.conf.d/\n%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\n%preun\n%systemd_preun ipsec.service\n\n%postun\n%systemd_postun_with_restart ipsec.service\n\n%post \n%systemd_post ipsec.service\nif [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n echo > ${TEMPFILE}\n certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n rm -f ${TEMPFILE}\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n", "code_before": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global fipscheck_version 1.3.0\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd systemd-units\nRequires(post): coreutils bash systemd\nRequires(preun): systemd\nRequires(postun): systemd\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n%if %{USE_FIPSCHECK}\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n FIPSPRODUCTCHECK=/etc/system-fips \\\n%endif\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_libexecdir}/ipsec/* \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\ninstall -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\ninstall -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n# We own the directory so we don't have to require prelink\n%attr(0755,root,root) %dir %{_sysconfdir}/prelink.conf.d/\n%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\n%preun\n%systemd_preun ipsec.service\n\n%postun\n%systemd_postun_with_restart ipsec.service\n\n%post \n%systemd_post ipsec.service\nif [ ! -f /etc/ipsec.d/cert8.db ] ; then\necho > /var/tmp/libreswan-nss-pwd\ncertutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\nrestorecon /etc/ipsec.d/*db 2>/dev/null || :\nrm /var/tmp/libreswan-nss-pwd\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n", "nloc": "nan", "complexity": "nan", "token_count": "nan", "programming_language": "Batchfile", "method_changes": [] }, { "file_change_id": "224741223349925", "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "filename": "libreswan.spec", "old_path": "packaging/rhel/5/libreswan.spec", "new_path": "packaging/rhel/5/libreswan.spec", "change_type": "ModificationType.MODIFY", "diff": "@@ -191,11 +191,13 @@ fi\n \n %post \n /sbin/chkconfig --add ipsec || :\n-if [ ! -f /etc/ipsec.d/cert8.db ] ; then\n-echo > /var/tmp/libreswan-nss-pwd\n-certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\n-restorecon /etc/ipsec.d/*db 2>/dev/null || :\n-rm /var/tmp/libreswan-nss-pwd\n+if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n+ TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n+ [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n+ echo > ${TEMPFILE}\n+ certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n+ restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n+ rm -f ${TEMPFILE}\n fi\n \n %changelog\n", "diff_parsed": "{'added': [(194, 'if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then'), (195, ' TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)'), (196, ' [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$'), (197, ' echo > ${TEMPFILE}'), (198, ' certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d'), (199, ' restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :'), (200, ' rm -f ${TEMPFILE}')], 'deleted': [(194, 'if [ ! -f /etc/ipsec.d/cert8.db ] ; then'), (195, 'echo > /var/tmp/libreswan-nss-pwd'), (196, 'certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d'), (197, 'restorecon /etc/ipsec.d/*db 2>/dev/null || :'), (198, 'rm /var/tmp/libreswan-nss-pwd')]}", "num_lines_added": "7", "num_lines_deleted": "5", "code_after": "%define USE_FIPSCHECK true\n%define USE_LABELED_IPSEC true\n%define USE_CRL_FETCHING true\n%define USE_DNSSEC true\n%define USE_NM true\n%define USE_LINUX_AUDIT true\n# Eanble for OCF, requires <crypto/cryptodev.h> See ocf-linux.sourceforge.net\n%define USE_OCF 0\n# Not available for RHEL5\n%define USE_LIBCAP_NG 0\n\n%define fipscheck_version 1.2.0-1\n%define buildefence 0\n%define development 0\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\n\n# The default kernel version to build for is the latest of\n# the installed binary kernel\n# This can be overridden by \"--define 'kversion x.x.x-y.y.y'\"\n%define defkv %(rpm -q kernel kernel-lt kernel-debug| grep -v \"not installed\" | sed -e \"s/kernel-debug-//\" -e \"s/kernel-//\" -e \"s/\\.[^.]*$//\" | sort | tail -1 )\n%{!?kversion: %{expand: %%define kversion %defkv}}\n%define krelver %(echo %{kversion} | tr -s '-' '_')\n# Libreswan -pre/-rc nomenclature has to co-exist with hyphen paranoia\n%define srcpkgver %(echo %{version} | tr -s '_' '-')\n\nRelease: 1%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: %{name}-%{srcpkgver}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nRequires(post): coreutils bash\nRequires(preun): initscripts chkconfig\nRequires(post): /sbin/chkconfig\nRequires(preun): /sbin/chkconfig\nRequires(preun): /sbin/service\nBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)\n\nBuildRequires: pkgconfig net-tools\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\n# we need fipshmac\nRequires: fipscheck >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{srcpkgver}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing\" \\\n%endif\n INITSYSTEM=sysvinit \\\n USERLINK=\"-g -pie %{?efence}\" \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=%{USE_FIPSCHECK} \\\n USE_LIBCAP_NG=%{USE_LIBCAP_NG} \\\n%if %{USE_OCF}\n USE_OCF=true \\\n%endif\n USE_LABELED_IPSEC=%{USE_LABELED_IPSEC} \\\n USE_LDAP=%{USE_CRL_FETCHING} \\\n USE_LIBCURL=%{USE_CRL_FETCHING} \\\n USE_DNSSEC=%{USE_DNSSEC} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac %{buildroot}%{_sbindir}/ipsec \\\n fipshmac %{buildroot}%{_libexecdir}/ipsec/* \\\n%{nil}\n%endif\n\n%install\nrm -rf %{buildroot}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INITSYSTEM=sysvinit \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_initrddir}/ipsec\n%{_libexecdir}/ipsec\n%{_sbindir}/ipsec\n%attr(0644,root,root) %{_mandir}/*/*.gz\n\n%if %{USE_FIPSCHECK}\n%{_sbindir}/.ipsec.hmac\n%endif\n\n%preun\nif [ $1 -eq 0 ]; then\n /sbin/service ipsec stop > /dev/null 2>&1 || :\n /sbin/chkconfig --del ipsec\nfi\n\n%postun\nif [ $1 -ge 1 ] ; then\n /sbin/service ipsec condrestart 2>&1 >/dev/null || :\nfi\n\n%post \n/sbin/chkconfig --add ipsec || :\nif [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n echo > ${TEMPFILE}\n certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n rm -f ${TEMPFILE}\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - 3.1-1\n- Automated build from release tar ball\n\n", "code_before": "%define USE_FIPSCHECK true\n%define USE_LABELED_IPSEC true\n%define USE_CRL_FETCHING true\n%define USE_DNSSEC true\n%define USE_NM true\n%define USE_LINUX_AUDIT true\n# Eanble for OCF, requires <crypto/cryptodev.h> See ocf-linux.sourceforge.net\n%define USE_OCF 0\n# Not available for RHEL5\n%define USE_LIBCAP_NG 0\n\n%define fipscheck_version 1.2.0-1\n%define buildefence 0\n%define development 0\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\n# version is generated in the release script\nVersion: IPSECBASEVERSION\n\n# The default kernel version to build for is the latest of\n# the installed binary kernel\n# This can be overridden by \"--define 'kversion x.x.x-y.y.y'\"\n%define defkv %(rpm -q kernel kernel-lt kernel-debug| grep -v \"not installed\" | sed -e \"s/kernel-debug-//\" -e \"s/kernel-//\" -e \"s/\\.[^.]*$//\" | sort | tail -1 )\n%{!?kversion: %{expand: %%define kversion %defkv}}\n%define krelver %(echo %{kversion} | tr -s '-' '_')\n# Libreswan -pre/-rc nomenclature has to co-exist with hyphen paranoia\n%define srcpkgver %(echo %{version} | tr -s '_' '-')\n\nRelease: 1%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: %{name}-%{srcpkgver}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nRequires(post): coreutils bash\nRequires(preun): initscripts chkconfig\nRequires(post): /sbin/chkconfig\nRequires(preun): /sbin/chkconfig\nRequires(preun): /sbin/service\nBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)\n\nBuildRequires: pkgconfig net-tools\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\n# we need fipshmac\nRequires: fipscheck >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{srcpkgver}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing\" \\\n%endif\n INITSYSTEM=sysvinit \\\n USERLINK=\"-g -pie %{?efence}\" \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=%{USE_FIPSCHECK} \\\n USE_LIBCAP_NG=%{USE_LIBCAP_NG} \\\n%if %{USE_OCF}\n USE_OCF=true \\\n%endif\n USE_LABELED_IPSEC=%{USE_LABELED_IPSEC} \\\n USE_LDAP=%{USE_CRL_FETCHING} \\\n USE_LIBCURL=%{USE_CRL_FETCHING} \\\n USE_DNSSEC=%{USE_DNSSEC} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac %{buildroot}%{_sbindir}/ipsec \\\n fipshmac %{buildroot}%{_libexecdir}/ipsec/* \\\n%{nil}\n%endif\n\n%install\nrm -rf %{buildroot}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INITSYSTEM=sysvinit \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_initrddir}/ipsec\n%{_libexecdir}/ipsec\n%{_sbindir}/ipsec\n%attr(0644,root,root) %{_mandir}/*/*.gz\n\n%if %{USE_FIPSCHECK}\n%{_sbindir}/.ipsec.hmac\n%endif\n\n%preun\nif [ $1 -eq 0 ]; then\n /sbin/service ipsec stop > /dev/null 2>&1 || :\n /sbin/chkconfig --del ipsec\nfi\n\n%postun\nif [ $1 -ge 1 ] ; then\n /sbin/service ipsec condrestart 2>&1 >/dev/null || :\nfi\n\n%post \n/sbin/chkconfig --add ipsec || :\nif [ ! -f /etc/ipsec.d/cert8.db ] ; then\necho > /var/tmp/libreswan-nss-pwd\ncertutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\nrestorecon /etc/ipsec.d/*db 2>/dev/null || :\nrm /var/tmp/libreswan-nss-pwd\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - 3.1-1\n- Automated build from release tar ball\n\n", "nloc": "nan", "complexity": "nan", "token_count": "nan", "programming_language": "Shell", "method_changes": [] }, { "file_change_id": "18521723267855", "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "filename": "libreswan.spec", "old_path": "packaging/rhel/6/libreswan.spec", "new_path": "packaging/rhel/6/libreswan.spec", "change_type": "ModificationType.MODIFY", "diff": "@@ -96,7 +96,7 @@ Libreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=%{USE_FIPSCHECK} \\\n- FIPSPRODUCTCHECK=\"/etc/system-fips\" \\\n+ FIPSPRODUCTCHECK=\"%{_sysconfdir}/system-fips\" \\\n USE_LIBCAP_NG=%{USE_LIBCAP_NG} \\\n USE_LABELED_IPSEC=%{USE_LABELED_IPSEC} \\\n USE_LDAP=%{USE_CRL_FETCHING} \\\n@@ -143,8 +143,8 @@ install -d %{buildroot}%{_sbindir}\n # replace with rhel[56] specific version\n install -m 0755 initsystems/sysvinit/init.rhel %{buildroot}%{_initrddir}/ipsec\n \n-echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n-rm -fr %{buildroot}/etc/rc.d/rc*\n+echo \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\n+rm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*\n \n %files \n %doc BUGS CHANGES COPYING CREDITS README LICENSE\n@@ -185,11 +185,13 @@ fi\n %if %{USE_FIPSCHECK}\n prelink -u %{_libexecdir}/ipsec/* 2>/dev/null || :\n %endif\n-if [ ! -f /etc/ipsec.d/cert8.db ] ; then\n-echo > /var/tmp/libreswan-nss-pwd\n-certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\n-restorecon /etc/ipsec.d/*db 2>/dev/null || :\n-rm /var/tmp/libreswan-nss-pwd\n+if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n+ TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n+ [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n+ echo > ${TEMPFILE}\n+ certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n+ restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n+ rm -f ${TEMPFILE}\n fi\n \n %changelog\n", "diff_parsed": "{'added': [(99, ' FIPSPRODUCTCHECK=\"%{_sysconfdir}/system-fips\" \\\\'), (146, 'echo \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (147, 'rm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*'), (188, 'if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then'), (189, ' TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)'), (190, ' [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$'), (191, ' echo > ${TEMPFILE}'), (192, ' certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d'), (193, ' restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :'), (194, ' rm -f ${TEMPFILE}')], 'deleted': [(99, ' FIPSPRODUCTCHECK=\"/etc/system-fips\" \\\\'), (146, 'echo \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets'), (147, 'rm -fr %{buildroot}/etc/rc.d/rc*'), (188, 'if [ ! -f /etc/ipsec.d/cert8.db ] ; then'), (189, 'echo > /var/tmp/libreswan-nss-pwd'), (190, 'certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d'), (191, 'restorecon /etc/ipsec.d/*db 2>/dev/null || :'), (192, 'rm /var/tmp/libreswan-nss-pwd')]}", "num_lines_added": "10", "num_lines_deleted": "8", "code_after": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global fipscheck_version 1.2.0-1\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nRequires(post): coreutils bash\nRequires(preun): initscripts chkconfig\nRequires(post): /sbin/chkconfig\nRequires(preun): /sbin/chkconfig\nRequires(preun): /sbin/service\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig net-tools\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\n# we need fipshmac\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %global efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n INITSYSTEM=sysvinit \\\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=%{USE_FIPSCHECK} \\\n FIPSPRODUCTCHECK=\"%{_sysconfdir}/system-fips\" \\\n USE_LIBCAP_NG=%{USE_LIBCAP_NG} \\\n USE_LABELED_IPSEC=%{USE_LABELED_IPSEC} \\\n USE_LDAP=%{USE_CRL_FETCHING} \\\n USE_LIBCURL=%{USE_CRL_FETCHING} \\\n USE_DNSSEC=%{USE_DNSSEC} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac %{buildroot}%{_sbindir}/ipsec \\\n fipshmac %{buildroot}%{_libexecdir}/ipsec/* \\\n%{nil}\n%endif\n\n%install\nrm -rf %{buildroot}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INITSYSTEM=sysvinit \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n# replace with rhel[56] specific version\ninstall -m 0755 initsystems/sysvinit/init.rhel %{buildroot}%{_initrddir}/ipsec\n\necho \"include %{_sysconfdir}/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}%{_sysconfdir}/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_initrddir}/ipsec\n%{_libexecdir}/ipsec\n%{_sbindir}/ipsec\n%attr(0644,root,root) %{_mandir}/*/*.gz\n\n%if %{USE_FIPSCHECK}\n%{_sbindir}/.ipsec.hmac\n%endif\n\n%preun\nif [ $1 -eq 0 ]; then\n /sbin/service ipsec stop > /dev/null 2>&1 || :\n /sbin/chkconfig --del ipsec\nfi\n\n%postun\nif [ $1 -ge 1 ] ; then\n /sbin/service ipsec condrestart 2>&1 >/dev/null || :\nfi\n\n%post \n/sbin/chkconfig --add ipsec || :\n%if %{USE_FIPSCHECK}\nprelink -u %{_libexecdir}/ipsec/* 2>/dev/null || :\n%endif\nif [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n echo > ${TEMPFILE}\n certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n rm -f ${TEMPFILE}\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n\n", "code_before": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global fipscheck_version 1.2.0-1\n%global buildefence 0\n%global development 0\n\n#global prever rc1\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}1%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nRequires(post): coreutils bash\nRequires(preun): initscripts chkconfig\nRequires(post): /sbin/chkconfig\nRequires(preun): /sbin/chkconfig\nRequires(preun): /sbin/service\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig net-tools\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\n# we need fipshmac\nBuildRequires: fipscheck-devel >= %{fipscheck_version}\nRequires: fipscheck%{_isa} >= %{fipscheck_version}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\nRequires: iproute >= 2.6.8\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is \nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and \ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %global efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n INITSYSTEM=sysvinit \\\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=%{USE_FIPSCHECK} \\\n FIPSPRODUCTCHECK=\"/etc/system-fips\" \\\n USE_LIBCAP_NG=%{USE_LIBCAP_NG} \\\n USE_LABELED_IPSEC=%{USE_LABELED_IPSEC} \\\n USE_LDAP=%{USE_CRL_FETCHING} \\\n USE_LIBCURL=%{USE_CRL_FETCHING} \\\n USE_DNSSEC=%{USE_DNSSEC} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac %{buildroot}%{_sbindir}/ipsec \\\n fipshmac %{buildroot}%{_libexecdir}/ipsec/* \\\n%{nil}\n%endif\n\n%install\nrm -rf %{buildroot}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INITSYSTEM=sysvinit \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase \ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n# replace with rhel[56] specific version\ninstall -m 0755 initsystems/sysvinit/init.rhel %{buildroot}%{_initrddir}/ipsec\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files \n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_initrddir}/ipsec\n%{_libexecdir}/ipsec\n%{_sbindir}/ipsec\n%attr(0644,root,root) %{_mandir}/*/*.gz\n\n%if %{USE_FIPSCHECK}\n%{_sbindir}/.ipsec.hmac\n%endif\n\n%preun\nif [ $1 -eq 0 ]; then\n /sbin/service ipsec stop > /dev/null 2>&1 || :\n /sbin/chkconfig --del ipsec\nfi\n\n%postun\nif [ $1 -ge 1 ] ; then\n /sbin/service ipsec condrestart 2>&1 >/dev/null || :\nfi\n\n%post \n/sbin/chkconfig --add ipsec || :\n%if %{USE_FIPSCHECK}\nprelink -u %{_libexecdir}/ipsec/* 2>/dev/null || :\n%endif\nif [ ! -f /etc/ipsec.d/cert8.db ] ; then\necho > /var/tmp/libreswan-nss-pwd\ncertutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\nrestorecon /etc/ipsec.d/*db 2>/dev/null || :\nrm /var/tmp/libreswan-nss-pwd\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n\n", "nloc": "nan", "complexity": "nan", "token_count": "nan", "programming_language": "Shell", "method_changes": [] }, { "file_change_id": "56951908392435", "hash": "ef2d756e73a188401c36133c2e2f7ce4f3c6ae55", "filename": "libreswan.spec", "old_path": "packaging/rhel/7/libreswan.spec", "new_path": "packaging/rhel/7/libreswan.spec", "change_type": "ModificationType.MODIFY", "diff": "@@ -190,11 +190,13 @@ rm -fr %{buildroot}/etc/rc.d/rc*\n %if %{USE_FIPSCHECK}\n prelink -u %{_libexecdir}/ipsec/* 2>/dev/null || :\n %endif\n-if [ ! -f /etc/ipsec.d/cert8.db ] ; then\n-echo > /var/tmp/libreswan-nss-pwd\n-certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\n-restorecon /etc/ipsec.d/*db 2>/dev/null || :\n-rm /var/tmp/libreswan-nss-pwd\n+if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n+ TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n+ [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n+ echo > ${TEMPFILE}\n+ certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n+ restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n+ rm -f ${TEMPFILE}\n fi\n \n %changelog\n", "diff_parsed": "{'added': [(193, 'if [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then'), (194, ' TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)'), (195, ' [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$'), (196, ' echo > ${TEMPFILE}'), (197, ' certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d'), (198, ' restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :'), (199, ' rm -f ${TEMPFILE}')], 'deleted': [(193, 'if [ ! -f /etc/ipsec.d/cert8.db ] ; then'), (194, 'echo > /var/tmp/libreswan-nss-pwd'), (195, 'certutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d'), (196, 'restorecon /etc/ipsec.d/*db 2>/dev/null || :'), (197, 'rm /var/tmp/libreswan-nss-pwd')]}", "num_lines_added": "7", "num_lines_deleted": "5", "code_after": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global buildefence 0\n%global development 0\n\n#global prever rc6\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}2%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd\nRequires(post): coreutils bash systemd\nRequires(preun): systemd\nRequires(postun): systemd\nRequires: iproute\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel\n# we need fipshmac\nRequires: fipscheck%{_isa}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is\nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and\ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_DYNAMICDNS=\"true\" \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_libexecdir}/ipsec/* \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase\ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\ninstall -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\ninstall -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files\n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n# We own the directory so we don't have to require prelink\n%attr(0755,root,root) %dir %{_sysconfdir}/prelink.conf.d/\n%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\n%preun\n%systemd_preun ipsec.service\n\n%postun\n%systemd_postun_with_restart ipsec.service\n\n%post\n%systemd_post ipsec.service\n%if %{USE_FIPSCHECK}\nprelink -u %{_libexecdir}/ipsec/* 2>/dev/null || :\n%endif\nif [ ! -f %{_sysconfdir}/ipsec.d/cert8.db ] ; then\n TEMPFILE=$(/bin/mktemp %{_sysconfdir}/ipsec.d/nsspw.XXXXXXX)\n [ $? -gt 0 ] && TEMPFILE=%{_sysconfdir}/ipsec.d/nsspw.$$\n echo > ${TEMPFILE}\n certutil -N -f ${TEMPFILE} -d %{_sysconfdir}/ipsec.d\n restorecon %{_sysconfdir}/ipsec.d/*db 2>/dev/null || :\n rm -f ${TEMPFILE}\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n", "code_before": "%global USE_FIPSCHECK true\n%global USE_LIBCAP_NG true\n%global USE_LABELED_IPSEC true\n%global USE_CRL_FETCHING true\n%global USE_DNSSEC true\n%global USE_NM true\n%global USE_LINUX_AUDIT true\n\n%global _hardened_build 1\n\n%global buildefence 0\n%global development 0\n\n#global prever rc6\n\nName: libreswan\nSummary: IPsec implementation with IKEv1 and IKEv2 keying protocols\nVersion: IPSECBASEVERSION\nRelease: %{?prever:0.}2%{?prever:.%{prever}}%{?dist}\nLicense: GPLv2\nUrl: https://www.libreswan.org/\nSource: https://download.libreswan.org/%{name}-%{version}%{?prever}.tar.gz\nGroup: System Environment/Daemons\nBuildRequires: gmp-devel bison flex redhat-rpm-config pkgconfig\nBuildRequires: systemd\nRequires(post): coreutils bash systemd\nRequires(preun): systemd\nRequires(postun): systemd\nRequires: iproute\n\nConflicts: openswan < %{version}-%{release}\nObsoletes: openswan < %{version}-%{release}\nProvides: openswan = %{version}-%{release}\n\nBuildRequires: pkgconfig hostname\nBuildRequires: nss-devel >= 3.12.6-2, nspr-devel\nBuildRequires: pam-devel\n%if %{USE_DNSSEC}\nBuildRequires: unbound-devel\n%endif\n%if %{USE_FIPSCHECK}\nBuildRequires: fipscheck-devel\n# we need fipshmac\nRequires: fipscheck%{_isa}\n%endif\n%if %{USE_LINUX_AUDIT}\nBuildrequires: audit-libs-devel\n%endif\n\n%if %{USE_LIBCAP_NG}\nBuildRequires: libcap-ng-devel\n%endif\n%if %{USE_CRL_FETCHING}\nBuildRequires: openldap-devel curl-devel\n%endif\n%if %{buildefence}\nBuildRequires: ElectricFence\n%endif\n# Only needed if xml man pages are modified and need regeneration\n# BuildRequires: xmlto\n\nRequires: nss-tools, nss-softokn\n\n%description\nLibreswan is a free implementation of IPsec & IKE for Linux. IPsec is\nthe Internet Protocol Security and uses strong cryptography to provide\nboth authentication and encryption services. These services allow you\nto build secure tunnels through untrusted networks. Everything passing\nthrough the untrusted net is encrypted by the ipsec gateway machine and\ndecrypted by the gateway at the other end of the tunnel. The resulting\ntunnel is a virtual private network or VPN.\n\nThis package contains the daemons and userland tools for setting up\nLibreswan. To build KLIPS, see the kmod-libreswan.spec file.\n\nLibreswan also supports IKEv2 (RFC4309) and Secure Labeling\n\nLibreswan is based on Openswan-2.6.38 which in turn is based on FreeS/WAN-2.04\n\n%prep\n%setup -q -n libreswan-%{version}%{?prever}\n\n%build\n%if %{buildefence}\n %define efence \"-lefence\"\n%endif\n\n#796683: -fno-strict-aliasing\n%{__make} \\\n%if %{development}\n USERCOMPILE=\"-g -DGCC_LINT %(echo %{optflags} | sed -e s/-O[0-9]*/ /) %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%else\n USERCOMPILE=\"-g -DGCC_LINT %{optflags} %{?efence} -fPIE -pie -fno-strict-aliasing -Wformat-nonliteral -Wformat-security\" \\\n%endif\n USERLINK=\"-g -pie -Wl,-z,relro,-z,now %{?efence}\" \\\n INITSYSTEM=systemd \\\n USE_DYNAMICDNS=\"true\" \\\n USE_NM=%{USE_NM} \\\n USE_XAUTHPAM=true \\\n USE_FIPSCHECK=\"%{USE_FIPSCHECK}\" \\\n USE_LIBCAP_NG=\"%{USE_LIBCAP_NG}\" \\\n USE_LABELED_IPSEC=\"%{USE_LABELED_IPSEC}\" \\\n%if %{USE_CRL_FETCHING}\n USE_LDAP=true \\\n USE_LIBCURL=true \\\n%endif\n USE_DNSSEC=\"%{USE_DNSSEC}\" \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n programs\nFS=$(pwd)\n\n%if %{USE_FIPSCHECK}\n# Add generation of HMAC checksums of the final stripped binaries\n%define __spec_install_post \\\n %{?__debug_package:%{__debug_install_post}} \\\n %{__arch_install_post} \\\n %{__os_install_post} \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_libexecdir}/ipsec/* \\\n fipshmac -d %{buildroot}%{_libdir}/fipscheck %{buildroot}%{_sbindir}/ipsec \\\n%{nil}\n%endif\n\n%install\nrm -rf ${RPM_BUILD_ROOT}\n%{__make} \\\n DESTDIR=%{buildroot} \\\n INC_USRLOCAL=%{_prefix} \\\n FINALLIBDIR=%{_libexecdir}/ipsec \\\n FINALLIBEXECDIR=%{_libexecdir}/ipsec \\\n MANTREE=%{buildroot}%{_mandir} \\\n INC_RCDEFAULT=%{_initrddir} \\\n INSTMANFLAGS=\"-m 644\" \\\n INITSYSTEM=systemd \\\n install\nFS=$(pwd)\nrm -rf %{buildroot}/usr/share/doc/libreswan\n\ninstall -d -m 0755 %{buildroot}%{_localstatedir}/run/pluto\n# used when setting --perpeerlog without --perpeerlogbase\ninstall -d -m 0700 %{buildroot}%{_localstatedir}/log/pluto/peer\ninstall -d %{buildroot}%{_sbindir}\n\n%if %{USE_FIPSCHECK}\nmkdir -p %{buildroot}%{_libdir}/fipscheck\ninstall -d %{buildroot}%{_sysconfdir}/prelink.conf.d/\ninstall -m644 packaging/fedora/libreswan-prelink.conf %{buildroot}%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\necho \"include /etc/ipsec.d/*.secrets\" > %{buildroot}%{_sysconfdir}/ipsec.secrets\nrm -fr %{buildroot}/etc/rc.d/rc*\n\n%files\n%doc BUGS CHANGES COPYING CREDITS README LICENSE\n%doc docs/*.*\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.conf\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/pluto\n%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ipsec.secrets\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/cacerts\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/crls\n%attr(0700,root,root) %dir %{_sysconfdir}/ipsec.d/policies\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ipsec.d/policies/*\n%attr(0700,root,root) %dir %{_localstatedir}/log/pluto/peer\n%attr(0755,root,root) %dir %{_localstatedir}/run/pluto\n%attr(0644,root,root) %{_unitdir}/ipsec.service\n%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/pluto\n%{_sbindir}/ipsec\n%{_libexecdir}/ipsec\n%attr(0644,root,root) %doc %{_mandir}/*/*\n\n%if %{USE_FIPSCHECK}\n%{_libdir}/fipscheck/*.hmac\n# We own the directory so we don't have to require prelink\n%attr(0755,root,root) %dir %{_sysconfdir}/prelink.conf.d/\n%{_sysconfdir}/prelink.conf.d/libreswan-fips.conf\n%endif\n\n%preun\n%systemd_preun ipsec.service\n\n%postun\n%systemd_postun_with_restart ipsec.service\n\n%post\n%systemd_post ipsec.service\n%if %{USE_FIPSCHECK}\nprelink -u %{_libexecdir}/ipsec/* 2>/dev/null || :\n%endif\nif [ ! -f /etc/ipsec.d/cert8.db ] ; then\necho > /var/tmp/libreswan-nss-pwd\ncertutil -N -f /var/tmp/libreswan-nss-pwd -d /etc/ipsec.d\nrestorecon /etc/ipsec.d/*db 2>/dev/null || :\nrm /var/tmp/libreswan-nss-pwd\nfi\n\n%changelog\n* Tue Jan 01 2013 Team Libreswan <team@libreswan.org> - IPSECBASEVERSION-1\n- Automated build from release tar ball\n", "nloc": "nan", "complexity": "nan", "token_count": "nan", "programming_language": "Batchfile", "method_changes": [] } ] } } ]
CVE-2022-28368
2022-04-03T03:15:00
2023-08-08T14:22:00
[{'lang': 'en', 'value': 'Dompdf 1.2.1 allows remote code execution via a .php file in the src:url field of an @font-face Cascading Style Sheets (CSS) statement (within an HTML input file).'}]
[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:dompdf_project:dompdf:*:*:*:*:*:*:*:*', 'versionEndExcluding': '1.2.1', 'cpe_name': []}]}]
HIGH
False
False
False
False
AV:N/AC:L/Au:N/C:P/I:P/A:P
NETWORK
LOW
NONE
PARTIAL
PARTIAL
PARTIAL
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
False
[{'url': 'https://github.com/snyk-labs/php-goof', 'name': 'https://github.com/snyk-labs/php-goof', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://packagist.org/packages/dompdf/dompdf#v1.2.1', 'name': 'https://packagist.org/packages/dompdf/dompdf#v1.2.1', 'refsource': 'MISC', 'tags': ['Product', 'Third Party Advisory']}, {'url': 'https://snyk.io/blog/security-alert-php-pdf-library-dompdf-rce/', 'name': 'https://snyk.io/blog/security-alert-php-pdf-library-dompdf-rce/', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/dompdf/dompdf/commit/4c70e1025bcd9b7694b95dd552499bd83cd6141d', 'name': 'https://github.com/dompdf/dompdf/commit/4c70e1025bcd9b7694b95dd552499bd83cd6141d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/dompdf/dompdf/pull/2808', 'name': 'https://github.com/dompdf/dompdf/pull/2808', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/dompdf/dompdf/issues/2598', 'name': 'https://github.com/dompdf/dompdf/issues/2598', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://packetstormsecurity.com/files/171738/Dompdf-1.2.1-Remote-Code-Execution.html', 'name': 'http://packetstormsecurity.com/files/171738/Dompdf-1.2.1-Remote-Code-Execution.html', 'refsource': 'MISC', 'tags': []}]
[{'description': [{'lang': 'en', 'value': 'CWE-79'}]}]
[ { "index": 878, "cwe_id": "CWE-79", "cwe_name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')", "description": "The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.", "extended_description": "\n Cross-site scripting (XSS) vulnerabilities occur when:\n \n Untrusted data enters a web application, typically from a web request.\n The web application dynamically generates a web page that contains this untrusted data.\n During page generation, the application does not prevent the data from containing content that is executable by a web browser, such as JavaScript, HTML tags, HTML attributes, mouse events, Flash, ActiveX, etc.\n A victim visits the generated web page through a web browser, which contains malicious script that was injected using the untrusted data.\n Since the script comes from a web page that was sent by the web server, the victim's web browser executes the malicious script in the context of the web server's domain.\n This effectively violates the intention of the web browser's same-origin policy, which states that scripts in one domain should not be able to access resources or run code in a different domain.\n \n There are three main kinds of XSS:\n \n \n Type 1: Reflected XSS (or Non-Persistent) - \n \t\t\tThe server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser. The most common mechanism for delivering malicious content is to include it as a parameter in a URL that is posted publicly or e-mailed directly to the victim. URLs constructed in this manner constitute the core of many phishing schemes, whereby an attacker convinces a victim to visit a URL that refers to a vulnerable site. After the site reflects the attacker's content back to the victim, the content is executed by the victim's browser.\n \n Type 2: Stored XSS (or Persistent) - \n The application stores dangerous data in a database, message forum, visitor log, or other trusted data store. At a later time, the dangerous data is subsequently read back into the application and included in dynamic content. From an attacker's perspective, the optimal place to inject malicious content is in an area that is displayed to either many users or particularly interesting users. Interesting users typically have elevated privileges in the application or interact with sensitive data that is valuable to the attacker. If one of these users executes malicious content, the attacker may be able to perform privileged operations on behalf of the user or gain access to sensitive data belonging to the user. For example, the attacker might inject XSS into a log message, which might not be handled properly when an administrator views the logs.\n \n \n Type 0: DOM-Based XSS - \n In DOM-based XSS, the client performs the injection of XSS into the page; in the other types, the server performs the injection. DOM-based XSS generally involves server-controlled, trusted script that is sent to the client, such as Javascript that performs sanity checks on a form before the user submits it. If the server-supplied script processes user-supplied data and then injects it back into the web page (such as with dynamic HTML), then DOM-based XSS is possible.\n \n \n Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site. Phishing attacks could be used to emulate trusted web sites and trick the victim into entering a password, allowing the attacker to compromise the victim's account on that web site. Finally, the script could exploit a vulnerability in the web browser itself possibly taking over the victim's machine, sometimes referred to as \"drive-by hacking.\"\n In many cases, the attack can be launched without the victim even being aware of it. Even with careful users, attackers frequently use a variety of methods to encode the malicious portion of the attack, such as URL encoding or Unicode, so the request looks less suspicious.\n \n ", "url": "https://cwe.mitre.org/data/definitions/79.html", "is_category": 0 } ]
[ { "cve_id": "CVE-2022-28368", "hash": "4c70e1025bcd9b7694b95dd552499bd83cd6141d", "repo_url": "https://github.com/dompdf/dompdf", "commit_details": { "hash": "4c70e1025bcd9b7694b95dd552499bd83cd6141d", "repo_url": "https://github.com/dompdf/dompdf", "author": "Brian Sweeney", "author_date": "2022-03-17T00:09:04", "author_timezone": "14400", "committer": "Brian Sweeney", "committer_date": "2022-03-21T21:08:15", "committer_timezone": "14400", "msg": "Match installed font filename extension to type\n\nfixes #2598", "merge": "False", "parents": "['0347b9a73f8a03b1b7e659312416f6fd6c7a0cee']", "num_lines_added": "7", "num_lines_deleted": "1", "dmm_unit_complexity": "nan", "dmm_unit_interfacing": "nan", "dmm_unit_size": "nan", "repository": { "repo_url": "https://github.com/dompdf/dompdf", "repo_name": "dompdf/dompdf", "description": "HTML to PDF converter for PHP", "date_created": "2012-11-12T20:47:16", "date_last_push": "2024-07-24T11:47:10", "homepage": "https://dompdf.github.io/", "repo_language": "PHP", "owner": "dompdf", "forks_count": "1782.0", "stars_count": "10383.0" }, "file_changes": [ { "file_change_id": "112838970714074", "hash": "4c70e1025bcd9b7694b95dd552499bd83cd6141d", "filename": "FontMetrics.php", "old_path": "src/FontMetrics.php", "new_path": "src/FontMetrics.php", "change_type": "ModificationType.MODIFY", "diff": "@@ -206,7 +206,6 @@ class FontMetrics\n }\n \n $cacheEntry = $localFile;\n- $localFile .= \".\".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH), PATHINFO_EXTENSION));\n \n $entry[$styleString] = $cacheEntry;\n \n@@ -258,6 +257,13 @@ class FontMetrics\n return false;\n }\n \n+ switch ($font->getFontType()) {\n+ case \"TrueType\":\n+ default:\n+ $localFile .= \".ttf\";\n+ break;\n+ }\n+\n $font->parse();\n $font->saveAdobeFontMetrics(\"$cacheEntry.ufm\");\n $font->close();\n", "diff_parsed": "{'added': [(260, ' switch ($font->getFontType()) {'), (261, ' case \"TrueType\":'), (262, ' default:'), (263, ' $localFile .= \".ttf\";'), (264, ' break;'), (265, ' }'), (266, '')], 'deleted': [(209, ' $localFile .= \".\".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH), PATHINFO_EXTENSION));')]}", "num_lines_added": "7", "num_lines_deleted": "1", "code_after": "<?php\n/**\n * @package dompdf\n * @link http://dompdf.github.com/\n * @author Benj Carson <benjcarson@digitaljunkies.ca>\n * @author Helmut Tischer <htischer@weihenstephan.org>\n * @author Fabien Ménager <fabien.menager@gmail.com>\n * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License\n */\n\nnamespace Dompdf;\n\nuse FontLib\\Font;\n\n/**\n * The font metrics class\n *\n * This class provides information about fonts and text. It can resolve\n * font names into actual installed font files, as well as determine the\n * size of text in a particular font and size.\n *\n * @static\n * @package dompdf\n */\nclass FontMetrics\n{\n /**\n * Name of the font cache file\n *\n * This file must be writable by the webserver process only to update it\n * with save_font_families() after adding the .afm file references of a new font family\n * with FontMetrics::saveFontFamilies().\n * This is typically done only from command line with load_font.php on converting\n * ttf fonts to ufm with php-font-lib.\n */\n const CACHE_FILE = \"dompdf_font_family_cache.php\";\n\n /**\n * @var Canvas\n * @deprecated\n */\n protected $pdf;\n\n /**\n * Underlying {@link Canvas} object to perform text size calculations\n *\n * @var Canvas\n */\n protected $canvas;\n\n /**\n * Array of font family names to font files\n *\n * Usually cached by the {@link load_font.php} script\n *\n * @var array\n */\n protected $fontLookup = [];\n\n /**\n * @var Options\n */\n private $options;\n\n /**\n * Class initialization\n */\n public function __construct(Canvas $canvas, Options $options)\n {\n $this->setCanvas($canvas);\n $this->setOptions($options);\n $this->loadFontFamilies();\n }\n\n /**\n * @deprecated\n */\n public function save_font_families()\n {\n $this->saveFontFamilies();\n }\n\n /**\n * Saves the stored font family cache\n *\n * The name and location of the cache file are determined by {@link\n * FontMetrics::CACHE_FILE}. This file should be writable by the\n * webserver process.\n *\n * @see FontMetrics::loadFontFamilies()\n */\n public function saveFontFamilies()\n {\n // replace the path to the DOMPDF font directories with the corresponding constants (allows for more portability)\n $cacheData = sprintf(\"<?php return function (%s, %s) {%s\", '$fontDir', '$rootDir', PHP_EOL);\n $cacheData .= sprintf(\"return array (%s\", PHP_EOL);\n foreach ($this->fontLookup as $family => $variants) {\n $cacheData .= sprintf(\" '%s' => array(%s\", addslashes($family), PHP_EOL);\n foreach ($variants as $variant => $path) {\n $path = sprintf(\"'%s'\", $path);\n $path = str_replace('\\'' . $this->options->getFontDir(), '$fontDir . \\'', $path);\n $path = str_replace('\\'' . $this->options->getRootDir(), '$rootDir . \\'', $path);\n $cacheData .= sprintf(\" '%s' => %s,%s\", $variant, $path, PHP_EOL);\n }\n $cacheData .= sprintf(\" ),%s\", PHP_EOL);\n }\n $cacheData .= \");\" . PHP_EOL;\n $cacheData .= \"}; ?>\";\n file_put_contents($this->getCacheFile(), $cacheData);\n }\n\n /**\n * @deprecated\n */\n public function load_font_families()\n {\n $this->loadFontFamilies();\n }\n\n /**\n * Loads the stored font family cache\n *\n * @see FontMetrics::saveFontFamilies()\n */\n public function loadFontFamilies()\n {\n $fontDir = $this->options->getFontDir();\n $rootDir = $this->options->getRootDir();\n\n // FIXME: temporarily define constants for cache files <= v0.6.2\n if (!defined(\"DOMPDF_DIR\")) { define(\"DOMPDF_DIR\", $rootDir); }\n if (!defined(\"DOMPDF_FONT_DIR\")) { define(\"DOMPDF_FONT_DIR\", $fontDir); }\n\n $file = $rootDir . \"/lib/fonts/dompdf_font_family_cache.dist.php\";\n $distFontsClosure = require $file;\n $distFonts = is_array($distFontsClosure) ? $distFontsClosure : $distFontsClosure($rootDir);\n if (!is_readable($this->getCacheFile())) {\n $this->fontLookup = $distFonts;\n return;\n }\n\n $cacheDataClosure = require $this->getCacheFile();\n $cacheData = is_array($cacheDataClosure) ? $cacheDataClosure : $cacheDataClosure($fontDir, $rootDir);\n\n $this->fontLookup = [];\n if (is_array($this->fontLookup)) {\n foreach ($cacheData as $key => $value) {\n $this->fontLookup[stripslashes($key)] = $value;\n }\n }\n\n // Merge provided fonts\n $this->fontLookup += $distFonts;\n }\n\n /**\n * @param array $style\n * @param string $remote_file\n * @param resource $context\n * @return bool\n * @deprecated\n */\n public function register_font($style, $remote_file, $context = null)\n {\n return $this->registerFont($style, $remote_file);\n }\n\n /**\n * @param array $style\n * @param string $remoteFile\n * @param resource $context\n * @return bool\n */\n public function registerFont($style, $remoteFile, $context = null)\n {\n $fontname = mb_strtolower($style[\"family\"]);\n $families = $this->getFontFamilies();\n\n $entry = [];\n if (isset($families[$fontname])) {\n $entry = $families[$fontname];\n }\n\n $styleString = $this->getType(\"{$style['weight']} {$style['style']}\");\n\n $fontDir = $this->options->getFontDir();\n $remoteHash = md5($remoteFile);\n\n $prefix = $fontname . \"_\" . $styleString;\n $prefix = trim($prefix, \"-\");\n if (function_exists('iconv')) {\n $prefix = @iconv('utf-8', 'us-ascii//TRANSLIT', $prefix);\n }\n $prefix_encoding = mb_detect_encoding($prefix, mb_detect_order(), true);\n $substchar = mb_substitute_character();\n mb_substitute_character(0x005F);\n $prefix = mb_convert_encoding($prefix, \"ISO-8859-1\", $prefix_encoding);\n mb_substitute_character($substchar);\n $prefix = preg_replace(\"[\\W]\", \"_\", $prefix);\n $prefix = preg_replace(\"/[^-_\\w]+/\", \"\", $prefix);\n\n $localFile = $fontDir . \"/\" . $prefix . \"_\" . $remoteHash;\n\n if (isset($entry[$styleString]) && $localFile == $entry[$styleString]) {\n return true;\n }\n\n $cacheEntry = $localFile;\n\n $entry[$styleString] = $cacheEntry;\n\n // Download the remote file\n [$protocol] = Helpers::explode_url($remoteFile);\n if (!$this->options->isRemoteEnabled() && ($protocol !== \"\" && $protocol !== \"file://\")) {\n Helpers::record_warnings(E_USER_WARNING, \"Remote font resource $remoteFile referenced, but remote file download is disabled.\", __FILE__, __LINE__);\n return false;\n }\n if ($protocol === \"\" || $protocol === \"file://\") {\n $realfile = realpath($remoteFile);\n\n $rootDir = realpath($this->options->getRootDir());\n if (strpos($realfile, $rootDir) !== 0) {\n $chroot = $this->options->getChroot();\n $chrootValid = false;\n foreach ($chroot as $chrootPath) {\n $chrootPath = realpath($chrootPath);\n if ($chrootPath !== false && strpos($realfile, $chrootPath) === 0) {\n $chrootValid = true;\n break;\n }\n }\n if ($chrootValid !== true) {\n Helpers::record_warnings(E_USER_WARNING, \"Permission denied on $remoteFile. The file could not be found under the paths specified by Options::chroot.\", __FILE__, __LINE__);\n return false;\n }\n }\n\n if (!$realfile) {\n Helpers::record_warnings(E_USER_WARNING, \"File '$realfile' not found.\", __FILE__, __LINE__);\n return false;\n }\n\n $remoteFile = $realfile;\n }\n list($remoteFileContent, $http_response_header) = @Helpers::getFileContent($remoteFile, $context);\n if ($remoteFileContent === null) {\n return false;\n }\n\n $localTempFile = @tempnam($this->options->get(\"tempDir\"), \"dompdf-font-\");\n file_put_contents($localTempFile, $remoteFileContent);\n\n $font = Font::load($localTempFile);\n\n if (!$font) {\n unlink($localTempFile);\n return false;\n }\n\n switch ($font->getFontType()) {\n case \"TrueType\":\n default:\n $localFile .= \".ttf\";\n break;\n }\n\n $font->parse();\n $font->saveAdobeFontMetrics(\"$cacheEntry.ufm\");\n $font->close();\n\n unlink($localTempFile);\n\n if ( !file_exists(\"$cacheEntry.ufm\") ) {\n return false;\n }\n\n // Save the changes\n file_put_contents($localFile, $remoteFileContent);\n\n if ( !file_exists($localFile) ) {\n unlink(\"$cacheEntry.ufm\");\n return false;\n }\n\n $this->setFontFamily($fontname, $entry);\n $this->saveFontFamilies();\n\n return true;\n }\n\n /**\n * @param $text\n * @param $font\n * @param $size\n * @param float $word_spacing\n * @param float $char_spacing\n * @return float\n * @deprecated\n */\n public function get_text_width($text, $font, $size, $word_spacing = 0.0, $char_spacing = 0.0)\n {\n //return self::$_pdf->get_text_width($text, $font, $size, $word_spacing, $char_spacing);\n return $this->getTextWidth($text, $font, $size, $word_spacing, $char_spacing);\n }\n\n /**\n * Calculates text size, in points\n *\n * @param string $text the text to be sized\n * @param string $font the desired font\n * @param float $size the desired font size\n * @param float $wordSpacing\n * @param float $charSpacing\n *\n * @internal param float $spacing word spacing, if any\n * @return float\n */\n public function getTextWidth($text, $font, $size, $wordSpacing = 0.0, $charSpacing = 0.0)\n {\n // @todo Make sure this cache is efficient before enabling it\n static $cache = [];\n\n if ($text === \"\") {\n return 0;\n }\n\n // Don't cache long strings\n $useCache = !isset($text[50]); // Faster than strlen\n\n // Text-size calculations depend on the canvas used. Make sure to not\n // return wrong values when switching canvas backends\n $canvasClass = get_class($this->canvas);\n $key = \"$canvasClass/$font/$size/$wordSpacing/$charSpacing\";\n\n if ($useCache && isset($cache[$key][$text])) {\n return $cache[$key][$text];\n }\n\n $width = $this->canvas->get_text_width($text, $font, $size, $wordSpacing, $charSpacing);\n\n if ($useCache) {\n $cache[$key][$text] = $width;\n }\n\n return $width;\n }\n\n /**\n * @param $font\n * @param $size\n * @return float\n * @deprecated\n */\n public function get_font_height($font, $size)\n {\n return $this->getFontHeight($font, $size);\n }\n\n /**\n * Calculates font height, in points\n *\n * @param string $font\n * @param float $size\n *\n * @return float\n */\n public function getFontHeight($font, $size)\n {\n return $this->canvas->get_font_height($font, $size);\n }\n\n /**\n * Calculates font baseline, in points\n *\n * @param string $font\n * @param float $size\n *\n * @return float\n */\n public function getFontBaseline($font, $size)\n {\n return $this->canvas->get_font_baseline($font, $size);\n }\n\n /**\n * @param $family_raw\n * @param string $subtype_raw\n * @return string\n * @deprecated\n */\n public function get_font($family_raw, $subtype_raw = \"normal\")\n {\n return $this->getFont($family_raw, $subtype_raw);\n }\n\n /**\n * Resolves a font family & subtype into an actual font file\n * Subtype can be one of 'normal', 'bold', 'italic' or 'bold_italic'. If\n * the particular font family has no suitable font file, the default font\n * ({@link Options::defaultFont}) is used. The font file returned\n * is the absolute pathname to the font file on the system.\n *\n * @param string $familyRaw\n * @param string $subtypeRaw\n *\n * @return string\n */\n public function getFont($familyRaw, $subtypeRaw = \"normal\")\n {\n static $cache = [];\n\n if (isset($cache[$familyRaw][$subtypeRaw])) {\n return $cache[$familyRaw][$subtypeRaw];\n }\n\n /* Allow calling for various fonts in search path. Therefore not immediately\n * return replacement on non match.\n * Only when called with NULL try replacement.\n * When this is also missing there is really trouble.\n * If only the subtype fails, nevertheless return failure.\n * Only on checking the fallback font, check various subtypes on same font.\n */\n\n $subtype = strtolower($subtypeRaw);\n\n if ($familyRaw) {\n $family = str_replace([\"'\", '\"'], \"\", strtolower($familyRaw));\n\n if (isset($this->fontLookup[$family][$subtype])) {\n return $cache[$familyRaw][$subtypeRaw] = $this->fontLookup[$family][$subtype];\n }\n\n return null;\n }\n\n $family = \"serif\";\n\n if (isset($this->fontLookup[$family][$subtype])) {\n return $cache[$familyRaw][$subtypeRaw] = $this->fontLookup[$family][$subtype];\n }\n\n if (!isset($this->fontLookup[$family])) {\n return null;\n }\n\n $family = $this->fontLookup[$family];\n\n foreach ($family as $sub => $font) {\n if (strpos($subtype, $sub) !== false) {\n return $cache[$familyRaw][$subtypeRaw] = $font;\n }\n }\n\n if ($subtype !== \"normal\") {\n foreach ($family as $sub => $font) {\n if ($sub !== \"normal\") {\n return $cache[$familyRaw][$subtypeRaw] = $font;\n }\n }\n }\n\n $subtype = \"normal\";\n\n if (isset($family[$subtype])) {\n return $cache[$familyRaw][$subtypeRaw] = $family[$subtype];\n }\n\n return null;\n }\n\n /**\n * @param $family\n * @return null|string\n * @deprecated\n */\n public function get_family($family)\n {\n return $this->getFamily($family);\n }\n\n /**\n * @param string $family\n * @return null|string\n */\n public function getFamily($family)\n {\n $family = str_replace([\"'\", '\"'], \"\", mb_strtolower($family));\n\n if (isset($this->fontLookup[$family])) {\n return $this->fontLookup[$family];\n }\n\n return null;\n }\n\n /**\n * @param $type\n * @return string\n * @deprecated\n */\n public function get_type($type)\n {\n return $this->getType($type);\n }\n\n /**\n * @param string $type\n * @return string\n */\n public function getType($type)\n {\n if (preg_match('/bold/i', $type)) {\n $weight = 700;\n } elseif (preg_match('/([1-9]00)/', $type, $match)) {\n $weight = (int)$match[0];\n } else {\n $weight = 400;\n }\n $weight = $weight === 400 ? 'normal' : $weight;\n $weight = $weight === 700 ? 'bold' : $weight;\n\n $style = preg_match('/italic|oblique/i', $type) ? 'italic' : null;\n\n if ($weight === 'normal' && $style !== null) {\n return $style;\n }\n\n return $style === null\n ? $weight\n : $weight.'_'.$style;\n }\n\n /**\n * @return array\n * @deprecated\n */\n public function get_font_families()\n {\n return $this->getFontFamilies();\n }\n\n /**\n * Returns the current font lookup table\n *\n * @return array\n */\n public function getFontFamilies()\n {\n return $this->fontLookup;\n }\n\n /**\n * @param string $fontname\n * @param mixed $entry\n * @deprecated\n */\n public function set_font_family($fontname, $entry)\n {\n $this->setFontFamily($fontname, $entry);\n }\n\n /**\n * @param string $fontname\n * @param mixed $entry\n */\n public function setFontFamily($fontname, $entry)\n {\n $this->fontLookup[mb_strtolower($fontname)] = $entry;\n }\n\n /**\n * @return string\n */\n public function getCacheFile()\n {\n return $this->options->getFontDir() . '/' . self::CACHE_FILE;\n }\n\n /**\n * @param Options $options\n * @return $this\n */\n public function setOptions(Options $options)\n {\n $this->options = $options;\n return $this;\n }\n\n /**\n * @return Options\n */\n public function getOptions()\n {\n return $this->options;\n }\n\n /**\n * @param Canvas $canvas\n * @return $this\n */\n public function setCanvas(Canvas $canvas)\n {\n $this->canvas = $canvas;\n // Still write deprecated pdf for now. It might be used by a parent class.\n $this->pdf = $canvas;\n return $this;\n }\n\n /**\n * @return Canvas\n */\n public function getCanvas()\n {\n return $this->canvas;\n }\n}\n", "code_before": "<?php\n/**\n * @package dompdf\n * @link http://dompdf.github.com/\n * @author Benj Carson <benjcarson@digitaljunkies.ca>\n * @author Helmut Tischer <htischer@weihenstephan.org>\n * @author Fabien Ménager <fabien.menager@gmail.com>\n * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License\n */\n\nnamespace Dompdf;\n\nuse FontLib\\Font;\n\n/**\n * The font metrics class\n *\n * This class provides information about fonts and text. It can resolve\n * font names into actual installed font files, as well as determine the\n * size of text in a particular font and size.\n *\n * @static\n * @package dompdf\n */\nclass FontMetrics\n{\n /**\n * Name of the font cache file\n *\n * This file must be writable by the webserver process only to update it\n * with save_font_families() after adding the .afm file references of a new font family\n * with FontMetrics::saveFontFamilies().\n * This is typically done only from command line with load_font.php on converting\n * ttf fonts to ufm with php-font-lib.\n */\n const CACHE_FILE = \"dompdf_font_family_cache.php\";\n\n /**\n * @var Canvas\n * @deprecated\n */\n protected $pdf;\n\n /**\n * Underlying {@link Canvas} object to perform text size calculations\n *\n * @var Canvas\n */\n protected $canvas;\n\n /**\n * Array of font family names to font files\n *\n * Usually cached by the {@link load_font.php} script\n *\n * @var array\n */\n protected $fontLookup = [];\n\n /**\n * @var Options\n */\n private $options;\n\n /**\n * Class initialization\n */\n public function __construct(Canvas $canvas, Options $options)\n {\n $this->setCanvas($canvas);\n $this->setOptions($options);\n $this->loadFontFamilies();\n }\n\n /**\n * @deprecated\n */\n public function save_font_families()\n {\n $this->saveFontFamilies();\n }\n\n /**\n * Saves the stored font family cache\n *\n * The name and location of the cache file are determined by {@link\n * FontMetrics::CACHE_FILE}. This file should be writable by the\n * webserver process.\n *\n * @see FontMetrics::loadFontFamilies()\n */\n public function saveFontFamilies()\n {\n // replace the path to the DOMPDF font directories with the corresponding constants (allows for more portability)\n $cacheData = sprintf(\"<?php return function (%s, %s) {%s\", '$fontDir', '$rootDir', PHP_EOL);\n $cacheData .= sprintf(\"return array (%s\", PHP_EOL);\n foreach ($this->fontLookup as $family => $variants) {\n $cacheData .= sprintf(\" '%s' => array(%s\", addslashes($family), PHP_EOL);\n foreach ($variants as $variant => $path) {\n $path = sprintf(\"'%s'\", $path);\n $path = str_replace('\\'' . $this->options->getFontDir(), '$fontDir . \\'', $path);\n $path = str_replace('\\'' . $this->options->getRootDir(), '$rootDir . \\'', $path);\n $cacheData .= sprintf(\" '%s' => %s,%s\", $variant, $path, PHP_EOL);\n }\n $cacheData .= sprintf(\" ),%s\", PHP_EOL);\n }\n $cacheData .= \");\" . PHP_EOL;\n $cacheData .= \"}; ?>\";\n file_put_contents($this->getCacheFile(), $cacheData);\n }\n\n /**\n * @deprecated\n */\n public function load_font_families()\n {\n $this->loadFontFamilies();\n }\n\n /**\n * Loads the stored font family cache\n *\n * @see FontMetrics::saveFontFamilies()\n */\n public function loadFontFamilies()\n {\n $fontDir = $this->options->getFontDir();\n $rootDir = $this->options->getRootDir();\n\n // FIXME: temporarily define constants for cache files <= v0.6.2\n if (!defined(\"DOMPDF_DIR\")) { define(\"DOMPDF_DIR\", $rootDir); }\n if (!defined(\"DOMPDF_FONT_DIR\")) { define(\"DOMPDF_FONT_DIR\", $fontDir); }\n\n $file = $rootDir . \"/lib/fonts/dompdf_font_family_cache.dist.php\";\n $distFontsClosure = require $file;\n $distFonts = is_array($distFontsClosure) ? $distFontsClosure : $distFontsClosure($rootDir);\n if (!is_readable($this->getCacheFile())) {\n $this->fontLookup = $distFonts;\n return;\n }\n\n $cacheDataClosure = require $this->getCacheFile();\n $cacheData = is_array($cacheDataClosure) ? $cacheDataClosure : $cacheDataClosure($fontDir, $rootDir);\n\n $this->fontLookup = [];\n if (is_array($this->fontLookup)) {\n foreach ($cacheData as $key => $value) {\n $this->fontLookup[stripslashes($key)] = $value;\n }\n }\n\n // Merge provided fonts\n $this->fontLookup += $distFonts;\n }\n\n /**\n * @param array $style\n * @param string $remote_file\n * @param resource $context\n * @return bool\n * @deprecated\n */\n public function register_font($style, $remote_file, $context = null)\n {\n return $this->registerFont($style, $remote_file);\n }\n\n /**\n * @param array $style\n * @param string $remoteFile\n * @param resource $context\n * @return bool\n */\n public function registerFont($style, $remoteFile, $context = null)\n {\n $fontname = mb_strtolower($style[\"family\"]);\n $families = $this->getFontFamilies();\n\n $entry = [];\n if (isset($families[$fontname])) {\n $entry = $families[$fontname];\n }\n\n $styleString = $this->getType(\"{$style['weight']} {$style['style']}\");\n\n $fontDir = $this->options->getFontDir();\n $remoteHash = md5($remoteFile);\n\n $prefix = $fontname . \"_\" . $styleString;\n $prefix = trim($prefix, \"-\");\n if (function_exists('iconv')) {\n $prefix = @iconv('utf-8', 'us-ascii//TRANSLIT', $prefix);\n }\n $prefix_encoding = mb_detect_encoding($prefix, mb_detect_order(), true);\n $substchar = mb_substitute_character();\n mb_substitute_character(0x005F);\n $prefix = mb_convert_encoding($prefix, \"ISO-8859-1\", $prefix_encoding);\n mb_substitute_character($substchar);\n $prefix = preg_replace(\"[\\W]\", \"_\", $prefix);\n $prefix = preg_replace(\"/[^-_\\w]+/\", \"\", $prefix);\n\n $localFile = $fontDir . \"/\" . $prefix . \"_\" . $remoteHash;\n\n if (isset($entry[$styleString]) && $localFile == $entry[$styleString]) {\n return true;\n }\n\n $cacheEntry = $localFile;\n $localFile .= \".\".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH), PATHINFO_EXTENSION));\n\n $entry[$styleString] = $cacheEntry;\n\n // Download the remote file\n [$protocol] = Helpers::explode_url($remoteFile);\n if (!$this->options->isRemoteEnabled() && ($protocol !== \"\" && $protocol !== \"file://\")) {\n Helpers::record_warnings(E_USER_WARNING, \"Remote font resource $remoteFile referenced, but remote file download is disabled.\", __FILE__, __LINE__);\n return false;\n }\n if ($protocol === \"\" || $protocol === \"file://\") {\n $realfile = realpath($remoteFile);\n\n $rootDir = realpath($this->options->getRootDir());\n if (strpos($realfile, $rootDir) !== 0) {\n $chroot = $this->options->getChroot();\n $chrootValid = false;\n foreach ($chroot as $chrootPath) {\n $chrootPath = realpath($chrootPath);\n if ($chrootPath !== false && strpos($realfile, $chrootPath) === 0) {\n $chrootValid = true;\n break;\n }\n }\n if ($chrootValid !== true) {\n Helpers::record_warnings(E_USER_WARNING, \"Permission denied on $remoteFile. The file could not be found under the paths specified by Options::chroot.\", __FILE__, __LINE__);\n return false;\n }\n }\n\n if (!$realfile) {\n Helpers::record_warnings(E_USER_WARNING, \"File '$realfile' not found.\", __FILE__, __LINE__);\n return false;\n }\n\n $remoteFile = $realfile;\n }\n list($remoteFileContent, $http_response_header) = @Helpers::getFileContent($remoteFile, $context);\n if ($remoteFileContent === null) {\n return false;\n }\n\n $localTempFile = @tempnam($this->options->get(\"tempDir\"), \"dompdf-font-\");\n file_put_contents($localTempFile, $remoteFileContent);\n\n $font = Font::load($localTempFile);\n\n if (!$font) {\n unlink($localTempFile);\n return false;\n }\n\n $font->parse();\n $font->saveAdobeFontMetrics(\"$cacheEntry.ufm\");\n $font->close();\n\n unlink($localTempFile);\n\n if ( !file_exists(\"$cacheEntry.ufm\") ) {\n return false;\n }\n\n // Save the changes\n file_put_contents($localFile, $remoteFileContent);\n\n if ( !file_exists($localFile) ) {\n unlink(\"$cacheEntry.ufm\");\n return false;\n }\n\n $this->setFontFamily($fontname, $entry);\n $this->saveFontFamilies();\n\n return true;\n }\n\n /**\n * @param $text\n * @param $font\n * @param $size\n * @param float $word_spacing\n * @param float $char_spacing\n * @return float\n * @deprecated\n */\n public function get_text_width($text, $font, $size, $word_spacing = 0.0, $char_spacing = 0.0)\n {\n //return self::$_pdf->get_text_width($text, $font, $size, $word_spacing, $char_spacing);\n return $this->getTextWidth($text, $font, $size, $word_spacing, $char_spacing);\n }\n\n /**\n * Calculates text size, in points\n *\n * @param string $text the text to be sized\n * @param string $font the desired font\n * @param float $size the desired font size\n * @param float $wordSpacing\n * @param float $charSpacing\n *\n * @internal param float $spacing word spacing, if any\n * @return float\n */\n public function getTextWidth($text, $font, $size, $wordSpacing = 0.0, $charSpacing = 0.0)\n {\n // @todo Make sure this cache is efficient before enabling it\n static $cache = [];\n\n if ($text === \"\") {\n return 0;\n }\n\n // Don't cache long strings\n $useCache = !isset($text[50]); // Faster than strlen\n\n // Text-size calculations depend on the canvas used. Make sure to not\n // return wrong values when switching canvas backends\n $canvasClass = get_class($this->canvas);\n $key = \"$canvasClass/$font/$size/$wordSpacing/$charSpacing\";\n\n if ($useCache && isset($cache[$key][$text])) {\n return $cache[$key][$text];\n }\n\n $width = $this->canvas->get_text_width($text, $font, $size, $wordSpacing, $charSpacing);\n\n if ($useCache) {\n $cache[$key][$text] = $width;\n }\n\n return $width;\n }\n\n /**\n * @param $font\n * @param $size\n * @return float\n * @deprecated\n */\n public function get_font_height($font, $size)\n {\n return $this->getFontHeight($font, $size);\n }\n\n /**\n * Calculates font height, in points\n *\n * @param string $font\n * @param float $size\n *\n * @return float\n */\n public function getFontHeight($font, $size)\n {\n return $this->canvas->get_font_height($font, $size);\n }\n\n /**\n * Calculates font baseline, in points\n *\n * @param string $font\n * @param float $size\n *\n * @return float\n */\n public function getFontBaseline($font, $size)\n {\n return $this->canvas->get_font_baseline($font, $size);\n }\n\n /**\n * @param $family_raw\n * @param string $subtype_raw\n * @return string\n * @deprecated\n */\n public function get_font($family_raw, $subtype_raw = \"normal\")\n {\n return $this->getFont($family_raw, $subtype_raw);\n }\n\n /**\n * Resolves a font family & subtype into an actual font file\n * Subtype can be one of 'normal', 'bold', 'italic' or 'bold_italic'. If\n * the particular font family has no suitable font file, the default font\n * ({@link Options::defaultFont}) is used. The font file returned\n * is the absolute pathname to the font file on the system.\n *\n * @param string $familyRaw\n * @param string $subtypeRaw\n *\n * @return string\n */\n public function getFont($familyRaw, $subtypeRaw = \"normal\")\n {\n static $cache = [];\n\n if (isset($cache[$familyRaw][$subtypeRaw])) {\n return $cache[$familyRaw][$subtypeRaw];\n }\n\n /* Allow calling for various fonts in search path. Therefore not immediately\n * return replacement on non match.\n * Only when called with NULL try replacement.\n * When this is also missing there is really trouble.\n * If only the subtype fails, nevertheless return failure.\n * Only on checking the fallback font, check various subtypes on same font.\n */\n\n $subtype = strtolower($subtypeRaw);\n\n if ($familyRaw) {\n $family = str_replace([\"'\", '\"'], \"\", strtolower($familyRaw));\n\n if (isset($this->fontLookup[$family][$subtype])) {\n return $cache[$familyRaw][$subtypeRaw] = $this->fontLookup[$family][$subtype];\n }\n\n return null;\n }\n\n $family = \"serif\";\n\n if (isset($this->fontLookup[$family][$subtype])) {\n return $cache[$familyRaw][$subtypeRaw] = $this->fontLookup[$family][$subtype];\n }\n\n if (!isset($this->fontLookup[$family])) {\n return null;\n }\n\n $family = $this->fontLookup[$family];\n\n foreach ($family as $sub => $font) {\n if (strpos($subtype, $sub) !== false) {\n return $cache[$familyRaw][$subtypeRaw] = $font;\n }\n }\n\n if ($subtype !== \"normal\") {\n foreach ($family as $sub => $font) {\n if ($sub !== \"normal\") {\n return $cache[$familyRaw][$subtypeRaw] = $font;\n }\n }\n }\n\n $subtype = \"normal\";\n\n if (isset($family[$subtype])) {\n return $cache[$familyRaw][$subtypeRaw] = $family[$subtype];\n }\n\n return null;\n }\n\n /**\n * @param $family\n * @return null|string\n * @deprecated\n */\n public function get_family($family)\n {\n return $this->getFamily($family);\n }\n\n /**\n * @param string $family\n * @return null|string\n */\n public function getFamily($family)\n {\n $family = str_replace([\"'\", '\"'], \"\", mb_strtolower($family));\n\n if (isset($this->fontLookup[$family])) {\n return $this->fontLookup[$family];\n }\n\n return null;\n }\n\n /**\n * @param $type\n * @return string\n * @deprecated\n */\n public function get_type($type)\n {\n return $this->getType($type);\n }\n\n /**\n * @param string $type\n * @return string\n */\n public function getType($type)\n {\n if (preg_match('/bold/i', $type)) {\n $weight = 700;\n } elseif (preg_match('/([1-9]00)/', $type, $match)) {\n $weight = (int)$match[0];\n } else {\n $weight = 400;\n }\n $weight = $weight === 400 ? 'normal' : $weight;\n $weight = $weight === 700 ? 'bold' : $weight;\n\n $style = preg_match('/italic|oblique/i', $type) ? 'italic' : null;\n\n if ($weight === 'normal' && $style !== null) {\n return $style;\n }\n\n return $style === null\n ? $weight\n : $weight.'_'.$style;\n }\n\n /**\n * @return array\n * @deprecated\n */\n public function get_font_families()\n {\n return $this->getFontFamilies();\n }\n\n /**\n * Returns the current font lookup table\n *\n * @return array\n */\n public function getFontFamilies()\n {\n return $this->fontLookup;\n }\n\n /**\n * @param string $fontname\n * @param mixed $entry\n * @deprecated\n */\n public function set_font_family($fontname, $entry)\n {\n $this->setFontFamily($fontname, $entry);\n }\n\n /**\n * @param string $fontname\n * @param mixed $entry\n */\n public function setFontFamily($fontname, $entry)\n {\n $this->fontLookup[mb_strtolower($fontname)] = $entry;\n }\n\n /**\n * @return string\n */\n public function getCacheFile()\n {\n return $this->options->getFontDir() . '/' . self::CACHE_FILE;\n }\n\n /**\n * @param Options $options\n * @return $this\n */\n public function setOptions(Options $options)\n {\n $this->options = $options;\n return $this;\n }\n\n /**\n * @return Options\n */\n public function getOptions()\n {\n return $this->options;\n }\n\n /**\n * @param Canvas $canvas\n * @return $this\n */\n public function setCanvas(Canvas $canvas)\n {\n $this->canvas = $canvas;\n // Still write deprecated pdf for now. It might be used by a parent class.\n $this->pdf = $canvas;\n return $this;\n }\n\n /**\n * @return Canvas\n */\n public function getCanvas()\n {\n return $this->canvas;\n }\n}\n", "nloc": "544", "complexity": "5", "token_count": "227", "programming_language": "PHP", "method_changes": [] } ] } } ]
CVE-2017-9203
2017-05-23T04:29:00
2019-10-03T00:03:00
"[{'lang': 'en', 'value': 'imagew-main.c:960:12 in libimageworsener.a in ImageWorsener 1.3.1 allows (...TRUNCATED)
"[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:entro(...TRUNCATED)
MEDIUM
False
False
False
True
AV:N/AC:M/Au:N/C:N/I:N/A:P
NETWORK
MEDIUM
NONE
NONE
NONE
PARTIAL
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
NONE
NONE
HIGH
6.5
MEDIUM
2.8
3.6
nan
"[{'url': 'https://github.com/jsummers/imageworsener/commit/a4f247707f08e322f0b41e82c3e06e224240a654(...TRUNCATED)
[{'description': [{'lang': 'en', 'value': 'CWE-787'}]}]
[{"index":875,"cwe_id":"CWE-787","cwe_name":"Out-of-bounds Write","description":"The product writes (...TRUNCATED)
[{"cve_id":"CVE-2017-9203","hash":"a4f247707f08e322f0b41e82c3e06e224240a654","repo_url":"https://git(...TRUNCATED)
CVE-2022-24810
2024-04-16T20:15:00
2024-04-17T12:48:00
"[{'lang': 'en', 'value': 'net-snmp provides various tools relating to the Simple Network Management(...TRUNCATED)
[]
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
"[{'url': 'https://github.com/net-snmp/net-snmp/commit/ce66eb97c17aa9a48bc079be7b65895266fa6775', 'n(...TRUNCATED)
[{'description': []}]
[{"index":1373,"cwe_id":"NVD-CWE-noinfo","cwe_name":"Insufficient Information","description":"There (...TRUNCATED)
[{"cve_id":"CVE-2022-24810","hash":"ce66eb97c17aa9a48bc079be7b65895266fa6775","repo_url":"https://gi(...TRUNCATED)
CVE-2018-1999015
2018-07-23T15:29:00
2018-09-20T16:22:00
"[{'lang': 'en', 'value': 'FFmpeg before commit 5aba5b89d0b1d73164d3b81764828bb8b20ff32a contains an(...TRUNCATED)
"[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ffmpe(...TRUNCATED)
MEDIUM
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:N
NETWORK
MEDIUM
NONE
PARTIAL
NONE
NONE
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
NONE
6.5
MEDIUM
2.8
3.6
nan
"[{'url': 'https://github.com/FFmpeg/FFmpeg/commit/5aba5b89d0b1d73164d3b81764828bb8b20ff32a', 'name'(...TRUNCATED)
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
[{"index":159,"cwe_id":"CWE-125","cwe_name":"Out-of-bounds Read","description":"The product reads da(...TRUNCATED)
[{"cve_id":"CVE-2018-1999015","hash":"5aba5b89d0b1d73164d3b81764828bb8b20ff32a","repo_url":"https://(...TRUNCATED)
CVE-2018-13300
2018-07-05T17:29:00
2021-01-04T18:15:00
"[{'lang': 'en', 'value': 'In FFmpeg 3.2 and 4.0.1, an improper argument (AVCodecParameters) passed (...TRUNCATED)
"[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ffmpe(...TRUNCATED)
MEDIUM
False
False
False
True
AV:N/AC:M/Au:N/C:P/I:N/A:P
NETWORK
MEDIUM
NONE
PARTIAL
NONE
PARTIAL
5.8
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
NETWORK
LOW
NONE
REQUIRED
UNCHANGED
HIGH
NONE
HIGH
8.1
HIGH
2.8
5.2
False
"[{'url': 'https://github.com/FFmpeg/FFmpeg/commit/95556e27e2c1d56d9e18f5db34d6f756f3011148', 'name'(...TRUNCATED)
[{'description': [{'lang': 'en', 'value': 'CWE-125'}]}]
[{"index":159,"cwe_id":"CWE-125","cwe_name":"Out-of-bounds Read","description":"The product reads da(...TRUNCATED)
[{"cve_id":"CVE-2018-13300","hash":"95556e27e2c1d56d9e18f5db34d6f756f3011148","repo_url":"https://gi(...TRUNCATED)
CVE-2022-3327
2022-10-20T00:15:00
2022-10-24T12:58:00
"[{'lang': 'en', 'value': 'Missing Authentication for Critical Function in GitHub repository ikus060(...TRUNCATED)
"[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:ikus-(...TRUNCATED)
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
nan
"[{'url': 'https://github.com/ikus060/rdiffweb/commit/f2a32f2a9f3fb8be1a9432ac3d81d3aacdb13095', 'na(...TRUNCATED)
[{'description': [{'lang': 'en', 'value': 'CWE-306'}]}]
[{"index":442,"cwe_id":"CWE-306","cwe_name":"Missing Authentication for Critical Function","descript(...TRUNCATED)
[{"cve_id":"CVE-2022-3327","hash":"f2a32f2a9f3fb8be1a9432ac3d81d3aacdb13095","repo_url":"https://git(...TRUNCATED)
CVE-2014-3535
2014-09-28T19:55:00
2023-02-13T00:40:00
"[{'lang': 'en', 'value': 'include/linux/netdevice.h in the Linux kernel before 2.6.36 incorrectly u(...TRUNCATED)
"[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux(...TRUNCATED)
HIGH
False
False
False
False
AV:N/AC:L/Au:N/C:N/I:N/A:C
NETWORK
LOW
NONE
NONE
NONE
COMPLETE
7.8
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
False
"[{'url': 'https://github.com/torvalds/linux/commit/256df2f3879efdb2e9808bdb1b54b16fbb11fa38', 'name(...TRUNCATED)
[{'description': [{'lang': 'en', 'value': 'CWE-119'}]}]
[{"index":122,"cwe_id":"CWE-119","cwe_name":"Improper Restriction of Operations within the Bounds of(...TRUNCATED)
[{"cve_id":"CVE-2014-3535","hash":"256df2f3879efdb2e9808bdb1b54b16fbb11fa38","repo_url":"https://git(...TRUNCATED)
CVE-2019-16941
2019-09-28T16:15:00
2019-10-04T21:15:00
"[{'lang': 'en', 'value': 'NSA Ghidra through 9.0.4, when experimental mode is enabled, allows arbit(...TRUNCATED)
"[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:nsa:g(...TRUNCATED)
MEDIUM
False
False
False
False
AV:N/AC:M/Au:N/C:P/I:P/A:P
NETWORK
MEDIUM
NONE
PARTIAL
PARTIAL
PARTIAL
6.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
False
"[{'url': 'https://github.com/NationalSecurityAgency/ghidra/issues/1090', 'name': 'https://github.co(...TRUNCATED)
[{'description': [{'lang': 'en', 'value': 'CWE-91'}]}]
[{"index":933,"cwe_id":"CWE-91","cwe_name":"XML Injection (aka Blind XPath Injection)","description"(...TRUNCATED)
[{"cve_id":"CVE-2019-16941","hash":"a17728f8c12effa171b17a25ccfb7e7d9528c5d0","repo_url":"https://gi(...TRUNCATED)
CVE-2023-28081
2023-05-18T22:15:00
2023-11-07T04:10:00
"[{'lang': 'en', 'value': 'A bytecode optimization bug in Hermes prior to commit e6ed9c1a4b02dc219de(...TRUNCATED)
"[{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:faceb(...TRUNCATED)
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
nan
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NETWORK
LOW
NONE
NONE
UNCHANGED
HIGH
HIGH
HIGH
9.8
CRITICAL
3.9
5.9
nan
"[{'url': 'https://github.com/facebook/hermes/commit/e6ed9c1a4b02dc219de1648f44cd808a56171b81', 'nam(...TRUNCATED)
[{'description': [{'lang': 'en', 'value': 'CWE-416'}]}]
[{"index":549,"cwe_id":"CWE-416","cwe_name":"Use After Free","description":"The product reuses or re(...TRUNCATED)
[{"cve_id":"CVE-2023-28081","hash":"e6ed9c1a4b02dc219de1648f44cd808a56171b81","repo_url":"https://gi(...TRUNCATED)
End of preview.