From owner-freebsd-stable@FreeBSD.ORG Thu Sep 21 13:43:28 2006 Return-Path: X-Original-To: stable@freebsd.org 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 203C416A403 for ; Thu, 21 Sep 2006 13:43:28 +0000 (UTC) (envelope-from freebsd-stable-local@be-well.ilk.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C595D43D5C for ; Thu, 21 Sep 2006 13:43:27 +0000 (GMT) (envelope-from freebsd-stable-local@be-well.ilk.org) Received: (qmail 5086 invoked from network); 21 Sep 2006 13:43:26 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 21 Sep 2006 13:43:26 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 090252842C; Thu, 21 Sep 2006 09:43:25 -0400 (EDT) To: Krassimir Slavchev References: <4512942A.1020400@bulinfo.net> From: Lowell Gilbert Date: Thu, 21 Sep 2006 09:43:25 -0400 In-Reply-To: <4512942A.1020400@bulinfo.net> (Krassimir Slavchev's message of "Thu, 21 Sep 2006 16:31:22 +0300") Message-ID: <44odt9uygy.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: stable@freebsd.org Subject: Re: Unable to generate random numbers? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2006 13:43:28 -0000 Krassimir Slavchev writes: > When I try to generate random bytes using rand() or random() > functions I found that these functions > return constant values!? Show your code (preferably a minimal, compilable, example); chances are that you are not initializing the state properly for use of those functions. Note that those functions are not in any way related to the kernel random(4) device. I suspect this question would be more appropriate on FreeBSD-Questions; the version of FreeBSD you're running isn't really relevant.