Re: [pgsql-hackers-win32] More SSL questions..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, "T(dot)J(dot)" <tjtoocool(at)phreaker(dot)net>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [pgsql-hackers-win32] More SSL questions..
Date: 2005-01-05 15:12:18
Message-ID: 27860.1104937938@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-hackers-win32

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> Tom also wrote:
>> Now that I look at it, there are several places that are depending on
>> getenv("HOME") or getenv("USERPROFILE") (on Windows) as the meaning of
>> "home directory". In particular ~/.pgpass is sought there, and psql
>> also uses get_home_path in a lot of places.

>> Seems like we should be consistent about this --- either we trust
>> $HOME or we don't.

> Don't trust $HOME on win32. There is no such thing.It's set by Cygwin,
> and it's set by the MingW shell, but it's not set by Windows. HOMEDRIVE,
> HOMEPATH and HOMESHARE are set, but not HOME.

> You can trust USERPROFILE in NT based OSes. Not sure about 9x. Using the
> API above is a much nicer way of doing it.

We are using $USERPROFILE, not $HOME, on Windows, but I think Magnus is
right: we shouldn't be doing that at all. If I don't hear any
objections soon, I'm going to replace get_home_path() with code that
uses getpwuid (on Unix) or SHGetSpecialFolderPath (on Windows).

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-01-05 15:22:06 Re: [BUGS] More SSL questions..
Previous Message Andrew Dunstan 2005-01-05 12:47:18 Re: [BUGS] More SSL questions..

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-01-05 15:22:06 Re: [BUGS] More SSL questions..
Previous Message Weiping 2005-01-05 13:18:40 Re: [HACKERS] Final call for translation updates

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2005-01-05 15:22:06 Re: [BUGS] More SSL questions..
Previous Message Andrew Dunstan 2005-01-05 12:47:18 Re: [BUGS] More SSL questions..