OP#561 add semanage
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
- install required binaries
|
- install required binaries
|
||||||
- manage local custom configuration based on parameters, overriding the defaults
|
- manage local custom configuration based on parameters, overriding the defaults
|
||||||
|
- manage selinux rules
|
||||||
- manage service
|
- manage service
|
||||||
- (optional) manage firewall
|
- (optional) manage firewall
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
class confdroid_ssh::main::service (
|
class confdroid_ssh::main::service (
|
||||||
) inherits confdroid_ssh::params {
|
) inherits confdroid_ssh::params {
|
||||||
require confdroid_ssh::main::files
|
require confdroid_ssh::main::files
|
||||||
|
require confdroid_ssh::selinux::semanage
|
||||||
if $ssh_use_firewall {
|
if $ssh_use_firewall {
|
||||||
require confdroid_ssh::firewall::iptables
|
require confdroid_ssh::firewall::iptables
|
||||||
}
|
}
|
||||||
|
|||||||
13
manifests/selinux/semanage.pp
Normal file
13
manifests/selinux/semanage.pp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## confdroid_ssh::selinux::semanage.pp
|
||||||
|
# Module name: confdroid_ssh
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manages SELinux semanage settings
|
||||||
|
##############################################################################
|
||||||
|
class confdroid_ssh::selinux::semanage (
|
||||||
|
) inherits confdroid_ssh::params {
|
||||||
|
exec { 'semanage_port_ssh':
|
||||||
|
command => "semanage port -a -t ssh_port_t -p tcp ${ssh_fw_port}",
|
||||||
|
unless => "semanage port -l | grep '^ssh_port_t' | grep 'tcp' | grep '${ssh_fw_port}'",
|
||||||
|
path => ['/usr/bin', '/usr/sbin'],
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user