[Pkg-shadow-devel] Shall Debian's su conform to other implementations

Nicolas François nicolas.francois at centraliens.net
Wed Nov 2 22:20:27 UTC 2005


Hi,

I intend to send this mail to debian-devel (with #276419 in CC) to get
some advices on the "pet bug".
My opinion is not clear on this subject, so I preferred to ask for advices
rather than preparing a transition (but we can change the last paragraphe)



In #276419, the bug submitter complained that when a command and some
arguments were passed to su, all these arguments were concatenated, and
provided to the shell -c option.

This behavior differs from su on other systems [0].
This also forbid to pass arguments to the shell [1].

As these behaviors where not documented in the man page, in the code or in
the changelog, we uploded 4.0.3-36 to fix this bug.

Unfortunately, this broke pbuilder (see #317264), and other Debian
packages (schroot, and dchroot IIRC). So this patch was (at least
temporarily) removed, and the current behavior documented.


We would now like to get rid of this bug. What do you recommend:
 * keep a Debian specific implementation and tag this bug wontfix
 * reapply the patch to fix this bug, and report bugs on the packages that
   uses this "feature"



[0] On other systems su's -c arguments must be quoted:
        su - -c "ls -l /tmp"
    and:
        su -- - "$LOGNAME" ls -l /tmp
    probably only works on Debian.

[1] For example:
        su -- - "$LOGNAME" -x
    Could exec("/bin/sh", ["-x"])

Kind Regards,
-- 
Nekral



More information about the Pkg-shadow-devel mailing list