From owner-FreeBSD-users-jp@jp.freebsd.org  Wed Jul 15 21:53:04 1998
Received: (from daemon@localhost)
	by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) id VAA22165;
	Wed, 15 Jul 1998 21:53:04 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from ms.mobile.icc.titech.ac.jp (ms.mobile.icc.titech.ac.jp [131.112.93.66])
	by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) with ESMTP id VAA22157
	for <freebsd-users-jp@jp.freebsd.org>; Wed, 15 Jul 1998 21:53:03 +0900 (JST)
	(envelope-from nabe@mobile.icc.titech.ac.jp)
Received: from localhost (suzuki-gw.mobile.icc.titech.ac.jp [131.112.93.65])
	by ms.mobile.icc.titech.ac.jp (8.9.0/3.7W-98070300) with ESMTP id VAA15406
	for <freebsd-users-jp@jp.freebsd.org>; Wed, 15 Jul 1998 21:55:15 +0900 (JST)
To: freebsd-users-jp@jp.freebsd.org
X-Mailer: Mew version 1.92.4 on XEmacs 20.4 (Emerald)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
	boundary="--Next_Part(Wed_Jul_15_21:50:52_1998_518)--"
Content-Transfer-Encoding: 7bit
Message-Id: <19980715215230D.nabe@suzuki-gw.mobile.icc.titech.ac.jp>
Date: Wed, 15 Jul 1998 21:52:30 +0900
From: Shingo WATANABE / =?ISO-2022-JP?B?GyRCRU9KVRsoQiA=?=
	=?ISO-2022-JP?B?GyRCPy04YxsoQg==?= <nabe@mobile.icc.titech.ac.jp>
X-Dispatcher: imput version 971024
Lines: 107
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=24e+ JFUG special]
X-Sequence: FreeBSD-users-jp 30719
Subject: [FreeBSD-users-jp 30719] okphone patch
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

----Next_Part(Wed_Jul_15_21:50:52_1998_518)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$B$o$?$J$Y!wEl9)Bg$G$9!#(B

hostname $B$,(B 32 $BJ8;z0J>e$@$H(B phoned $B$,$-$A$s$H(B gethostname() $B=PMh$J$/$F(B
exit $B$7$F$7$^$&$N$G(B patch $B$r:n$j$^$7$?!#(B
$B!t$H$O8@$C$F$b%Q%C%A$H8F$Y$k$h$&$JBg$7$?$3$H$7$F$J$$$s$G$9$1$I!#(B


$B$A$J$_$K!"$3$N$H$-(B /var/log/messages $B$K$O0J2<$N$h$&$J%a%C%;!<%8$,;D$C$F(B
$B$$$^$7$?!#(B($B;29M$^$G$K(B)
inetd[156]: /usr/local/libexec/phoned[22845]: exit status 0x600

---
 Shingo WATANABE / nabe@mobile.icc.titech.ac.jp, s-nabe@cs.titech.ac.jp
                                                                      JG8OOM/1


----Next_Part(Wed_Jul_15_21:50:52_1998_518)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

diff -ur okphone-1.2/client/names.c okphone-1.2.work/client/names.c
--- okphone-1.2/client/names.c	Fri Dec 15 18:30:09 1989
+++ okphone-1.2.work/client/names.c	Wed Jul 15 21:23:21 1998
@@ -3,6 +3,7 @@
 #include <netdb.h>
 #include <stdio.h>
 #include <pwd.h>
+#include <sys/param.h>
 
 #undef	NULL
 #define	NULL ((char *) 0)
@@ -67,7 +68,7 @@
 		tty += 5;	/* skip over "/dev/" */
  
 	/* find out about our host */
-	gethostname (host, 32);
+	gethostname (host, MAXHOSTNAMELEN);
 	if ((hp = gethostbyname ("localhost")) == (struct hostent *) 0)
 		if ((hp = gethostbyname (host)) == (struct hostent *) 0) {
 			fprintf (stderr, "Cannot find network entry for %s\n", host);
diff -ur okphone-1.2/conv/convd.c okphone-1.2.work/conv/convd.c
--- okphone-1.2/conv/convd.c	Wed Jul 15 21:43:23 1998
+++ okphone-1.2.work/conv/convd.c	Wed Jul 15 21:23:35 1998
@@ -44,6 +44,7 @@
 #include <sys/ioctl.h>
 #include <syslog.h> /* fix */
 #include <errno.h>
+#include <sys/param.h>
 
 #define BUFFER    128				/* size of char buffer to use     */
 #define MAXSLOTS  32                /* max users/conversation         */
@@ -413,7 +414,7 @@
 	char   host[32];
 	int    s;
 
-	gethostname (host, 32);
+	gethostname (host, MAXHOSTNAMELEN);
 
 	sprintf (mesg, "\nMessage from phone conversation daemon @ %s:\n", host);
 
Only in okphone-1.2.work: make.log
diff -ur okphone-1.2/master/defs.h okphone-1.2.work/master/defs.h
--- okphone-1.2/master/defs.h	Fri Dec 15 18:30:13 1989
+++ okphone-1.2.work/master/defs.h	Wed Jul 15 21:25:30 1998
@@ -13,6 +13,7 @@
 #include <netinet/in.h>
 #include <stdio.h>
 #include <errno.h>
+#include <sys/param.h>
 
 #define SOCKADDR	struct sockaddr_in    /* shorter to type */
 
@@ -56,7 +57,7 @@
 INV     *lookup();
 
 #define SIZ 512
-char    host[32];               /* name of this host */
+char    host[MAXHOSTNAMELEN];               /* name of this host */
 char	buf[SIZ];				/* general-purpose buffer */
 extern	int errno;
 int		misc;					/* socket used to send out */
diff -ur okphone-1.2/master/main.c okphone-1.2.work/master/main.c
--- okphone-1.2/master/main.c	Fri Dec 15 18:30:14 1989
+++ okphone-1.2.work/master/main.c	Wed Jul 15 21:35:13 1998
@@ -17,6 +17,7 @@
 #include <netdb.h>
 #include <sys/time.h>	/* fix */
 #include <sys/types.h>	/* fix */
+#include <sys/param.h>
 
 #ifdef FORK
 #include <sys/ioctl.h>
@@ -117,7 +118,7 @@
 
 	signal (SIGCHLD, sigchld);
 	signal (SIGALRM, ring);
-	gethostname (host, 32);
+	gethostname (host, MAXHOSTNAMELEN);
 
 	if ((hp = gethostbyname (host)) == (struct hostent *) 0) {
 		fprintf (stderr, "%s: cannot find my own address!!!\n", argv[0]);

----Next_Part(Wed_Jul_15_21:50:52_1998_518)----
