Last active
October 5, 2018 20:44
-
-
Save igalic/c1b7ed3420107f061dfb40f3fb62d154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newproperty(:rlimits) do | |
desc <<-EOM | |
A Hash of rlimits for this jail | |
Example: | |
jail { xforkb: | |
ensure => present, | |
rlimits => { nproc => {action => deny, amount => 50}} | |
} | |
This creates a jail that makes it impossible to fork-bomb, since we | |
will not allow to spawn more than 50 processes (nproc) | |
EOM | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jail { "j01": | |
ensure => present, | |
boot => yes, | |
rlimits => { | |
'maxproc' => { action => sigkill, amount => 50}, | |
'vmemoryuse' => { action => deny, amount => 128M }, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment