From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Sam Mason <sam(at)samason(dot)me(dot)uk>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] libpq port number handling |
Date: | 2009-09-25 06:21:35 |
Message-ID: | 6C7EC7EB-BDBE-402D-8A60-8F90B006FF2C@hagander.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On 25 sep 2009, at 02.59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
>> + if (portnum < 1 || portnum > 65535)
>
> BTW, it strikes me that we could tighten this even more by rejecting
> target ports below 1024. This is guaranteed safe on all Unix systems
> I know of, because privileged ports can only be listened to by root-
> owned
> processes and we know the postmaster won't be one. I am not sure
> whether it would be possible to start the postmaster on a low-numbered
> port on Windows though. Anyone know? Even if it's possible, do we
> want to allow it?
Windows doesn't care. A non privileged process can open any port, both
above and below 1024.
Other than that, I agree with previous comments - restricting this in
libpq won't actually help anything, but in a few limited cases it will
be very annoying.
/Magnus
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-09-25 06:29:24 | Re: [HACKERS] libpq port number handling |
Previous Message | Grant Maxwell | 2009-09-25 03:12:23 | Re: Looking for way to replicate master db to multiple mobile databases |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2009-09-25 06:25:23 | Re: SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5 |
Previous Message | tomas | 2009-09-25 05:55:14 | Re: [rfc] unicode escapes for extended strings |