01101d
Summary: A secure replacement for inetd
01101d
Name: xinetd
01101d
Version: 2.3.15
9583a8
Release: 14%{?dist}
01101d
License: xinetd
01101d
Group: System Environment/Daemons
01101d
Epoch: 2
01101d
URL: http://www.xinetd.org
01101d
Source: http://www.xinetd.org/xinetd-%{version}.tar.gz
01101d
Source1: xinetd.service
01101d
Source3: xinetd.sysconf
01101d
Patch0: xinetd-2.3.15-pie.patch
01101d
Patch4: xinetd-2.3.14-bind-ipv6.patch
01101d
Patch6: xinetd-2.3.14-man-section.patch
01101d
Patch7: xinetd-2.3.15-PIE.patch
01101d
Patch8: xinetd-2.3.14-ident-bind.patch
01101d
Patch9: xinetd-2.3.14-readable-debuginfo.patch
01101d
# Patch for clean reconfiguration using newer versions of autotools
01101d
Patch10: xinetd-2.3.14-autoconf.patch
01101d
# Completely rewritten socket handling code (it uses poll() instead
01101d
# of select() function)
01101d
Patch11: xinetd-2.3.14-poll.patch
01101d
# New configuration option (limit for files opened by child process)
01101d
Patch12: xinetd-2.3.14-file-limit.patch
01101d
# When using tcpmux, xinetd ended up with sigsegv
01101d
# (detection of NULL pointer in pollfd structure was missing)
01101d
Patch13: xinetd-2.3.14-tcpmux.patch
01101d
# When service is destroyed, destroy also its
01101d
# file descriptor in array given to poll function
01101d
Patch14: xinetd-2.3.14-clean-pfd.patch
01101d
# xinetd confuses ipv6 and ipv4 port parsing
01101d
# - furtunately, they have the same format, so everything
01101d
#   works even without this patch
01101d
Patch15: xinetd-2.3.14-ipv6confusion.patch
01101d
# This fixes bug #593904 - online reconfiguration caused log message
01101d
# flood when turning off UDP service
01101d
Patch16: xinetd-2.3.14-udp-reconfig.patch
01101d
Patch18: xinetd-2.3.14-rpc-specific-port.patch
01101d
Patch19: xinetd-2.3.14-signal-log-hang.patch
01101d
Patch20: xinetd-2.3.14-fix-type-punned-ptr.patch
01101d
# Fix leaking file descriptors and pfd_array wasting
01101d
# This fixes #702670
01101d
Patch21: xinetd-2.3.14-leaking-fds.patch
01101d
# Fix memory corruption when loading a large number of services
01101d
# This fixes #720390
01101d
Patch22: xinetd-2.3.14-many-services.patch
01101d
# Remove realloc of fds that was causing memory corruption
01101d
Patch23: xinetd-2.3.14-realloc-remove.patch
01101d
# Fix leaking descriptor when starting a service fails
01101d
Patch24: xinetd-2.3.14-leaking-fds-2a.patch
01101d
# Fix #770858 - Instances limit in xinetd can be easily bypassed
01101d
Patch25: xinetd-2.3.14-instances.patch
01101d
# Fix #809272 - Service disabled due to bind failure
01101d
Patch26: xinetd-2.3.14-retry-svc-activate-in-cps-restart.patch
01101d
Patch27: xinetd-2.3.15-bad-port-check.patch
01101d
# Fix #977873 - Use full path to server when checking selinux context
01101d
Patch28: xinetd-2.3.15-context-exepath.patch
01101d
# Fix #1006100 - xinetd: ignores user and group directives for tcpmux services
01101d
Patch29: xinetd-2.3.15-creds.patch
ab0df7
# Fix #1037565 - xinetd segfaults when connecting to tcpmux service
ab0df7
Patch30: xinetd-2.3.15-tcpmux-nameinargs-disable-service.patch
536876
# Fix #1147538 - modify the xinetd man page to make it more clear on what happens to services on xinetd reload
536876
Patch31: xinetd-2.3.15-man-reload.patch
9583a8
Patch32: xinetd-2.3.15-udp-wait.patch
01101d
01101d
BuildRequires: autoconf, automake
01101d
BuildRequires: libselinux-devel >= 1.30
01101d
BuildRequires: systemd-units
01101d
Requires(post): systemd-sysv
01101d
Requires(post): systemd-units
01101d
Requires(preun): systemd-units
01101d
Requires(postun): systemd-units
01101d
%{!?tcp_wrappers:BuildRequires: tcp_wrappers-devel}
01101d
Requires: filesystem >= 2.0.1, initscripts, setup, fileutils
01101d
Provides: inetd
01101d
01101d
01101d
%description
01101d
Xinetd is a secure replacement for inetd, the Internet services
01101d
daemon. Xinetd provides access control for all services based on the
01101d
address of the remote host and/or on time of access and can prevent
01101d
denial-of-access attacks. Xinetd provides extensive logging, has no
01101d
limit on the number of server arguments, and lets you bind specific
01101d
services to specific IP addresses on your host machine. Each service
01101d
has its own specific configuration file for Xinetd; the files are
01101d
located in the /etc/xinetd.d directory.
01101d
01101d
%prep
01101d
%setup -q
01101d
01101d
# SPARC/SPARC64 needs -fPIE/-PIE
01101d
# This really should be detected by configure.
01101d
%ifarch sparcv9 sparc64
01101d
%patch7 -p1 -b .PIE
01101d
%else
01101d
%patch0 -p1 -b .pie
01101d
%endif
01101d
%patch4 -p1 -b .bind
01101d
%patch6 -p1 -b .man-section
01101d
%patch8 -p1 -b .ident-bind
01101d
%patch9 -p1 -b .readable-debuginfo
01101d
%patch10 -p1 -b .autoconf
01101d
%patch11 -p1 -b .poll
01101d
%patch12 -p1 -b .file-limit
01101d
%patch13 -p1 -b .tcpmux
01101d
%patch14 -p1 -b .clean-pfd
01101d
%patch15 -p1 -b .ipv6confusion
01101d
%patch16 -p1 -b .udp-reconfig
01101d
%patch18 -p1 -b .rpc-specific-port
01101d
%patch19 -p1 -b .signal-log-hang
01101d
%patch20 -p1 -b .fix-type-punned-ptr
01101d
%patch21 -p1 -b .leaking-fds
01101d
%patch22 -p1 -b .many-services
01101d
%patch23 -p1 -b .realloc-remove
01101d
%patch24 -p1 -b .leaking-fds-2a
01101d
%patch25 -p1 -b .instances
01101d
%patch26 -p1 -b .retry-svc-activate
01101d
%patch27 -p1 -b .bad-port-check
01101d
%patch28 -p1 -b .context-exepath
01101d
%patch29 -p1 -b .creds
ab0df7
%patch30 -p1
536876
%patch31 -p1
9583a8
%patch32 -p1
01101d
01101d
aclocal
01101d
autoconf
01101d
01101d
%build
01101d
# -pie -PIE flags added by separate patches
01101d
export LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
01101d
%configure --with-loadavg --with-inet6 %{!?tcp_wrappers:--with-libwrap} --with-labeled-networking
01101d
make
01101d
01101d
%install
01101d
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
01101d
mkdir -m 700 -p $RPM_BUILD_ROOT/etc/xinetd.d/
01101d
# Remove unneeded service
01101d
rm -f contrib/xinetd.d/ftp-sensor
01101d
%make_install DAEMONDIR=$RPM_BUILD_ROOT/usr/sbin MANDIR=$RPM_BUILD_ROOT/%{_mandir}
01101d
install -m 600 contrib/xinetd.conf $RPM_BUILD_ROOT/etc
01101d
install -m 600 contrib/xinetd.d/* $RPM_BUILD_ROOT/etc/xinetd.d
01101d
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
01101d
01101d
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/itox*
01101d
rm -f $RPM_BUILD_ROOT/usr/sbin/itox
01101d
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/xconv.pl*
01101d
rm -f $RPM_BUILD_ROOT/usr/sbin/xconv.pl
01101d
01101d
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
01101d
install -m 600 %SOURCE3 $RPM_BUILD_ROOT/etc/sysconfig/xinetd
01101d
01101d
%post
01101d
%systemd_post xinetd.service
01101d
01101d
%preun
01101d
%systemd_preun xinetd.service
01101d
01101d
%postun
01101d
%systemd_postun_with_restart xinetd.service
01101d
01101d
%files
01101d
%doc CHANGELOG COPYRIGHT README xinetd/sample.conf contrib/empty.conf
01101d
%config(noreplace) /etc/xinetd.conf
01101d
%config(noreplace) /etc/sysconfig/xinetd
01101d
%{_unitdir}/xinetd.service
01101d
%config(noreplace) /etc/xinetd.d/*
01101d
/usr/sbin/xinetd
01101d
%{_mandir}/*/*
01101d
01101d
%changelog
9583a8
* Wed Jul 31 2019 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-14
9583a8
- fix xinetd infinite busy loop when datagram service has wait=yes (#1567227)
9583a8
536876
* Thu Mar  3 2016 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-13
536876
- modify the xinetd man page to make it more clear on what happens to services on xinetd reload (#1147538)
536876
ab0df7
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2:2.3.15-12
ab0df7
- Mass rebuild 2014-01-24
ab0df7
ab0df7
* Mon Jan  6 2014 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-11
ab0df7
- fixup of the previous patch
ab0df7
- Related:  #1037565
ab0df7
- Resolves: #1042357
ab0df7
ab0df7
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2:2.3.15-10
ab0df7
- Mass rebuild 2013-12-27
ab0df7
ab0df7
* Tue Dec  3 2013 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-9
ab0df7
- xinetd segfaults when connecting to tcpmux service
ab0df7
- Resolves: #1037565
ab0df7
01101d
* Tue Sep 24 2013 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-8
01101d
- Honor user and group directives (re-fix the previous commit)
01101d
- Resolves: CVE-2013-4342
01101d
01101d
* Wed Sep 11 2013 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-7
01101d
- Set credentials before execve
01101d
- Resolves: #1006100
01101d
01101d
* Wed Jun 26 2013 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-6
01101d
- Use full path to server when checking selinux context
01101d
- Resolves: #977873
01101d
01101d
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.3.15-5
01101d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
01101d
01101d
* Mon Sep 03 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-4
01101d
- Change config files' permissions
01101d
- Resolves: #853144
01101d
01101d
* Wed Aug 22 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-3
01101d
- Replace the makeinstall macro
01101d
- Add systemd-rpm macros
01101d
- Resolves: #850370
01101d
01101d
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.3.15-2
01101d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
01101d
01101d
* Mon May 14 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.15-1
01101d
- Update to 2.3.15
01101d
- Drop patches merged by upstream
01101d
  (-log-crash, -tcp_rpc, -label, -contextconf, -ssize_t)
01101d
- Update -pie, -PIE, -poll patch
01101d
- Resolves: #820927
01101d
- Add -bad-port-check patch
01101d
01101d
* Fri Apr 13 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-46
01101d
- Fix: service file: avoid problems when name resolution is not ready
01101d
- Resolves: #748931
01101d
01101d
* Fri Apr 13 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-45
01101d
- Fix: Service disabled due to bind failure
01101d
- Update patch: xinetd-2.3.14-leaking-fds-2.patch
01101d
- Resolves: #809272
01101d
01101d
* Mon Mar 05 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-44
01101d
- Fix: Instances limit in xinetd can be easily bypassed
01101d
- Resolves: #770858
01101d
01101d
* Mon Mar 05 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-43
01101d
- Fix xinetd.service permissions
01101d
- Remove useless INSTALL from package documentation
01101d
- Implement reload in xinetd.service
01101d
01101d
* Fri Mar 02 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-42
01101d
- Fix leaking descriptor when starting a service fails (#795188)
01101d
01101d
* Wed Jan 18 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-41
01101d
- Remove realloc inside svc_activate that was causing memory corruption
01101d
- Number of alloc'd file descriptors is now determined by system limits (ulimit -n)
01101d
- Add patch -realloc-remove
01101d
01101d
* Tue Jan 17 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-40
01101d
- Fix memory corruption when loading a large number of services
01101d
- Resolves #720390
01101d
01101d
* Mon Jan 16 2012 Jan Synáček <jsynacek@redhat.com> - 2:2.3.14-39
01101d
- Fix leaking file descriptors
01101d
- Resolves: #702670
01101d
01101d
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.3.14-38
01101d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
01101d
01101d
* Mon Sep 12 2011 Tom Callaway <spot@fedoraproject.org> - 2:2.3.14-37
01101d
- covert to systemd
01101d
01101d
* Thu Apr 21 2011 Vojtech Vitek (V-Teq) <vvitek@redhat.com> - 2:2.3.14-36
01101d
- Fix build warning about "dereferencing type-punned pointer"
01101d
  Related: #695674
01101d
- Avoid possible hang while logging an unexpected signal
01101d
  Related: #501604
01101d
- Let RPC services bind to a specific port
01101d
  Related: #624800
01101d
01101d
* Fri Feb 18 2011 Vojtech Vitek (V-Teq) <vvitek@redhat.com> - 2:2.3.14-35
01101d
- fix crash when application's logfile hit size limit
01101d
  Related: #244063
01101d
01101d
* Mon Feb 14 2011 Vojtech Vitek (V-Teq) <vvitek@redhat.com> - 2:2.3.14-34
01101d
- Add -Wl,-z,relro,-z,now to LDFLAGS
01101d
01101d
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.3.14-33
01101d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
01101d
01101d
* Wed Jun 02 2010 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-32
01101d
- fixed log message flooding when turning off UDP service during online
01101d
  reconfiguration (#593904)
01101d
01101d
* Fri Mar 19 2010 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-31
01101d
- corrected port parsing code (IPv4 and IPv6 were switched)
01101d
- commented patches I'm familiar with in spec file
01101d
01101d
* Fri Mar 19 2010 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-30
01101d
- fixed flooding log with error messages when disabled service at runtime
01101d
- updated release number to 30 to prevent rpm from detecting this as downgrade
01101d
01101d
* Thu Jan 21 2010 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-28
01101d
- fixed issue with tcpmux service (#543968)
01101d
01101d
* Tue Oct 20 2009 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-27
01101d
- last update of init script modified to work with SELinux correctly
01101d
- added support for new configuration option - file limit for service
01101d
01101d
* Mon Oct 12 2009 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-26
01101d
- updated init script (LSB compliance - #528154)
01101d
01101d
* Thu Sep 17 2009 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-25
01101d
- correction of last patch replacing select() with poll()
01101d
01101d
* Mon Sep 14 2009 Jan Zeleny <jzeleny@redhat.com> - 2:2.3.14-24
01101d
- select() function and it's supporting macros replaced by poll() and it's supporting macros
01101d
- added patch of configure.in for clean compilation
01101d
01101d
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.3.14-23
01101d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
01101d
01101d
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.3.14-22
01101d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
01101d
01101d
* Thu Sep 18 2008 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-21
01101d
- fix glitches found during package review (#226560)
01101d
- make all files in .debuginfo package readable by everyone
01101d
01101d
* Wed Jul 16 2008 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-20
01101d
- fix wrong bind() call (#448069)
01101d
01101d
* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2:2.3.14-19
01101d
- fix sparc fPIE issues
01101d
01101d
* Thu Jan 31 2008 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-18
01101d
- fixed LABEL flag (#430929)
01101d
01101d
* Wed Jan 30 2008 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-17
01101d
- fixing init scripts (#430816)
01101d
01101d
* Mon Jan 28 2008 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-16
01101d
- xinetd.log man page is in the right section now (#428812)
01101d
01101d
* Thu Sep  6 2007 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-15
01101d
- initscript made LSB compliant (#247099)
01101d
01101d
* Thu Sep  6 2007 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-14
01101d
- removed inetdconvert script, nobody is using inetd
01101d
01101d
* Wed Aug 22 2007 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-13
01101d
- updated license field
01101d
01101d
* Wed May 16 2007 Jan Safranek <jsafranek@redhat.com> - 2:2.3.14-12
01101d
- bind IPv6 socket by default and switch to IPv4 on error
01101d
  (bz#195265)
01101d
- service xinetd status returns actual status (bz#232887)
01101d
- use ssize_t instead of int (bz#211776)
01101d
01101d
* Mon Dec  4 2006 Thomas Woerner <twoerner@redhat.com> - 2:2.3.14-11
01101d
- tcp_wrappers has a new devel and libs sub package, therefore changing build
01101d
  requirement for tcp_wrappers to tcp_wrappers-devel
01101d
01101d
* Fri Dec 01 2006 James Antill <james.antill@redhat.com> - 2:2.3.14-9
01101d
- Fix getpeercon() for LABELED networking MLS environments
01101d
- Resolves: rhbz#209379
01101d
01101d
* Sun Oct 01 2006 Jesse Keating <jkeating@redhat.com> - 2:2.3.14-8
01101d
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
01101d
01101d
* Wed Sep 20 2006 Steve Grubb <sgrubb@redhat.com> 2:2.3.14-7
01101d
- Revised labeled networking patch to not allow redirection
01101d
01101d
* Tue Aug 29 2006 Steve Grubb <sgrubb@redhat.com> 2:2.3.14-6
01101d
- Revised labeled networking patch again
01101d
01101d
* Thu Aug 24 2006 Steve Grubb <sgrubb@redhat.com> 2:2.3.14-5
01101d
- Revised labeled networking patch
01101d
01101d
* Wed Aug 23 2006 Steve Grubb <sgrubb@redhat.com> 2:2.3.14-4
01101d
- Added labeled networking patch
01101d
01101d
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2:2.3.14-3.1
01101d
- rebuild
01101d
01101d
* Fri Jun 16 2006 Steve Grubb <sgrubb@redhat.com> 2:2.3.14-3
01101d
- Rework spec file & use xinetd's sevice config files
01101d
01101d
* Fri Mar 24 2006 Jay Fenlason <fenlason@redhat.com> 2:2.3.14-2
01101d
- Upgrade to new upstream version.  This obsoletes the -libwrap,
01101d
  -rpc, -banner, -bug140084 and -gcc4 patches.
01101d
01101d
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2:2.3.13-6.2.1
01101d
- bump again for double-long bug on ppc(64)
01101d
01101d
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2:2.3.13-6.2
01101d
- rebuilt for new gcc4.1 snapshot and glibc changes
01101d
01101d
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
01101d
- rebuilt
01101d
01101d
* Thu Feb 17 2005 Jay Fenlason <fenlason@redhat.com> 2:2.3.13-6
01101d
- include new patch to allow gcc4 to compile xinetd.
01101d
01101d
* Sat Jan 8 2005 Jay Fenlason <fenlason@redhat.com> 2:2.3.13-4
01101d
- Added patch committed to upstream CVS to fix bz#140084
01101d
  (error logging accidentally using one of [012] as the syslog
01101d
  descriptor)
01101d
01101d
* Fri Jun 18 2004 Jay Fenlason <fenlason@redhat.com> 2:2.3.13-3
01101d
- Add patch to fix #126242: banner's don't work
01101d
01101d
* Thu Jun 17 2004 Jay Fenlason <fenlason@redhat.com>
01101d
- Remove the configuration for the no-longer-present "services" service.
01101d
  Closes #126169
01101d
01101d
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
01101d
- rebuilt
01101d
01101d
* Fri May 14 2004 Jay Fenlason <fenlason@redhat.com>
01101d
- Add patch to allow multiple rpc services to cooexist as long as they're
01101d
  different program numbers or different versions.
01101d
01101d
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
01101d
- rebuilt
01101d
01101d
* Thu Jan 29 2004 Jay Fenlason <fenlason@redhat.com> 2.3.13-1
01101d
- Upgrade to new upstream version, which obsoletes most patches.
01101d
- Add new tcp_rpc patch, to turn on the nolibwrap flag on tcp rpc services,
01101d
  since libwrap cannot be used on them.
01101d
01101d
* Sun Dec 28 2003 Florian La Roche <Florian.LaRoche@redhat.de>
01101d
- use new technology to filter python dep for inetdconvert instead
01101d
  of changing the -x bit on file permissions
01101d