Date: Fri, 29 Oct 1999 17:20:33 -0400 (EDT) From: aa8vb@ipass.net To: FreeBSD-gnats-submit@freebsd.org Subject: kern/14602: struct utsname fields are allocated too small Message-ID: <199910292120.RAA01742@stealth.ipass.net.>
next in thread | raw e-mail | index | archive | help
>Number: 14602 >Category: kern >Synopsis: struct utsname fields are allocated too small >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Oct 29 14:20:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Randall Hopper >Release: FreeBSD 3.2-RELEASE i386 >Organization: self >Environment: Stock 3.2-RELEASE >Description: The version string for FreeBSD is much longer than 32 characters: > uname -v FreeBSD 3.2-RELEASE #0: Mon Jun 28 16:45:38 EDT 1999 rhh@stealth:/32_share/os/3.2/usr/src/sys/compile/WINCAST but this can't be queried via uname() by cross-platform utilities, because of a small length definition in utsname.h: /usr/include/sys/utsname.h: #define SYS_NMLN 32 struct utsname { ... char version[SYS_NMLN]; /* Version level. */ }; FWIW, on SGI IRIX: /usr/include/sys/utsname.h: #define _SYS_NMLN 257 /* 4.0 size of utsname elements.*/ /* Must be at least 257 to */ /* support Internet hostnames. */ struct utsname { char sysname[_SYS_NMLN]; char nodename[_SYS_NMLN]; char release[_SYS_NMLN]; char version[_SYS_NMLN]; >How-To-Repeat: Query the FreeBSD version via uname(3) and observe the truncation. >Fix: Please expand sys/utsname.h's SYS_NMLN to around 256. Thanks. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910292120.RAA01742>