Bug#276419: [Pkg-shadow-devel] Bug#276419: su appends the positional args to the command line

Nicolas François nicolas.francois at centraliens.net
Sun Jul 24 20:21:19 UTC 2005


Hi,

On Fri, Jul 22, 2005 at 11:15:41PM +0200, Martin Quinson wrote:
> I don't feel the need for overkilling mecanism here. I feel that Helmut
> perfectly demonstrated at least twice why this bug has to be fixed. I
> believe that the patches to packages relying on the old broken behaviour are
> both quite rare (debian only) and quite simple to fix.

Yes, both rare and in debian only scripts.
The biggest issue is to detect them (currently pbuilder and dchroot, maybe
another *chroot).


> I'd say that we need to summarize the rationnal and how to adapt packages to
> the new, fixed behaviour on, say, 100 lines, post it to
> debian-devel-announce under the title "su behaviour transition" or so, wait
> 2 weeks, and upload a fixed version.
> 
> If you guys(*) agree, I'll try to do the summary and send it myself. I'm
> still in vacations, but I'm really a geek, I'm affraid.

I do agree.


Here are some ideas:
(The "patch" here is the one that stop the concatenation of the arguments,
and also stop adding a -c)

It makes Debian's su more compatible with BSD, SUN, Gentoo, Redhat's ones.
(slackware or suze behave like Debian; shell-utils' su should be checked)
Some may argue that Debian's su also support some options others don't (so
the compatibility won't be complete anyway). Also FreeBSD su has a
completly different -c option.

The developer better knows how to quote than su (when we are concatenating
the arguments, we can mess the quotes).

Removing the -c when additional arguments are provided permits to add
options to the shell.

It makes the program compatible with its documentation (well, with the
patch revertion, the documentation has been changed to reflect the program
behavior).

-- 
Nekral, back to Lapland, and fighting with mosquitos




More information about the Pkg-shadow-devel mailing list