Re: [PATCH] Prompt for password on Windows platforms

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCH] Prompt for password on Windows platforms
Date: 2006-02-28 21:22:17
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0F80F@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> >> (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 any sane Unix installation, /dev is not user-writable ...
> and I've never heard of one without /dev/tty, either. So the
> above risk seems illusory, except on Windows.

That was kind of my main guess, but I don't know enough different Unix
flavours to state it. I'm sure you do :-)

Given that, please just go with the win32-only solution.

/Magnus

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2006-02-28 21:36:58 Re: 2 line patch to allow plpythonu functions to return
Previous Message Tom Lane 2006-02-28 21:18:25 Re: [PATCH] Prompt for password on Windows platforms