From owner-cvs-all Tue Feb 5 14:26: 1 2002 Delivered-To: cvs-all@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id 9126937B422; Tue, 5 Feb 2002 14:25:28 -0800 (PST) Received: from caddis.yogotech.com (caddis.yogotech.com [206.127.123.130]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id PAA12084; Tue, 5 Feb 2002 15:24:23 -0700 (MST) (envelope-from nate@yogotech.com) Received: (from nate@localhost) by caddis.yogotech.com (8.11.6/8.11.6) id g15MOCY70369; Tue, 5 Feb 2002 15:24:12 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15456.23434.738687.902455@caddis.yogotech.com> Date: Tue, 5 Feb 2002 15:24:10 -0700 To: Mark Murray Cc: "Andrey A. Chernov" , des@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libpam/modules/pam_unix pam_unix.c In-Reply-To: <200202052219.g15MJhs32408@greenpeace.grondar.org> References: <20020205214703.GA8579@nagual.pp.ru> <200202052219.g15MJhs32408@greenpeace.grondar.org> X-Mailer: VM 6.96 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > It is OK at this point, but broken _after_ PAM called. > > > Lets imagine srandom(33) produce this hypotetical sequence for random() > > > calls: > > > > To see the bug, run following test application with "call_pam" set to 1 > > and 0 > > The bug is doing userland stuff before the authentication IMO. Naw, I agree with Andrey. Library calls like PAM shouldn't dictate the order you do things. Based on what I'm hearying, your change is ill-conceived and should be backed out. Nate > > > #include > > > > int call_pam = 0; > > > > main() > > { > > srandom(33); > > random(); > > random(); > > if (call_pam) libpam_steals_N_randoms(); > > printf("%d\n", random()); > > } > > Should look like > > #include > > int call_pam = 0; > > main() > { > if (call_pam) libpam_steals_N_randoms(); > srandom(33); > random(); > random(); > printf("%d\n", random()); > } > > M > -- > o Mark Murray > \_ FreeBSD Services Limited > O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message