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

Failing postinst script with suidmanager



You need to tell us which statement fails. All statements you tried work
successfully just the script returns an error code?

Are you sure you run the postinst script in superuser mode with the
correct paths set?

On Sat, 10 May 1997, Karl M. Hegbloom wrote:

>
> This may be a `debmake` bug.
>
>>>>>> "Christoph" == Christoph Lameter <clameter@power.net> writes:
>
>    Christoph> So the suidregister script return 1 if those lines are
>    Christoph> not yet in /etc/suid.conf?
>
>(please see the bug archive, #'s 9435 & 9583.  The buglists should be
>glimpseable... there are probably related bugs???)
>
> No, the `suidregister` script works fine from the commandline.  I can
>paste the `suidregister` commandline out of a *.posinst script, into an
>xterm, run it, and it registers the file in "/etc/suid.conf", and sets
>the permissions.  (I checked them to be sure.)  It returns success,
>and functions as designed.
>
>    Christoph> Can you check why the suidregister script returns 1 on
>    Christoph> your system?
>
> It doesn't.  The *.postinst does.  !!!It is the `set -e` in the postinst
>scripts that is causing this to happen!!!  I just tested, with
>"rlpr.postinst".  It failed when I ran it, I commented out the `set
>-e` at the top of it, and ran it again.  That time it succeeded, the
>files got registered in "/etc/suid.conf", and the permissions are set
>correctly.
>
>  This is with the `set -e` commented out:
>8<----------------------------------------------------------------->8
># chown karlheg /usr/bin/rlpr 
>/etc 
># ls -l /usr/bin/rlpr 
>-rwxr-xr-x   1 karlheg  root        16140 Jan 16 21:52 /usr/bin/rlpr 
>/etc 
># /var/lib/dpkg/info/rlpr.postinst 
>/etc 
># ls -l /usr/bin/rlpr 
>-rwsr-xr-x   1 root     root        16140 Jan 16 21:52 /usr/bin/rlpr 
>/etc 
>#
>8<----------------------------------------------------------------->8
>
>  And again with it NOT commented out:
>8<----------------------------------------------------------------->8
># chown karlheg /usr/bin/rlpr 
>/etc 
># ls -l /usr/bin/rlpr 
>-rwxr-xr-x   1 karlheg  root        16140 Jan 16 21:52 /usr/bin/rlpr 
>/etc 
># /var/lib/dpkg/info/rlpr.postinst 
>[status 1] 
>/etc 
># ls -l /usr/bin/rlpr 
>-rwsr-xr-x   1 root     root        16140 Jan 16 21:52 /usr/bin/rlpr 
>/etc
>8<----------------------------------------------------------------->8
>
>.... you can see that it is resetting the ownership and permissions,
>but the script is returning an error status.  I am using Bash-2.0.
>
>  Here is a copy of "/var/lib/dpkg/info/rlpr.postinst":
>8<----------------------------------------------------------------->8
>#!/bin/sh
>############## set -e # commenting this makes it work.
># Permission processing inserted by debmake on Fri, 17 Jan 1997 14:52:40 +0900
>if [ -e /etc/suid.conf ]; then
>	suidregister -s rlpr /usr/bin/rlpr root root 4755
>else
>	chown root.root /usr/bin/rlpr
>	chmod 4755 /usr/bin/rlpr
>fi
># Permission processing inserted by debmake on Fri, 17 Jan 1997 14:52:40 +0900
>if [ -e /etc/suid.conf ]; then
>	suidregister -s rlpr /usr/bin/rlprd root root 4755
>else
>	chown root.root /usr/bin/rlprd
>	chmod 4755 /usr/bin/rlprd
>fi
>8<----------------------------------------------------------------->8
>
>    Christoph> The last thing done in the script is a chmod on the
>    Christoph> indicated file. Maybe it fails for some reason.
>
> No, it succeeds.

--- +++ --- +++ --- +++ --- +++ --- +++ --- +++ --- +++ ---


--
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: