Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-bugs by date

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

pgsql-hackers-win32 by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group