Date: Wed, 7 Mar 2001 18:31:25 +0200 From: Ruslan Ermilov <ru@FreeBSD.ORG> To: Max Khon <fjoe@iclub.nsu.ru> Cc: freebsd-audit@FreeBSD.ORG, Garrett Wollman <wollman@FreeBSD.ORG> Subject: Re: MAXHOSTNAMELEN Message-ID: <20010307183125.A3227@sunbay.com> In-Reply-To: <20010307182453.D36537@sunbay.com>; from ru@FreeBSD.org on Wed, Mar 07, 2001 at 06:24:53PM %2B0200 References: <Pine.BSF.4.21.0103072153170.43511-100000@iclub.nsu.ru> <20010307182453.D36537@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 07, 2001 at 06:24:53PM +0200, 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. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age 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?20010307183125.A3227>