Skip to content

Commit 37b1951

Browse files
Merge pull request #5797 from craigcomstock/ENT-12954/3.21
Added http_port and getattr selinux permissions as needed for selinux policy on rhel-8 and rhel-9 (3.21)
2 parents b3699e5 + 91139a9 commit 37b1951

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

misc/selinux/cfengine-enterprise.te.all

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ require {
9191
type ssh_exec_t;
9292
type ssh_home_t;
9393
type rpm_script_t;
94+
type fsadm_exec_t;
95+
type lvm_exec_t;
9496
class lockdown { confidentiality integrity };
9597
class tcp_socket { create ioctl read getattr lock write setattr append bind connect getopt setopt shutdown name_connect accept listen name_bind node_bind };
9698
class mctp_socket { ioctl read write create getattr setattr lock relabelfrom relabelto append map bind connect listen accept getopt setopt shutdown recvfrom sendto recv_msg send_msg name_bind };
@@ -403,6 +405,10 @@ allow init_t cfengine_hub_t:process siginh;
403405
allow cfengine_hub_t cfengine_hub_exec_t:file entrypoint;
404406
allow cfengine_hub_t cfengine_hub_exec_t:file { ioctl read getattr lock map execute open };
405407

408+
# the following file permissions for cf-hub are not needed if masterfiles includes fixes from ENT-12954 making inventory and paths standard library bundles agent instead of common.
409+
allow cfengine_hub_t fsadm_exec_t:file getattr;
410+
allow cfengine_hub_t lvm_exec_t:file getattr;
411+
406412
# allow cf-hub to use/execute libpromises.so
407413
allow cfengine_hub_t cfengine_var_lib_t:file map;
408414
allow cfengine_hub_t cfengine_var_lib_t:file execute;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
require {
22
type systemd_userdbd_runtime_t;
3+
type http_port_t;
34
}
45

56
# PAM module for dynamic users
67
allow cfengine_httpd_t systemd_userdbd_runtime_t:dir { getattr open read search };
78
allow cfengine_httpd_t systemd_userdbd_runtime_t:sock_file write;
89
allow cfengine_httpd_t kernel_t:unix_stream_socket connectto;
10+
11+
# selinux-policy 38.1.45 requires the following http_port permissions whereas 3.14.3 does not.
12+
# these permissions are not be needed if changes from ENT-12954 to masterfiles policy move inventory from common to an agent bundle are in place.
13+
allow cfengine_serverd_t http_port_t:tcp_socket name_connect;
14+
allow cfengine_execd_t http_port_t:tcp_socket name_connect;

0 commit comments

Comments
 (0)