Alexey Privalov wrote:
> hi all.
>
> i`m trying to set randompid:
>
> root@land3# sysctl kern.randompid=1
> kern.randompid: 0 -> 0
>
> what`s a need to set on?
The value you give to this sysctl is not a boolean, it's a value used in
the formula which computes the randompid. This value is sanity checked,
that's why giving 1 doesn't do anything. Here is the code which is
responsible for this :
if (pid < 0 || pid > PID_MAX - 100) /* out of range */
pid = PID_MAX - 100;
else if (pid < 2) /* NOP */
pid = 0;
else if (pid < 100) /* Make it reasonable */
pid = 100;
This should give you enough information to chose a good value. :-)
Maxime
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message