From owner-freebsd-audit Wed Mar 7 8:33:46 2001 Delivered-To: freebsd-audit@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 1279137B71A; Wed, 7 Mar 2001 08:33:12 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f27GVPL04101; Wed, 7 Mar 2001 18:31:25 +0200 (EET) (envelope-from ru) Date: Wed, 7 Mar 2001 18:31:25 +0200 From: Ruslan Ermilov To: Max Khon Cc: freebsd-audit@FreeBSD.ORG, Garrett Wollman Subject: Re: MAXHOSTNAMELEN Message-ID: <20010307183125.A3227@sunbay.com> References: <20010307182453.D36537@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010307182453.D36537@sunbay.com>; from ru@FreeBSD.org on Wed, Mar 07, 2001 at 06:24:53PM +0200 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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