Re: g_get_home_dir (), ${HOME}, and getpwuid ()->pw_dir



>>>>> Colin Walters <walters verbum org> writes:
>>>>> On Thu, 2012-09-27 at 12:42 +0700, Ivan Shmakov wrote:

 >> Gets the current user's home directory as defined in the password
 >> database.

 >> Note that in contrast to traditional UNIX tools, this function
 >> prefers passwd entries over the HOME environment variable.

 > The question to answer is simple: why does GLib do what it does now?

[…]

 > So... yeah, not very enlightening =/ This kind of thing is a prime
 > example of why I am constantly asking people to rewrite commit
 > messages to say *WHY*, not what.

	Simon McVittie was courteous to traverse the Git history for us
	back to the Bug 2311 [6] at the GNOME Bugzilla.  (See [7].)

[…]

 >> There's a further clarification at [6] that the use of su(8) and
 >> sudo(8) may leave HOME pointing to a directory inaccessible by the
 >> current user.

[…]

 >> [6] https://bugzilla.gnome.org/show_bug.cgi?id=2311
    [7] http://permalink.gmane.org/gmane.linux.debian.devel.general/176977

-- 
FSF associate member #7257



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