diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if
index 4052ab90..85b3bb42 100644
--- a/policy/modules/kernel/filesystem.if
+++ b/policy/modules/kernel/filesystem.if
@@ -557,24 +557,6 @@ interface(`fs_register_binary_executable_type',`
rw_files_pattern($1, binfmt_misc_fs_t, binfmt_misc_fs_t)
')
-########################################
-##
-## Get attributes of cgroup filesystems.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`fs_getattr_cgroup',`
- gen_require(`
- type cgroup_t;
- ')
-
- allow $1 cgroup_t:filesystem getattr;
-')
-
########################################
##
## Mount cgroup filesystems.
@@ -593,24 +575,6 @@ interface(`fs_mount_cgroup', `
allow $1 cgroup_t:filesystem mount;
')
-########################################
-##
-## Mount on cgroup directories.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`fs_mounton_cgroup', `
- gen_require(`
- type cgroup_t;
- ')
-
- allow $1 cgroup_t:dir mounton;
-')
-
########################################
##
## Remount cgroup filesystems.
@@ -649,7 +613,7 @@ interface(`fs_unmount_cgroup', `
########################################
##
-## Delete cgroup directories.
+## Get attributes of cgroup filesystems.
##
##
##
@@ -657,49 +621,12 @@ interface(`fs_unmount_cgroup', `
##
##
#
-interface(`fs_delete_cgroup_dirs', `
+interface(`fs_getattr_cgroup',`
gen_require(`
type cgroup_t;
')
- delete_dirs_pattern($1, cgroup_t, cgroup_t)
-')
-
-########################################
-##
-## list cgroup directories.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`fs_list_cgroup_dirs', `
- gen_require(`
- type cgroup_t;
- ')
-
- list_dirs_pattern($1, cgroup_t, cgroup_t)
-')
-
-########################################
-##
-## Manage cgroup directories.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`fs_manage_cgroup_dirs',`
- gen_require(`
- type cgroup_t;
-
- ')
-
- manage_dirs_pattern($1, cgroup_t, cgroup_t)
+ allow $1 cgroup_t:filesystem getattr;
')
########################################
@@ -723,7 +650,7 @@ interface(`fs_search_cgroup_dirs',`
########################################
##
-## Manage cgroup files.
+## list cgroup directories.
##
##
##
@@ -731,13 +658,49 @@ interface(`fs_search_cgroup_dirs',`
##
##
#
-interface(`fs_manage_cgroup_files',`
+interface(`fs_list_cgroup_dirs', `
+ gen_require(`
+ type cgroup_t;
+ ')
+
+ list_dirs_pattern($1, cgroup_t, cgroup_t)
+')
+
+########################################
+##
+## Delete cgroup directories.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`fs_delete_cgroup_dirs', `
+ gen_require(`
+ type cgroup_t;
+ ')
+
+ delete_dirs_pattern($1, cgroup_t, cgroup_t)
+')
+
+########################################
+##
+## Manage cgroup directories.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`fs_manage_cgroup_dirs',`
gen_require(`
type cgroup_t;
')
- manage_files_pattern($1, cgroup_t, cgroup_t)
+ manage_dirs_pattern($1, cgroup_t, cgroup_t)
')
########################################
@@ -759,6 +722,24 @@ interface(`fs_read_cgroup_files',`
read_files_pattern($1, cgroup_t, cgroup_t)
')
+########################################
+##
+## Write cgroup files.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`fs_write_cgroup_files', `
+ gen_require(`
+ type cgroup_t;
+ ')
+
+ write_files_pattern($1, cgroup_t, cgroup_t)
+')
+
########################################
##
## Read and write cgroup files.
@@ -778,24 +759,6 @@ interface(`fs_rw_cgroup_files',`
rw_files_pattern($1, cgroup_t, cgroup_t)
')
-########################################
-##
-## Write cgroup files.
-##
-##
-##
-## Domain allowed access.
-##
-##
-#
-interface(`fs_write_cgroup_files', `
- gen_require(`
- type cgroup_t;
- ')
-
- write_files_pattern($1, cgroup_t, cgroup_t)
-')
-
########################################
##
## Do not audit attempts to open,
@@ -816,6 +779,43 @@ interface(`fs_dontaudit_rw_cgroup_files',`
dontaudit $1 cgroup_t:file rw_file_perms;
')
+########################################
+##
+## Manage cgroup files.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`fs_manage_cgroup_files',`
+ gen_require(`
+ type cgroup_t;
+
+ ')
+
+ manage_files_pattern($1, cgroup_t, cgroup_t)
+')
+
+########################################
+##
+## Mount on cgroup directories.
+##
+##
+##
+## Domain allowed access.
+##
+##
+#
+interface(`fs_mounton_cgroup', `
+ gen_require(`
+ type cgroup_t;
+ ')
+
+ allow $1 cgroup_t:dir mounton;
+')
+
########################################
##
## Do not audit attempts to read