Bug #596: bind to 127.0.0.1 in pgstat.c in secure server

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #596: bind to 127.0.0.1 in pgstat.c in secure server
Date: 2002-02-19 22:36:11
Message-ID: 200202192236.g1JMaBH53887@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Denis Medvedev (t_mdl(at)yahoo(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
bind to 127.0.0.1 in pgstat.c in secure server

Long Description
I am trying to run postgresql in secure server where is
only one IP available.
There is no means to bind to 127.0.0.1
So postmaster crashes when pgstat tries to bind to 127.0.0.1
Is it possible to bind to particular ip address instead of
statically written 127.0.0.1?
pgstat.c line 183
for example bind to gethostbyname("localhost")?

Sample Code
file pgstat.c near line 183
{
struct hostent *hostlocalhost;
hostlocalhost=gethostbyname("localhost");
pgStatAddr.sin_addr=hostlocalhost->h_addr_list[0];


/*inet_aton("127.0.0.1", &(pgStatAddr.sin_addr))*/ }

No file was uploaded with this report

Browse pgsql-bugs by date

  From Date Subject
Next Message Alain Picard 2002-02-20 00:43:43 Re: Postgresql 7.1.3 not thread safe
Previous Message Tom Lane 2002-02-19 22:21:14 Re: crash on cash_words('21,474,836.48'::money)