misc/63020: 'utsname' structure field 'nodename' is too short
Valentin Nechayev
netch at ivb.nn.kiev.ua
Sat Mar 27 10:40:22 PST 2004
The following reply was made to PR misc/63020; it has been noted by GNATS.
From: Valentin Nechayev <netch at ivb.nn.kiev.ua>
To: Cian Synnott <cian.synnott at eircom.net>
Cc: FreeBSD-gnats-submit at freebsd.org, cirt at eircom.net
Subject: Re: misc/63020: 'utsname' structure field 'nodename' is too short
Date: Sat, 27 Mar 2004 20:38:21 +0200
CS> The utsname structure defined in the sys/utsname.h has a maximum of
CS> 32 characters on all fields, including the 'nodename' - the network
CS> name of the machine. This could reasonably be expected by a
CS> programmer using the uname() call to be MAXHOSTNAMELEN in length.
CS> However, long hostnames returned from the wrapped sysctl() are
CS> truncated.
5.* fixes this using variable sized utsname. I think 4.* would not
be fixed because their life is closed to finish.
-netch-
More information about the freebsd-bugs
mailing list