From owner-freebsd-current Tue Mar 20 6:13:59 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by hub.freebsd.org (Postfix) with ESMTP id 52B1D37B722; Tue, 20 Mar 2001 06:13:55 -0800 (PST) (envelope-from brandt@fokus.gmd.de) Received: from beagle (beagle [193.175.132.100]) by mailhub.fokus.gmd.de (8.8.8/8.8.8) with ESMTP id PAA25739; Tue, 20 Mar 2001 15:13:46 +0100 (MET) Date: Tue, 20 Mar 2001 15:13:46 +0100 (CET) From: Harti Brandt To: Cc: Subject: RPC update break ypbind Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, the recent update to RPC causes ypbind to break. The problem is, that /usr/src/usr.sbin/ypbind/yp_ping.c mirrors some code from the RPC library, including the internal structure used for the CLIENT structure. The new structure uses struct sockaddr_storage (128 bytes) instead of struct sockaddr_in (something lesser) and includes a new member just at the end of the structure (struct pollfd). Because the XDR buffers are allocate directly behind struct CLIENT, this makes the pointers into the buffer wrong. This causes the ypbind child to dump core, which in turn causes the parent to create a new child, which dumps core, causing the parent to create a new child, which dumps core ... A simple fix is: Index: yp_ping.c =================================================================== RCS file: /usr/ncvs/src/usr.sbin/ypbind/yp_ping.c,v retrieving revision 1.8 diff -u -r1.8 yp_ping.c --- yp_ping.c 2001/03/19 12:50:12 1.8 +++ yp_ping.c 2001/03/20 13:46:24 @@ -93,6 +93,7 @@ #include #include #include +#include #include #include "yp_ping.h" @@ -126,7 +127,7 @@ struct cu_data { int cu_sock; bool_t cu_closeit; - struct sockaddr_in cu_raddr; + struct sockaddr_storage cu_raddr; int cu_rlen; struct timeval cu_wait; struct timeval cu_total; @@ -136,6 +137,7 @@ u_int cu_sendsz; char *cu_outbuf; u_int cu_recvsz; + struct pollfd cu_pollfd; char cu_inbuf[1]; }; A better fix would probably put the definition into a private header file and include this in yp_ping. harti -- harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.gmd.de, harti@begemot.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message