Skip to content

Commit

Permalink
kubernetes: allow container engines to mount on DRI devices if enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Kenton Groombridge <concord@gentoo.org>
  • Loading branch information
0xC0ncord committed Dec 19, 2023
1 parent 759de96 commit 7f8059e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions policy/modules/kernel/devices.if
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,24 @@ interface(`dev_manage_dri_dev',`
allow $1 dri_device_t:chr_file map;
')

########################################
## <summary>
## Mount on the dri devices.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`dev_mounton_dri_dev',`
gen_require(`
type dri_device_t;
')

allow $1 dri_device_t:chr_file mounton;
')

########################################
## <summary>
## Automatic type transition to the type
Expand Down
4 changes: 4 additions & 0 deletions policy/modules/services/kubernetes.te
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ tunable_policy(`container_read_public_content',`
miscfiles_mounton_all_public_files(kubernetes_container_engine_domain)
')

tunable_policy(`container_use_dri',`
dev_mounton_dri_dev(kubernetes_container_engine_domain)
')

tunable_policy(`container_use_nfs',`
fs_getattr_nfs(kubernetes_container_engine_domain)
fs_remount_nfs(kubernetes_container_engine_domain)
Expand Down

0 comments on commit 7f8059e

Please sign in to comment.