Date: Mon, 9 May 2005 13:27:19 +0200 From: Oliver Brandmueller <ob@e-Gitt.NET> To: Gavin Atkinson <gavin.atkinson@ury.york.ac.uk> Cc: freebsd-stable@freebsd.org Subject: Re: nss_ldap / top startup Message-ID: <20050509112719.GA69637@e-Gitt.NET> In-Reply-To: <20050427200324.X47179@ury.york.ac.uk> References: <20050425105919.GA95908@e-Gitt.NET> <1114625632.21968.34.camel@buffy.york.ac.uk> <20050427200324.X47179@ury.york.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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! |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050509112719.GA69637>