severity 415954 serious
quit

On Sat, Mar 24, 2007 at 01:10:08AM +0100, José Luis Tallón wrote:
> Peter Eisentraut wrote:
> > Package: imapproxy
> > Version: 1.2.4-10
> > Severity: serious

> This doesn't break unrelated software.

No, it breaks the package itself.

> > This happened during an upgrade just now:

> > Starting IMAP proxy: /etc/init.d/imapproxy: line 56: [: too many arguments
> > Failed to start imapproxy. Check logs for details.
> > invoke-rc.d: initscript imapproxy, action "start" failed.

> > The problem is this code:

> >     psline="`ps ax | grep imapproxyd | grep -v grep`"
> >     if [ -n $psline ]; then

> > because psline will contain multiple shell words.

> > After adding quotes, the start action of the script still fails (exist
> > status 1) if the service is already running, which is a violation of
> > required init script behavior.

> This did work some releases ago. Unfortunately, fixes for other problems
> seem to have introduced this bug.

Earlier the code was:

       if [ -n "`ps ax | grep imapproxyd | grep -v grep`" ]; then

This didn't have the bug, and further, was only called on stop.  The new
code is called on start, where it's expected that the ps line *will* return
a non-empty value; so the start script is now pretty badly broken.  I'm not
sure how it passed my tests before I uploaded, really, but I shouldn't have
let the change in anyway because it was a change unrelated to the RC bugfix,
so that's my fault.

Frankly, though, the init script has a *lot* of bad code that's trying to
second-guess start-stop-daemon in ways that it shouldn't.  The right way to
fix this is to kill off all of this extra code, let s-s-d what it's designed
to, and fix imapproxyd to not bail out with an error *after* it's returned
control to the parent process...

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/

Reply via email to