X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibtirpc.git;a=blobdiff_plain;f=src%2Fnetnamer.c;h=53ba73b977d0f1ac157bb81ab02951953da0e83d;hp=9b3b7dc4f545b6f43ae281bc06e7f9cc833eb171;hb=1b2274af88fc30a25f43be91e177cea041958e48;hpb=05e779c3a20dce57d28e3303a7b318d118902d51 diff --git a/src/netnamer.c b/src/netnamer.c index 9b3b7dc..53ba73b 100644 --- a/src/netnamer.c +++ b/src/netnamer.c @@ -47,6 +47,8 @@ #include #include +#include "debug.h" + static char *OPSYS = "unix"; static char *NETID = "netid.byname"; static char *NETIDFILE = "/etc/netid"; @@ -159,10 +161,8 @@ _getgroups(uname, groups) for (i = 0; grp->gr_mem[i]; i++) if (!strcmp(grp->gr_mem[i], uname)) { if (ngroups == NGROUPS) { -#ifdef DEBUG - fprintf(stderr, - "initgroups: %s is in too many groups\n", uname); -#endif + LIBTIRPC_DEBUG(1, + ("_getgroups: %s is in too many groups\n", uname)); goto toomany; } /* filter out duplicate group entries */ @@ -279,9 +279,7 @@ getnetid(key, ret) err = yp_match(domain, NETID, key, strlen(key), &lookup, &len); if (err) { -#ifdef DEBUG - fprintf(stderr, "match failed error %d\n", err); -#endif + LIBTIRPC_DEBUG(1, ("getnetid: match failed error %d", err)); continue; } lookup[len] = 0; @@ -291,11 +289,9 @@ getnetid(key, ret) fclose(fd); return (2); #else /* YP */ -#ifdef DEBUG - fprintf(stderr, -"Bad record in %s '+' -- NIS not supported in this library copy\n", - NETIDFILE); -#endif + LIBTIRPC_DEBUG(1, +("Bad record in %s '+' -- NIS not supported in this library copy\n", + NETIDFILE)); continue; #endif /* YP */ } else {