From owner-freebsd-stable@FreeBSD.ORG Mon May 9 11:27:21 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49DF516A4E7 for ; Mon, 9 May 2005 11:27:21 +0000 (GMT) Received: from obh.snafu.de (obh.snafu.de [213.73.92.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DDEC43D76 for ; Mon, 9 May 2005 11:27:20 +0000 (GMT) (envelope-from ob@gruft.de) Received: from ob by obh.snafu.de with local (Exim 4.50 (FreeBSD)) id 1DV6Pv-000P6S-6f; Mon, 09 May 2005 13:27:19 +0200 Date: Mon, 9 May 2005 13:27:19 +0200 From: Oliver Brandmueller To: Gavin Atkinson Message-ID: <20050509112719.GA69637@e-Gitt.NET> Mail-Followup-To: Gavin Atkinson , freebsd-stable@freebsd.org References: <20050425105919.GA95908@e-Gitt.NET> <1114625632.21968.34.camel@buffy.york.ac.uk> <20050427200324.X47179@ury.york.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050427200324.X47179@ury.york.ac.uk> User-Agent: Mutt/1.5.9i Sender: Oliver Brandmueller cc: freebsd-stable@freebsd.org Subject: Re: nss_ldap / top startup X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2005 11:27:21 -0000 Hi Gavin, sorry, took some time to test it, but we're currently very busy moving services to the new machines. On Wed, Apr 27, 2005 at 08:06:38PM +0100, Gavin Atkinson wrote: > Sorry - even with that patch, I suspect you'll have to either run top with > the -u option, or define RANDOM_PW before recompiling it. If you can, try > both individually, I'd be interested in your finding. Your patch is just fine, even without defining RANDOM_PW! I would suggest you file an PR with the patch, it could be like that: --- CUT HERE --- #ifndef TOP_NO_NAMELEN while ((pw = getpwent()) != NULL) { if (strlen(pw->pw_name) > namelength) namelength = strlen(pw->pw_name); } #else namelength = 15; #endif --- CUT HERE --- In the Makefile there should be something like that: --- CUT HERE --- .if defined(TOP_NO_NAMELEN) CFLAGS+= -DTOP_NO_NAMELEN .endif --- CUT HERE --- If you don't want to file a PR, I would like to ask for permission to put the changes into a patch and file the PR, I guess there are more people having lot's of users - and always reading them all and counting the namelength seems to be eating resources unnecessarily, at leats on systems with some 10k users. Thank you, Oliver -- | Oliver Brandmueller | Offenbacher Str. 1 | Germany D-14197 Berlin | | Fon +49-172-3130856 | Fax +49-172-3145027 | WWW: http://the.addict.de/ | | Ich bin das Internet. Sowahr ich Gott helfe. | | Eine gewerbliche Nutzung aller enthaltenen Adressen ist nicht gestattet! |