Depracate ND_DEBUG and BIND_DEBUG in favour of RPCBIND_DEBUG.

Add commented out entries for RPCBIND_DEBUG and SVC_RUN_DEBUG in Makefile.
This commit is contained in:
dsl 2007-08-27 19:53:32 +00:00
parent 3d3a92a528
commit b504fee486
4 changed files with 16 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 2007/05/28 18:12:06 tls Exp $ # $NetBSD: Makefile,v 1.11 2007/08/27 19:53:32 dsl Exp $
.include <bsd.own.mk> .include <bsd.own.mk>
@ -19,6 +19,10 @@ CPPFLAGS+= -I${LIBCRPCDIR} -DPORTMAP -DLIBWRAP
CPPFLAGS+= -DINET6 CPPFLAGS+= -DINET6
.endif .endif
# Uncomment these to get any useful output from 'rpcbind -d'
# CPPFLAGS+= -DRPCBIND_DEBUG
# CPPFLAGS+= -DSVC_RUN_DEBUG
LDADD+= -lwrap -lutil LDADD+= -lwrap -lutil
DPADD+= ${LIBWRAP} ${LIBUTIL} DPADD+= ${LIBWRAP} ${LIBUTIL}

View File

@ -1,4 +1,4 @@
/* $NetBSD: check_bound.c,v 1.4 2007/05/13 20:03:46 christos Exp $ */ /* $NetBSD: check_bound.c,v 1.5 2007/08/27 19:53:33 dsl Exp $ */
/* /*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -184,7 +184,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, char *uaddr, char *saddr)
allocated_uaddr = c_uaddr; allocated_uaddr = c_uaddr;
} }
#ifdef ND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) { if (debugging) {
if (saddr == NULL) { if (saddr == NULL) {
fprintf(stderr, "mergeaddr: client uaddr = %s\n", fprintf(stderr, "mergeaddr: client uaddr = %s\n",
@ -200,7 +200,7 @@ mergeaddr(SVCXPRT *xprt, char *netid, char *uaddr, char *saddr)
* This is all we should need for IP 4 and 6 * This is all we should need for IP 4 and 6
*/ */
m_uaddr = addrmerge(svc_getrpccaller(xprt), s_uaddr, c_uaddr, netid); m_uaddr = addrmerge(svc_getrpccaller(xprt), s_uaddr, c_uaddr, netid);
#ifdef ND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) if (debugging)
fprintf(stderr, "mergeaddr: uaddr = %s, merged uaddr = %s\n", fprintf(stderr, "mergeaddr: uaddr = %s, merged uaddr = %s\n",
uaddr, m_uaddr); uaddr, m_uaddr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpcbind.c,v 1.14 2007/06/04 18:00:51 christos Exp $ */ /* $NetBSD: rpcbind.c,v 1.15 2007/08/27 19:53:33 dsl Exp $ */
/* /*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@ -227,7 +227,7 @@ init_transport(struct netconfig *nconf)
(nconf->nc_semantics != NC_TPI_COTS) && (nconf->nc_semantics != NC_TPI_COTS) &&
(nconf->nc_semantics != NC_TPI_COTS_ORD)) (nconf->nc_semantics != NC_TPI_COTS_ORD))
return 1; /* not my type */ return 1; /* not my type */
#ifdef ND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) { if (debugging) {
int i; int i;
char **s; char **s;
@ -315,7 +315,7 @@ init_transport(struct netconfig *nconf)
return 1; return 1;
} }
(void)memcpy(taddr.addr.buf, sa, addrlen); (void)memcpy(taddr.addr.buf, sa, addrlen);
#ifdef ND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) { if (debugging) {
/* for debugging print out our universal address */ /* for debugging print out our universal address */
char *uaddr; char *uaddr;
@ -448,7 +448,7 @@ init_transport(struct netconfig *nconf)
/* decide if bound checking works for this transport */ /* decide if bound checking works for this transport */
status = add_bndlist(nconf, &taddr.addr); status = add_bndlist(nconf, &taddr.addr);
#ifdef BIND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) { if (debugging) {
if (status < 0) { if (status < 0) {
fprintf(stderr, "Error in finding bind status for %s\n", fprintf(stderr, "Error in finding bind status for %s\n",
@ -468,7 +468,7 @@ init_transport(struct netconfig *nconf)
if (nconf->nc_semantics == NC_TPI_CLTS) { if (nconf->nc_semantics == NC_TPI_CLTS) {
status = create_rmtcall_fd(nconf); status = create_rmtcall_fd(nconf);
#ifdef BIND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) { if (debugging) {
if (status < 0) { if (status < 0) {
fprintf(stderr, fprintf(stderr,

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.c,v 1.13 2007/05/13 20:03:47 christos Exp $ */ /* $NetBSD: util.c,v 1.14 2007/08/27 19:53:33 dsl Exp $ */
/*- /*-
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -128,7 +128,7 @@ addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr,
#endif #endif
servsin = newsin = NULL; /* XXXGCC -Wuninitialized */ servsin = newsin = NULL; /* XXXGCC -Wuninitialized */
#ifdef ND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) if (debugging)
fprintf(stderr, "addrmerge(caller, %s, %s, %s\n", serv_uaddr, fprintf(stderr, "addrmerge(caller, %s, %s, %s\n", serv_uaddr,
clnt_uaddr, netid); clnt_uaddr, netid);
@ -304,7 +304,7 @@ freeit:
free(clnt_nbp); free(clnt_nbp);
freeifaddrs(ifp); freeifaddrs(ifp);
#ifdef ND_DEBUG #ifdef RPCBIND_DEBUG
if (debugging) if (debugging)
fprintf(stderr, "addrmerge: returning %s\n", ret); fprintf(stderr, "addrmerge: returning %s\n", ret);
#endif #endif