make gpg pin entry passphrase dialog work.
PATCH 1/1 make gpg pin entry passphrase dialog work.
Currently the GPG pin entry dialog does not work for confined users. Enclosed patch is an attempt to fix that.
I realize that chances of this patch ever getting adopted is slim but i would be satisfied if the issue is recognized.
Some considerations:
- In this patch i decided to user pulseaudio_exec instead of pulseaudio_domtrans. This decision causes considerable more policy to be required and i am not confident that this is worth it.
- This patch implements labelling inspired by the freedesktop xdg specification.
---
:100644 100644 223a9d1... 1bc8056... M policy/modules/apps/gnome.fc
:100644 100644 9601de0... a407f5b... M policy/modules/apps/gnome.if
:100644 100644 984009e... 1828bd0... M policy/modules/apps/gnome.te
:100644 100644 b8c96f6... 8d56244... M policy/modules/apps/gpg.te
:100644 100644 5164058... c9024db... M policy/modules/apps/pulseaudio.fc
:100644 100644 2116903... d31ac6a... M policy/modules/apps/pulseaudio.if
:100644 100644 1d0dded... 0818c97... M policy/modules/apps/pulseaudio.te
:100644 100644 990063c... 16f15a6... M policy/modules/system/userdomain.if
policy/modules/apps/gnome.fc | 5 +++ policy/modules/apps/gnome.if | 19 ++++++++++ policy/modules/apps/gnome.te | 12 ++++++- policy/modules/apps/gpg.te | 67 +++++++++++++++++++++++++++++++++-- policy/modules/apps/pulseaudio.fc | 5 ++- policy/modules/apps/pulseaudio.if | 58 ++++++++++++++++++++++++++++++ policy/modules/apps/pulseaudio.te | 8 ++++ policy/modules/system/userdomain.if | 19 ++++++++++ 8 files changed, 188 insertions(+), 5 deletions(-)
policy/modules/apps/gnome.fc +5 -0
@@ -1,5 +1,10 @@ +HOME_DIR/\.cache(/.*)? gen_context(system_u:object_r:cache_home_t,s0) +HOME_DIR/\.config(/.*)? gen_context(system_u:object_r:config_home_t,s0) HOME_DIR/\.config/gtk-.* gen_context(system_u:object_r:gnome_home_t,s0) HOME_DIR/\.gconf(d)?(/.*)? gen_context(system_u:object_r:gconf_home_t,s0) +HOME_DIR/\.local.* gen_context(system_u:object_r:gconf_home_t,s0) +HOME_DIR/\.local/share(.*)? gen_context(system_u:object_r:data_home_t,s0) +/HOME_DIR/\.Xdefaults gen_context(system_u:object_r:config_home_t,s0) /etc/gconf(/.*)? gen_context(system_u:object_r:gconf_etc_t,s0)
policy/modules/apps/gnome.if +19 -0
@@ -91,3 +91,22 @@ interface(`gnome_manage_config',` allow $1 gnome_home_t:file manage_file_perms; userdom_search_user_home_dirs($1) ') + +######################################## +## <summary> +## Read and write Gnome cache home files. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`gnome_rw_cache_home_files',` + gen_require(` + type cache_home_t; + ') + + rw_files_pattern($1, cache_home_t, cache_home_t) + userdom_search_user_home_dirs($1) +')
policy/modules/apps/gnome.te +11 -1
@@ -7,11 +7,21 @@ policy_module(gnome, 2.0.0) # attribute gnomedomain; +attribute gnome_home_type; type gconf_etc_t; files_type(gconf_etc_t) -type gconf_home_t; +type data_home_t, gnome_home_type; +userdom_user_home_content(data_home_t) + +type config_home_t, gnome_home_type; +userdom_user_home_content(config_home_t) + +type cache_home_t, gnome_home_type; +userdom_user_home_content(cache_home_t) + +type gconf_home_t, gnome_home_type; typealias gconf_home_t alias { user_gconf_home_t staff_gconf_home_t sysadm_gconf_home_t }; typealias gconf_home_t alias { auditadm_gconf_home_t secadm_gconf_home_t }; userdom_user_home_content(gconf_home_t)
policy/modules/apps/gpg.te +64 -3
131 lines not on this page · raw message
policy/modules/apps/pulseaudio.fc +4 -1
@@ -1 +1,4 @@ -/usr/bin/pulseaudio -- gen_context(system_u:object_r:pulseaudio_exec_t,s0) +HOME_DIR/\.pulse(/.*)? gen_context(system_u:object_r:pulseaudio_home_t,s0) +HOME_DIR/\.pulse-cookie gen_context(system_u:object_r:pulseaudio_home_t,s0) + +/usr/bin/pulseaudio -- gen_context(system_u:object_r:pulseaudio_exec_t,s0)
policy/modules/apps/pulseaudio.if +58 -0
64 lines not on this page · raw message
policy/modules/apps/pulseaudio.te +8 -0
@@ -11,6 +11,9 @@ type pulseaudio_exec_t; application_domain(pulseaudio_t, pulseaudio_exec_t) role system_r types pulseaudio_t; +type pulseaudio_home_t; +userdom_user_home_content(pulseaudio_home_t) + ######################################## # # pulseaudio local policy
@@ -24,6 +27,11 @@ allow pulseaudio_t self:tcp_socket create_stream_socket_perms; allow pulseaudio_t self:udp_socket create_socket_perms; allow pulseaudio_t self:netlink_kobject_uevent_socket create_socket_perms; +manage_dirs_pattern(pulseaudio_t, pulseaudio_home_t, pulseaudio_home_t) +manage_files_pattern(pulseaudio_t, pulseaudio_home_t, pulseaudio_home_t) +# userdom_user_home_dir_filetrans(pulseaudio_t, pulseaudio_home_t, { dir file }) +userdom_search_user_home_dirs(pulseaudio_t) + can_exec(pulseaudio_t, pulseaudio_exec_t) kernel_read_system_state(pulseaudio_t)
policy/modules/system/userdomain.if +19 -0
@@ -3077,6 +3077,25 @@ interface(`userdom_sigchld_all_users',` ######################################## ## <summary> +## Send a SIGNULL signal to +## unprivileged user domains. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`userdom_signull_unpriv_users',` + gen_require(` + attribute unpriv_userdomain; + ') + + allow $1 unpriv_userdomain:process signull; +') + +######################################## +## <summary> ## Create keys for all user domains. ## </summary> ## <param name="domain">
Signature · 9 lines
1.7.0.1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100322/cbac7f73/attachment.bin