filesystem: introduce fs_cgroup_filetrans interface
PATCH v2 1/1 filesystem: introduce fs_cgroup_filetrans interface
---
changes from v1:
add require tmpfs_t
add fs_search_sysfs
no changes are required in the patches for contrib
--- policy/modules/kernel/filesystem.if | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
policy/modules/kernel/filesystem.if +36 -0
@@ -944,6 +944,42 @@ interface(`fs_mounton_cgroup', ` ######################################## ## <summary> +## Create an object in a cgroup tmpfs filesystem, with a private +## type using a type transition. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +## <param name="private type"> +## <summary> +## The type of the object to be created. +## </summary> +## </param> +## <param name="object"> +## <summary> +## The object class of the object being created. +## </summary> +## </param> +## <param name="name" optional="true"> +## <summary> +## The name of the object being created. +## </summary> +## </param> +# +interface(`fs_cgroup_filetrans',` + gen_require(` + type cgroup_t, tmpfs_t; + ') + + allow $2 tmpfs_t:filesystem associate; + filetrans_pattern($1, cgroup_t, $2, $3, $4) + fs_search_sysfs($1) +') + +######################################## +## <summary> ## Do not audit attempts to read ## dirs on a CIFS or SMB filesystem. ## </summary>
Signature · 1 line
2.13.0
PATCH v2 1/1 filesystem: introduce fs_cgroup_filetrans interface
Quoted 40 lines · Jason Zaman
---
changes from v1:
add requiretmpfs_t
addfs_search_sysfsno changes are required in the patches for contrib
--- policy/modules/kernel/filesystem.if | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)policy/modules/kernel/filesystem.if +22
-0@@ -944,6 +944,42 @@ interface(`fs_mounton_cgroup', ` ######################################## ## <summary> +## Create an object in a cgroup tmpfs filesystem, with a private +## type using a type transition. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +## <param name="private type"> +## <summary> +## The type of the object to be created. +## </summary> +## </param> +## <param name="object"> +## <summary> +## The object class of the object being created. +## </summary> +## </param> +## <param name="name" optional="true"> +## <summary> +## The name of the object being created. +## </summary>
policy/modules/kernel/filesystem.if interface(`fs_mounton_cgroup', ` · line 978
Quoted 10 lines
policy/modules/kernel/filesystem.if +10
-0+## </param> +# +interface(`fs_cgroup_filetrans',` + gen_require(` + type cgroup_t, tmpfs_t; + ') + + allow $2 tmpfs_t:filesystem associate; + filetrans_pattern($1, cgroup_t, $2, $3, $4) + fs_search_sysfs($1)
It's actually dev_search_sysfs(). I merged it along with the fix.
Quoted 8 lines
policy/modules/kernel/filesystem.if +4
-0+') + +######################################## +## <summary> ## Do not audit attempts to read ## dirs on a CIFS or SMB filesystem. ## </summary>
Signature · 1 line
Chris PeBenito