[buildd-tools-devel] Bug#545706: Bug#545706: Bug#545706: 'schroot' exits with code 0 on 'permission denied' failures
Roger Leigh
rleigh at codelibre.net
Fri Sep 11 14:47:34 UTC 2009
tags 545706 + fixed-upstream
thanks
On Thu, Sep 10, 2009 at 05:33:31PM +0100, Roger Leigh wrote:
> On Tue, Sep 08, 2009 at 11:20:08AM -0400, Nelson Elhage wrote:
> > Running schroot commands on a chroot that the current user does not
> > have permission to access results in schroot failing, but exiting with
> > a code of 0. This is annoying, as it means that scripts that use
> > schroot with a user-provided chroot name cannot easily determine
> > whether operations succeeded.
>
> It should definitely be exiting with a nonzero exit status in
> this case. I'll verify that it is indeed returning zero, and
> make sure it returns a nonzero status.
Confirmed. This is because we return the child exit status, and
this was defaulting to zero, so if authentication failed and we
didn't run any program, a zero status was still returned. We
now default to EXIT_FAILURE to ensure error in all circumstances
except for when the program returns zero.
Fixed on the master and schroot-1.2 branches. schroot 1.3.0 should
enter experimental shortly, and then 1.3.1 should go into unstable.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
More information about the Buildd-tools-devel
mailing list