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

Wichmann, Mats D mats.d.wichmann at intel.com
Thu Aug 24 08:19:18 PDT 2006


>Thorsten Kukuk <kukuk at suse.de> wrote:
>> > Nope, it will *always* return the first entry that matches, as 
>searched
>> > from the beginning. The "www" entries will never be reached by
>> > getservbyport(). They *will* be reached by getservbyname(www).
>> 
>> You make the assumption that getservbyport will parse /etc/services.
>> What happens if somebody use a real database as used as backend for
>> NIS?
>
>From the standard:
>
>"This information is considered to be stored in a database that can be 
>accessed sequentially or randomly."
>
>"The getservbyport( ) function shall search the database from the 
>beginning and find the first entry......."
>
>Now, you can argue that the spec is broken, but that's what is 
>says right now.

Maybe one could question what "sequentially" means if the
database is not a flat file (or not solely a flat file).
Does this want a POSIX aardvark, or it not worth bothering?




More information about the lsb-discuss mailing list