mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
xinetd: bump version (#3704)
This commit is contained in:
committed by
Sergei Reznikov
parent
34211484d7
commit
e89754955d
134
sys-apps/xinetd/patches/xinetd-2.3.15.4.patchset
Normal file
134
sys-apps/xinetd/patches/xinetd-2.3.15.4.patchset
Normal file
@@ -0,0 +1,134 @@
|
||||
From d44855c2d057d086126d575140d70563b956fbfa Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Thu, 21 Mar 2019 13:17:22 +0100
|
||||
Subject: import previous patch
|
||||
|
||||
|
||||
diff --git a/src/redirect.c b/src/redirect.c
|
||||
index 6749a86..6d79b1a 100644
|
||||
--- a/src/redirect.c
|
||||
+++ b/src/redirect.c
|
||||
@@ -20,7 +20,11 @@
|
||||
#include <unistd.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/signal.h>
|
||||
+#else
|
||||
+#include <signal.h>
|
||||
+#endif
|
||||
|
||||
#include "redirect.h"
|
||||
#include "service.h"
|
||||
diff --git a/src/server.h b/src/server.h
|
||||
index 43b282a..44fee7b 100644
|
||||
--- a/src/server.h
|
||||
+++ b/src/server.h
|
||||
@@ -24,6 +24,9 @@
|
||||
typedef int pid_t ;
|
||||
#endif
|
||||
|
||||
+#ifndef FNDELAY
|
||||
+#define FNDELAY O_NONBLOCK
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* This struct describes running servers
|
||||
diff --git a/src/signals.h b/src/signals.h
|
||||
index 6acf97c..3aaf0b8 100644
|
||||
--- a/src/signals.h
|
||||
+++ b/src/signals.h
|
||||
@@ -6,6 +6,10 @@
|
||||
#ifndef _X_SIGNALS
|
||||
#define _X_SIGNALS
|
||||
|
||||
+#ifndef SIGIOT
|
||||
+#define SIGIOT SIGABRT
|
||||
+#endif
|
||||
+
|
||||
#include "defs.h"
|
||||
|
||||
#if defined(NO_POSIX_SIGS)
|
||||
diff --git a/src/sio/sio.c b/src/sio/sio.c
|
||||
index c9abde9..464c2c9 100644
|
||||
--- a/src/sio/sio.c
|
||||
+++ b/src/sio/sio.c
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
-#ifdef _APPLE_
|
||||
+#if defined _APPLE_ || defined __HAIKU__
|
||||
#undef HAVE_MMAP
|
||||
#endif
|
||||
|
||||
diff --git a/src/sio/siosup.c b/src/sio/siosup.c
|
||||
index 149bf57..1c9dc90 100644
|
||||
--- a/src/sio/siosup.c
|
||||
+++ b/src/sio/siosup.c
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
|
||||
-#ifdef _APPLE_
|
||||
+#if defined _APPLE_ || defined __HAIKU__
|
||||
#undef HAVE_MMAP
|
||||
#endif
|
||||
|
||||
diff --git a/src/util.c b/src/util.c
|
||||
index 6ee97b9..8665098 100644
|
||||
--- a/src/util.c
|
||||
+++ b/src/util.c
|
||||
@@ -16,7 +16,7 @@
|
||||
* The following ifdef is for TIOCNOTTY
|
||||
*/
|
||||
#ifndef NO_TERMIOS
|
||||
-#include <sys/termios.h>
|
||||
+//#include <sys/termios.h>
|
||||
#include <termios.h>
|
||||
#else
|
||||
#include <sys/ioctl.h>
|
||||
diff --git a/src/util.h b/src/util.h
|
||||
index f46563d..d94730d 100644
|
||||
--- a/src/util.h
|
||||
+++ b/src/util.h
|
||||
@@ -4,6 +4,10 @@
|
||||
#include "pset.h"
|
||||
#include "defs.h"
|
||||
|
||||
+#ifndef FNDELAY
|
||||
+#define FNDELAY O_NONBLOCK
|
||||
+#endif
|
||||
+
|
||||
void out_of_memory(const char *func);
|
||||
const struct name_value *nv_find_value(const struct name_value nv_array[],const char *name);
|
||||
const struct name_value *nv_find_name(const struct name_value nv_array[],int value);
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 22cab2f0716f8316fe39ea0dfa6981e032d62480 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Thu, 21 Mar 2019 13:21:04 +0100
|
||||
Subject: xinetd needs to link to -lnetwork
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2e0cf21..164df7a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -45,6 +45,11 @@ AC_FUNC_MMAP
|
||||
AC_CHECK_HEADER(sys/filio.h, [AC_DEFINE([HAVE_SYS_FILIO_H], [1], [Have FreeBSD filio.h])])
|
||||
AC_CHECK_FUNC(poll, [AC_DEFINE([HAVE_POLL], [1], [Have available poll function])])
|
||||
|
||||
+# ======================================
|
||||
+# Check for various libraries for gethostbyname
|
||||
+# ======================================
|
||||
+AC_SEARCH_LIBS(gethostbyname, nsl socket resolv network)
|
||||
+
|
||||
# ======
|
||||
# Switch
|
||||
# ======
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
From 54208b419757982ed670e2b875fb22b39385f3f6 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Sat, 28 Apr 2018 13:06:05 +0200
|
||||
Subject: import previous patch
|
||||
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index a629a1f..403f049 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -76,26 +76,26 @@ 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
|
||||
+ $(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"
|
||||
|
||||
uninstall:
|
||||
- rm -f $(DAEMONDIR)/xinetd
|
||||
- rm -f $(DAEMONDIR)/itox
|
||||
- rm -f $(DAEMONDIR)/xconv.pl
|
||||
- rm -f $(MANDIR)/man5/xinetd.conf.5
|
||||
- rm -f $(MANDIR)/man8/xinetd.log.8
|
||||
- rm -f $(MANDIR)/man8/xinetd.8
|
||||
- rm -f $(MANDIR)/man8/itox.8
|
||||
+ rm -f $(DESTDIR)$(DAEMONDIR)/xinetd
|
||||
+ rm -f $(DESTDIR)$(DAEMONDIR)/itox
|
||||
+ rm -f $(DESTDIR)$(DAEMONDIR)/xconv.pl
|
||||
+ rm -f $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5
|
||||
+ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.log.8
|
||||
+ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.8
|
||||
+ rm -f $(DESTDIR)$(MANDIR)/man8/itox.8
|
||||
|
||||
distclean: clean
|
||||
rm -f config.cache config.log Makefile config.status xinetd/itox
|
||||
diff --git a/configure.in b/configure.in
|
||||
index be80dce..cdf510c 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -7,9 +7,9 @@ AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AC_CHECK_LIB(compat, main)
|
||||
-AC_SEARCH_LIBS(gethostbyname, nsl socket resolv)
|
||||
-AC_SEARCH_LIBS(getnameinfo, nsl socket resolv)
|
||||
-AC_SEARCH_LIBS(inet_ntop, nsl socket resolv)
|
||||
+AC_SEARCH_LIBS(gethostbyname, nsl socket resolv network)
|
||||
+AC_SEARCH_LIBS(getnameinfo, nsl socket resolv network)
|
||||
+AC_SEARCH_LIBS(inet_ntop, nsl socket resolv network)
|
||||
AC_CHECK_FUNCS(getnameinfo inet_ntop)
|
||||
AC_CHECK_FUNCS(difftime, ,
|
||||
AC_CHECK_LIB(m, difftime))
|
||||
@@ -27,8 +27,9 @@ AC_CHECK_FUNC(socket, ,
|
||||
AC_CHECK_LIB(nsl, socket)))
|
||||
AC_CHECK_FUNC(inet_aton, ,
|
||||
AC_CHECK_LIB(nsl, inet_aton, ,
|
||||
+ AC_CHECK_LIB(network, inet_aton, ,
|
||||
AC_CHECK_LIB(socket, inet_aton, ,
|
||||
- AC_CHECK_LIB(resolv, inet_aton, ,[AC_DEFINE(NO_INET_ATON)]))))
|
||||
+ AC_CHECK_LIB(resolv, inet_aton, ,[AC_DEFINE(NO_INET_ATON)])))))
|
||||
AC_CHECK_FUNC(setenv,[AC_DEFINE(HAVE_SETENV)])
|
||||
AC_CHECK_FUNC(strsignal, [AC_DEFINE(HAVE_STRSIGNAL)])
|
||||
AC_CHECK_LIB(c, sys_siglist, [AC_DEFINE(HAVE_SYS_SIGLIST)])
|
||||
diff --git a/libs/src/sio/sio.c b/libs/src/sio/sio.c
|
||||
index 1b4f542..f815dc0 100644
|
||||
--- a/libs/src/sio/sio.c
|
||||
+++ b/libs/src/sio/sio.c
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
-#ifdef _APPLE_
|
||||
+#if defined _APPLE_ || defined __HAIKU__
|
||||
#undef HAVE_MMAP
|
||||
#endif
|
||||
|
||||
diff --git a/libs/src/sio/siosup.c b/libs/src/sio/siosup.c
|
||||
index de68ee2..b4c4414 100644
|
||||
--- a/libs/src/sio/siosup.c
|
||||
+++ b/libs/src/sio/siosup.c
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
|
||||
-#ifdef _APPLE_
|
||||
+#if defined _APPLE_ || defined __HAIKU__
|
||||
#undef HAVE_MMAP
|
||||
#endif
|
||||
|
||||
diff --git a/xinetd/child.c b/xinetd/child.c
|
||||
index e7781b6..f237da1 100644
|
||||
--- a/xinetd/child.c
|
||||
+++ b/xinetd/child.c
|
||||
@@ -338,7 +338,11 @@ void child_process( struct server *serp )
|
||||
{
|
||||
set_credentials( scp ) ;
|
||||
if ( SC_SPECIFIED( scp, A_NICE ) )
|
||||
+#ifndef __HAIKU__
|
||||
(void) nice( SC_NICE( scp ) ) ;
|
||||
+#else
|
||||
+ sleep( 1 );
|
||||
+#endif /* HAIKU does not have nice() */
|
||||
}
|
||||
|
||||
if ( svc_child_access_control(sp, cp) != OK )
|
||||
diff --git a/xinetd/confparse.c b/xinetd/confparse.c
|
||||
index b277bf9..d9d651d 100644
|
||||
--- a/xinetd/confparse.c
|
||||
+++ b/xinetd/confparse.c
|
||||
@@ -745,8 +745,8 @@ static status_e check_entry( struct service_config *scp,
|
||||
}
|
||||
}
|
||||
|
||||
-/* #ifndef NO_RPC */
|
||||
-#if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H)
|
||||
+/* #ifdef HAVE_RPC_RPC */
|
||||
+#if ((defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H)) && !defined __HAIKU__ )
|
||||
if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) )
|
||||
{
|
||||
struct rpcent *rep = (struct rpcent *)getrpcbyname( SC_NAME(scp) ) ;
|
||||
diff --git a/xinetd/server.h b/xinetd/server.h
|
||||
index 43b282a..44fee7b 100644
|
||||
--- a/xinetd/server.h
|
||||
+++ b/xinetd/server.h
|
||||
@@ -24,6 +24,9 @@
|
||||
typedef int pid_t ;
|
||||
#endif
|
||||
|
||||
+#ifndef FNDELAY
|
||||
+#define FNDELAY O_NONBLOCK
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* This struct describes running servers
|
||||
diff --git a/xinetd/signals.h b/xinetd/signals.h
|
||||
index 6acf97c..3aaf0b8 100644
|
||||
--- a/xinetd/signals.h
|
||||
+++ b/xinetd/signals.h
|
||||
@@ -6,6 +6,10 @@
|
||||
#ifndef _X_SIGNALS
|
||||
#define _X_SIGNALS
|
||||
|
||||
+#ifndef SIGIOT
|
||||
+#define SIGIOT SIGABRT
|
||||
+#endif
|
||||
+
|
||||
#include "defs.h"
|
||||
|
||||
#if defined(NO_POSIX_SIGS)
|
||||
diff --git a/xinetd/util.h b/xinetd/util.h
|
||||
index f46563d..d94730d 100644
|
||||
--- a/xinetd/util.h
|
||||
+++ b/xinetd/util.h
|
||||
@@ -4,6 +4,10 @@
|
||||
#include "pset.h"
|
||||
#include "defs.h"
|
||||
|
||||
+#ifndef FNDELAY
|
||||
+#define FNDELAY O_NONBLOCK
|
||||
+#endif
|
||||
+
|
||||
void out_of_memory(const char *func);
|
||||
const struct name_value *nv_find_value(const struct name_value nv_array[],const char *name);
|
||||
const struct name_value *nv_find_name(const struct name_value nv_array[],int value);
|
||||
--
|
||||
2.16.2
|
||||
|
||||
|
||||
From 704349f11c61e50a55b5258b059fc9aad8e4b602 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 28 Apr 2018 13:11:59 +0200
|
||||
Subject: add a fix for CVE-2013-4342
|
||||
|
||||
|
||||
diff --git a/xinetd/builtins.c b/xinetd/builtins.c
|
||||
index 3b85579..34a5bac 100644
|
||||
--- a/xinetd/builtins.c
|
||||
+++ b/xinetd/builtins.c
|
||||
@@ -617,7 +617,7 @@ static void tcpmux_handler( const struct server *serp )
|
||||
if( SC_IS_INTERNAL( scp ) ) {
|
||||
SC_INTERNAL(scp, nserp);
|
||||
} else {
|
||||
- exec_server(nserp);
|
||||
+ child_process(nserp);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.16.2
|
||||
|
||||
63
sys-apps/xinetd/xinetd-2.3.15.4.recipe
Normal file
63
sys-apps/xinetd/xinetd-2.3.15.4.recipe
Normal file
@@ -0,0 +1,63 @@
|
||||
SUMMARY="A secure replacement for inetd"
|
||||
DESCRIPTION="powerful replacement for inetd"
|
||||
HOMEPAGE="https://github.com/xinetd-org/xinetd"
|
||||
COPYRIGHT="1992 Panagiotis Tsirigotis
|
||||
1998-2001 Rob Braun
|
||||
2001 Steve Grubb
|
||||
2017 SUSE LINUX GmbH and other parties"
|
||||
LICENSE="Xinetd"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/openSUSE/xinetd/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="cbb6d078a8e4d0297cbfc146d5acd0b598de7d30dd0f76301a52ca923b42129a"
|
||||
SOURCE_DIR="xinetd-$portVersion"
|
||||
PATCHES="xinetd-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/xinetd.conf keep-old
|
||||
settings/xinetd.d directory keep-old
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
xinetd$secondaryArchSuffix = $portVersion
|
||||
cmd:itox$secondaryArchSuffix = $portVersion
|
||||
cmd:xconv.pl$secondaryArchSuffix = $portVersion
|
||||
cmd:xinetd$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoreconf
|
||||
cmd:awk
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# workaround while (SIGBUS == SIGSEGV) on HAIKU
|
||||
sed -i 's/case SIGBUS:/\n/' src/signals.c
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -vfi
|
||||
runConfigure ./configure --without-loadavg
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
SUMMARY="A secure replacement for inetd"
|
||||
DESCRIPTION="powerful replacement for inetd"
|
||||
HOMEPAGE="https://github.com/xinetd-org/xinetd"
|
||||
COPYRIGHT="1992 Panagiotis Tsirigotis
|
||||
1998-2001 Rob Braun"
|
||||
LICENSE="Xinetd"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/xinetd-org/xinetd/archive/xinetd-${portVersion//\./-}.tar.gz"
|
||||
CHECKSUM_SHA256="620b25f4ab4d72fdf32b13797156ea40df2049f1c07e640177e5fec544e9a94c"
|
||||
SOURCE_DIR="xinetd-xinetd-${portVersion//\./-}"
|
||||
PATCHES="xinetd-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86_64"
|
||||
|
||||
PROVIDES="
|
||||
xinetd = $portVersion
|
||||
cmd:itox = $portVersion
|
||||
cmd:xconv.pl = $portVersion
|
||||
cmd:xinetd = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:gcc
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# if we don't have rpc/rpc.h then why does it still try to use it??
|
||||
# let's change the #ifndef NO_RPC to #ifdef HAVE_RPC_RPC
|
||||
sed -i 's/ndef NO_RPC/def HAVE_RPC_RPC/g' xinetd/*.c
|
||||
|
||||
# workaround while (SIGBUS == SIGSEGV) on HAIKU
|
||||
sed -i 's/case SIGBUS:/\n/' xinetd/signals.c
|
||||
|
||||
# save rlim_t
|
||||
sed -i 's/XINETD_CHECK_TYPE(rlim_t/dnl &/' configure.in
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize --force --copy --install
|
||||
aclocal
|
||||
autoconf
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
Reference in New Issue
Block a user