##
## Allow the specified domain to
@@ -16595,7 +16650,7 @@ index 97fcdac..e2e6c3b 100644
## Example attributes:
##
##
-@@ -4866,3 +5123,24 @@ interface(`fs_unconfined',`
+@@ -4866,3 +5124,24 @@ interface(`fs_unconfined',`
typeattribute $1 filesystem_unconfined_type;
')
@@ -22560,7 +22615,7 @@ index 6480167..13d57b7 100644
+ filetrans_pattern($1, { httpd_user_content_t httpd_user_script_exec_t }, httpd_user_htaccess_t, file, ".htaccess")
')
diff --git a/policy/modules/services/apache.te b/policy/modules/services/apache.te
-index 3136c6a..ee04348 100644
+index 3136c6a..fddb752 100644
--- a/policy/modules/services/apache.te
+++ b/policy/modules/services/apache.te
@@ -18,130 +18,195 @@ policy_module(apache, 2.2.1)
@@ -22972,7 +23027,7 @@ index 3136c6a..ee04348 100644
files_read_var_lib_files(httpd_t)
files_search_home(httpd_t)
files_getattr_home_dir(httpd_t)
-@@ -402,9 +505,20 @@ files_read_etc_files(httpd_t)
+@@ -402,48 +505,100 @@ files_read_etc_files(httpd_t)
files_read_var_lib_symlinks(httpd_t)
fs_search_auto_mountpoints(httpd_sys_script_t)
@@ -22993,7 +23048,12 @@ index 3136c6a..ee04348 100644
logging_send_syslog_msg(httpd_t)
miscfiles_read_localization(httpd_t)
-@@ -416,34 +530,74 @@ seutil_dontaudit_search_config(httpd_t)
+ miscfiles_read_fonts(httpd_t)
+ miscfiles_read_public_files(httpd_t)
+ miscfiles_read_generic_certs(httpd_t)
++miscfiles_read_tetex_data(httpd_t)
+
+ seutil_dontaudit_search_config(httpd_t)
userdom_use_unpriv_users_fds(httpd_t)
@@ -23070,7 +23130,7 @@ index 3136c6a..ee04348 100644
')
tunable_policy(`httpd_enable_cgi && httpd_use_nfs',`
-@@ -456,6 +610,10 @@ tunable_policy(`httpd_enable_cgi && httpd_use_cifs',`
+@@ -456,6 +611,10 @@ tunable_policy(`httpd_enable_cgi && httpd_use_cifs',`
tunable_policy(`httpd_enable_cgi && httpd_unified && httpd_builtin_scripting',`
domtrans_pattern(httpd_t, httpdcontent, httpd_sys_script_t)
@@ -23081,7 +23141,7 @@ index 3136c6a..ee04348 100644
manage_dirs_pattern(httpd_t, httpdcontent, httpdcontent)
manage_files_pattern(httpd_t, httpdcontent, httpdcontent)
-@@ -466,15 +624,27 @@ tunable_policy(`httpd_enable_ftp_server',`
+@@ -466,15 +625,27 @@ tunable_policy(`httpd_enable_ftp_server',`
corenet_tcp_bind_ftp_port(httpd_t)
')
@@ -23111,7 +23171,7 @@ index 3136c6a..ee04348 100644
tunable_policy(`httpd_enable_homedirs && use_samba_home_dirs',`
fs_read_cifs_files(httpd_t)
fs_read_cifs_symlinks(httpd_t)
-@@ -484,7 +654,16 @@ tunable_policy(`httpd_can_sendmail',`
+@@ -484,7 +655,16 @@ tunable_policy(`httpd_can_sendmail',`
# allow httpd to connect to mail servers
corenet_tcp_connect_smtp_port(httpd_t)
corenet_sendrecv_smtp_client_packets(httpd_t)
@@ -23128,7 +23188,7 @@ index 3136c6a..ee04348 100644
')
tunable_policy(`httpd_ssi_exec',`
-@@ -499,9 +678,19 @@ tunable_policy(`httpd_ssi_exec',`
+@@ -499,9 +679,19 @@ tunable_policy(`httpd_ssi_exec',`
# to run correctly without this permission, so the permission
# are dontaudited here.
tunable_policy(`httpd_tty_comm',`
@@ -23149,7 +23209,7 @@ index 3136c6a..ee04348 100644
')
optional_policy(`
-@@ -513,7 +702,13 @@ optional_policy(`
+@@ -513,7 +703,13 @@ optional_policy(`
')
optional_policy(`
@@ -23164,7 +23224,7 @@ index 3136c6a..ee04348 100644
')
optional_policy(`
-@@ -528,7 +723,19 @@ optional_policy(`
+@@ -528,7 +724,19 @@ optional_policy(`
daemontools_service_domain(httpd_t, httpd_exec_t)
')
@@ -23185,7 +23245,7 @@ index 3136c6a..ee04348 100644
dbus_system_bus_client(httpd_t)
tunable_policy(`httpd_dbus_avahi',`
-@@ -537,8 +744,13 @@ optional_policy(`
+@@ -537,8 +745,13 @@ optional_policy(`
')
optional_policy(`
@@ -23200,7 +23260,7 @@ index 3136c6a..ee04348 100644
')
')
-@@ -556,7 +768,13 @@ optional_policy(`
+@@ -556,7 +769,13 @@ optional_policy(`
')
optional_policy(`
@@ -23214,7 +23274,7 @@ index 3136c6a..ee04348 100644
mysql_stream_connect(httpd_t)
mysql_rw_db_sockets(httpd_t)
-@@ -567,6 +785,7 @@ optional_policy(`
+@@ -567,6 +786,7 @@ optional_policy(`
optional_policy(`
nagios_read_config(httpd_t)
@@ -23222,7 +23282,7 @@ index 3136c6a..ee04348 100644
')
optional_policy(`
-@@ -577,6 +796,20 @@ optional_policy(`
+@@ -577,6 +797,20 @@ optional_policy(`
')
optional_policy(`
@@ -23243,7 +23303,7 @@ index 3136c6a..ee04348 100644
# Allow httpd to work with postgresql
postgresql_stream_connect(httpd_t)
postgresql_unpriv_client(httpd_t)
-@@ -591,6 +824,11 @@ optional_policy(`
+@@ -591,6 +825,11 @@ optional_policy(`
')
optional_policy(`
@@ -23255,7 +23315,7 @@ index 3136c6a..ee04348 100644
snmp_dontaudit_read_snmp_var_lib_files(httpd_t)
snmp_dontaudit_write_snmp_var_lib_files(httpd_t)
')
-@@ -603,6 +841,12 @@ optional_policy(`
+@@ -603,6 +842,12 @@ optional_policy(`
yam_read_content(httpd_t)
')
@@ -23268,7 +23328,7 @@ index 3136c6a..ee04348 100644
########################################
#
# Apache helper local policy
-@@ -616,7 +860,11 @@ allow httpd_helper_t httpd_log_t:file append_file_perms;
+@@ -616,7 +861,11 @@ allow httpd_helper_t httpd_log_t:file append_file_perms;
logging_send_syslog_msg(httpd_helper_t)
@@ -23281,7 +23341,7 @@ index 3136c6a..ee04348 100644
########################################
#
-@@ -654,28 +902,30 @@ libs_exec_lib_files(httpd_php_t)
+@@ -654,28 +903,30 @@ libs_exec_lib_files(httpd_php_t)
userdom_use_unpriv_users_fds(httpd_php_t)
tunable_policy(`httpd_can_network_connect_db',`
@@ -23325,7 +23385,7 @@ index 3136c6a..ee04348 100644
')
########################################
-@@ -685,6 +935,8 @@ optional_policy(`
+@@ -685,6 +936,8 @@ optional_policy(`
allow httpd_suexec_t self:capability { setuid setgid };
allow httpd_suexec_t self:process signal_perms;
@@ -23334,7 +23394,7 @@ index 3136c6a..ee04348 100644
allow httpd_suexec_t self:unix_stream_socket create_stream_socket_perms;
domtrans_pattern(httpd_t, httpd_suexec_exec_t, httpd_suexec_t)
-@@ -699,17 +951,22 @@ manage_dirs_pattern(httpd_suexec_t, httpd_suexec_tmp_t, httpd_suexec_tmp_t)
+@@ -699,17 +952,22 @@ manage_dirs_pattern(httpd_suexec_t, httpd_suexec_tmp_t, httpd_suexec_tmp_t)
manage_files_pattern(httpd_suexec_t, httpd_suexec_tmp_t, httpd_suexec_tmp_t)
files_tmp_filetrans(httpd_suexec_t, httpd_suexec_tmp_t, { file dir })
@@ -23360,7 +23420,7 @@ index 3136c6a..ee04348 100644
files_read_etc_files(httpd_suexec_t)
files_read_usr_files(httpd_suexec_t)
-@@ -740,13 +997,31 @@ tunable_policy(`httpd_can_network_connect',`
+@@ -740,13 +998,31 @@ tunable_policy(`httpd_can_network_connect',`
corenet_sendrecv_all_client_packets(httpd_suexec_t)
')
@@ -23393,7 +23453,7 @@ index 3136c6a..ee04348 100644
fs_read_nfs_files(httpd_suexec_t)
fs_read_nfs_symlinks(httpd_suexec_t)
fs_exec_nfs_files(httpd_suexec_t)
-@@ -769,6 +1044,25 @@ optional_policy(`
+@@ -769,6 +1045,25 @@ optional_policy(`
dontaudit httpd_suexec_t httpd_t:unix_stream_socket { read write };
')
@@ -23419,7 +23479,7 @@ index 3136c6a..ee04348 100644
########################################
#
# Apache system script local policy
-@@ -789,12 +1083,17 @@ read_lnk_files_pattern(httpd_sys_script_t, squirrelmail_spool_t, squirrelmail_sp
+@@ -789,12 +1084,17 @@ read_lnk_files_pattern(httpd_sys_script_t, squirrelmail_spool_t, squirrelmail_sp
kernel_read_kernel_sysctls(httpd_sys_script_t)
@@ -23437,7 +23497,7 @@ index 3136c6a..ee04348 100644
ifdef(`distro_redhat',`
allow httpd_sys_script_t httpd_log_t:file append_file_perms;
')
-@@ -803,18 +1102,50 @@ tunable_policy(`httpd_can_sendmail',`
+@@ -803,18 +1103,50 @@ tunable_policy(`httpd_can_sendmail',`
mta_send_mail(httpd_sys_script_t)
')
@@ -23494,7 +23554,7 @@ index 3136c6a..ee04348 100644
corenet_tcp_sendrecv_all_ports(httpd_sys_script_t)
corenet_udp_sendrecv_all_ports(httpd_sys_script_t)
corenet_tcp_connect_all_ports(httpd_sys_script_t)
-@@ -822,14 +1153,29 @@ tunable_policy(`httpd_enable_cgi && httpd_can_network_connect',`
+@@ -822,14 +1154,29 @@ tunable_policy(`httpd_enable_cgi && httpd_can_network_connect',`
')
tunable_policy(`httpd_enable_homedirs',`
@@ -23525,7 +23585,7 @@ index 3136c6a..ee04348 100644
tunable_policy(`httpd_enable_homedirs && use_samba_home_dirs',`
fs_read_cifs_files(httpd_sys_script_t)
fs_read_cifs_symlinks(httpd_sys_script_t)
-@@ -842,10 +1188,20 @@ optional_policy(`
+@@ -842,10 +1189,20 @@ optional_policy(`
optional_policy(`
mysql_stream_connect(httpd_sys_script_t)
mysql_rw_db_sockets(httpd_sys_script_t)
@@ -23546,7 +23606,7 @@ index 3136c6a..ee04348 100644
')
########################################
-@@ -891,11 +1247,48 @@ optional_policy(`
+@@ -891,11 +1248,48 @@ optional_policy(`
tunable_policy(`httpd_enable_cgi && httpd_unified',`
allow httpd_user_script_t httpdcontent:file entrypoint;
@@ -34912,6 +34972,432 @@ index 7382f85..2ef543c 100644
+#
+git_role_template(git_shell)
+gen_user(git_shell_u, user, git_shell_r, s0, s0)
+diff --git a/policy/modules/services/glance.fc b/policy/modules/services/glance.fc
+new file mode 100644
+index 0000000..7d27335
+--- /dev/null
++++ b/policy/modules/services/glance.fc
+@@ -0,0 +1,14 @@
++
++/usr/bin/glance-registry -- gen_context(system_u:object_r:glance_registry_exec_t,s0)
++
++/usr/bin/glance-api -- gen_context(system_u:object_r:glance_api_exec_t,s0)
++
++/var/lib/glance(/.*)? gen_context(system_u:object_r:glance_var_lib_t,s0)
++
++/var/log/glance(/.*)? gen_context(system_u:object_r:glance_log_t,s0)
++
++/var/run/glance(/.*)? gen_context(system_u:object_r:glance_var_run_t,s0)
++
++/etc/rc\.d/init\.d/openstack-glance-api -- gen_context(system_u:object_r:glance_api_initrc_exec_t,s0)
++
++/etc/rc\.d/init\.d/openstack-glance-registry -- gen_context(system_u:object_r:glance_registry_initrc_exec_t,s0)
+diff --git a/policy/modules/services/glance.if b/policy/modules/services/glance.if
+new file mode 100644
+index 0000000..3b1870a
+--- /dev/null
++++ b/policy/modules/services/glance.if
+@@ -0,0 +1,272 @@
++
++## policy for glance
++
++
++########################################
++##
++## Transition to glance.
++##
++##
++##
++## Domain allowed to transition.
++##
++##
++#
++interface(`glance_domtrans_registry',`
++ gen_require(`
++ type glance_registry_t, glance_registry_exec_t;
++ ')
++
++ corecmd_search_bin($1)
++ domtrans_pattern($1, glance_registry_exec_t, glance_registry_t)
++')
++
++########################################
++##
++## Transition to glance.
++##
++##
++##
++## Domain allowed to transition.
++##
++##
++#
++interface(`glance_domtrans_api',`
++ gen_require(`
++ type glance_api_t, glance_api_exec_t;
++ ')
++
++ corecmd_search_bin($1)
++ domtrans_pattern($1, glance_api_exec_t, glance_api_t)
++')
++
++
++########################################
++##
++## Read glance's log files.
++##
++##
++##
++## Domain allowed access.
++##
++##
++##
++#
++interface(`glance_read_log',`
++ gen_require(`
++ type glance_log_t;
++ ')
++
++ logging_search_logs($1)
++ read_files_pattern($1, glance_log_t, glance_log_t)
++')
++
++########################################
++##
++## Append to glance log files.
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_append_log',`
++ gen_require(`
++ type glance_log_t;
++ ')
++
++ logging_search_logs($1)
++ append_files_pattern($1, glance_log_t, glance_log_t)
++')
++
++########################################
++##
++## Manage glance log files
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_manage_log',`
++ gen_require(`
++ type glance_log_t;
++ ')
++
++ logging_search_logs($1)
++ manage_dirs_pattern($1, glance_log_t, glance_log_t)
++ manage_files_pattern($1, glance_log_t, glance_log_t)
++ manage_lnk_files_pattern($1, glance_log_t, glance_log_t)
++')
++
++########################################
++##
++## Search glance lib directories.
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_search_lib',`
++ gen_require(`
++ type glance_var_lib_t;
++ ')
++
++ allow $1 glance_var_lib_t:dir search_dir_perms;
++ files_search_var_lib($1)
++')
++
++########################################
++##
++## Read glance lib files.
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_read_lib_files',`
++ gen_require(`
++ type glance_var_lib_t;
++ ')
++
++ files_search_var_lib($1)
++ read_files_pattern($1, glance_var_lib_t, glance_var_lib_t)
++')
++
++########################################
++##
++## Manage glance lib files.
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_manage_lib_files',`
++ gen_require(`
++ type glance_var_lib_t;
++ ')
++
++ files_search_var_lib($1)
++ manage_files_pattern($1, glance_var_lib_t, glance_var_lib_t)
++')
++
++########################################
++##
++## Manage glance lib directories.
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_manage_lib_dirs',`
++ gen_require(`
++ type glance_var_lib_t;
++ ')
++
++ files_search_var_lib($1)
++ manage_dirs_pattern($1, glance_var_lib_t, glance_var_lib_t)
++')
++
++
++########################################
++##
++## Read glance PID files.
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_read_pid_files',`
++ gen_require(`
++ type glance_var_run_t;
++ ')
++
++ files_search_pids($1)
++ read_files_pattern($1, glance_var_run_t, glance_var_run_t)
++')
++
++########################################
++##
++## Manage glance PID files.
++##
++##
++##
++## Domain allowed access.
++##
++##
++#
++interface(`glance_manage_pid_files',`
++ gen_require(`
++ type glance_var_run_t;
++ ')
++
++ files_search_pids($1)
++ manage_files_pattern($1, glance_var_run_t, glance_var_run_t)
++')
++
++
++########################################
++##
++## All of the rules required to administrate
++## an glance environment
++##
++##
++##
++## Domain allowed access.
++##
++##
++##
++##
++## Role allowed access.
++##
++##
++##
++#
++interface(`glance_admin',`
++ gen_require(`
++ type glance_registry_t;
++ type glance_api_t;
++ type glance_log_t;
++ type glance_var_lib_t;
++ type glance_var_run_t;
++ type glance_registry_initrc_exec_t;
++ type glance_api_initrc_exec_t;
++ ')
++
++ allow $1 glance_registry_t:process { ptrace signal_perms };
++ ps_process_pattern($1, glance_registry_t)
++
++ allow $1 glance_api_t:process { ptrace signal_perms };
++ ps_process_pattern($1, glance_api_t)
++
++ init_labeled_script_domtrans($1, glance_registry_initrc_exec_t)
++ domain_system_change_exemption($1)
++ role_transition $2 glance_registry_initrc_exec_t system_r;
++ allow $2 system_r;
++
++ init_labeled_script_domtrans($1, glance_api_initrc_exec_t)
++ role_transition $2 glance_api_initrc_exec_t system_r;
++
++ logging_search_logs($1)
++ admin_pattern($1, glance_log_t)
++
++ files_search_var_lib($1)
++ admin_pattern($1, glance_var_lib_t)
++
++ files_search_pids($1)
++ admin_pattern($1, glance_var_run_t)
++
++')
++
+diff --git a/policy/modules/services/glance.te b/policy/modules/services/glance.te
+new file mode 100644
+index 0000000..030a521
+--- /dev/null
++++ b/policy/modules/services/glance.te
+@@ -0,0 +1,122 @@
++policy_module(glance, 1.0.0)
++
++########################################
++#
++# Declarations
++#
++
++type glance_registry_t;
++type glance_registry_exec_t;
++init_daemon_domain(glance_registry_t, glance_registry_exec_t)
++
++type glance_registry_initrc_exec_t;
++init_script_file(glance_registry_initrc_exec_t)
++
++type glance_api_t;
++type glance_api_exec_t;
++init_daemon_domain(glance_api_t, glance_api_exec_t)
++
++type glance_api_initrc_exec_t;
++init_script_file(glance_api_initrc_exec_t)
++
++type glance_log_t;
++logging_log_file(glance_log_t)
++
++type glance_var_lib_t;
++files_type(glance_var_lib_t)
++
++type glance_tmp_t;
++files_tmp_file(glance_tmp_t)
++
++type glance_var_run_t;
++files_pid_file(glance_var_run_t)
++
++########################################
++#
++# glance-registry local policy
++#
++
++allow glance_registry_t self:fifo_file rw_fifo_file_perms;
++allow glance_registry_t self:unix_stream_socket create_stream_socket_perms;
++allow glance_registry_t self:tcp_socket create_stream_socket_perms;
++
++manage_dirs_pattern(glance_registry_t, glance_log_t, glance_log_t)
++manage_files_pattern(glance_registry_t, glance_log_t, glance_log_t)
++logging_log_filetrans(glance_registry_t, glance_log_t, { dir file })
++
++manage_dirs_pattern(glance_registry_t, glance_var_lib_t, glance_var_lib_t)
++manage_files_pattern(glance_registry_t, glance_var_lib_t, glance_var_lib_t)
++files_var_lib_filetrans(glance_registry_t, glance_var_lib_t, { dir file })
++
++manage_dirs_pattern(glance_registry_t, glance_var_run_t, glance_var_run_t)
++manage_files_pattern(glance_registry_t, glance_var_run_t, glance_var_run_t)
++files_pid_filetrans(glance_registry_t, glance_var_run_t, { dir file })
++
++kernel_read_system_state(glance_registry_t)
++
++corecmd_exec_bin(glance_registry_t)
++
++corenet_tcp_bind_generic_node(glance_registry_t)
++corenet_tcp_bind_glance_registry_port(glance_registry_t)
++
++dev_read_urand(glance_registry_t)
++
++domain_use_interactive_fds(glance_registry_t)
++
++files_read_etc_files(glance_registry_t)
++files_read_usr_files(glance_registry_t)
++
++miscfiles_read_localization(glance_registry_t)
++
++sysnet_dns_name_resolve(glance_registry_t)
++
++########################################
++#
++# glance-api local policy
++#
++
++allow glance_api_t self:fifo_file rw_fifo_file_perms;
++allow glance_api_t self:unix_stream_socket create_stream_socket_perms;
++allow glance_api_t self:tcp_socket create_stream_socket_perms;
++
++manage_dirs_pattern(glance_api_t, glance_tmp_t, glance_tmp_t)
++manage_files_pattern(glance_api_t, glance_tmp_t, glance_tmp_t)
++files_tmp_filetrans(glance_api_t, glance_tmp_t, { dir file })
++can_exec(glance_api_t, glance_tmp_t)
++
++manage_dirs_pattern(glance_api_t, glance_log_t, glance_log_t)
++manage_files_pattern(glance_api_t, glance_log_t, glance_log_t)
++logging_log_filetrans(glance_api_t, glance_log_t, { dir file })
++
++manage_dirs_pattern(glance_api_t, glance_var_lib_t, glance_var_lib_t)
++manage_files_pattern(glance_api_t, glance_var_lib_t, glance_var_lib_t)
++files_var_lib_filetrans(glance_api_t, glance_var_lib_t, { dir file })
++
++manage_dirs_pattern(glance_api_t, glance_var_run_t, glance_var_run_t)
++manage_files_pattern(glance_api_t, glance_var_run_t, glance_var_run_t)
++files_pid_filetrans(glance_api_t, glance_var_run_t, { dir file })
++
++kernel_read_system_state(glance_api_t)
++
++corecmd_exec_bin(glance_api_t)
++corecmd_exec_shell(glance_api_t)
++
++corenet_tcp_bind_generic_node(glance_api_t)
++corenet_tcp_bind_hplip_port(glance_api_t)
++
++dev_read_urand(glance_api_t)
++
++domain_use_interactive_fds(glance_api_t)
++
++files_read_etc_files(glance_api_t)
++files_read_usr_files(glance_api_t)
++
++libs_exec_ldconfig(glance_api_t)
++
++miscfiles_read_localization(glance_api_t)
++
++sysnet_read_config(glance_api_t)
++
++sysnet_dns_name_resolve(glance_api_t)
++
++
diff --git a/policy/modules/services/gnomeclock.fc b/policy/modules/services/gnomeclock.fc
index 462de63..5df751b 100644
--- a/policy/modules/services/gnomeclock.fc
@@ -38671,6 +39157,19 @@ index db4fd6f..5008a6c 100644
+ files_list_pids($1)
admin_pattern($1, memcached_var_run_t)
')
+diff --git a/policy/modules/services/memcached.te b/policy/modules/services/memcached.te
+index b681608..08b1b49 100644
+--- a/policy/modules/services/memcached.te
++++ b/policy/modules/services/memcached.te
+@@ -20,7 +20,7 @@ files_pid_file(memcached_var_run_t)
+ # memcached local policy
+ #
+
+-allow memcached_t self:capability { setuid setgid };
++allow memcached_t self:capability { setuid setgid sys_resource };
+ dontaudit memcached_t self:capability sys_tty_config;
+ allow memcached_t self:process { setrlimit signal_perms };
+ allow memcached_t self:tcp_socket create_stream_socket_perms;
diff --git a/policy/modules/services/milter.fc b/policy/modules/services/milter.fc
index 55a3e2f..bc489e0 100644
--- a/policy/modules/services/milter.fc
@@ -55259,7 +55758,7 @@ index 7c5d8d8..d83a9a2 100644
+ dontaudit $1 virt_image_type:chr_file read_chr_file_perms;
')
diff --git a/policy/modules/services/virt.te b/policy/modules/services/virt.te
-index 3eca020..9c42952 100644
+index 3eca020..2ffbc3a 100644
--- a/policy/modules/services/virt.te
+++ b/policy/modules/services/virt.te
@@ -5,56 +5,67 @@ policy_module(virt, 1.4.0)
@@ -55771,7 +56270,7 @@ index 3eca020..9c42952 100644
logging_send_syslog_msg(virt_domain)
miscfiles_read_localization(virt_domain)
-@@ -457,8 +611,176 @@ optional_policy(`
+@@ -457,8 +611,177 @@ optional_policy(`
')
optional_policy(`
@@ -55821,6 +56320,7 @@ index 3eca020..9c42952 100644
+corenet_tcp_sendrecv_generic_node(virsh_t)
+corenet_tcp_connect_soundd_port(virsh_t)
+
++dev_read_rand(virsh_t)
+dev_read_urand(virsh_t)
+dev_read_sysfs(virsh_t)
+
@@ -60943,7 +61443,7 @@ index 94fd8dd..3e8f08e 100644
+ read_fifo_files_pattern($1, init_var_run_t, init_var_run_t)
+')
diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te
-index 29a9565..f131c5a 100644
+index 29a9565..b400c03 100644
--- a/policy/modules/system/init.te
+++ b/policy/modules/system/init.te
@@ -16,6 +16,34 @@ gen_require(`
@@ -61128,8 +61628,7 @@ index 29a9565..f131c5a 100644
+storage_raw_rw_fixed_disk(init_t)
+
- optional_policy(`
-- auth_rw_login_records(init_t)
++optional_policy(`
+ modutils_domtrans_insmod(init_t)
+')
+
@@ -61233,30 +61732,31 @@ index 29a9565..f131c5a 100644
+auth_use_nsswitch(init_t)
+auth_rw_login_records(init_t)
+
-+optional_policy(`
+ optional_policy(`
+- auth_rw_login_records(init_t)
+ lvm_rw_pipes(init_t)
-+')
-+
-+optional_policy(`
-+ consolekit_manage_log(init_t)
')
optional_policy(`
-+ dbus_connect_system_bus(init_t)
- dbus_system_bus_client(init_t)
-+ dbus_delete_pid_files(init_t)
++ consolekit_manage_log(init_t)
+')
+
+optional_policy(`
++ dbus_connect_system_bus(init_t)
+ dbus_system_bus_client(init_t)
++ dbus_delete_pid_files(init_t)
+ ')
+
+ optional_policy(`
+- nscd_socket_use(init_t)
+ # /var/run/dovecot/login/ssl-parameters.dat is a hard link to
+ # /var/lib/dovecot/ssl-parameters.dat and init tries to clean up
+ # the directory. But we do not want to allow this.
+ # The master process of dovecot will manage this file.
+ dovecot_dontaudit_unlink_lib_files(initrc_t)
- ')
-
- optional_policy(`
-- nscd_socket_use(init_t)
++')
++
++optional_policy(`
+ plymouthd_stream_connect(init_t)
+ plymouthd_exec_plymouth(init_t)
')
@@ -61637,7 +62137,18 @@ index 29a9565..f131c5a 100644
')
optional_policy(`
-@@ -649,6 +968,11 @@ optional_policy(`
+@@ -632,6 +951,10 @@ optional_policy(`
+ ')
+
+ optional_policy(`
++ glance_manage_pid_files(initrc_t)
++')
++
++optional_policy(`
+ gpm_setattr_gpmctl(initrc_t)
+ ')
+
+@@ -649,6 +972,11 @@ optional_policy(`
')
optional_policy(`
@@ -61649,7 +62160,7 @@ index 29a9565..f131c5a 100644
inn_exec_config(initrc_t)
')
-@@ -689,6 +1013,7 @@ optional_policy(`
+@@ -689,6 +1017,7 @@ optional_policy(`
lpd_list_spool(initrc_t)
lpd_read_config(initrc_t)
@@ -61657,7 +62168,7 @@ index 29a9565..f131c5a 100644
')
optional_policy(`
-@@ -706,7 +1031,13 @@ optional_policy(`
+@@ -706,7 +1035,13 @@ optional_policy(`
')
optional_policy(`
@@ -61671,7 +62182,7 @@ index 29a9565..f131c5a 100644
mta_dontaudit_read_spool_symlinks(initrc_t)
')
-@@ -729,6 +1060,10 @@ optional_policy(`
+@@ -729,6 +1064,10 @@ optional_policy(`
')
optional_policy(`
@@ -61682,7 +62193,7 @@ index 29a9565..f131c5a 100644
postgresql_manage_db(initrc_t)
postgresql_read_config(initrc_t)
')
-@@ -738,10 +1073,20 @@ optional_policy(`
+@@ -738,10 +1077,20 @@ optional_policy(`
')
optional_policy(`
@@ -61703,7 +62214,7 @@ index 29a9565..f131c5a 100644
quota_manage_flags(initrc_t)
')
-@@ -750,6 +1095,10 @@ optional_policy(`
+@@ -750,6 +1099,10 @@ optional_policy(`
')
optional_policy(`
@@ -61714,7 +62225,7 @@ index 29a9565..f131c5a 100644
fs_write_ramfs_sockets(initrc_t)
fs_search_ramfs(initrc_t)
-@@ -771,8 +1120,6 @@ optional_policy(`
+@@ -771,8 +1124,6 @@ optional_policy(`
# bash tries ioctl for some reason
files_dontaudit_ioctl_all_pids(initrc_t)
@@ -61723,7 +62234,7 @@ index 29a9565..f131c5a 100644
')
optional_policy(`
-@@ -790,10 +1137,12 @@ optional_policy(`
+@@ -790,10 +1141,12 @@ optional_policy(`
squid_manage_logs(initrc_t)
')
@@ -61736,7 +62247,7 @@ index 29a9565..f131c5a 100644
optional_policy(`
ssh_dontaudit_read_server_keys(initrc_t)
-@@ -805,7 +1154,6 @@ optional_policy(`
+@@ -805,7 +1158,6 @@ optional_policy(`
')
optional_policy(`
@@ -61744,7 +62255,7 @@ index 29a9565..f131c5a 100644
udev_manage_pid_files(initrc_t)
udev_manage_rules_files(initrc_t)
')
-@@ -815,11 +1163,24 @@ optional_policy(`
+@@ -815,11 +1167,24 @@ optional_policy(`
')
optional_policy(`
@@ -61770,7 +62281,7 @@ index 29a9565..f131c5a 100644
ifdef(`distro_redhat',`
# system-config-services causes avc messages that should be dontaudited
-@@ -829,6 +1190,25 @@ optional_policy(`
+@@ -829,6 +1194,25 @@ optional_policy(`
optional_policy(`
mono_domtrans(initrc_t)
')
@@ -61796,7 +62307,7 @@ index 29a9565..f131c5a 100644
')
optional_policy(`
-@@ -844,6 +1224,10 @@ optional_policy(`
+@@ -844,6 +1228,10 @@ optional_policy(`
')
optional_policy(`
@@ -61807,7 +62318,7 @@ index 29a9565..f131c5a 100644
# Set device ownerships/modes.
xserver_setattr_console_pipes(initrc_t)
-@@ -854,3 +1238,149 @@ optional_policy(`
+@@ -854,3 +1242,149 @@ optional_policy(`
optional_policy(`
zebra_read_config(initrc_t)
')
@@ -64826,21 +65337,24 @@ index 4d06ae3..e81b7ac 100644
seutil_sigchld_newrole(cardmgr_t)
')
diff --git a/policy/modules/system/raid.fc b/policy/modules/system/raid.fc
-index ed9c70d..b961d53 100644
+index ed9c70d..7a6f23a 100644
--- a/policy/modules/system/raid.fc
+++ b/policy/modules/system/raid.fc
-@@ -1,4 +1,10 @@
+@@ -1,6 +1,13 @@
-/dev/.mdadm.map -- gen_context(system_u:object_r:mdadm_map_t,s0)
+/dev/.mdadm\.map -- gen_context(system_u:object_r:mdadm_var_run_t,s0)
+/dev/md(/.*)? gen_context(system_u:object_r:mdadm_var_run_t,s0)
-+
+
+#669402
+/usr/sbin/iprdump -- gen_context(system_u:object_r:mdadm_exec_t,s0)
-+/usr/sbin/iprinit -- gen_context(system_u:object_r:mdadm_exec_t,s0)
-+/usr/sbin/iprupdate -- gen_context(system_u:object_r:mdadm_exec_t,s0)
-
/sbin/mdadm -- gen_context(system_u:object_r:mdadm_exec_t,s0)
/sbin/mdmpd -- gen_context(system_u:object_r:mdadm_exec_t,s0)
+
+ /var/run/mdadm(/.*)? gen_context(system_u:object_r:mdadm_var_run_t,s0)
++
++/usr/sbin/iprinit -- gen_context(system_u:object_r:mdadm_exec_t,s0)
++/usr/sbin/iprupdate -- gen_context(system_u:object_r:mdadm_exec_t,s0)
++/usr/sbin/raid-check -- gen_context(system_u:object_r:mdadm_exec_t,s0)
diff --git a/policy/modules/system/raid.if b/policy/modules/system/raid.if
index b1a85b5..db0d815 100644
--- a/policy/modules/system/raid.if
@@ -64871,7 +65385,7 @@ index b1a85b5..db0d815 100644
##
##
diff --git a/policy/modules/system/raid.te b/policy/modules/system/raid.te
-index a19ecea..dbcca4d 100644
+index a19ecea..63c3936 100644
--- a/policy/modules/system/raid.te
+++ b/policy/modules/system/raid.te
@@ -10,11 +10,9 @@ type mdadm_exec_t;
@@ -64888,9 +65402,12 @@ index a19ecea..dbcca4d 100644
########################################
#
-@@ -25,13 +23,13 @@ allow mdadm_t self:capability { dac_override sys_admin ipc_lock };
+@@ -23,15 +21,15 @@ files_pid_file(mdadm_var_run_t)
+
+ allow mdadm_t self:capability { dac_override sys_admin ipc_lock };
dontaudit mdadm_t self:capability sys_tty_config;
- allow mdadm_t self:process { sigchld sigkill sigstop signull signal };
+-allow mdadm_t self:process { sigchld sigkill sigstop signull signal };
++allow mdadm_t self:process { getsched setsched sigchld sigkill sigstop signull signal };
allow mdadm_t self:fifo_file rw_fifo_file_perms;
+allow mdadm_t self:netlink_kobject_uevent_socket create_socket_perms;
@@ -64933,6 +65450,17 @@ index a19ecea..dbcca4d 100644
term_dontaudit_list_ptys(mdadm_t)
+@@ -84,6 +86,10 @@ userdom_dontaudit_use_user_terminals(mdadm_t)
+ mta_send_mail(mdadm_t)
+
+ optional_policy(`
++ cron_system_entry(mdadm_t, mdadm_exec_t)
++')
++
++optional_policy(`
+ gpm_dontaudit_getattr_gpmctl(mdadm_t)
+ ')
+
diff --git a/policy/modules/system/selinuxutil.fc b/policy/modules/system/selinuxutil.fc
index 2cc4bda..167c358 100644
--- a/policy/modules/system/selinuxutil.fc
@@ -66435,10 +66963,10 @@ index 34d0ec5..ac52258 100644
+')
diff --git a/policy/modules/system/systemd.fc b/policy/modules/system/systemd.fc
new file mode 100644
-index 0000000..500db64
+index 0000000..839455d
--- /dev/null
+++ b/policy/modules/system/systemd.fc
-@@ -0,0 +1,18 @@
+@@ -0,0 +1,19 @@
+/bin/systemd-notify -- gen_context(system_u:object_r:systemd_notify_exec_t,s0)
+
+/bin/systemctl -- gen_context(system_u:object_r:systemd_systemctl_exec_t,s0)
@@ -66457,6 +66985,7 @@ index 0000000..500db64
+/var/run/systemd/users(/.*)? gen_context(system_u:object_r:systemd_logind_var_run_t,s0)
+/var/run/systemd/ask-password-block/[^/]* -p gen_context(system_u:object_r:systemd_device_t,s0)
+/dev/\.systemd/ask-password-block/[^/]* -p gen_context(system_u:object_r:systemd_device_t,s0)
++/var/run/initramfs <>
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if
new file mode 100644
index 0000000..fc27830
@@ -66842,10 +67371,10 @@ index 0000000..fc27830
+
diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
new file mode 100644
-index 0000000..d1bcd34
+index 0000000..a91d3dd
--- /dev/null
+++ b/policy/modules/system/systemd.te
-@@ -0,0 +1,346 @@
+@@ -0,0 +1,352 @@
+policy_module(systemd, 1.0.0)
+
+#######################################
@@ -66932,6 +67461,7 @@ index 0000000..d1bcd34
+dev_setattr_sound_dev(systemd_logind_t)
+dev_setattr_generic_usb_dev(systemd_logind_t)
+dev_setattr_video_dev(systemd_logind_t)
++dev_setattr_all_chr_files(systemd_logind_t)
+
+# /etc/udev/udev.conf should probably have a private type if only for confined administration
+# /etc/nsswitch.conf
@@ -66986,7 +67516,7 @@ index 0000000..d1bcd34
+# Local policy
+#
+
-+allow systemd_passwd_agent_t self:capability chown;
++allow systemd_passwd_agent_t self:capability { chown sys_tty_config };
+allow systemd_passwd_agent_t self:process { setfscreate setsockcreate signal };
+allow systemd_passwd_agent_t self:unix_dgram_socket create_socket_perms;
+
@@ -67002,6 +67532,8 @@ index 0000000..d1bcd34
+dev_read_generic_files(systemd_passwd_agent_t)
+dev_write_generic_sock_files(systemd_passwd_agent_t)
+
++term_read_console(systemd_passwd_agent_t)
++
+auth_use_nsswitch(systemd_passwd_agent_t)
+
+init_create_pid_dirs(systemd_passwd_agent_t)
@@ -67031,6 +67563,7 @@ index 0000000..d1bcd34
+allow systemd_tmpfiles_t self:unix_dgram_socket create_socket_perms;
+
+kernel_read_network_state(systemd_tmpfiles_t)
++files_delete_kernel_modules(systemd_tmpfiles_t)
+
+dev_write_kmsg(systemd_tmpfiles_t)
+
@@ -67135,6 +67668,7 @@ index 0000000..d1bcd34
+domain_use_interactive_fds(systemd_notify_t)
+
+files_read_etc_files(systemd_notify_t)
++files_read_usr_files(systemd_notify_t)
+
+fs_getattr_cgroup_files(systemd_notify_t)
+
@@ -67164,6 +67698,7 @@ index 0000000..d1bcd34
+domain_use_interactive_fds(systemd_logger_t)
+
+files_read_etc_files(systemd_logger_t)
++files_read_usr_files(systemd_logger_t)
+
+# only needs write
+term_use_generic_ptys(systemd_logger_t)
diff --git a/selinux-policy.spec b/selinux-policy.spec
index 23c0704..e39ed40 100644
--- a/selinux-policy.spec
+++ b/selinux-policy.spec
@@ -17,7 +17,7 @@
Summary: SELinux policy configuration
Name: selinux-policy
Version: 3.10.0
-Release: 22%{?dist}
+Release: 23%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: serefpolicy-%{version}.tgz
@@ -466,6 +466,14 @@ SELinux Reference policy mls base module.
%endif
%changelog
+* Tue Aug 30 2011 Miroslav Grepl 3.10.0-23
+- Add glance policy
+- Allow mdadm setsched
+- /var/run/initramfs should not be relabeled with a restorecon run
+- memcache can be setup to override sys_resource
+- Allow httpd_t to read tetex data
+- Allow systemd_tmpfiles to delete kernel modules left in /tmp directory.
+
* Mon Aug 29 2011 Miroslav Grepl 3.10.0-22
- Allow Postfix to deliver to Dovecot LMTP socket
- Ignore bogus sys_module for lldpad