given

int
main(int argc, char **argv)
{
        struct servent *s;

        s=getservbyname("bogus","sctp");
        if (s==NULL)
                fprintf(stderr,"getservbyname(\"bogus\",\"sctp\") failed\n");
        else
                print_service(s);

        s=getservbyport(9999,"sctp");
        if (s==NULL)
                fprintf(stderr,"getservbyport(9999,\"sctp\") failed\n");
        else
                print_service(s);

        return 0;
}

and an /etc/services entry like

bogus           9999/sctp

on a system:

$ /usr/bin/uname -a
SunOS paradox 5.11 snv_41 sun4u sparc SUNW,Sun-Blade-1000

I get the expected output, i.e.

bogus   9999/sctp
bogus   9999/sctp

That's with nsswitch.conf entry

services:   files nis

If I take it out of the local /etc/services file, and add the same entry to the
NIS master, it still works.

So I'm just not seeing the problem.
 
 
This message posted from opensolaris.org

Reply via email to