Browse Source

mysqldump: add missing permissions for Debian stretch

Helmut Pozimski 7 years ago
parent
commit
2ca3e25aca
1 changed files with 9 additions and 4 deletions
  1. 9 4
      policy/modules/mysqldump.te

+ 9 - 4
policy/modules/mysqldump.te

@@ -1,4 +1,4 @@
-policy_module(mysqldump, 0.1.4)
+policy_module(mysqldump, 0.1.5)
 
 #################################
 #
@@ -39,15 +39,16 @@ optional_policy(`
 	gen_require(`
 		type mysqld_etc_t;
 	')
-	allow mysqldump_t mysqld_etc_t:dir { read open search };
+	allow mysqldump_t mysqld_etc_t:dir { read open search getattr };
 	allow mysqldump_t mysqld_etc_t:file { read getattr open };
+	allow mysqldump_t mysqld_etc_t:lnk_file read;
 ')
 
 optional_policy(`
 	gen_require(`
 		type crond_tmp_t;
 	')
-	allow mysqldump_t crond_tmp_t:file { read write };
+	allow mysqldump_t crond_tmp_t:file { read write ioctl };
 ')
 
 optional_policy(`
@@ -58,5 +59,9 @@ optional_policy(`
 ')
 
 optional_policy(`
-	cron_system_entry(mysqldump_t, mysqldump_exec_t)
+	gen_require(`
+		type backup_store_t;
+	')
+	search_dirs_pattern(mysqldump_t, backup_store_t, backup_store_t)
 ')
+cron_system_entry(mysqldump_t, mysqldump_exec_t)