Package: proftpd-basic
Version: 1.3.2b-2
Severity: normal

The init-script installed with proftpd-basic is not able
to properly detect the use of xinetd as superserver.

In November 2007, xinetd_1:2.3.14-3 stopped using dpkg-divert
when replacing the netkit-inetd superserver:

  xinetd has an -inetd_compat mode that renders it suitable for being an
  inet-superserver, instead of clumsily divert netkit-inetd.

Nowadays, xinetd silently removes openbsd-inetd, without any use
of dpkg-divert. Still there is to the present day a test in
/etc/init.d/proftpd that uses dpkg-divert. Since this test always
fails, proftpd-basic is never able to detect the case that the
administrator has chosen a setup where ftp is not set active
(for compatibility) in /etc/inetd.conf, yet ftp is indeed activated
for service by xinetd, either in /etc/xinetd.conf, or in 
/etc/xinetd.d/proftpd, say.

Thus a properly functional init-script must always check
whether the case when proftpd used in inetd-mode, in fact
activates ftp/proftpd in either of these three locations:

     /etc/xinetd.conf
     /etc/xinetd.d/*
     /etc/inetd.conf

Presently, the first two possibilities are conditionally
ignored of the above reasons. The present effect that there
can be a log message saying that proftpd is not active neither
by inetd, nor by xinetd, in case /etc/inetd.conf is not used,
but /etc/xinetd.d/proftpd is. Yet a simple and successful call
"ftp localhost" easily provides the desired contradiction.


The following patch would mend this suboptimal behaviour:


# Description: Remove outdated test using dpkg-divert.
# File: /etc/init.d/proftpd
# Author: Mats Erik Andersson <deb...@gisladisker.se>
--- /etc/init.d/proftpd.orig
+++ /etc/init.d/proftpd
@@ -45,10 +45,9 @@
 #
 if ! egrep -qi "^[[:space:]]*ServerType.*standalone" /etc/proftpd/proftpd.conf
 then
-    if [ $(dpkg-divert --list xinetd|wc -l) -eq 1 ] 
-    then
        if egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" 
/etc/xinetd.conf 2>/dev/null || \
-          egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" 
/etc/xinetd.d/* 2>/dev/null
+          egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" 
/etc/xinetd.d/* 2>/dev/null || \
+          egrep -qi "^ftp.*/usr/sbin/proftpd" /etc/inetd.conf 2>/dev/null
        then
                RUN="no"
                INETD="yes"
@@ -62,22 +61,6 @@
                        INETD="no"
                fi
        fi
-    else
-       if egrep -qi "^ftp.*/usr/sbin/proftpd" /etc/inetd.conf 2>/dev/null
-       then
-               RUN="no"
-               INETD="yes"
-       else
-               if ! egrep -qi "^[[:space:]]*ServerType.*inetd" 
/etc/proftpd/proftpd.conf
-               then
-                       RUN="yes"
-                       INETD="no"
-               else
-                       RUN="no"
-                       INETD="no"
-               fi
-       fi
-    fi
 fi
 
 # /var/run could be on a tmpfs


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=sv_SE, LC_CTYPE=sv_SE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages proftpd-basic depends on:
ii  adduser                   3.111          add and remove users and groups
ii  debconf                   1.5.28         Debian configuration management sy
ii  debianutils               3.2.2          Miscellaneous utilities specific t
ii  libacl1                   2.2.49-1       Access control list shared library
ii  libattr1                  1:2.4.44-1     Extended attribute shared library
ii  libc6                     2.10.2-2       GNU C Library: Shared libraries
ii  libcap2                   1:2.17-2       support for getting/setting POSIX.
ii  libncurses5               5.7+20090803-2 shared libraries for terminal hand
ii  libpam-runtime            1.1.0-4        Runtime support for the PAM librar
ii  libpam0g                  1.1.0-4        Pluggable Authentication Modules l
ii  libssl0.9.8               0.9.8k-7       SSL shared libraries
ii  libwrap0                  7.6.q-18       Wietse Venema's TCP wrappers libra
ii  netbase                   4.37           Basic TCP/IP networking system
ii  sed                       4.2.1-4        The GNU sed stream editor
ii  ucf                       3.0025         Update Configuration File: preserv
ii  xinetd [inet-superserver] 1:2.3.14-7     replacement for inetd with many en

proftpd-basic recommends no packages.

Versions of packages proftpd-basic suggests:
ii  openssl                       0.9.8k-7   Secure Socket Layer (SSL) binary a
pn  proftpd-doc                   <none>     (no description available)
pn  proftpd-mod-ldap              <none>     (no description available)
pn  proftpd-mod-mysql             <none>     (no description available)
pn  proftpd-mod-odbc              <none>     (no description available)
pn  proftpd-mod-pgsql             <none>     (no description available)
pn  proftpd-mod-sqlite            <none>     (no description available)

-- debconf information:
* shared/proftpd/inetd_or_standalone: from inetd



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to