commit 6ed952c4d0d1fc1c88b460dd36d3cf0c84c8d89b Author: Andrey Zonov Date: Wed Oct 31 01:09:35 2012 +0400 - Set memorylocked limit to 8Mb for default login class. This prevents unprivileged users to lock too much memory. - Set memorylocked limit to 64Mb for daemon login class. Some daemons such as amd(8) and watchdogd(8) calls mlockall(2) on startup, they are run from init(8) wich uses daemon login class. - Set memorylocked limit to unlimited for root login class. Suggested by: avg Approved by: kib (mentor) MFC after: 1 week diff --git a/etc/login.conf b/etc/login.conf index 2c3e7ae..74ba1ce 100644 --- a/etc/login.conf +++ b/etc/login.conf @@ -32,7 +32,7 @@ default:\ :cputime=unlimited:\ :datasize=unlimited:\ :stacksize=unlimited:\ - :memorylocked=unlimited:\ + :memorylocked=8M:\ :memoryuse=unlimited:\ :filesize=unlimited:\ :coredumpsize=unlimited:\ @@ -59,6 +59,7 @@ xuser:\ staff:\ :tc=default: daemon:\ + :memorylocked=64M:\ :tc=default: news:\ :tc=default: @@ -72,6 +73,7 @@ dialer:\ # in preference to 'default'. root:\ :ignorenologin:\ + :memorylocked=unlimited:\ :tc=default: #