[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#9582: suidmanager 0.6 uploaded to master.debian.org

>>>>> "Christoph" == Christoph Lameter <clameter@power.net> writes:

    Christoph> To my knowledge set -e

    Christoph> is only valid for the currently executing scripts and
    Christoph> not a subshell.

 Try it and see.

 It is why `suidregister` is not working when called from postinst
scripts.  The grep in `suidregister`[1] fails, returning code 1 when
it cannot find the regex in the "/etc/suid.conf" file, and since '-o
errexit' (aka 'set -e') is on, the `suidregister` script exits.

 I think that this is counterintuitive, and that '-o errexit' should
have file-local (and even function-local) scope.  It seems like a bug
in BASH to me.

 `suidregister` works fine from a commandline, since '-o errexit' is
not set then.[2]  After it's been run once, and the entry that gets
`grep`ped for has been written to "/etc/suid.conf", it works fine from 
inside a postinst too, since then the `grep` doesn't return code 1, as 
it has something to find this time.

[1]  In the line that reads "X=..."

[2]  Or the shell will exit on any error return; I tried it.

Karl M. Hegbloom <karlheg@inetarena.com>
Portland, OR  USA
Debian GNU 1.2  Linux 2.1.36 AMD K5 PR-133

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . Trouble? 
e-mail to templin@bucknell.edu .

Reply to: