Date: Thu, 8 Mar 2001 00:09:06 +0600 (NS) From: Max Khon <fjoe@iclub.nsu.ru> To: Ruslan Ermilov <ru@FreeBSD.ORG> Cc: freebsd-audit@FreeBSD.ORG, Garrett Wollman <wollman@FreeBSD.ORG> Subject: Re: MAXHOSTNAMELEN Message-ID: <Pine.BSF.4.21.0103080008030.43511-100000@iclub.nsu.ru> In-Reply-To: <20010307183125.A3227@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
hi, there! On Wed, 7 Mar 2001, Ruslan Ermilov wrote: > > And given that MAXHOSTNAMELEN is defined as 256, it would appear that > > passing MAXHOSTNAMELEN would be enough. But we are not currently > > POSIX-compatible; kern_mib.c defines ``char hostname[MAXHOSTNAMELEN]'' > > thus allowing host names of up to 256 bytes, so (in FreeBSD), you > > should pass MAXHOSTNAMELEN+1. > > > > This could be fixed by redefining MAXHOSTNAMELEN to 255. Garrett? > > > Grr, I meant to say that you should always pass MAXHOSTNAMELEN+1, but > the current value of MAXHOSTNAMELEN is not POSIX-compatible. so in a lot of places buffers that supposed to hold hostname are not allocated properly (see output of grep in my original message) /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0103080008030.43511-100000>