Skip to content

Commit 6e0cb6e

Browse files
committed
Readd missing container policy
Signed-off-by: Daniel J Walsh <[email protected]>
1 parent 24e5784 commit 6e0cb6e

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

container.if

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,35 @@ template(`container_domain_template',`
887887
type $1_t, container_domain;
888888
domain_type($1_t)
889889
domain_user_exemption_target($1_t)
890+
891+
container_manage_files_template($1, $2)
892+
')
893+
894+
895+
########################################
896+
## <summary>
897+
## Manage container files template
898+
## </summary>
899+
## <param name="prefix">
900+
## <summary>
901+
## Prefix for the domain.
902+
## </summary>
903+
## </param>
904+
## <param name="prefix">
905+
## <summary>
906+
## Prefix for the file type.
907+
## </summary>
908+
## </param>
909+
#
910+
template(`container_manage_files_template',`
911+
gen_require(`
912+
attribute container_domain;
913+
type container_runtime_t;
914+
type container_var_lib_t;
915+
type container_ro_file_t;
916+
')
917+
918+
890919
mls_rangetrans_target($1_t)
891920
mcs_constrained($1_t)
892921
role system_r types $1_t;

container.te

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
policy_module(container, 2.195.0)
1+
policy_module(container, 2.196.1)
22

33
gen_require(`
44
class passwd rootok;
@@ -779,6 +779,8 @@ gen_require(`
779779
type container_t;
780780
type container_file_t;
781781
')
782+
container_manage_files_template(container, container)
783+
782784
typeattribute container_file_t container_file_type;
783785
typeattribute container_t container_domain, container_net_domain, container_user_domain;
784786
allow container_user_domain self:process getattr;
@@ -1092,8 +1094,6 @@ fs_relabelfrom_tmpfs(container_userns_t)
10921094
fs_remount_cgroup(container_userns_t)
10931095

10941096
kernel_mount_proc(container_userns_t)
1095-
kernel_mount_proc(container_userns_t)
1096-
kernel_mounton_proc(container_userns_t)
10971097
kernel_mounton_proc(container_userns_t)
10981098

10991099
term_use_generic_ptys(container_userns_t)

0 commit comments

Comments
 (0)