[Bug 648202] Re: vsftpd started even if not in standalone mode

Andres Rodriguez andreserl at ubuntu-pe.org
Mon Feb 28 16:24:47 UTC 2011


** Description changed:

  Binary package hint: vsftpd
  
  (lucid vsftpd 2.2.2-3ubuntu6)
  
  because of a syntax error in /etc/init/vsftpd.con, vsftd is started (and
  respawns a lot as it fails to start) if there's no "listen=yes" in
  /etc/vsftpd.conf
  
  /etc/init/vsftpd.conf has:
  
-                 if [ -e  "${CONFFILE}" ] && !egrep -iq "^
+                 if [ -e  "${CONFFILE}" ] && !egrep -iq "^
  *listen(_ipv6)? *= *yes" "${CONFFILE}"
  
  without space between ! and egrep. As a result !egrep returns with an
  error ("!egrep" command not found) and as a result, the script assumes
  the "listen = yes" line is in the file.
  
  Moreover, if the /etc/vsftpd.conf file is not there, vsftpd is also
  started which I suspect was not intended.
  
  Moreover egrep is not a POSIX command.
  
  Would be better written as:
  
  if ! grep -qEis --
  '^[[:blank:]]*listen(_ipv6)?[[:blank:]]*=[[:blank:]]*yes' "$CONFFILE";
  then...
+ 
+ =======
+ SRU Justification
+ 
+ IMPACT: See above description to see the its impact.
+ 
+ REPRODUCE:
+ 
+  1. First edit the configure (/etc/vsftpd.conf) and comment the line "listen=yes". 
+  2. Then start vsftpd: sudo service vsftpd start
+  3. Upstart will report that the service has been started (start/running), when it should have failed to start because the upstart job does the configuration check (stop/pre-start).
+ 
+ HOW FIXED: Add a blank space between ! and egrep as specified above.
+ Also, instead of using 'exit 0' use stop within the upstart job.
+ 
+ PATCH: Attached. Uploaded to lucid-proposed for review there.
+ 
+ REGRESSION POTENTIAL: Minimal. I've tested this throughly and works as
+ expected. (See C-de Avillez comment #2 on how this is supposed to work.
+ 
+ =======

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.
https://bugs.launchpad.net/bugs/648202

Title:
  vsftpd started even if not in standalone mode

Status in “vsftpd” package in Ubuntu:
  Fix Released
Status in “vsftpd” source package in Lucid:
  In Progress
Status in “vsftpd” source package in Maverick:
  Confirmed

Bug description:
  Binary package hint: vsftpd

  (lucid vsftpd 2.2.2-3ubuntu6)

  because of a syntax error in /etc/init/vsftpd.con, vsftd is started
  (and respawns a lot as it fails to start) if there's no "listen=yes"
  in /etc/vsftpd.conf

  /etc/init/vsftpd.conf has:

                  if [ -e  "${CONFFILE}" ] && !egrep -iq "^
  *listen(_ipv6)? *= *yes" "${CONFFILE}"

  without space between ! and egrep. As a result !egrep returns with an
  error ("!egrep" command not found) and as a result, the script assumes
  the "listen = yes" line is in the file.

  Moreover, if the /etc/vsftpd.conf file is not there, vsftpd is also
  started which I suspect was not intended.

  Moreover egrep is not a POSIX command.

  Would be better written as:

  if ! grep -qEis --
  '^[[:blank:]]*listen(_ipv6)?[[:blank:]]*=[[:blank:]]*yes' "$CONFFILE";
  then...

  =======
  SRU Justification

  IMPACT: See above description to see the its impact.

  REPRODUCE:

   1. First edit the configure (/etc/vsftpd.conf) and comment the line "listen=yes". 
   2. Then start vsftpd: sudo service vsftpd start
   3. Upstart will report that the service has been started (start/running), when it should have failed to start because the upstart job does the configuration check (stop/pre-start).

  HOW FIXED: Add a blank space between ! and egrep as specified above.
  Also, instead of using 'exit 0' use stop within the upstart job.

  PATCH: Attached. Uploaded to lucid-proposed for review there.

  REGRESSION POTENTIAL: Minimal. I've tested this throughly and works as
  expected. (See C-de Avillez comment #2 on how this is supposed to
  work.

  =======




More information about the Ubuntu-sponsors mailing list