Subject: bin/2676: truncated initial messages in getty
To: None <gnats-bugs@NetBSD.ORG>
From: None <msaitoh@spa.is.uec.ac.jp>
List: netbsd-bugs
Date: 08/06/1996 07:35:42
>Number:         2676
>Category:       bin
>Synopsis:       truncated initial messages in getty
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug  5 19:05:02 1996
>Last-Modified:
>Originator:     SAITOH Masanobu
>Organization:
University of Electro-Communications
>Release:        1.2_BETA
>Environment:
System: NetBSD ifree.spa.is.uec.ac.jp 1.2_BETA NetBSD 1.2_BETA (IFREE) #12: Mon Jul 1 01:41:30 JST 1996 msaitoh@ifree.spa.is.uec.ac.jp:/var/sources/src/sys/arch/i386/compile/IFREE i386


>Description:
	The getty(8) prints initial message like below:

		NetBSD/i386 (mincore.spa.is.uec.ac.jp.privat) (ttyv0)

	If the length of the hostname >= 32, hostname field is truncated
	at 31 bytes.

	"mincore.spa.is.uec.ac.jp" is 24bytes, but
	"mincore.spa.is.uec.ac.jp.private" is 32bytes :-(

	The hostname is apt to be longer recently.

>How-To-Repeat:
>Fix:
	Apply following patch:

*** subr.c.orig	Sat Oct 14 10:05:14 1995
--- subr.c	Tue Aug  6 06:57:17 1996
***************
*** 45,50 ****
--- 45,51 ----
  #include <string.h>
  #include <termios.h>
  #include <sys/ioctl.h>
+ #include <sys/param.h>
  
  #include "gettytab.h"
  #include "pathnames.h"
***************
*** 552,558 ****
  }
  #endif
  
! char	editedhost[32];
  
  void
  edithost(pat)
--- 553,559 ----
  }
  #endif
  
! char	editedhost[MAXHOSTNAMELEN];
  
  void
  edithost(pat)

>Audit-Trail:
>Unformatted: