From adf353076baa629d88544067ef15ac9302c83172 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 1 Jan 2012 06:26:05 +0100 Subject: New upstream release 1.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement ”ping -W linger”. (Closes: #566845) Pass “-Im4 -Iam” to autoreconf call in debian/rules. --- debian/changelog | 22 +++++ debian/patches/01_disable_useless_man_pages.patch | 15 ++- debian/patches/02_remove_unused_opie_check.patch | 25 ----- debian/patches/03_reduce_shared_lib_depends.patch | 109 ++++++++++----------- debian/patches/22_syslogd_conf.patch | 2 +- debian/patches/50_split_load_conffile.patch | 81 ++++++++------- debian/patches/51_add_load_confdir_support.patch | 26 ++--- .../60_inetd_support_argless_services.patch | 40 -------- .../patches/61_inetd_listen_on_tcpmux_ports.patch | 27 ----- .../62_inetd_change_ipv6_protocol_semantics.patch | 58 ++--------- debian/patches/63_inetd_ipv6_sockaddrlen.patch | 49 --------- debian/patches/64_telnetd_ipv6_sockaddrlen.patch | 30 ------ debian/patches/70_ftbfs_non-linux.patch | 44 +++------ debian/patches/72_traceroute_fix_setsockopt.patch | 64 ------------ debian/patches/99_CVE-2011-4862.patch | 14 --- debian/patches/series | 7 -- debian/rules | 2 +- 17 files changed, 158 insertions(+), 457 deletions(-) delete mode 100644 debian/patches/02_remove_unused_opie_check.patch delete mode 100644 debian/patches/60_inetd_support_argless_services.patch delete mode 100644 debian/patches/61_inetd_listen_on_tcpmux_ports.patch delete mode 100644 debian/patches/63_inetd_ipv6_sockaddrlen.patch delete mode 100644 debian/patches/64_telnetd_ipv6_sockaddrlen.patch delete mode 100644 debian/patches/72_traceroute_fix_setsockopt.patch delete mode 100644 debian/patches/99_CVE-2011-4862.patch diff --git a/debian/changelog b/debian/changelog index 6552da2..ce4b812 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +inetutils (2:1.9-1) UNRELEASED; urgency=low + + * New upstream release. + - Implement ”ping -W linger”. (Closes: #566845) + - debian/patches/99_CVE-2011-4862.patch: Remove, merged upstream. + - debian/patches/02_remove_unused_opie_check.patch: Likewise. + - debian/patches/60_inetd_support_argless_services.patch: Likewise. + - debian/patches/61_inetd_listen_on_tcpmux_ports.patch: Likewise. + - debian/patches/63_inetd_ipv6_sockaddrlen.patch: Likewise. + - debian/patches/64_telnetd_ipv6_sockaddrlen.patch: Likewise. + - debian/patches/72_traceroute_fix_setsockopt.patch: Likewise. + - debian/patches/01_disable_useless_man_pages.patch: Refreshed. + - debian/patches/03_reduce_shared_lib_depends.patch: Likewise. + - debian/patches/22_syslogd_conf.patch: Likewise. + - debian/patches/50_split_load_conffile.patch: Likewise. + - debian/patches/51_add_load_confdir_support.patch: Likewise. + - debian/patches/62_inetd_change_ipv6_protocol_semantics.patch: Likewise. + - debian/patches/70_ftbfs_non-linux.patch: Likewise. + * Pass “-Im4 -Iam” to autoreconf call in debian/rules. + + -- Guillem Jover Sun, 01 Jan 2012 04:34:04 +0100 + inetutils (2:1.8-6) unstable; urgency=high * Fix buffer overflow in telnetd allowing remote attackers to execute diff --git a/debian/patches/01_disable_useless_man_pages.patch b/debian/patches/01_disable_useless_man_pages.patch index 713a8bc..b345cce 100644 --- a/debian/patches/01_disable_useless_man_pages.patch +++ b/debian/patches/01_disable_useless_man_pages.patch @@ -4,14 +4,13 @@ Date: Wed, 9 Jun 2010 03:56:08 +0200 Subject: [PATCH] Disable useless man pages --- - Makefile.am | 2 +- - configure.ac | 2 - + Makefile.am | 2 +- + configure.ac | 2 -- + 2 files changed, 1 insertion(+), 3 deletions(-) -diff --git a/Makefile.am b/Makefile.am -index 7af1c56..34d105b 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -26,7 +26,7 @@ EXTRA_DIST = README-alpha paths ChangeLog.0 +@@ -22,7 +22,7 @@ EXTRA_DIST = paths ChangeLog.0 SUBDIRS = lib \ libinetutils libtelnet libicmp libls \ src telnet telnetd ftp ftpd talk talkd whois ping ifconfig \ @@ -20,11 +19,9 @@ index 7af1c56..34d105b 100644 tests DISTCLEANFILES = pathdefs.make paths.defs $(PACKAGE)-$(VERSION).tar.gz -diff --git a/configure.ac b/configure.ac -index 2b60bde..f582074 100644 --- a/configure.ac +++ b/configure.ac -@@ -133,7 +133,6 @@ AC_PROG_MAKE_SET +@@ -136,7 +136,6 @@ AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_YACC AC_PROG_LN_S @@ -32,7 +29,7 @@ index 2b60bde..f582074 100644 gl_INIT -@@ -812,7 +811,6 @@ ping/Makefile +@@ -831,7 +830,6 @@ ping/Makefile ifconfig/Makefile ifconfig/system/Makefile doc/Makefile diff --git a/debian/patches/02_remove_unused_opie_check.patch b/debian/patches/02_remove_unused_opie_check.patch deleted file mode 100644 index a185e5e..0000000 --- a/debian/patches/02_remove_unused_opie_check.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 34125eba732544bfcb6cf96a1dba5b5c6e610f47 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Mon, 6 Sep 2010 11:22:23 +0200 -Subject: [PATCH] Do not check for unused `opie' library - -* configure.ac: Remove opie AC_CHECK_LIB check. ---- - configure.ac | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 80a85b6..528a9b4 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -142,7 +142,6 @@ gl_INIT - AC_CHECK_LIB(nsl, inet_ntoa) - AC_CHECK_LIB(resolv, gethostname) - AC_CHECK_LIB(socket, getpeername) --AC_CHECK_LIB(opie, opiegenerator) - - # See if a termcap library is available (under one of several names) - IU_LIB_TERMCAP --- -1.7.1 - diff --git a/debian/patches/03_reduce_shared_lib_depends.patch b/debian/patches/03_reduce_shared_lib_depends.patch index 99fada0..79bdb49 100644 --- a/debian/patches/03_reduce_shared_lib_depends.patch +++ b/debian/patches/03_reduce_shared_lib_depends.patch @@ -1,25 +1,23 @@ --- - am/libcurses.m4 | 18 +++++++++--------- + am/libcurses.m4 | 4 ---- configure.ac | 6 +++--- - ftp/Makefile.am | 3 +-- - src/Makefile.am | 16 +++++++++++----- - telnet/Makefile.am | 2 +- - telnetd/Makefile.am | 2 +- - 6 files changed, 26 insertions(+), 21 deletions(-) + ftp/Makefile.am | 4 +++- + src/Makefile.am | 10 ++++++++-- + telnet/Makefile.am | 5 ++++- + telnetd/Makefile.am | 5 ++++- + 6 files changed, 22 insertions(+), 12 deletions(-) --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -24,6 +24,9 @@ inetdaemon_PROGRAMS = +@@ -24,6 +24,7 @@ inetdaemon_PROGRAMS = bin_PROGRAMS = EXTRA_PROGRAMS = -+LDADD = \ -+ ../libinetutils/libinetutils.a \ -+ ../lib/libgnu.a ++LDADD = $(iu_LIBRARIES) $(LIBUTIL) bin_PROGRAMS += @hostname_BUILD@ hostname_SOURCES = hostname.c -@@ -35,6 +38,7 @@ EXTRA_PROGRAMS += logger +@@ -35,6 +36,7 @@ EXTRA_PROGRAMS += logger bin_PROGRAMS += @rcp_BUILD@ rcp_SOURCES = rcp.c @@ -27,7 +25,7 @@ EXTRA_PROGRAMS += rcp bin_PROGRAMS += @rexec_BUILD@ -@@ -43,10 +47,12 @@ EXTRA_PROGRAMS += rexec +@@ -43,10 +45,12 @@ EXTRA_PROGRAMS += rexec bin_PROGRAMS += @rlogin_BUILD@ rlogin_SOURCES = rlogin.c @@ -40,15 +38,15 @@ EXTRA_PROGRAMS += rsh bin_PROGRAMS += @tftp_BUILD@ -@@ -55,6 +61,7 @@ EXTRA_PROGRAMS += tftp +@@ -55,6 +59,7 @@ EXTRA_PROGRAMS += tftp bin_PROGRAMS += @traceroute_BUILD@ traceroute_SOURCES = traceroute.c -+traceroute_LDADD = ../libicmp/libicmp.a $(LDADD) ++traceroute_LDADD = $(LDADD) $(top_builddir)/libicmp/libicmp.a EXTRA_PROGRAMS += traceroute inetdaemon_PROGRAMS += @inetd_BUILD@ -@@ -63,14 +70,17 @@ EXTRA_PROGRAMS += inetd +@@ -63,14 +68,17 @@ EXTRA_PROGRAMS += inetd inetdaemon_PROGRAMS += @rexecd_BUILD@ rexecd_SOURCES = rexecd.c @@ -66,28 +64,23 @@ EXTRA_PROGRAMS += rshd inetdaemon_PROGRAMS += @syslogd_BUILD@ -@@ -83,17 +93,13 @@ EXTRA_PROGRAMS += tftpd +@@ -83,12 +107,11 @@ EXTRA_PROGRAMS += tftpd inetdaemon_PROGRAMS += @uucpd_BUILD@ uucpd_SOURCES = uucpd.c -+uucpd_LDADD = $(LDADD) $(LIBUTIL) $(LIBCRYPT) ++uucpd_LDADD = $(LDADD) $(LIBCRYPT) EXTRA_PROGRAMS += uucpd - INCLUDES = -I$(top_srcdir)/lib \ - -I$(top_srcdir)/libinetutils \ - -I$(top_srcdir)/libicmp + INCLUDES = $(iu_INCLUDES) -I$(top_srcdir)/libicmp --LDADD = -L$(top_builddir)/libicmp -licmp \ -- -L$(top_builddir)/libinetutils -linetutils \ -- -L$(top_builddir)/lib ../lib/libgnu.a \ -- $(LIBAUTH) $(LIBCRYPT) $(LIBUTIL) +-LDADD = $(iu_LIBRARIES) $(top_builddir)/libicmp/libicmp.a $(LIBAUTH) $(LIBCRYPT) $(LIBUTIL) - AM_CPPFLAGS = $(PATHDEF_BSHELL) $(PATHDEF_CONSOLE) $(PATHDEF_CP) $(PATHDEF_DEFPATH) $(PATHDEF_DEV) $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) $(PATHDEF_INETDPID) $(PATHDEF_KLOG) $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGIN) $(PATHDEF_LOGPID) $(PATHDEF_NOLOGIN) $(PATHDEF_RLOGIN) $(PATHDEF_RSH) $(PATHDEF_TTY) $(PATHDEF_UTMP) $(PATHDEF_UUCICO) SUIDMODE = -o root -m 4775 --- a/configure.ac +++ b/configure.ac -@@ -137,8 +137,8 @@ AC_PROG_LN_S +@@ -140,8 +140,8 @@ AC_PROG_LN_S gl_INIT ### Checks for libraries. @@ -98,7 +91,7 @@ AC_CHECK_LIB(socket, getpeername) # See if a termcap library is available (under one of several names) -@@ -189,7 +189,7 @@ AC_SUBST(LIBUTIL) +@@ -169,7 +169,7 @@ AC_SUBST(LIBUTIL) # See if we have libpam.a this is for ftpd. if test "$with_pam" = yes ; then @@ -109,53 +102,53 @@ AC_DEFINE([WITH_PAM], 1, [Define to one if you have -lpam.]) --- a/telnetd/Makefile.am +++ b/telnetd/Makefile.am -@@ -35,4 +35,4 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdi - LDADD = -L../libinetutils -linetutils \ - -L../libtelnet -ltelnet \ - ../lib/libgnu.a \ -- $(LIBTERMCAP) $(LIBUTIL) $(LIBCRYPT) $(LIBAUTH) +@@ -31,4 +31,7 @@ noinst_HEADERS = telnetd.h + AM_CPPFLAGS = $(PATHDEF_DEV) $(PATHDEF_TTY) $(PATHDEF_LOGIN) + INCLUDES = $(iu_INCLUDES) -I$(top_srcdir) $(INCAUTH) $(NCURSES_INCLUDE) + +-LDADD = $(iu_LIBRARIES) $(top_builddir)/libtelnet/libtelnet.a $(LIBTERMCAP) $(LIBUTIL) $(LIBCRYPT) $(LIBAUTH) $(LIBREADLINE) ++LDADD = \ ++ $(iu_LIBRARIES) \ ++ $(top_builddir)/libtelnet/libtelnet.a \ + $(LIBTERMCAP) $(LIBUTIL) $(LIBAUTH) --- a/telnet/Makefile.am +++ b/telnet/Makefile.am -@@ -30,4 +30,4 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdi - AM_CPPFLAGS=-DTERMCAP -DLINEMODE -DKLUDGELINEMODE -DENV_HACK +@@ -29,4 +29,7 @@ noinst_HEADERS = defines.h externs.h gen + INCLUDES = $(iu_INCLUDES) $(NCURSES_INCLUDE) + AM_CPPFLAGS = -DTERMCAP -DLINEMODE -DKLUDGELINEMODE -DENV_HACK - LDADD = -L../libinetutils -L../libtelnet -linetutils \ -- -ltelnet ../lib/libgnu.a $(LIBTERMCAP) $(LIBCRYPT) $(LIBAUTH) -+ -ltelnet ../lib/libgnu.a $(LIBTERMCAP) $(LIBAUTH) +-LDADD = $(iu_LIBRARIES) $(top_builddir)/libtelnet/libtelnet.a $(LIBTERMCAP) $(LIBCRYPT) $(LIBAUTH) $(LIBREADLINE) ++LDADD = \ ++ $(iu_LIBRARIES) \ ++ $(top_builddir)/libtelnet/libtelnet.a \ ++ $(LIBTERMCAP) $(LIBAUTH) --- a/am/libcurses.m4 +++ b/am/libcurses.m4 -@@ -84,15 +84,15 @@ dnl LIBTERMCAP is defined with the appro +@@ -85,9 +85,6 @@ dnl LIBTERMCAP is defined with the appro dnl AC_DEFUN([IU_LIB_TERMCAP], [ AC_REQUIRE([IU_LIB_NCURSES]) - if test "$LIBNCURSES"; then - LIBTERMCAP="$LIBNCURSES" - else -- AC_CHECK_LIB(curses, tgetent, LIBTERMCAP=-lcurses) -- if test "$ac_cv_lib_curses_tgetent" = no; then -- AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP=-ltermcap) -- fi -- if test "$ac_cv_lib_termcap_tgetent" = no; then -- AC_CHECK_LIB(termlib, tgetent, LIBTERMCAP=-ltermlib) -+ AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP=-ltermcap) -+ if test "$ac_cv_lib_termcap_tgetent" = no; then -+ AC_CHECK_LIB(termlib, tgetent, LIBTERMCAP=-ltermlib) -+ fi -+ if test "$ac_cv_lib_termlib_tgetent" = no; then -+ if test "$LIBNCURSES"; then -+ LIBTERMCAP="$LIBNCURSES" -+ else -+ AC_CHECK_LIB(curses, tgetent, LIBTERMCAP=-lcurses) + AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP=-ltermcap) + AC_CHECK_HEADERS([termcap.h]) + if test "$ac_cv_lib_termcap_tgetent" = yes \ +@@ -113,7 +110,6 @@ AC_DEFUN([IU_LIB_TERMCAP], [ + if test -n "$LIBTERMCAP"; then + AC_DEFINE([HAVE_TGETENT], 1, [Define to 1 if tgetent() exists.]) fi - fi +- fi AC_SUBST(LIBTERMCAP)])dnl + + dnl IU_LIB_CURSES -- check for curses, and associated libraries --- a/ftp/Makefile.am +++ b/ftp/Makefile.am -@@ -30,5 +30,4 @@ noinst_HEADERS = extern.h ftp_var.h - INCLUDES = -I$(top_srcdir)/lib -I../lib -I$(top_srcdir)/libinetutils +@@ -30,4 +30,6 @@ noinst_HEADERS = extern.h ftp_var.h + INCLUDES = $(iu_INCLUDES) AM_CPPFLAGS = $(PATHDEF_TMP) $(PATHDEF_BSHELL) --READLINE = $(LIBREADLINE) $(LIBTERMCAP) $(LIBHISTORY) --LDADD = -L../libinetutils -linetutils ../lib/libgnu.a $(LIBGLOB) $(READLINE) -+LDADD = -L../libinetutils -linetutils ../lib/libgnu.a $(LIBGLOB) $(LIBREADLINE) +-LDADD = $(iu_LIBRARIES) $(LIBGLOB) $(LIBREADLINE) $(LIBTERMCAP) $(LIBHISTORY) ++LDADD = \ ++ $(iu_LIBRARIES) \ ++ $(LIBGLOB) $(LIBREADLINE) diff --git a/debian/patches/22_syslogd_conf.patch b/debian/patches/22_syslogd_conf.patch index 39843b2..88221db 100644 --- a/debian/patches/22_syslogd_conf.patch +++ b/debian/patches/22_syslogd_conf.patch @@ -78,7 +78,7 @@ + --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -114,6 +114,8 @@ inetdaemon_PROGRAMS += @syslogd_BUILD@ +@@ -85,6 +85,8 @@ inetdaemon_PROGRAMS += @syslogd_BUILD@ syslogd_SOURCES = syslogd.c EXTRA_PROGRAMS += syslogd diff --git a/debian/patches/50_split_load_conffile.patch b/debian/patches/50_split_load_conffile.patch index 6a22953..7254c31 100644 --- a/debian/patches/50_split_load_conffile.patch +++ b/debian/patches/50_split_load_conffile.patch @@ -4,12 +4,12 @@ Date: Wed, 20 Feb 2008 05:23:19 +0200 Subject: [PATCH] Split load_conffile --- - src/syslogd.c | 111 +++++++++++++++++++++++++++++++--------------------------- - 1 file changed, 61 insertions(+), 50 deletions(-) + src/syslogd.c | 117 +++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 64 insertions(+), 53 deletions(-) --- a/src/syslogd.c +++ b/src/syslogd.c -@@ -249,6 +249,7 @@ void die (int); +@@ -251,6 +251,7 @@ void die (int); void doexit (int); void domark (int); void fprintlog (struct filed *, const char *, int, const char *); @@ -17,13 +17,13 @@ Subject: [PATCH] Split load_conffile void init (int); void logerror (const char *); void logmsg (int, const char *, const char *, int); -@@ -1541,12 +1542,11 @@ die (int signo) - exit (0); +@@ -1697,12 +1698,11 @@ die (int signo) + exit (EXIT_SUCCESS); } -/* INIT -- Initialize syslogd from configuration table. */ --RETSIGTYPE --init (int signo ARG_UNUSED) +-void +-init (int signo _GL_UNUSED_PARAMETER) +static int +load_conffile (const char *filename, struct filed **nextp) { @@ -33,28 +33,18 @@ Subject: [PATCH] Split load_conffile char *p; #ifndef LINE_MAX # define LINE_MAX 2048 -@@ -1555,61 +1555,20 @@ init (int signo ARG_UNUSED) - char *cbuf; +@@ -1712,63 +1712,19 @@ init (int signo _GL_UNUSED_PARAMETER) char *cline; int cont_line = 0; -- struct servent *sp; -- + - dbg_printf ("init\n"); -- sp = getservbyname ("syslog", "udp"); -- if (sp == NULL) -- { -- errno = 0; -- logerror ("network logging disabled (syslog/udp service unknown)."); -- logerror -- ("see syslogd(8) for details of whether and how to enable it."); -- return; -- } -- LogPort = sp->s_port; - - /* Close all open log files. */ - Initialized = 0; - for (f = Files; f != NULL; f = next) - { +- int j; +- - /* Flush any pending output. */ - if (f->f_prevcount) - fprintlog (f, LocalHostName, 0, (char *) NULL); @@ -65,9 +55,21 @@ Subject: [PATCH] Split load_conffile - case F_TTY: - case F_CONSOLE: - case F_PIPE: +- free (f->f_un.f_fname); - close (f->f_file); - break; +- case F_FORW: +- case F_FORW_SUSP: +- case F_FORW_UNKN: +- free (f->f_un.f_forw.f_hname); +- break; +- case F_USERS: +- for (j = 0; j < f->f_un.f_user.f_nusers; ++j) +- free (f->f_un.f_user.f_unames[j]); +- free (f->f_un.f_user.f_unames); +- break; - } +- free (f->f_prevhost); - next = f->f_next; - free (f); - } @@ -75,7 +77,7 @@ Subject: [PATCH] Split load_conffile - nextp = &Files; - - facilities_seen = 0; - +- /* Open the configuration file. */ - cf = fopen (ConfFile, "r"); + cf = fopen (filename, "r"); @@ -98,7 +100,7 @@ Subject: [PATCH] Split load_conffile /* Allocate a buffer for line parsing. */ cbuf = malloc (line_max); if (cbuf == NULL) -@@ -1617,7 +1576,7 @@ init (int signo ARG_UNUSED) +@@ -1776,7 +1732,7 @@ init (int signo _GL_UNUSED_PARAMETER) /* There is no graceful recovery here. */ dbg_printf ("cannot allocate space for configuration\n"); fclose (cf); @@ -107,7 +109,7 @@ Subject: [PATCH] Split load_conffile } cline = cbuf; -@@ -1658,7 +1617,7 @@ init (int signo ARG_UNUSED) +@@ -1817,7 +1773,7 @@ init (int signo _GL_UNUSED_PARAMETER) dbg_printf ("cannot allocate space configuration\n"); fclose (cf); free (cbuf); @@ -116,7 +118,7 @@ Subject: [PATCH] Split load_conffile } else cbuf = tmp; -@@ -1705,6 +1664,58 @@ init (int signo ARG_UNUSED) +@@ -1864,6 +1820,61 @@ init (int signo _GL_UNUSED_PARAMETER) fclose (cf); free (cbuf); @@ -124,28 +126,19 @@ Subject: [PATCH] Split load_conffile +} + +/* INIT -- Initialize syslogd from configuration table. */ -+RETSIGTYPE -+init (int signo ARG_UNUSED) ++void ++init (int signo _GL_UNUSED_PARAMETER) +{ + struct filed *f, *next, **nextp; -+ struct servent *sp; + + dbg_printf ("init\n"); -+ sp = getservbyname ("syslog", "udp"); -+ if (sp == NULL) -+ { -+ errno = 0; -+ logerror ("network logging disabled (syslog/udp service unknown)."); -+ logerror -+ ("see syslogd(8) for details of whether and how to enable it."); -+ return; -+ } -+ LogPort = sp->s_port; + + /* Close all open log files. */ + Initialized = 0; + for (f = Files; f != NULL; f = next) + { ++ int j; ++ + /* Flush any pending output. */ + if (f->f_prevcount) + fprintlog (f, LocalHostName, 0, (char *) NULL); @@ -156,9 +149,21 @@ Subject: [PATCH] Split load_conffile + case F_TTY: + case F_CONSOLE: + case F_PIPE: ++ free (f->f_un.f_fname); + close (f->f_file); + break; ++ case F_FORW: ++ case F_FORW_SUSP: ++ case F_FORW_UNKN: ++ free (f->f_un.f_forw.f_hname); ++ break; ++ case F_USERS: ++ for (j = 0; j < f->f_un.f_user.f_nusers; ++j) ++ free (f->f_un.f_user.f_unames[j]); ++ free (f->f_un.f_user.f_unames); ++ break; + } ++ free (f->f_prevhost); + next = f->f_next; + free (f); + } diff --git a/debian/patches/51_add_load_confdir_support.patch b/debian/patches/51_add_load_confdir_support.patch index b12ba43..7488781 100644 --- a/debian/patches/51_add_load_confdir_support.patch +++ b/debian/patches/51_add_load_confdir_support.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Add load_confdir support --- a/paths +++ b/paths -@@ -90,6 +90,7 @@ PATH_LASTLOG $(localstatedir)/l +@@ -91,6 +91,7 @@ PATH_LASTLOG $(localstatedir)/l PATH_LOG /dev/log PATH_KLOG /dev/klog no PATH_LOGCONF $(sysconfdir)/syslog.conf @@ -21,9 +21,9 @@ Subject: [PATCH] Add load_confdir support PATH_NOLOGIN $(sysconfdir)/nologin --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -104,7 +104,7 @@ INCLUDES = -I$(top_srcdir)/lib \ - -I$(top_srcdir)/libinetutils \ - -I$(top_srcdir)/libicmp +@@ -98,7 +98,7 @@ EXTRA_PROGRAMS += uucpd + + INCLUDES = $(iu_INCLUDES) -I$(top_srcdir)/libicmp -AM_CPPFLAGS = $(PATHDEF_BSHELL) $(PATHDEF_CONSOLE) $(PATHDEF_CP) $(PATHDEF_DEFPATH) $(PATHDEF_DEV) $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) $(PATHDEF_INETDPID) $(PATHDEF_KLOG) $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGIN) $(PATHDEF_LOGPID) $(PATHDEF_NOLOGIN) $(PATHDEF_RLOGIN) $(PATHDEF_RSH) $(PATHDEF_TTY) $(PATHDEF_UTMP) $(PATHDEF_UUCICO) +AM_CPPFLAGS = $(PATHDEF_BSHELL) $(PATHDEF_CONSOLE) $(PATHDEF_CP) $(PATHDEF_DEFPATH) $(PATHDEF_DEV) $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) $(PATHDEF_INETDPID) $(PATHDEF_KLOG) $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGCONFD) $(PATHDEF_LOGIN) $(PATHDEF_LOGPID) $(PATHDEF_NOLOGIN) $(PATHDEF_RLOGIN) $(PATHDEF_RSH) $(PATHDEF_TTY) $(PATHDEF_UTMP) $(PATHDEF_UUCICO) @@ -32,7 +32,7 @@ Subject: [PATCH] Add load_confdir support --- a/src/syslogd.c +++ b/src/syslogd.c -@@ -108,6 +108,7 @@ +@@ -104,6 +104,7 @@ #include #include #include @@ -40,7 +40,7 @@ Subject: [PATCH] Add load_confdir support #include #include -@@ -132,6 +133,7 @@ +@@ -133,6 +134,7 @@ int facilities_seen; const char *ConfFile = PATH_LOGCONF; /* Default Configuration file. */ @@ -48,7 +48,7 @@ Subject: [PATCH] Add load_confdir support const char *PidFile = PATH_LOGPID; /* Default path to tuck pid. */ char ctty[] = PATH_CONSOLE; /* Default console to send message info. */ -@@ -250,6 +252,7 @@ void doexit (int); +@@ -252,6 +254,7 @@ void doexit (int); void domark (int); void fprintlog (struct filed *, const char *, int, const char *); static int load_conffile (const char *, struct filed **); @@ -56,7 +56,7 @@ Subject: [PATCH] Add load_confdir support void init (int); void logerror (const char *); void logmsg (int, const char *, const char *, int); -@@ -328,6 +331,9 @@ static struct argp_option argp_options[] +@@ -344,6 +347,9 @@ static struct argp_option argp_options[] {"rcfile", 'f', "FILE", 0, "override configuration file (default: " PATH_LOGCONF ")", GRP+1}, @@ -66,7 +66,7 @@ Subject: [PATCH] Add load_confdir support {"socket", 'p', "FILE", 0, "override default unix domain socket " PATH_LOG, GRP+1}, {"sync", 'S', NULL, 0, "force a file sync on every line", GRP+1}, -@@ -399,6 +405,10 @@ parse_opt (int key, char *arg, struct ar +@@ -431,6 +437,10 @@ parse_opt (int key, char *arg, struct ar ConfFile = arg; break; @@ -77,7 +77,7 @@ Subject: [PATCH] Add load_confdir support case 'p': funix[0].name = arg; funix[0].fd = -1; -@@ -1667,6 +1677,51 @@ load_conffile (const char *filename, str +@@ -1823,6 +1833,51 @@ load_conffile (const char *filename, str return 1; } @@ -127,9 +127,9 @@ Subject: [PATCH] Add load_confdir support +} + /* INIT -- Initialize syslogd from configuration table. */ - RETSIGTYPE - init (int signo ARG_UNUSED) -@@ -1714,7 +1769,7 @@ init (int signo ARG_UNUSED) + void + init (int signo _GL_UNUSED_PARAMETER) +@@ -1873,7 +1928,7 @@ init (int signo _GL_UNUSED_PARAMETER) /* Foreach line in the conf table, open that file. */ f = NULL; diff --git a/debian/patches/60_inetd_support_argless_services.patch b/debian/patches/60_inetd_support_argless_services.patch deleted file mode 100644 index e5280f1..0000000 --- a/debian/patches/60_inetd_support_argless_services.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 93e33a312d840eed7a85faa1d5a56b2cd6846001 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Mon, 6 Sep 2010 08:52:59 +0200 -Subject: [PATCH] inetd: Inject server name in argv[0] when no arguments are provided - -* src/inetd.c (getconfigent): If se_argc == 1 inject the normalized -se_server name into se_argv[0]. ---- - src/inetd.c | 15 +++++++++++++++ - 1 files changed, 15 insertions(+), 0 deletions(-) - -diff --git a/src/inetd.c b/src/inetd.c -index 6fe9adf..354ae1d 100644 ---- a/src/inetd.c -+++ b/src/inetd.c -@@ -1108,6 +1108,21 @@ getconfigent (FILE *fconfig, const char *file, size_t *line) - sep->se_argv[i] = argv[INETD_SERVER_ARGS + i]; - argv[INETD_SERVER_ARGS + i] = 0; - } -+ -+ /* If no arguments are provided, use server name as argv[0]. */ -+ if (sep->se_argc == 1) -+ { -+ const char *argv0 = NULL; -+ -+ argv0 = strrchr (sep->se_server, '/'); -+ if (argv0) -+ argv0++; -+ else -+ argv0 = sep->se_server; -+ -+ sep->se_argv[0] = newstr (argv0); -+ } -+ - sep->se_argv[i] = NULL; - break; - } --- -1.7.1 - diff --git a/debian/patches/61_inetd_listen_on_tcpmux_ports.patch b/debian/patches/61_inetd_listen_on_tcpmux_ports.patch deleted file mode 100644 index 5ac63c2..0000000 --- a/debian/patches/61_inetd_listen_on_tcpmux_ports.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 929968ce1e0a5a72d929982e00e68a09b9a996c3 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Mon, 6 Sep 2010 09:00:58 +0200 -Subject: [PATCH] inetd: Listen on ports for tcpmux services - -* src/inetd.c (fix_tcpmux): Call expand_enter instead of enter for -tcpmux services. ---- - src/inetd.c | 6 ++---- - 1 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/src/inetd.c b/src/inetd.c -index 354ae1d..1c51a51 100644 ---- a/src/inetd.c -+++ b/src/inetd.c -@@ -1249,7 +1247,7 @@ fix_tcpmux (void) - if (debug) - fprintf (stderr, "inserting default tcpmux entry\n"); - syslog (LOG_INFO, "inserting default tcpmux entry"); -- enter (&serv); -+ expand_enter (&serv); - } - } - --- -1.7.1 - diff --git a/debian/patches/62_inetd_change_ipv6_protocol_semantics.patch b/debian/patches/62_inetd_change_ipv6_protocol_semantics.patch index 50ee383..4563995 100644 --- a/debian/patches/62_inetd_change_ipv6_protocol_semantics.patch +++ b/debian/patches/62_inetd_change_ipv6_protocol_semantics.patch @@ -10,71 +10,33 @@ Add "tcp6only" and "udp6only" protocols for IPv6 only addresses. (fix_tcpmux) [IPV6]: Set se_proto to "tcp6". [!IPV6]: Set se_proto to "tcp". --- - src/inetd.c | 20 ++++++++++++-------- - 1 files changed, 12 insertions(+), 8 deletions(-) + src/inetd.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) -diff --git a/src/inetd.c b/src/inetd.c -index 1c51a51..0d3ff69 100644 --- a/src/inetd.c +++ b/src/inetd.c -@@ -563,8 +563,8 @@ setup (struct servtab *sep) - if (sep->se_family == AF_INET6) - { - /* Reverse the value of SEP->se_v4mapped, since otherwise if -- using `tcp' as a protocol type all connections will be mapped -- to IPv6, and with `tcp6' they get mapped IPv4 mapped to -+ using `tcp6' as a protocol type all connections will be mapped -+ to IPv6, and with `tcp6only' they get mapped IPv4 mapped to - IPv6. */ - int val = sep->se_v4mapped ? 0 : 1; - if (setsockopt (sep->se_fd, IPPROTO_IPV6, IPV6_V6ONLY, -@@ -1002,10 +1002,9 @@ getconfigent (FILE *fconfig, const char *file, size_t *line) +@@ -1048,9 +1048,9 @@ getconfigent (FILE *fconfig, const char sep->se_proto = newstr (argv[INETD_PROTOCOL]); #ifdef IPV6 -- /* We default to IPv6, in setup() we'll fall back to IPv4 if -- it doesn't work. */ -- sep->se_family = AF_INET6; -- sep->se_v4mapped = 1; +- /* We default to IPv4. */ + /* We default to IPv4. */ -+ sep->se_family = AF_INET; + sep->se_family = AF_INET; +- sep->se_v4mapped = 1; + sep->se_v4mapped = 0; if ((strncmp (sep->se_proto, "tcp", 3) == 0) || (strncmp (sep->se_proto, "udp", 3) == 0)) -@@ -1013,7 +1012,11 @@ getconfigent (FILE *fconfig, const char *file, size_t *line) +@@ -1058,10 +1058,11 @@ getconfigent (FILE *fconfig, const char if (sep->se_proto[3] == '6') { sep->se_family = AF_INET6; - sep->se_v4mapped = 0; -+ /* Check for tcp6only and udp6only. */ -+ if (strcmp (&sep->se_proto[3], "6only") == 0) -+ sep->se_v4mapped = 0; + /* Check for tcp6only and udp6only. */ + if (strcmp (&sep->se_proto[3], "6only") == 0) + sep->se_v4mapped = 0; + else + sep->se_v4mapped = 1; } else if (sep->se_proto[3] == '4') { -@@ -1221,7 +1224,6 @@ fix_tcpmux (void) - - serv.se_service = newstr ("tcpmux"); - serv.se_socktype = SOCK_STREAM; -- serv.se_proto = newstr ("tcp"); - serv.se_checked = 1; - serv.se_user = newstr ("root"); - serv.se_bi = bi_lookup (&serv); -@@ -1239,9 +1241,11 @@ fix_tcpmux (void) - serv.se_fd = -1; - serv.se_type = NORM_TYPE; - #ifdef IPV6 -+ serv.se_proto = newstr ("tcp6"); - serv.se_family = AF_INET6; - serv.se_v4mapped = 1; - #else -+ serv.se_proto = newstr ("tcp"); - serv.se_family = AF_INET; - #endif - if (debug) --- -1.7.1 - diff --git a/debian/patches/63_inetd_ipv6_sockaddrlen.patch b/debian/patches/63_inetd_ipv6_sockaddrlen.patch deleted file mode 100644 index 5dff7fb..0000000 --- a/debian/patches/63_inetd_ipv6_sockaddrlen.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 71a5c6478ea29872b95db9c3c8d1595b0920ff27 Mon Sep 17 00:00:00 2001 -From: Mats Erik Andersson -Date: Sun, 31 Oct 2010 04:29:21 +0100 -Subject: [PATCH 2/2] src/inetd.c: Use exact length of address structure. - -Bind socket using knowledge of exact sockaddr length. - -* src/inetd.c: New element `se_addrlen' in `struct servtab'. -(expand_enter): Record in SE_ADDRLEN the actual length of each -established control address. -(setup): Use the exact address length in call to bind(3). ---- - src/inetd.c | 5 ++++- - 2 files changed, 13 insertions(+), 1 deletions(-) - -diff --git a/src/inetd.c b/src/inetd.c -index 272e874..2a30acf 100644 ---- a/src/inetd.c -+++ b/src/inetd.c -@@ -254,6 +254,7 @@ struct servtab - sa_family_t se_family; /* address family of the socket */ - char se_v4mapped; /* 1 = accept v4mapped connection, 0 = don't */ - struct sockaddr_storage se_ctrladdr; /* bound address */ -+ socklen_t se_addrlen; /* exact address length in use */ - unsigned se_refcnt; - int se_count; /* number started since se_time */ - struct timeval se_time; /* start of se_count */ -@@ -585,7 +586,7 @@ setup (struct servtab *sep) - syslog (LOG_ERR, "setsockopt (SO_REUSEADDR): %m"); - - err = bind (sep->se_fd, (struct sockaddr *) &sep->se_ctrladdr, -- sizeof (sep->se_ctrladdr)); -+ sep->se_addrlen); - if (err < 0) - { - /* If we can't bind with AF_INET6 try again with AF_INET. */ -@@ -800,7 +801,9 @@ expand_enter (struct servtab *sep) - - for (rp = result; rp != NULL; rp = rp->ai_next) - { -+ memset (&sep->se_ctrladdr, 0, sizeof (sep->se_ctrladdr)); - memcpy (&sep->se_ctrladdr, rp->ai_addr, rp->ai_addrlen); -+ sep->se_addrlen = rp->ai_addrlen; - cp = enter (sep); - servent_setup (cp); - } --- -1.7.1 - diff --git a/debian/patches/64_telnetd_ipv6_sockaddrlen.patch b/debian/patches/64_telnetd_ipv6_sockaddrlen.patch deleted file mode 100644 index aa17701..0000000 --- a/debian/patches/64_telnetd_ipv6_sockaddrlen.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit c4956d533efbc0972bf97ed66e1b867e92b4d56f -Author: Mats Erik Andersson -Date: Tue Oct 26 22:48:15 2010 +0200 - - telnetd/telnetd.c: Reuse address length. Needed for OpenBSD. - - Signed-off-by: Simon Josefsson - -diff --git a/telnetd/telnetd.c b/telnetd/telnetd.c -index b72cd73..b155087 100644 ---- a/telnetd/telnetd.c -+++ b/telnetd/telnetd.c -@@ -300,7 +300,7 @@ telnetd_setup (int fd) - } - - #ifdef IPV6 -- err = getnameinfo ((struct sockaddr *) &saddr, sizeof (saddr), buf, -+ err = getnameinfo ((struct sockaddr *) &saddr, len, buf, - sizeof (buf), NULL, 0, NI_NUMERICHOST); - if (err) - { -@@ -317,7 +317,7 @@ telnetd_setup (int fd) - - /* We use a second buffer so we don't have to call getnameinfo again - if we need the numeric host below. */ -- err = getnameinfo ((struct sockaddr *) &saddr, sizeof (saddr), buf2, -+ err = getnameinfo ((struct sockaddr *) &saddr, len, buf2, - sizeof (buf2), NULL, 0, NI_NAMEREQD); - - if (reverse_lookup) diff --git a/debian/patches/70_ftbfs_non-linux.patch b/debian/patches/70_ftbfs_non-linux.patch index 75089e7..99e38e5 100644 --- a/debian/patches/70_ftbfs_non-linux.patch +++ b/debian/patches/70_ftbfs_non-linux.patch @@ -1,33 +1,10 @@ --- - ifconfig/flags.h | 2 ++ - telnetd/telnetd.h | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) + ifconfig/flags.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) ---- a/telnetd/telnetd.h -+++ b/telnetd/telnetd.h -@@ -45,7 +45,7 @@ - #ifdef HAVE_SYS_PTYVAR_H - # include - #endif --#ifdef HAVE_STROPTS_H -+#if 0 - # include - #endif - #include ---- a/ifconfig/flags.h -+++ b/ifconfig/flags.h -@@ -22,6 +22,8 @@ - #ifndef IFCONFIG_FLAGS_H - # define IFCONFIG_FLAGS_H - -+# include -+ - /* Using these avoid strings with if_flagtoname, the caller can set a - preference on returned flag names. If one of the names in the list - is found for the flag, the search continues to attempt a better --- a/ifconfig/flags.c +++ b/ifconfig/flags.c -@@ -391,22 +391,48 @@ struct if_flag_char +@@ -389,20 +389,36 @@ struct if_flag_char That's the way netstat does it. */ static struct if_flag_char flag_char_tab[] = { @@ -52,21 +29,22 @@ +#ifdef IFF_PROMISC { IFF_PROMISC, 'P' }, +#endif -+#ifdef IFF_NOTRAILERS + #ifdef IFF_NOTRAILERS { IFF_NOTRAILERS, 'N' }, -+#endif + #endif +#ifdef IFF_NOARP { IFF_NOARP, 'O' }, +#endif +#ifdef IFF_POINTOPOINT { IFF_POINTOPOINT, 'P' }, +#endif -+#ifdef IFF_SLAVE + #ifdef IFF_SLAVE { IFF_SLAVE, 's' }, -+#endif -+#ifdef IFF_MASTER - { IFF_MASTER, 'm' }, -+#endif + #endif +@@ -412,8 +428,12 @@ static struct if_flag_char flag_char_tab + #ifdef IFF_SIMPLEX + { IFF_SIMPLEX, 'S' }, + #endif +#ifdef IFF_RUNNING { IFF_RUNNING, 'R' }, +#endif diff --git a/debian/patches/72_traceroute_fix_setsockopt.patch b/debian/patches/72_traceroute_fix_setsockopt.patch deleted file mode 100644 index 2f86a89..0000000 --- a/debian/patches/72_traceroute_fix_setsockopt.patch +++ /dev/null @@ -1,64 +0,0 @@ -Description: Use integer arguments to setsockopt(). - GNU/kFreeBSD must pass an integer argument with IP_TTL - in setsockopt(2). Thsi has no ill effect with GNU/Linux. - . - The change is backported from upstream git repository. -Author: Mats Erik Andersson -Forwarded: not-needed -Last-Update: 2011-01-18 - ---- inetutils-1.8/src/traceroute.c.orig -+++ inetutils-1.8/src/traceroute.c -@@ -67,7 +67,7 @@ - int icmpfd, udpfd; - enum trace_type type; - struct sockaddr_in to, from; -- unsigned char ttl; -+ int ttl; - struct timeval tsent; - } trace_t; - -@@ -314,7 +314,7 @@ - trace_init (trace_t * t, const struct sockaddr_in to, - const enum trace_type type) - { -- const unsigned char *ttlp; -+ const int *ttlp; - assert (t); - ttlp = &t->ttl; - -@@ -329,7 +329,7 @@ - error (EXIT_FAILURE, errno, "socket"); - - if (setsockopt (t->udpfd, IPPROTO_IP, IP_TTL, ttlp, -- sizeof (t->ttl)) < 0) -+ sizeof (*ttlp)) < 0) - error (EXIT_FAILURE, errno, "setsockopt"); - } - -@@ -343,7 +343,7 @@ - error (EXIT_FAILURE, errno, "socket"); - - if (setsockopt (t->icmpfd, IPPROTO_IP, IP_TTL, -- ttlp, sizeof (t->ttl)) < 0) -+ ttlp, sizeof (*ttlp)) < 0) - error (EXIT_FAILURE, errno, "setsockopt"); - } - else -@@ -523,14 +523,14 @@ - trace_inc_ttl (trace_t * t) - { - int fd; -- const unsigned char *ttlp; -+ const int *ttlp; - - assert (t); - - ttlp = &t->ttl; - t->ttl++; - fd = (t->type == TRACE_UDP ? t->udpfd : t->icmpfd); -- if (setsockopt (fd, IPPROTO_IP, IP_TTL, ttlp, sizeof (t->ttl)) < 0) -+ if (setsockopt (fd, IPPROTO_IP, IP_TTL, ttlp, sizeof (*ttlp)) < 0) - error (EXIT_FAILURE, errno, "setsockopt"); - } - diff --git a/debian/patches/99_CVE-2011-4862.patch b/debian/patches/99_CVE-2011-4862.patch deleted file mode 100644 index 4bb677e..0000000 --- a/debian/patches/99_CVE-2011-4862.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: git/libtelnet/encrypt.c -=================================================================== ---- git.orig/libtelnet/encrypt.c 2011-12-25 16:51:52.000000000 +0100 -+++ git/libtelnet/encrypt.c 2011-12-25 16:58:22.441175233 +0100 -@@ -794,6 +794,9 @@ - int dir = kp->dir; - register int ret = 0; - -+ if (len > MAXKEYLEN) -+ len = MAXKEYLEN; -+ - if (!(ep = (*kp->getcrypt) (*kp->modep))) - { - if (len == 0) diff --git a/debian/patches/series b/debian/patches/series index ecf488c..ba4b0b9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,15 +1,8 @@ 01_disable_useless_man_pages.patch -02_remove_unused_opie_check.patch 03_reduce_shared_lib_depends.patch 22_syslogd_conf.patch 30_ping-Abort-on-sendto-error.patch 50_split_load_conffile.patch 51_add_load_confdir_support.patch -60_inetd_support_argless_services.patch -61_inetd_listen_on_tcpmux_ports.patch 62_inetd_change_ipv6_protocol_semantics.patch -63_inetd_ipv6_sockaddrlen.patch -64_telnetd_ipv6_sockaddrlen.patch 70_ftbfs_non-linux.patch -72_traceroute_fix_setsockopt.patch -99_CVE-2011-4862.patch diff --git a/debian/rules b/debian/rules index 531300e..c27e00a 100755 --- a/debian/rules +++ b/debian/rules @@ -38,7 +38,7 @@ man8dir = $(mandir)/man8 configure: configure.ac dh_testdir - autoreconf -i + autoreconf -i -Im4 -Iam config.status: configure dh_testdir -- cgit v1.2.3