xinetd: update to 2.3.15.4

Changelog:
1c4d1766d4/CHANGELOG (L935)

Instead of the xinetd-org sources, the OpenSUSE fork is used now
because the xinetd-org version is not maintained anymore. This fork
is used by Debian too and obsoletes the patches that were used
previously for the packaging at OpenWrt.

[1] https://github.com/xinetd-org/xinetd/issues/37
[2] https://packages.debian.org/trixie/xinetd

Signed-off-by: Jonas Lochmann <openwrt@jonaslochmann.de>
This commit is contained in:
Jonas Lochmann
2025-12-22 01:00:00 +01:00
committed by Hannu Nyman
parent 793f1353c8
commit 47a54ba42d
8 changed files with 21 additions and 257 deletions

View File

@@ -1,5 +1,5 @@
# #
# Copyright (C) 2006-2015 OpenWrt.org # Copyright (C) 2006-2025 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@@ -8,19 +8,20 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=xinetd PKG_NAME:=xinetd
PKG_VERSION:=2.3.15 PKG_VERSION:=2.3.15.4
PKG_RELEASE:=18 PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_NAME)-2-3-15 PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/xinetd-org/xinetd PKG_SOURCE_URL:=https://github.com/openSUSE/xinetd
PKG_MIRROR_HASH:=f2fc2c6decb2334848c277915e10dee7463aacd1411d61c953ff908aaad8d275 PKG_MIRROR_HASH:=7268c75ce6f4cd64fa62172849c5361d38f05b6be0fac889ed2012d3d9547639
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de> PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
PKG_LICENSE:=xinetd PKG_LICENSE:=xinetd
PKG_LICENSE_FILES:=COPYRIGHT PKG_LICENSE_FILES:=COPYRIGHT
PKG_CPE_ID:=cpe:/a:xinetd:xinetd PKG_CPE_ID:=cpe:/a:xinetd:xinetd
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1 PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@@ -29,7 +30,7 @@ define Package/xinetd
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
TITLE:=A powerful and secure super-server TITLE:=A powerful and secure super-server
URL:=https://github.com/xinetd-org URL:=https://github.com/openSUSE/xinetd
DEPENDS:= +USE_GLIBC:libcrypt-compat DEPENDS:= +USE_GLIBC:libcrypt-compat
endef endef
@@ -46,17 +47,11 @@ define Package/xinetd/conffiles
/etc/xinetd.d /etc/xinetd.d
endef endef
TARGET_CFLAGS += -DNO_RPC -std=gnu11
TARGET_CPPFLAGS += -DHAVE_RLIM_T
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--without-libwrap \ --without-libwrap \
--with-loadavg --with-loadavg \
--without-rpc \
CONFIGURE_VARS += \ --without-labeled-networking
ac_cv_header_rpc_pmap_clnt_h=no \
ac_cv_header_rpc_rpc_h=no \
ac_cv_header_rpc_rpcent_h=no
define Package/xinetd/install define Package/xinetd/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin

View File

@@ -1,66 +0,0 @@
--- a/libs/src/misc/Makefile.in
+++ b/libs/src/misc/Makefile.in
@@ -62,7 +62,7 @@ libopt: clean
$(LIBNAME): $(OBJECTS)
- ar r $@ $?
+ $(AR) r $@ $?
$(RANLIB) $@
install: $(LIBNAME)
--- a/libs/src/portable/Makefile.in
+++ b/libs/src/portable/Makefile.in
@@ -57,7 +57,7 @@ libopt: clean
$(LIBNAME): $(OBJECTS)
- ar r $@ $?
+ $(AR) r $@ $?
$(RANLIB) $@
install: $(LIBNAME)
--- a/libs/src/pset/Makefile.in
+++ b/libs/src/pset/Makefile.in
@@ -53,7 +53,7 @@ libopt: clean
mv $(LIBNAME) $(LIBDIR)/optimized
$(LIBNAME): $(OBJECTS)
- ar r $@ $?
+ $(AR) r $@ $?
$(RANLIB) $@
install: $(LIBNAME)
--- a/libs/src/sio/Makefile.in
+++ b/libs/src/sio/Makefile.in
@@ -52,7 +52,7 @@ libopt: clean
$(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized
$(LIBNAME): $(OBJECTS)
- ar r $@ $?
+ $(AR) r $@ $?
$(RANLIB) $@
install: $(LIBNAME)
--- a/libs/src/str/Makefile.in
+++ b/libs/src/str/Makefile.in
@@ -63,7 +63,7 @@ libopt: clean
$(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O
$(LIBNAME): $(OBJECTS)
- ar r $@ $?
+ $(AR) r $@ $?
$(RANLIB) $@
LINT_IGNORE=possible pointer alignment|RCSid unused
--- a/libs/src/xlog/Makefile.in
+++ b/libs/src/xlog/Makefile.in
@@ -58,7 +58,7 @@ libopt: clean
$(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized
$(LIBNAME): $(OBJECTS)
- ar r $@ $?
+ $(AR) r $@ $?
$(RANLIB) $@
install: $(LIBNAME)

View File

@@ -0,0 +1,10 @@
--- a/src/sio/sprint.c
+++ b/src/sio/sprint.c
@@ -6,6 +6,7 @@
#include "config.h"
+#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

View File

@@ -1,27 +0,0 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -75,15 +75,15 @@ dlibxlog: dlibsio dlibstr
install: build
for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \
- test -d $$i || mkdir -p $$i ; done
- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR)
- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR)
- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR)
- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5
- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8
- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8
- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8
- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8
+ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done
+ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR)
+ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR)
+ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR)
+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5
+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8
+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8
+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8
+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8
@echo "You must put your xinetd.conf in /etc/xinetd.conf"
@echo "There is a sample config file in xinetd/sample.conf and you can"
@echo "use xconv.pl to convert your old inetd.conf file to an xinetd format"

View File

@@ -1,19 +0,0 @@
--- a/xinetd/confparse.c
+++ b/xinetd/confparse.c
@@ -745,7 +745,7 @@ static status_e check_entry( struct serv
}
}
-/* #ifndef NO_RPC */
+#ifndef NO_RPC
#if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H)
if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) )
{
@@ -759,6 +759,7 @@ static status_e check_entry( struct serv
SC_RPCDATA( scp )->rd_program_number = rep->r_number ;
}
else
+#endif
#endif /* ! NO_RPC */
{
if ( !SC_IS_UNLISTED( scp ) )

View File

@@ -1,42 +0,0 @@
xinetd: socket bind: Invalid argument (errno = 22) when using USERID on ipv6
Use right size of addresses in bind() call. Also use getpeername addresses when
connecting to ident service to prevent address family mismatch between socket(),
bind() and connect() calls.
Author: Jan Safranek <jsafrane@redhat.com>
Reviewed-By: Adam Tkac <atkac@redhat.com>
#diff -up xinetd-2.3.14/xinetd/ident.c.orig xinetd-2.3.14/xinetd/ident.c
--- a/xinetd/ident.c
+++ b/xinetd/ident.c
@@ -97,7 +97,13 @@ idresult_e log_remote_user( const struct
}
CLEAR( sin_contact );
- sin_remote = *CONN_XADDRESS( SERVER_CONNECTION( serp ) ) ;
+
+ sin_len = sizeof( sin_remote );
+ if ( getpeername( SERVER_FD( serp ), &sin_remote.sa, &sin_len ) == -1 )
+ {
+ msg( LOG_ERR, func, "(%d) getpeername: %m", getpid() ) ;
+ return( IDR_ERROR ) ;
+ }
sin_contact = sin_remote;
memcpy( &sin_bind, &sin_local, sizeof(sin_bind) ) ;
local_port = 0;
@@ -127,7 +133,13 @@ idresult_e log_remote_user( const struct
msg( LOG_ERR, func, "socket creation: %m" ) ;
return( IDR_ERROR ) ;
}
- if ( bind(sd, &sin_bind.sa, sizeof(sin_bind.sa)) == -1 )
+
+ if ( sin_bind.sa.sa_family == AF_INET )
+ sin_len = sizeof( sin_bind.sa_in ) ;
+ else
+ sin_len = sizeof( sin_bind.sa_in6 ) ;
+
+ if ( bind(sd, &sin_bind.sa, sin_len) == -1 )
{
msg( LOG_ERR, func, "socket bind: %m" ) ;
(void) Sclose( sd ) ;

View File

@@ -1,23 +0,0 @@
--- a/xinetd/connection.c
+++ b/xinetd/connection.c
@@ -14,6 +14,7 @@
#include <syslog.h>
#include <stdlib.h>
#include <unistd.h>
+#include <inttypes.h>
#include <netinet/tcp.h>
@@ -218,11 +219,7 @@ void conn_dump( const connection_s *cp,
tabprint( fd, 1, "service = %s\n", SVC_ID( cp->co_sp ) ) ;
tabprint( fd, 1, "descriptor = %d\n", cp->co_descriptor ) ;
-#if defined(__GNUC__) && !defined(__arch64__) && !defined(__alpha__)
- tabprint( fd, 1, "flags = %#llx\n", cp->co_flags ) ;
-#else
- tabprint( fd, 1, "flags = %#lx\n", cp->co_flags ) ;
-#endif
+ tabprint( fd, 1, "flags = %#" PRIx64 "\n", cp->co_flags ) ;
tabprint( fd, 1, "remote_address = %s,%d\n", name,
ntohs( cp->co_remote_address.sa_in.sin_port ) ) ;
}

View File

@@ -1,64 +0,0 @@
--- a/libs/src/sio/sprint.c
+++ b/libs/src/sio/sprint.c
@@ -6,6 +6,11 @@
#include "config.h"
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
--- a/xinetd/redirect.c
+++ b/xinetd/redirect.c
@@ -24,9 +24,6 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_SYS_SIGNAL_H
-#include <sys/signal.h>
-#endif
#include "redirect.h"
#include "service.h"
--- a/xinetd/sconf.c
+++ b/xinetd/sconf.c
@@ -311,7 +311,7 @@ void sc_dump( struct service_config *scp
tabprint( fd, tab_level+1, "Nice = %d\n", SC_NICE(scp) ) ;
if ( SC_SPECIFIED( scp, A_CPS ) )
- tabprint( fd, tab_level+1, "CPS = max conn:%lu wait:%lu\n",
+ tabprint( fd, tab_level+1, "CPS = max conn:%" PRId64 " wait:%" PRId64 "\n",
SC_TIME_CONN_MAX(scp), SC_TIME_WAIT(scp) );
if ( SC_SPECIFIED( scp, A_PER_SOURCE ) )
--- a/xinetd/sensor.c
+++ b/xinetd/sensor.c
@@ -76,7 +76,7 @@ void process_sensor( const struct servic
if (SC_DENY_TIME(SVC_CONF(sp)) == -1)
strcpy(time_buf, "-1");
else
- strx_nprint(time_buf, 38, "%ld",
+ strx_nprint(time_buf, 38, "%" PRId64,
(time_t)nowtime+(60*SC_DENY_TIME(SVC_CONF(sp))));
tmp = new_string(time_buf);
--- a/xinetd/util.c
+++ b/xinetd/util.c
@@ -18,11 +18,10 @@
* The following ifdef is for TIOCNOTTY
*/
#ifndef NO_TERMIOS
-#ifdef HAVE_SYS_TERMIOS_H
-#include <sys/termios.h>
-#endif
#ifdef HAVE_TERMIOS_H
#include <termios.h>
+#elif defined(HAVE_SYS_TERMIOS_H)
+#include <sys/termios.h>
#endif
#else
#include <sys/ioctl.h>