1- policy_module(container, 2 .196 . 1 )
1+ policy_module(container, 2 .197 . 0 )
22
33gen_require(`
44 class passwd rootok;
@@ -39,6 +39,14 @@ gen_tunable(container_manage_cgroup, false)
3939# # </desc>
4040gen_tunable(container_use_cephfs, false )
4141
42+ # # <desc>
43+ # # <p>
44+ # # Determine whether container can
45+ # # use ecrypt file system
46+ # # </p>
47+ # # </desc>
48+ gen_tunable(container_use_ecryptfs, false )
49+
4250attribute container_runtime_domain;
4351container_runtime_domain_template(container_runtime)
4452typealias container_runtime_t alias docker_t;
@@ -523,10 +531,6 @@ tunable_policy(`virt_use_samba',`
523531 allow container_domain cifs_t:file execmod;
524532')
525533
526- gen_require(`
527- type cephfs_t;
528- ')
529-
530534tunable_policy(`virt_use_nfs',`
531535 fs_manage_nfs_dirs(container_domain)
532536 fs_manage_nfs_files(container_domain)
@@ -538,6 +542,10 @@ tunable_policy(`virt_use_nfs',`
538542 allow container_domain nfs_t:file execmod;
539543')
540544
545+ gen_require(`
546+ type cephfs_t;
547+ ')
548+
541549tunable_policy(`container_use_cephfs',`
542550 manage_files_pattern(container_domain, cephfs_t, cephfs_t)
543551 manage_lnk_files_pattern(container_domain, cephfs_t, cephfs_t)
@@ -546,6 +554,18 @@ tunable_policy(`container_use_cephfs',`
546554 allow container_domain cephfs_t:file execmod;
547555')
548556
557+ gen_require(`
558+ type ecryptfs_t;
559+ ')
560+
561+ tunable_policy(`container_use_ecryptfs',`
562+ manage_files_pattern(container_domain, ecryptfs_t, ecryptfs_t)
563+ manage_lnk_files_pattern(container_domain, ecryptfs_t, ecryptfs_t)
564+ manage_dirs_pattern(container_domain, ecryptfs_t, ecryptfs_t)
565+ exec_files_pattern(container_domain, ecryptfs_t, ecryptfs_t)
566+ allow container_domain ecryptfs_t:file execmod;
567+ ')
568+
549569fs_manage_fusefs_named_sockets(container_runtime_domain)
550570fs_manage_fusefs_dirs(container_runtime_domain)
551571fs_manage_fusefs_files(container_runtime_domain)
0 commit comments