Date: Sat, 10 Aug 2002 20:29:52 +0200 From: "Michal F. Hanula" <frankie@kyblik.pieskovisko.sk> To: questions@freebsd.org Subject: Re: randompid sysctl value Message-ID: <20020810182952.GA98112@kyblik.pieskovisko.sk> In-Reply-To: <200208092201.g79M1JaD071133@node1.cluster.srrc.usda.gov> References: <200208092139.g79Ld7bk070861@node1.cluster.srrc.usda.gov> <20020809215532.GZ49844@vectors.cx> <200208092201.g79M1JaD071133@node1.cluster.srrc.usda.gov>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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:
>
> > echo kern.randompid=1 >> /etc/sysctl.conf
> >
> > man 5 sysctl.conf
>
> 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.
>
> > >> (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 += 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
--
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.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE9VVufQgEMP0l2aH4RAnDQAJ9P5KdJVhcl4qYHlanp3CCpC2Y/LwCgryot
yKsG3Yr8195CozleHCUIPuc=
=VTZb
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020810182952.GA98112>
