From owner-freebsd-hackers Thu Oct 12 12:27:52 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA25895 for hackers-outgoing; Thu, 12 Oct 1995 12:27:52 -0700 Received: from rk.ios.com (rk.ios.com [198.4.75.55]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA25888 for ; Thu, 12 Oct 1995 12:27:42 -0700 Received: (from rashid@localhost) by rk.ios.com (8.6.11/8.6.9) id DAA05466 for hackers@freebsd.org; Fri, 13 Oct 1995 03:28:11 -0400 From: Rashid Karimov Message-Id: <199510130728.DAA05466@rk.ios.com> Subject: DES crypt() in FreeBSD2.1* - bug or feature ? To: hackers@freebsd.org Date: Fri, 13 Oct 1995 03:28:10 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1859 Sender: owner-hackers@freebsd.org Precedence: bulk Hi there folx, This is the finale of the former thread here under "ANNEX'es erpcd ***" subj.. Those ones who followed and/or were interested know that erpcd compiled for FreeBSD caused huge load averages for the server for some weird reason. It didn't authetificate certain accounts off the acp_passwd file and erpcd processes were in some kind of endless loop in crypt() (DES) with 50-90% of CPU consumption (top). So I tried to recreate the problem .. and here is what I've find out: on certain combinations of parameters crypt() _dies - it never returns from the call ( probably it does - in an hour or two, I didn't have much time to wait ;). while _the same params on SStation work just fine ! For example: crypt("YBS889j","_2UzF.mC29OQ."); doesn't work on FreeBSD ( tried both PERL 5.001 and small C program) and does work on SS ( returns back second parameter in the way it should). So what happens with erpcd is it forks the processes for each authentification request and those ones who aren't lucky with parameters for crypt() won't end , consuming more and more proc slots , which will lead to huge load averages on busy systems ( I have ~20.000 entries in acp_passwd file). It will authetificate though certain users .. weird ... The acp_password file I use was ftp'ed from SStation under SunOS 414. They both run DES . I've tried to import passwords into regular /etc/master.passwd - just for the heck of it - and it does work ! I've checked out the libdes* - they are intact and apparently the right ones. The symlinks ( libcrypt*) are corret as well. So ... even if there is a screw up from my side - why does crypt() die in that loop ? I would be much more happy with NULL as return value ... Is this really a bug ? What could be possibly wrong from my side ? Rashid