Re: [HACKERS] libpq port number handling

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] libpq port number handling
Date: 2009-09-25 00:59:25
Message-ID: 2898.1253840365@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message KaiGai Kohei 2009-09-25 01:24:34 Re: [HACKERS] libpq port number handling
Previous Message Robert Haas 2009-09-25 00:41:24 Re: [HACKERS] libpq port number handling

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2009-09-25 01:24:34 Re: [HACKERS] libpq port number handling
Previous Message KaiGai Kohei 2009-09-25 00:48:42 Re: [PATCH] Reworks for Access Control facilities (r2311)