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

Shall Debian's su conform to other implementations


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 (e.g. dchroot). 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"
        su -- - "$LOGNAME" ls -l /tmp
    probably only works on Debian.

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

Kind Regards,

Reply to: