Subject: lib/10537: svc_vc.c of rev. 1.5 breaks rpcbind
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mrt@notwork.org>
List: netbsd-bugs
Date: 07/07/2000 23:57:18
>Number: 10537
>Category: lib
>Synopsis: svc_vc.c of rev. 1.5 breaks rpcbind
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 07 23:58:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: MURATA, Shuuichirou
>Release: 2000/07/08
>Organization:
>Environment:
System: NetBSD fons-adae.s.notwork.org 1.5B NetBSD 1.5B (KOTONOHA) #5: Sat Jul 8 10:44:20 JST 2000 mrt@fons-adae.s.notwork.org:/export/work/mrt/src/sys/arch/i386/compile/KOTONOHA i386
>Description:
svc_vc.c of rev. 1.5 does not contain call of svc_vc_rendezvous_ops() and this
causes segmentation violation of rpcbind here.
>How-To-Repeat:
Try to connect to rpcbind with rpcinfo (or nfsd, ypbind... etc.)
>Fix:
Following patch, partially backing out the changes of rev. 1.5, fixes this problem
here, though I don't know the patch is correct or not.
Index: svc_vc.c
===================================================================
RCS file: /cvs/cvsroot/basesrc/lib/libc/rpc/svc_vc.c,v
retrieving revision 1.5
diff -u -r1.5 svc_vc.c
--- svc_vc.c 2000/07/06 03:10:35 1.5
+++ svc_vc.c 2000/07/08 06:48:26
@@ -75,10 +75,8 @@
#endif
static SVCXPRT *makefd_xprt __P((int, u_int, u_int));
-#if 0
static bool_t rendezvous_request __P((SVCXPRT *, struct rpc_msg *));
static enum xprt_stat rendezvous_stat __P((SVCXPRT *));
-#endif
static void svc_vc_destroy __P((SVCXPRT *));
static int read_vc __P((caddr_t, caddr_t, int));
static int write_vc __P((caddr_t, caddr_t, int));
@@ -87,9 +85,7 @@
static bool_t svc_vc_getargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static bool_t svc_vc_freeargs __P((SVCXPRT *, xdrproc_t, caddr_t));
static bool_t svc_vc_reply __P((SVCXPRT *, struct rpc_msg *));
-#if 0
static void svc_vc_rendezvous_ops __P((SVCXPRT *));
-#endif
static void svc_vc_ops __P((SVCXPRT *));
static bool_t svc_vc_control __P((SVCXPRT *xprt, const u_int rq, void *in));
@@ -153,6 +149,7 @@
xprt->xp_p2 = NULL;
xprt->xp_p3 = NULL;
xprt->xp_verf = _null_auth;
+ svc_vc_rendezvous_ops(xprt);
xprt->xp_port = (u_short)-1; /* It is the rendezvouser */
xprt->xp_fd = fd;
@@ -284,7 +281,6 @@
return (xprt);
}
-#if 0
/*ARGSUSED*/
static bool_t
rendezvous_request(xprt, msg)
@@ -340,7 +336,6 @@
return (XPRT_IDLE);
}
-#endif
static void
svc_vc_destroy(xprt)
@@ -625,7 +620,6 @@
mutex_unlock(&ops_lock);
}
-#if 0
static void
svc_vc_rendezvous_ops(xprt)
SVCXPRT *xprt;
@@ -653,4 +647,3 @@
xprt->xp_ops2 = &ops2;
mutex_unlock(&ops_lock);
}
-#endif
>Release-Note:
>Audit-Trail:
>Unformatted: