Re: [PATCH] Prompt for password on Windows platforms

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Robert Kinberg" <kinberg(at)tecore(dot)com>, <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCH] Prompt for password on Windows platforms
Date: 2006-02-22 21:38:15
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C806F@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> 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 that does not have a dev
> directory at the root, the problem goes away.

This sounds to me like a reasonable explanation to the fact that this
works in most cases but not all. And that some have it working when
they're on C: but not on a network drive or the other way around.

And I can confirm this problem definitly exists. Haven't had time to
test the patch, but:

F:\Program Files\PostgreSQL\8.1\bin>psql
Password:
psql: FATAL: password authentication failed for user "maghag"

F:\Program Files\PostgreSQL\8.1\bin>echo foo > \dev\tty

F:\Program Files\PostgreSQL\8.1\bin>psql
psql: FATAL: password authentication failed for user "maghag"

F:\Program Files\PostgreSQL\8.1\bin>del \dev\tty

F:\Program Files\PostgreSQL\8.1\bin>psql
Password:
psql: FATAL: password authentication failed for user "maghag"

(notice that I got a chance to enter my password when \dev\tty did not
exist, but when it does exist, it breaks. Yes, I forgot my password :P)

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!

//Magnus

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2006-02-22 22:47:26 Re: plpython tracebacks
Previous Message Robert Kinberg 2006-02-22 21:05:43 Re: [PATCH] Prompt for password on Windows platforms