Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-03-03 Thread Bruce Momjian
Updated patch applied. I found a use of /dev/tty in psql for command history that I changed to stderr for Win32. Thanks for the legwork in finding the cause of this bug. Backpatched to 8.1.X and 8.0.X. --- Robert Kinberg

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-28 Thread Magnus Hagander
> >> (Specifically, it's bad that we open /dev/tty for writing > even if we > >> failed it for reading (that will create a new file), and that we > >> don't check if it's a tty at all). > > > Maybe we should stat the file and check that it's actually > a character > > special device. > > On

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-28 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Magnus Hagander wrote: >> (Specifically, it's bad that we open /dev/tty for writing even if we >> failed it for reading (that will create a new file), and that we don't >> check if it's a tty at all). > Maybe we should stat the file and check that it's

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-28 Thread Magnus Hagander
> >>So yes, it looks like this patch will be needed. A very good catch, > >>Robert! This one has been annoying me for a long time! > >> > >>Tom - if you're unsure the patch fixes the problem, I'll > try to test > >>it soonest. But the problem definitly exists! > >> > >> > > > >I have now tes

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-28 Thread Andrew Dunstan
Magnus Hagander wrote: I was very surprised by this issue as well. I am just assuming that not many people have a c:\dev directory on their machines where they run postgreSQL from. That is the only way that you would be able to open the file '/dev/tty', if the cwd is c:. If I

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-28 Thread Magnus Hagander
> > I was very surprised by this issue as well. I am just assuming that > > not many people have a c:\dev directory on their machines > where they > > run postgreSQL from. That is the only way that you would be able to > > open the file '/dev/tty', if the cwd is c:. > > > > If I switch my cwd

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-22 Thread Magnus Hagander
> I was very surprised by this issue as well. I am just > assuming that not many people have a c:\dev directory on > their machines where they run postgreSQL from. That is the > only way that you would be able to open the file '/dev/tty', > if the cwd is c:. > > If I switch my cwd to a drive

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-22 Thread Robert Kinberg
ink it is a *real* problem. Let me know what you think. Robert -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 22, 2006 2:02 PM To: Robert Kinberg Cc: pgsql-patches@postgresql.org Subject: Re: [PATCHES] [PATCH] Prompt for password on Windows platfor

Re: [PATCHES] [PATCH] Prompt for password on Windows platforms

2006-02-22 Thread Tom Lane
"Robert Kinberg" <[EMAIL PROTECTED]> writes: > The current version of psql, pg_dump, ... do not properly prompt the > user for a password, when the backend database is setup for password > authentication on a Windows platform. Curious that you are the *only* person to have noticed such a fundament