Re: ${HOME} vs. g_get_home_dir ()

2012-09-28 Thread Ivan Shmakov
> Simon McVittie writes: > On 26/09/12 18:15, Ivan Shmakov wrote: > Simon McVittie writes: >>> Please research previous discussion to check that you're not >>> missing arguments that have happened in the past, >> Any particular pointers? > Following the git history points to >

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-28 Thread Ian Jackson
(Resending due to a problem with mail headers.) Josselin Mouette writes ("Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]"): > I expect programs to use my real home, regardless of whatever crap could > have been put in the environment (and there are really too many thin

Re: ${HOME} vs. g_get_home_dir ()

2012-09-28 Thread Simon McVittie
On 27/09/12 22:53, Josselin Mouette wrote: > Le jeudi 27 septembre 2012 à 14:39 -0700, Josh Triplett a écrit : >> "sudo foo" leaves $HOME set to the user's >> home directory rather than root > > This is a bug in sudo. There can be very dangerous things in $HOME It's configurable, because each of

Re: ${HOME} vs. g_get_home_dir ()

2012-09-27 Thread Adam Borowski
On Thu, Sep 27, 2012 at 11:53:36PM +0200, Josselin Mouette wrote: > Le jeudi 27 septembre 2012 à 14:39 -0700, Josh Triplett a écrit : > > Agreed entirely. In particular, it breaks the very common use case of > > running a program with sudo. "sudo foo" leaves $HOME set to the user's > > home dire

Re: ${HOME} vs. g_get_home_dir ()

2012-09-27 Thread Josselin Mouette
Le jeudi 27 septembre 2012 à 14:39 -0700, Josh Triplett a écrit : > Agreed entirely. In particular, it breaks the very common use case of > running a program with sudo. "sudo foo" leaves $HOME set to the user's > home directory rather than root, so that foo will use the same > configuration eith

Re: ${HOME} vs. g_get_home_dir ()

2012-09-27 Thread Josh Triplett
Ivan Shmakov wrote: > I do remember filing a bug or two against packages that refer to > the getent () data to find the user's “home” directory instead > of using the HOME environment variable. > > The environment is the preferred place to check for this kind of >

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-27 Thread Nikolaus Rath
Josselin Mouette writes: > Le mercredi 26 septembre 2012 à 23:17 +0100, Ian Jackson a écrit : >> Josselin Mouette writes ("Re: ${HOME} vs. g_get_home_dir () [and 1 more >> messages]"): >> > Maybe you should try and obtain a CTTE decision to patch that in glib

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-27 Thread Josselin Mouette
Le jeudi 27 septembre 2012 à 10:06 +0200, Bjørn Mork a écrit : > This is not a technical issue at all. It is about breaking user > expectations by breaking conventions. No, this is about breaking YOUR expectations. But what former SunOS 5.6 users expect is not necessarily what other users exp

Re: ${HOME} vs. g_get_home_dir ()

2012-09-27 Thread Bernhard R. Link
* Russ Allbery [120926 21:42]: > > The documentation for g_get_home_dir[1] also documents what a proper > > program can do, it's a simple: > > > const char *homedir = g_getenv ("HOME"); > >if (!homedir) > > homedir = g_get_home_dir (); > > > instead of using get_get_home_dir directly.

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-26 Thread Josselin Mouette
Le mercredi 26 septembre 2012 à 23:17 +0100, Ian Jackson a écrit : > Josselin Mouette writes ("Re: ${HOME} vs. g_get_home_dir () [and 1 more > messages]"): > > Maybe you should try and obtain a CTTE decision to patch that in glib. > > Surely it would be better to

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-26 Thread Wouter Verhelst
On Wed, Sep 26, 2012 at 10:51:39PM +0200, Josselin Mouette wrote: > Le mercredi 26 septembre 2012 à 21:47 +0100, Ian Jackson a écrit : > > Ivan Shmakov writes ("${HOME} vs. g_get_home_dir ()"): > > > I do remember filing a bug or two against packages that refer to &

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-26 Thread Ian Jackson
Josselin Mouette writes ("Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]"): > Maybe you should try and obtain a CTTE decision to patch that in glib. Surely it would be better to try to fully understand the problem, and discuss it politely and constructively with the v

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-26 Thread Josselin Mouette
Le mercredi 26 septembre 2012 à 21:47 +0100, Ian Jackson a écrit : > Ivan Shmakov writes ("${HOME} vs. g_get_home_dir ()"): > > I do remember filing a bug or two against packages that refer to > > the getent () data to find the user's “home” directory ins

Re: ${HOME} vs. g_get_home_dir () [and 1 more messages]

2012-09-26 Thread Ian Jackson
Ivan Shmakov writes ("${HOME} vs. g_get_home_dir ()"): > I do remember filing a bug or two against packages that refer to > the getent () data to find the user's “home” directory instead > of using the HOME environment variable. I agree with your com

Re: ${HOME} vs. g_get_home_dir ()

2012-09-26 Thread Russ Allbery
"Bernhard R. Link" writes: > * Simon McVittie [120926 18:50]: >> ... but I don't think this is the right way to make it happen. Please >> research previous discussion to check that you're not missing arguments >> that have happened in the past, then if you still think your proposal is >> the bes

Re: ${HOME} vs. g_get_home_dir ()

2012-09-26 Thread Bernhard R. Link
* Simon McVittie [120926 18:50]: > ... but I don't think this is the right way to make it happen. Please > research previous discussion to check that you're not missing arguments > that have happened in the past, then if you still think your proposal is > the best option, take it upstream. This w

Re: ${HOME} vs. g_get_home_dir ()

2012-09-26 Thread Simon McVittie
On 26/09/12 18:15, Ivan Shmakov wrote: >> Simon McVittie writes: > > Please research previous discussion to check that you're not missing > > arguments that have happened in the past, > > Any particular pointers? Following the git history points to

Re: ${HOME} vs. g_get_home_dir ()

2012-09-26 Thread Ivan Shmakov
> Simon McVittie writes: > On 26/09/12 17:12, Ivan Shmakov wrote: >> (Want to use the all-defaults configuration for a program? Just >> start it like: $ HOME="$(mktemp -dt -- foo.)" foo) > Debian's GLib has been patched, and actually has this precedence: > G_HOME > getpwent

Re: ${HOME} vs. g_get_home_dir ()

2012-09-26 Thread Simon McVittie
On 26/09/12 17:12, Ivan Shmakov wrote: > (Want to use the > all-defaults configuration for a program? Just start it like: > $ HOME="$(mktemp -dt -- foo.)" foo) Debian's GLib has been patched, and actually has this precedence: G_HOME > getpwent > HOME. This was originally inten

${HOME} vs. g_get_home_dir ()

2012-09-26 Thread Ivan Shmakov
I do remember filing a bug or two against packages that refer to the getent () data to find the user's “home” directory instead of using the HOME environment variable. The environment is the preferred place to check for this kind of things: it's (usually) un