From 42a0d84ed2eb4b07c77396298006a1e1d3724470 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 28 Nov 2007 10:53:25 +0100 Subject: [PATCH] Add new patch. Signed-off-by: Pierre Habouzit --- debian/changelog | 9 ++ debian/patches/0001-Documentation-fixes.patch | 2 +- debian/patches/0002-xconv.pl-updates.patch | 2 +- ...s-fixes-from-the-previous-maintainer.patch | 2 +- ...Fix-xinetd.log.man-installation-path.patch | 2 +- debian/patches/0005-Update-build-system.patch | 2 +- ...-from-inetd.conf-if-a-service-with-t.patch | 84 +++++++++++++++++++ 7 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 debian/patches/0006-Disable-services-from-inetd.conf-if-a-service-with-t.patch diff --git a/debian/changelog b/debian/changelog index cdc817f..dc64552 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +xinetd (1:2.3.14-4) UNRELEASED; urgency=low + + * Add Disable-services-with-a-duplicated-id.patch: if a service has the same + id and is configured in both xinetd configuration directories _and_ in + /etc/inetd.conf, the configuration (even if disabled) from xinetd + directories takes precedence. + + -- Pierre Habouzit Wed, 28 Nov 2007 10:14:47 +0100 + xinetd (1:2.3.14-3) unstable; urgency=low [ The let's try to provide inet-superserver upload ] diff --git a/debian/patches/0001-Documentation-fixes.patch b/debian/patches/0001-Documentation-fixes.patch index fff43e5..f8e4429 100644 --- a/debian/patches/0001-Documentation-fixes.patch +++ b/debian/patches/0001-Documentation-fixes.patch @@ -70,5 +70,5 @@ index d52c2cc..c76c3c6 100644 used by the program have not been corrupted. When the check is completed -- -1.5.3.6.2033.g1437 +1.5.3.6.2040.g15e6 diff --git a/debian/patches/0002-xconv.pl-updates.patch b/debian/patches/0002-xconv.pl-updates.patch index 94e1a15..7154180 100644 --- a/debian/patches/0002-xconv.pl-updates.patch +++ b/debian/patches/0002-xconv.pl-updates.patch @@ -84,5 +84,5 @@ index cc58868..6c0a71d 100755 print "\n"; } -- -1.5.3.6.2033.g1437 +1.5.3.6.2040.g15e6 diff --git a/debian/patches/0003-Various-fixes-from-the-previous-maintainer.patch b/debian/patches/0003-Various-fixes-from-the-previous-maintainer.patch index 238bdb6..d243692 100644 --- a/debian/patches/0003-Various-fixes-from-the-previous-maintainer.patch +++ b/debian/patches/0003-Various-fixes-from-the-previous-maintainer.patch @@ -73,5 +73,5 @@ index 3d68d78..0132d6c 100644 (void) time( ¤t_time ) ; -- -1.5.3.6.2033.g1437 +1.5.3.6.2040.g15e6 diff --git a/debian/patches/0004-Fix-xinetd.log.man-installation-path.patch b/debian/patches/0004-Fix-xinetd.log.man-installation-path.patch index fdbf0e5..6fd248c 100644 --- a/debian/patches/0004-Fix-xinetd.log.man-installation-path.patch +++ b/debian/patches/0004-Fix-xinetd.log.man-installation-path.patch @@ -21,5 +21,5 @@ index 7511efd..f766383 100644 $(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 -- -1.5.3.6.2033.g1437 +1.5.3.6.2040.g15e6 diff --git a/debian/patches/0005-Update-build-system.patch b/debian/patches/0005-Update-build-system.patch index 054a602..f903438 100644 --- a/debian/patches/0005-Update-build-system.patch +++ b/debian/patches/0005-Update-build-system.patch @@ -13380,5 +13380,5 @@ index 416848d..188bc18 100755 { (exit 0); exit 0; } _ACEOF -- -1.5.3.6.2033.g1437 +1.5.3.6.2040.g15e6 diff --git a/debian/patches/0006-Disable-services-from-inetd.conf-if-a-service-with-t.patch b/debian/patches/0006-Disable-services-from-inetd.conf-if-a-service-with-t.patch new file mode 100644 index 0000000..8602a88 --- /dev/null +++ b/debian/patches/0006-Disable-services-from-inetd.conf-if-a-service-with-t.patch @@ -0,0 +1,84 @@ +From d588b6530e1382a624898b3f4307f636c72c80a9 Mon Sep 17 00:00:00 2001 +From: Pierre Habouzit +Date: Wed, 28 Nov 2007 10:13:08 +0100 +Subject: [PATCH] Disable services from inetd.conf if a service with the same id exists. + + This way, if a service is enabled in /etc/xinetd* _and_ in +/etc/inetd.conf, the one (even if disabled) from /etc/xinetd* takes +precedence. + +Signed-off-by: Pierre Habouzit +--- + xinetd/inet.c | 22 +++++++++++++++++++--- + 1 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/xinetd/inet.c b/xinetd/inet.c +index 1cb2ba2..8caab45 100644 +--- a/xinetd/inet.c ++++ b/xinetd/inet.c +@@ -23,6 +23,8 @@ + #include "parsesup.h" + #include "nvlists.h" + ++static psi_h iter ; ++ + static int get_next_inet_entry( int fd, pset_h sconfs, + struct service_config *defaults); + +@@ -32,12 +34,15 @@ void parse_inet_conf_file( int fd, struct configuration *confp ) + struct service_config *default_config = CNF_DEFAULTS( confp ); + + line_count = 0; ++ iter = psi_create (sconfs); + + for( ;; ) + { + if (get_next_inet_entry(fd, sconfs, default_config) == -2) + break; + } ++ ++ psi_destroy(iter); + } + + static int get_next_inet_entry( int fd, pset_h sconfs, +@@ -46,7 +51,7 @@ static int get_next_inet_entry( int fd, pset_h sconfs, + char *p; + str_h strp; + char *line = next_line(fd); +- struct service_config *scp; ++ struct service_config *scp, *tmp; + unsigned u, i; + const char *func = "get_next_inet_entry"; + char *name = NULL, *rpcvers = NULL, *rpcproto = NULL; +@@ -405,7 +410,16 @@ static int get_next_inet_entry( int fd, pset_h sconfs, + SC_SPECIFY( scp, A_SOCKET_TYPE ); + SC_SPECIFY( scp, A_WAIT ); + +- if( ! pset_add(sconfs, scp) ) ++ for ( tmp = SCP( psi_start( iter ) ) ; tmp ; tmp = SCP( psi_next(iter)) ){ ++ if (EQ(SC_ID(scp), SC_ID(tmp))) { ++ parsemsg(LOG_DEBUG, func, "removing duplicate service %s", SC_NAME(scp)); ++ sc_free(scp); ++ scp = NULL; ++ break; ++ } ++ } ++ ++ if( scp && ! pset_add(sconfs, scp) ) + { + out_of_memory( func ); + pset_destroy(args); +@@ -414,7 +428,9 @@ static int get_next_inet_entry( int fd, pset_h sconfs, + } + + pset_destroy(args); +- parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); ++ if (scp) { ++ parsemsg( LOG_DEBUG, func, "added service %s", SC_NAME(scp)); ++ } + return 0; + } + +-- +1.5.3.6.2040.g15e6 + -- 2.20.1