Sync from SUSE:SLFO:Main traceroute revision 45fbae8929cabcf7b00b5e031a16ea5a

This commit is contained in:
Adrian Schröter 2024-05-04 01:28:32 +02:00
commit b86b1f902d
6 changed files with 291 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
traceroute-2.1.3.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,66 @@
Index: traceroute-2.1.0/Makefile.am
===================================================================
--- /dev/null
+++ traceroute-2.1.0/Makefile.am
@@ -0,0 +1,17 @@
+AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/libsupp
+AM_CFLAGS = -fvisibility=hidden -fPIE
+
+noinst_LIBRARIES = libsupp.a
+libsupp_a_SOURCES = libsupp/clif.c libsupp/clif.h
+
+sbin_PROGRAMS = traceroute/traceroute
+
+man8_MANS = traceroute/traceroute.8
+
+traceroute_traceroute_SOURCES = traceroute/as_lookups.c traceroute/extension.c traceroute/mod-icmp.c traceroute/mod-tcp.c \
+ traceroute/mod-udp.c traceroute/poll.c traceroute/time.c traceroute/traceroute.c \
+ traceroute/csum.c traceroute/flowlabel.h traceroute/mod-tcpconn.c traceroute/traceroute.h \
+ traceroute/mod-dccp.c traceroute/mod-raw.c traceroute/module.c traceroute/random.c
+
+traceroute_traceroute_LDFLAGS = -pie
+traceroute_traceroute_LDADD = libsupp.a -lm
\ No newline at end of file
Index: traceroute-2.1.0/configure.ac
===================================================================
--- /dev/null
+++ traceroute-2.1.0/configure.ac
@@ -0,0 +1,26 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.60)
+AC_INIT([traceroute],
+ [2.0.21],
+ [traceroute-devel@lists.sourceforge.net],
+ [traceroute],
+ [http://traceroute.sourceforge.net/])
+AC_CONFIG_SRCDIR([traceroute/traceroute.h])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign 1.11 -Wall silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
+
+# Checks for programs.
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+AC_PROG_INSTALL
+AM_PROG_AR
+AC_PROG_RANLIB
+
+# Checks for libraries.
+AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
Index: traceroute-2.1.0/traceroute/traceroute.c
===================================================================
--- traceroute-2.1.0.orig/traceroute/traceroute.c
+++ traceroute-2.1.0/traceroute/traceroute.c
@@ -28,7 +28,6 @@
#include "flowlabel.h"
#include <clif.h>
-#include "version.h"
#include "traceroute.h"

View File

@ -0,0 +1,57 @@
--- traceroute-2.0.20.orig/traceroute/traceroute.h
+++ traceroute-2.0.20/traceroute/traceroute.h
@@ -57,6 +57,13 @@ typedef struct tr_module_struct tr_modul
#define DEF_DCCP_PORT DEF_START_PORT /* is it a good choice?... */
#define DEF_RAW_PROT 253 /* for experimentation and testing, rfc3692 */
+#ifndef HAVE_SECURE_GETENV
+# ifdef HAVE___SECURE_GETENV
+# define secure_getenv __secure_getenv
+# else
+# error neither secure_getenv nor __secure_getenv is available
+# endif
+#endif
void error (const char *str) __attribute__((noreturn));
void error_or_perm (const char *str) __attribute__((noreturn));
--- traceroute-2.0.20.orig/traceroute/as_lookups.c
+++ traceroute-2.0.20/traceroute/as_lookups.c
@@ -39,10 +39,10 @@ const char *get_as_path (const char *que
struct addrinfo *res;
int ret;
- server = getenv ("RA_SERVER");
+ server = secure_getenv ("RA_SERVER");
if (!server) server = DEF_RADB_SERVER;
- service = getenv ("RA_SERVICE");
+ service = secure_getenv ("RA_SERVICE");
if (!service) service = DEF_RADB_SERVICE;
--- traceroute-2.0.20.orig/libsupp/clif.c
+++ traceroute-2.0.20/libsupp/clif.c
@@ -398,7 +398,7 @@ int CLIF_parse_cmdline (int argc, char *
unsigned int dirty_flags = 0;
int dirty_plus = 0;
int exclusive_cnt = 0;
- int posix = getenv ("POSIXLY_CORRECT") != NULL ||
+ int posix = secure_getenv ("POSIXLY_CORRECT") != NULL ||
(parse_flags & CLIF_POSIX);
curr.argc = argc;
--- traceroute-2.0.20.orig/libsupp/clif.h
+++ traceroute-2.0.20/libsupp/clif.h
@@ -118,4 +118,12 @@ extern int CLIF_arg_func (CLIF_argument
{ "V", "version", 0, "Print version info and exit", \
CLIF_version_handler, STR, 0, CLIF_EXTRA | CLIF_EXIT }
+#ifndef HAVE_SECURE_GETENV
+# ifdef HAVE___SECURE_GETENV
+# define secure_getenv __secure_getenv
+# else
+# error neither secure_getenv nor __secure_getenv is available
+# endif
+#endif
+
#endif /* _CLIF_H */

80
traceroute.changes Normal file
View File

@ -0,0 +1,80 @@
-------------------------------------------------------------------
Fri Nov 10 13:53:09 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.1.3:
* Fix command line parsing in wrappers. (CVE-2023-46316 bsc#1216591)
-------------------------------------------------------------------
Tue Feb 14 10:09:06 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
- update to version 2.1.2:
* Fix unprivileged ICMP tracerouting with Linux kernel >= 6.1
-------------------------------------------------------------------
Wed Dec 28 12:29:41 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
- update to version 2.1.1:
* Interpret ipv4-mapped ipv6 addresses (::ffff:A.B.C.D) as true
ipv4
* Return back more robust poll(2) loop handling
-------------------------------------------------------------------
Tue Jan 22 00:29:43 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Trim time-sensitive wording from description.
-------------------------------------------------------------------
Tue Jan 15 12:44:16 UTC 2019 - Cristian Rodríguez <crrodriguez@opensuse.org>
- fix undefined reference to "ceil", some compiler versions do
not optimize-out or inline ceil, but anyways libm is required.
-------------------------------------------------------------------
Tue Jan 8 15:02:56 UTC 2019 - Cristian Rodríguez <crrodriguez@opensuse.org>
- Update to version 2.1.0
* Implement -w MAX_SECS,HERE,NEAR option
* Provide tcptraceroute
* Improve the main loop for better interactivity.
-------------------------------------------------------------------
Thu Jul 16 20:27:50 UTC 2015 - crrodriguez@opensuse.org
- traceroute-autotools.patch: switch to non-recursive automake
without libtool.
-------------------------------------------------------------------
Thu Jul 16 19:33:35 UTC 2015 - crrodriguez@opensuse.org
- Version 2.0.21
* fix -F --mtu with current kernel versions
- traceroute-autotools.patch refresh and add -fvisibility=hidden
to CFLAGS.
-------------------------------------------------------------------
Sun Aug 31 17:02:49 UTC 2014 - crrodriguez@opensuse.org
- version 2.0.20
* Describe all complementary long options in the man page
* Use correct service name for AS lookups
* Avoid some rare case null dereference
* Improve expiration check for simultaneous probes
- traceroute-secure_getenv.patch use secure_getenv
- traceroute-autotools.patch refresh
-------------------------------------------------------------------
Thu Mar 7 17:52:47 UTC 2013 - crrodriguez@opensuse.org
- The previous incarnation of traceroute had a traceroute6
binary, provide a compatibility symlink for it.
- Build with full RELRO.
-------------------------------------------------------------------
Sun Jan 27 19:20:20 UTC 2013 - crrodriguez@opensuse.org
- Initial version. obsoletes the version found in package net-tools
- This is the implementation used by the rest of the planet, not
the one found in SUSE but Fedora, RHEL, Debian, Mandriva, Gentoo, Ubuntu.

62
traceroute.spec Normal file
View File

@ -0,0 +1,62 @@
#
# spec file for package traceroute
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: traceroute
Version: 2.1.3
Release: 0
Summary: Packet route path tracing utility
License: GPL-2.0-or-later
Group: Productivity/Networking/Other
URL: https://traceroute.sourceforge.net/
Source: https://sourceforge.net/projects/traceroute/files/traceroute/traceroute-%{version}/%{name}-%{version}.tar.gz
Patch0: traceroute-autotools.patch
Patch1: traceroute-secure_getenv.patch
BuildRequires: automake
Provides: net-tools:%{_sbindir}/%{name}
Provides: tcptraceroute
Obsoletes: tcptraceroute <= 1.5.beta7
%description
Traceroute tracks the route packets taken from an IP network on their way to a given host.
It utilizes the IP protocol's time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED
response from each gateway along the path to the host.
%prep
%autosetup -p1
%build
export LDFLAGS="-Wl,-z,relro,-z,now"
autoreconf -fiv
%configure
%make_build
%install
%make_install
ln -sf %{_sbindir}/%{name} %{buildroot}%{_sbindir}/%{name}6
ln -s %{_mandir}/man8/traceroute.8 %{buildroot}%{_mandir}/man8/traceroute6.8
install -D -m0755 wrappers/tcptraceroute %{buildroot}%{_bindir}/tcptraceroute
install -m0644 wrappers/tcptraceroute.8 %{buildroot}%{_mandir}/man8/tcptraceroute.8
%files
%license COPYING
%doc ChangeLog README
%{_bindir}/*
%{_sbindir}/*
%{_mandir}/man8/*.8%{?ext_man}
%changelog