Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 9 Jul 2017 16:04:26 +0200
From: u-uy74@...ey.se
To: musl@...ts.openwall.com
Subject: Re: Question about setting argv[0] when manually using
 dynamic linker

On Sun, Jul 09, 2017 at 08:23:25AM -0400, Rich Felker wrote:
> On Sun, Jul 09, 2017 at 11:23:23AM +0200, u-uy74@...ey.se wrote:
> > What about always passing on the loader argv[0] unless --argv0 is present?
> > This will not matter for programs which do not analyze argv[0]
> > and will not make it worse for programs which do.
> 
> This would be a regression in existing behavior and basically breaks
> any scripts where the program run wants argv[0] to be its own name.

Indeed, this _can_ make it worse for programs run from existing scripts.
This makes my suggestion moot.

> Otherwise I agree it would be a nicer interface. But I don't see any
> reason your invoking program can't just pass the same string it passes
> as argv[0] at exec time also as the argument to --argv0.

Certainly it can, this just happens to be practically inconvenient.

Such a change needs some new config syntax, some coding, testing,
documentation and then modification and testing of a noticeable number of
configuration instances. Sigh. Given that the "existing scripts depending
on the old behaviour" are irrelevant here, it does not feel right. :)

Of course this is not an argument for upstream.

Never mind, we can either bite the bullet and use --argv0 as it is meant
to, or make the "pass-on" change to our copy of the dynloader.

Thanks (for musl and for --argv0) !
Rune

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.