Use of /etc/services?

Started by Peter Eisentrautover 23 years ago18 messages
#1Peter Eisentraut
peter_e@gmx.net

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

--
Peter Eisentraut peter_e@gmx.net

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Peter Eisentraut (#1)
Re: Use of /etc/services?

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Curt Sampson
cjs@cynic.net
In reply to: Bruce Momjian (#2)
Re: Use of /etc/services?

On Fri, 7 Jun 2002, Bruce Momjian wrote:

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

NetBSD will be, as of 1.7, though the 1.7 release is a while away yet.
(Sorry, I didn't find out about this in time to get it into for 1.6,
which is just about to be released.)

cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

#4Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Curt Sampson (#3)
Re: Use of /etc/services?

Curt Sampson wrote:

On Fri, 7 Jun 2002, Bruce Momjian wrote:

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

NetBSD will be, as of 1.7, though the 1.7 release is a while away yet.
(Sorry, I didn't find out about this in time to get it into for 1.6,
which is just about to be released.)

Sure, then let's start using getservbyname(), if it works.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#5Marc G. Fournier
scrappy@hub.org
In reply to: Bruce Momjian (#2)
Re: Use of /etc/services?

FreeBSD

On Fri, 7 Jun 2002, Bruce Momjian wrote:

Show quoted text

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

--
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 853-3000
+  If your life is a hard drive,     |  830 Blythe Avenue
+  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

#6Roderick A. Anderson
raanders@acm.org
In reply to: Marc G. Fournier (#5)
Re: Use of /etc/services?

I see PostgreSQL in /etc/services on an upgraded Redhat Linux 7.3 system.
Don't think it was me adding it since I didn't have PG running on the
system.

Rod
--
Please don't tell my mother I'm a System Administrator.
She thinks I play piano in a bordello.

#7Ettore Simone
esimone@suse.it
In reply to: Bruce Momjian (#2)
Re: Use of /etc/services?

SuSE Linux 8.0

On Fri, 2002-06-07 at 07:41, Bruce Momjian wrote:

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

-- 
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 853-3000
+  If your life is a hard drive,     |  830 Blythe Avenue
+  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

--
Ettore Simone
SuSE Linux srl Cel. +39 348 4904011

Via Montanara, 26 Tel. +39 059 5395 41
41051 Castelnuovo R. (MO) Fax +39 059 5332009

Via Proust, 40 Tel. +39 06 50514545
00143 Roma

#8NunoACHenriques
nach@fct.unl.pt
In reply to: Roderick A. Anderson (#6)
Re: Use of /etc/services?

Hi!

Mandrake Linux release 8.1 also and without postgres rpms installed.

[nach@golfinho ~]$ cat /etc/services | grep 5432
# 5432-5434 Unassigned
postgres 5432/tcp # POSTGRES
postgres 5432/udp # POSTGRES

--
o__ Bem haja,
_.>/ _ NunoACHenriques
(_) \(_) ~~~~~~~~~~~~~~~
http://students.fct.unl.pt/users/nuno/

On Fri, 7 Jun 2002, Roderick A. Anderson wrote:

Show quoted text

I see PostgreSQL in /etc/services on an upgraded Redhat Linux 7.3 system.
Don't think it was me adding it since I didn't have PG running on the
system.

Rod

#9Andrew Sullivan
andrew@libertyrms.info
In reply to: Roderick A. Anderson (#6)
Re: Use of /etc/services?

Debian "woody" (to be 3.0 RSN . . . or something) has this in
/etc/services:

postgres 5432/tcp # POSTGRES
postgres 5432/udp # POSTGRES

A
--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M6K 3E3
+1 416 646 3304 x110

#10Kaare Rasmussen
kar@bering.webline.dk
In reply to: Bruce Momjian (#2)
Re: Use of /etc/services?

Is any OS actually shipping us in /etc/services?

It's right here in SuSE Linux 8.0. It was not in 7.3, so maybe it's
officially included from now on.

#11Michael Alan Dorman
mdorman@debian.org
In reply to: Bruce Momjian (#2)
Re: Use of /etc/services?

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

Debian GNU/Linux is, or at least will be for the imminent 3.0 release.

Mike.

#12Larry Rosenman
ler@lerctr.org
In reply to: Michael Alan Dorman (#11)
Re: Use of /etc/services?

On Fri, 2002-06-07 at 10:55, Michael Alan Dorman wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

Debian GNU/Linux is, or at least will be for the imminent 3.0 release.

It's in FreeBSD 4-STABLE, and definitely in 4.6-RELEASE which is due out
tomorrow. (or shortly thereafter).

Mike.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#13Peter Eisentraut
peter_e@gmx.net
In reply to: NunoACHenriques (#8)
Re: Use of /etc/services?

NunoACHenriques writes:

Mandrake Linux release 8.1 also and without postgres rpms installed.

[nach@golfinho ~]$ cat /etc/services | grep 5432
# 5432-5434 Unassigned
postgres 5432/tcp # POSTGRES
postgres 5432/udp # POSTGRES

This is inconsistent with the official IANA assignment which reads

postgresql 5432/tcp # PostgreSQL Database
postqresql 5432/udp # PostgreSQL Database
# Tom Lane <tgl@sss.pgh.pa.us>

(The spelling might have been fixed by now.)

You should probably file a bug report for your OS.

--
Peter Eisentraut peter_e@gmx.net

#14Peter Eisentraut
peter_e@gmx.net
In reply to: Bruce Momjian (#4)
Re: Use of /etc/services?

Bruce Momjian writes:

Sure, then let's start using getservbyname(), if it works.

One thing that had occurred to me is that this probably doesn't work in
Java, so you couldn't do configure --with-pgport=postgresql. That reduces
the potential value a lot.

--
Peter Eisentraut peter_e@gmx.net

#15rise
rise@knavery.net
In reply to: Bruce Momjian (#2)
Re: Use of /etc/services?

On Fri, 7 Jun 2002, Bruce Momjian wrote:

Peter Eisentraut wrote:

Since we now have an official entry in /etc/services, shouldn't we be able
to make use of it, by using getservbyname() if a nonnumeric port number is
specified?

Is any OS actually shipping us in /etc/services?

SuSE 8.0:

postgresql 5432/tcp # PostgreSQL Database
postqresql 5432/udp # PostgreSQL Database

I'll check OpenBSD 3.1 when I'm done installing.

--
Jonathan Conway rise@knavery.net
history is paling & my surge protection failed, & so I FRIED
- Concrete Blonde, "Fried"

#16Tom Lane
tgl@sss.pgh.pa.us
In reply to: rise (#15)
Re: Use of /etc/services?

rise <rise@knavery.net> writes:

On Fri, 7 Jun 2002, Bruce Momjian wrote:

Is any OS actually shipping us in /etc/services?

SuSE 8.0:

postgresql 5432/tcp # PostgreSQL Database
postqresql 5432/udp # PostgreSQL Database

Mph, complete with the typo in the UDP entry. Hang onto that, it'll
be a collector's item someday ;-)

regards, tom lane

#17Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#16)
Re: Use of /etc/services?

Tom Lane wrote:

rise <rise@knavery.net> writes:

On Fri, 7 Jun 2002, Bruce Momjian wrote:

Is any OS actually shipping us in /etc/services?

SuSE 8.0:

postgresql 5432/tcp # PostgreSQL Database
postqresql 5432/udp # PostgreSQL Database

Mph, complete with the typo in the UDP entry. Hang onto that, it'll
be a collector's item someday ;-)

Isn't Suse centralizing development for the new UnitedLinux2? Guess Red
Hat doesn't have much to worry about. ;-)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#18Roderick A. Anderson
raanders@acm.org
In reply to: Peter Eisentraut (#13)
Re: Use of /etc/services?

On Sat, 8 Jun 2002, Peter Eisentraut wrote:

This is inconsistent with the official IANA assignment which reads

Thanks. I'll update my services file and check all those I come into
contact with. I'll check if a new install if Redhat 7.3 has the correct
entries this weekend.

postgresql 5432/tcp # PostgreSQL Database
postqresql 5432/udp # PostgreSQL Database
# Tom Lane <tgl@sss.pgh.pa.us>

(The spelling might have been fixed by now.)

It is corrected.

You should probably file a bug report for your OS.

Interesting. I've never done this before. Most of the problems like this
I see after someone else has repored them. Maybe I'll get my 5 minutes
of fame.

Cheers,
Rod
--
Please don't tell my mother I'm a System Administrator.
She thinks I play piano in a bordello.