Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2000 22:15:29 -0700 (PDT)
From:      yoshint@flab.fujitsu.co.jp
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/18896: Tcl "info hostname" command returns chop-off hostname, when hostname length >= 32
Message-ID:  <20000530051529.31F3037BD89@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         18896
>Category:       ports
>Synopsis:       Tcl "info hostname" command returns chop-off hostname, when hostname length >= 32
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 29 22:20:02 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Yoshinori Tomita
>Release:        3.4-RELEASE
>Organization:
Fujitsu Laboratories
>Environment:
FreeBSD cerberus.proc.flab.fujitsu.co.jp 3.4-RELEASE FreeBSD 3.4-RELEASE #5: Mon Feb 21 12:07:07 JST 2000     yoshin-t@cerberus.proc.flab.fujitsu.co.jp:/usr/src/sys/compile/Cerberus  i386
>Description:
Tcl command "info hostname" returns host name.
When host name is long, it returns only 31 letters of host name.

I guess this problem will also happen on any version of Tcl.

Tcl will get hostname using uname(3). It seems FreeBSD's uname(3)
returns only 31 letters by /usr/include/sys/utsname.h.


>How-To-Repeat:
1) change hostname more than 31 letters.
2) run tclsh
3) type "info hostname"

>Fix:
use gethostname() instead of uname() in unix/tclUnixSock.c



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000530051529.31F3037BD89>