Created
July 12, 2010 04:00
-
-
Save rodjek/472123 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
define selinux_login($identity, $ensure="present") { | |
if $ensure == "present" { | |
exec { "Mapping ${name} to the ${identity} SELinux identity": | |
command => "semanage login -a -S targeted -s ${identity} -r s0 ${name}", | |
unless => "semanage login -l | grep \"${name}\" | grep \"${identity}\"", | |
} | |
} else { | |
exec { "Removing ${name} from the ${identity} SELinux identity": | |
command => "semanage login -d ${name}", | |
onlyif => "semanage login -l | grep \"${name}\" | grep \"${identity}\"", | |
} | |
} | |
} | |
selinux_login { "fenris02": | |
indentity => "user_u", | |
ensure => present, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment