diff --git a/policy/modules/services/mysql.te b/policy/modules/services/mysql.te index 2e7621471..4d1124bbf 100644 --- a/policy/modules/services/mysql.te +++ b/policy/modules/services/mysql.te @@ -67,11 +67,12 @@ files_runtime_file(mysqlmanagerd_runtime_t) allow mysqld_t self:capability { dac_override dac_read_search ipc_lock setgid setuid sys_resource }; dontaudit mysqld_t self:capability sys_tty_config; -allow mysqld_t self:process { setsched getsched setrlimit signal_perms rlimitinh }; +allow mysqld_t self:process { getcap setsched getsched setrlimit signal_perms rlimitinh }; allow mysqld_t self:fifo_file rw_fifo_file_perms; allow mysqld_t self:shm create_shm_perms; allow mysqld_t self:unix_stream_socket { connectto accept listen }; allow mysqld_t self:tcp_socket { accept listen }; +allow mysqld_t self:anon_inode { create map read write }; manage_dirs_pattern(mysqld_t, mysqld_db_t, mysqld_db_t) mmap_manage_files_pattern(mysqld_t, mysqld_db_t, mysqld_db_t) @@ -191,6 +192,7 @@ dev_read_sysfs(mysqld_safe_t) domain_read_all_domains_state(mysqld_safe_t) +files_dontaudit_write_root_dirs(mysqld_safe_t) files_read_etc_files(mysqld_safe_t) files_read_usr_files(mysqld_safe_t) files_search_runtime(mysqld_safe_t) diff --git a/policy/modules/services/postgresql.te b/policy/modules/services/postgresql.te index 1b2d8ab0d..11b3936b0 100644 --- a/policy/modules/services/postgresql.te +++ b/policy/modules/services/postgresql.te @@ -65,6 +65,9 @@ init_daemon_runtime_file(postgresql_runtime_t, dir, "postgresql") type postgresql_tmp_t; files_tmp_file(postgresql_tmp_t) +type postgresql_tmpfs_t; +files_tmpfs_file(postgresql_tmpfs_t) + type postgresql_unit_t; init_unit_file(postgresql_unit_t) @@ -282,7 +285,10 @@ manage_lnk_files_pattern(postgresql_t, postgresql_tmp_t, postgresql_tmp_t) manage_fifo_files_pattern(postgresql_t, postgresql_tmp_t, postgresql_tmp_t) manage_sock_files_pattern(postgresql_t, postgresql_tmp_t, postgresql_tmp_t) files_tmp_filetrans(postgresql_t, postgresql_tmp_t, { dir file sock_file }) -fs_tmpfs_filetrans(postgresql_t, postgresql_tmp_t, { dir file lnk_file sock_file fifo_file }) +fs_tmpfs_filetrans(postgresql_t, postgresql_tmp_t, { dir lnk_file sock_file fifo_file }) +fs_tmpfs_filetrans(postgresql_t, postgresql_tmpfs_t, { file }) +allow postgresql_t postgresql_tmpfs_t:file map; +manage_files_pattern(postgresql_t, postgresql_tmpfs_t, postgresql_tmpfs_t) manage_dirs_pattern(postgresql_t, postgresql_runtime_t, postgresql_runtime_t) manage_files_pattern(postgresql_t, postgresql_runtime_t, postgresql_runtime_t) @@ -342,6 +348,7 @@ init_read_utmp(postgresql_t) logging_send_syslog_msg(postgresql_t) logging_send_audit_msgs(postgresql_t) +miscfiles_read_generic_tls_privkey(postgresql_t) miscfiles_read_localization(postgresql_t) seutil_libselinux_linked(postgresql_t)