From owner-freebsd-questions Sat Aug 10 11:29:58 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D9A437B400 for ; Sat, 10 Aug 2002 11:29:56 -0700 (PDT) Received: from kyblik.pieskovisko.sk (kyblik.pieskovisko.sk [213.215.72.42]) by mx1.FreeBSD.org (Postfix) with SMTP id 5A0F043E3B for ; Sat, 10 Aug 2002 11:29:55 -0700 (PDT) (envelope-from frankie@kyblik.pieskovisko.sk) Received: (qmail 95983 invoked by uid 19508); 10 Aug 2002 18:29:52 -0000 Date: Sat, 10 Aug 2002 20:29:52 +0200 From: "Michal F. Hanula" To: questions@freebsd.org Subject: Re: randompid sysctl value Message-ID: <20020810182952.GA98112@kyblik.pieskovisko.sk> References: <200208092139.g79Ld7bk070861@node1.cluster.srrc.usda.gov> <20020809215532.GZ49844@vectors.cx> <200208092201.g79M1JaD071133@node1.cluster.srrc.usda.gov> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <200208092201.g79M1JaD071133@node1.cluster.srrc.usda.gov> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 09, 2002 at 05:01:19PM -0500, Glenn Johnson wrote: > On Fri, Aug 09, 2002 at 02:55:32PM -0700, Adam Weinberger wrote: >=20 > > echo kern.randompid=3D1 >> /etc/sysctl.conf > > > > man 5 sysctl.conf >=20 > I realized after I sent my mail that I did not provide all of the > information. I tried setting the value in /etc/sysctl.conf; that did > not work. I then set the value in /boot/loader.conf; that did not work > either. The value is still set to 0 after rebooting. >=20 > > >> (08.09.2002 @ 1439 PST): Glenn Johnson said, in 0.3K: << > > > > > > How can I turn on the kern.randompid sysctl variable? src/sys/kern/kern_fork.c: nextpid++; if (randompid) nextpid +=3D arc4random() % randompid; The pid assigned to a new process is chosen from the interval [last pid; last pid + kern.randompid]. Setting kern.randompid to 1 means that the new pid will always be the last pid + 1, which is clearly not what we want. (This has been discussed on -security recently, IIRC) m&f --=20 The danger from computers is not that they will eventually get as smart as men but that we will meanwhile agree to meet them halfway. --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE9VVufQgEMP0l2aH4RAnDQAJ9P5KdJVhcl4qYHlanp3CCpC2Y/LwCgryot yKsG3Yr8195CozleHCUIPuc= =VTZb -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message