[lsb-discuss] potential lsb-apache FVT problem and /etc/services

Theodore Y Tso theotso at us.ibm.com
Tue Aug 22 08:01:43 PDT 2006

Mark Brown wrote on 08/22/2006 10:35:10 AM:
> > But of course, we don't know if future authors/maintainers of
> > LSB-certified applications will be as careful, so maybe we need to say
> > something.  I'd be hesitant to duplicate the IANA's functions, and the
> > IANA list does change as future ports are added, so simply saying that
> > distributions must copy the IANA's list doesn't seem to a smart thing
> > to do.  So if were going to do anything we would have to snapshot the
> > IANA list.
> This is not recommended, from my "standards veteran" perspective.
> Snapshotting the "current version" of a real-time canonical registry (be
> IANA, ISO languages/locales, or FAA airport codes, whatever) instantly
> makes you obsolete/incorrect and leads to multiple user interpretation
> questions down the road. Always point to the definitive source (if you
> can), don't copy it.

I wasn't recommending it, but if we're going to make any guarantees
about what getservbyname() might return, how else would we do it?

I stand corrected that getservbyport() claims to search the database
in order, but of course that assumes that the database has a stable
sort order, and in any case SuSv3 doesn't specify the contents of said

The reason why I bring this is up is that one can posit a (badly written)
application which absolutely depends on getservbyname() returning a
port number for "http", and where it bombs out if doesn't get
a port number --- or a badly written shell script which assumes that
getservbyport() will return "www" instead of "http", or vice versa.
Such an application or shell script could be LSB certified, work just fine
on LSB certified distribution --- and then fail somewhere else.

The question then is who is at fault?   Was it the LSB, for not
specifying a controlled enough environment, or for not making the
necessary admonition to the application writer (possibly refusing
to certify it if we could determine that it is doing something
non-portable)?   The ISV, for writing a bone-headedly stupid
application?  The frustrated user, for having the expectation
that an LSB certified application running on an LSB certified
distribution should just work?

This starts to edge into a philosophical discussion about what
does LSB certification of an application mean, and whether or
not we want to at some point in the future make claims of
"write once, run everywhere" --- or has Sun and Java ruined
that promise and made cynics of us all?   :-)

Theodore Y. Ts'o
STSM, Advanced Linux Response Team
Linux Technology Center
Medford, Massachusetts
(617) 245-5616, T/L 930-1182
(781) 391-2699 (Fax)
(781) 526-0121 (cell)

More information about the lsb-discuss mailing list