SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* pulseaudio patch
@ 2020-02-12  2:38 Russell Coker
  2020-02-16 15:33 ` Chris PeBenito
  0 siblings, 1 reply; 4+ messages in thread
From: Russell Coker @ 2020-02-12  2:38 UTC (permalink / raw)
  To: selinux-refpolicy


[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

The attached patch has a few small changes needed for pulseaudio on systemd.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

[-- Attachment #2: pulseaudio.diff --]
[-- Type: text/x-patch, Size: 1700 bytes --]

Index: refpolicy-2.20200209/policy/modules/apps/pulseaudio.te
===================================================================
--- refpolicy-2.20200209.orig/policy/modules/apps/pulseaudio.te
+++ refpolicy-2.20200209/policy/modules/apps/pulseaudio.te
@@ -92,6 +92,8 @@ files_pid_filetrans(pulseaudio_t, pulsea
 
 manage_dirs_pattern(pulseaudio_t, pulseaudio_xdg_config_t, pulseaudio_xdg_config_t)
 manage_files_pattern(pulseaudio_t, pulseaudio_xdg_config_t, pulseaudio_xdg_config_t)
+allow pulseaudio_t pulseaudio_xdg_config_t:file map;
+
 xdg_config_filetrans(pulseaudio_t, pulseaudio_xdg_config_t, dir, "pulse")
 
 allow pulseaudio_t pulseaudio_client:process signull;
@@ -146,7 +148,7 @@ miscfiles_read_localization(pulseaudio_t
 
 seutil_read_config(pulseaudio_t)
 
-userdom_read_user_tmpfs_files(pulseaudio_t)
+userdom_rw_user_tmpfs_files(pulseaudio_t)
 userdom_map_user_tmpfs_files(pulseaudio_t)
 userdom_delete_user_tmpfs_files(pulseaudio_t)
 userdom_search_user_home_dirs(pulseaudio_t)
@@ -155,6 +157,7 @@ userdom_search_user_home_content(pulseau
 userdom_manage_user_tmp_dirs(pulseaudio_t)
 userdom_manage_user_tmp_files(pulseaudio_t)
 userdom_manage_user_tmp_sockets(pulseaudio_t)
+userdom_write_all_user_runtime_named_sockets(pulseaudio_t)
 
 tunable_policy(`pulseaudio_execmem',`
 	allow pulseaudio_t self:process execmem;
@@ -224,6 +227,13 @@ optional_policy(`
 ')
 
 optional_policy(`
+	# for /run/systemd/seats and /run/systemd/sessions
+	systemd_read_logind_sessions_files(pulseaudio_t)
+	# for /run/systemd/users/$PID
+	systemd_read_logind_pids(pulseaudio_t)
+')
+
+optional_policy(`
 	udev_read_pid_files(pulseaudio_t)
 	udev_read_state(pulseaudio_t)
 	udev_read_db(pulseaudio_t)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pulseaudio patch
  2020-02-12  2:38 pulseaudio patch Russell Coker
@ 2020-02-16 15:33 ` Chris PeBenito
  0 siblings, 0 replies; 4+ messages in thread
From: Chris PeBenito @ 2020-02-16 15:33 UTC (permalink / raw)
  To: russell, selinux-refpolicy

On 2/11/20 9:38 PM, Russell Coker wrote:
> The attached patch has a few small changes needed for pulseaudio on systemd.

Please inline patch and add signed-off-by.

-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pulseaudio patch
  2020-04-05  8:44 Russell Coker
@ 2020-04-09 13:39 ` Chris PeBenito
  0 siblings, 0 replies; 4+ messages in thread
From: Chris PeBenito @ 2020-04-09 13:39 UTC (permalink / raw)
  To: Russell Coker, selinux-refpolicy

On 4/5/20 4:44 AM, Russell Coker wrote:
> Patch for pulseaudio against latest GIT
> 
> Signed-off-by: Russell Coker <russell@coker.com.au>
> 
> 
> Index: refpolicy-2.20200209/policy/modules/apps/pulseaudio.te
> ===================================================================
> --- refpolicy-2.20200209.orig/policy/modules/apps/pulseaudio.te
> +++ refpolicy-2.20200209/policy/modules/apps/pulseaudio.te
> @@ -92,6 +92,8 @@ files_pid_filetrans(pulseaudio_t, pulsea
>   
>   manage_dirs_pattern(pulseaudio_t, pulseaudio_xdg_config_t, pulseaudio_xdg_config_t)
>   manage_files_pattern(pulseaudio_t, pulseaudio_xdg_config_t, pulseaudio_xdg_config_t)
> +allow pulseaudio_t pulseaudio_xdg_config_t:file map;
> +
>   xdg_config_filetrans(pulseaudio_t, pulseaudio_xdg_config_t, dir, "pulse")
>   
>   allow pulseaudio_t pulseaudio_client:process signull;
> @@ -146,7 +148,7 @@ miscfiles_read_localization(pulseaudio_t
>   
>   seutil_read_config(pulseaudio_t)
>   
> -userdom_read_user_tmpfs_files(pulseaudio_t)
> +userdom_rw_user_tmpfs_files(pulseaudio_t)
>   userdom_map_user_tmpfs_files(pulseaudio_t)
>   userdom_delete_user_tmpfs_files(pulseaudio_t)
>   userdom_search_user_home_dirs(pulseaudio_t)
> @@ -155,6 +157,7 @@ userdom_search_user_home_content(pulseau
>   userdom_manage_user_tmp_dirs(pulseaudio_t)
>   userdom_manage_user_tmp_files(pulseaudio_t)
>   userdom_manage_user_tmp_sockets(pulseaudio_t)
> +userdom_write_all_user_runtime_named_sockets(pulseaudio_t)

Does not exist in refpolicy.

>   tunable_policy(`pulseaudio_execmem',`
>   	allow pulseaudio_t self:process execmem;
> @@ -224,6 +227,13 @@ optional_policy(`
>   ')
>   
>   optional_policy(`
> +	# for /run/systemd/seats and /run/systemd/sessions
> +	systemd_read_logind_sessions_files(pulseaudio_t)
> +	# for /run/systemd/users/$PID
> +	systemd_read_logind_pids(pulseaudio_t)
> +')
> +
> +optional_policy(`
>   	udev_read_pid_files(pulseaudio_t)
>   	udev_read_state(pulseaudio_t)
>   	udev_read_db(pulseaudio_t)
> 

Merged, though I dropped the one call above which doesn't exist in refpolicy.


-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 4+ messages in thread

* pulseaudio patch
@ 2020-04-05  8:44 Russell Coker
  2020-04-09 13:39 ` Chris PeBenito
  0 siblings, 1 reply; 4+ messages in thread
From: Russell Coker @ 2020-04-05  8:44 UTC (permalink / raw)
  To: selinux-refpolicy

Patch for pulseaudio against latest GIT

Signed-off-by: Russell Coker <russell@coker.com.au>


Index: refpolicy-2.20200209/policy/modules/apps/pulseaudio.te
===================================================================
--- refpolicy-2.20200209.orig/policy/modules/apps/pulseaudio.te
+++ refpolicy-2.20200209/policy/modules/apps/pulseaudio.te
@@ -92,6 +92,8 @@ files_pid_filetrans(pulseaudio_t, pulsea
 
 manage_dirs_pattern(pulseaudio_t, pulseaudio_xdg_config_t, pulseaudio_xdg_config_t)
 manage_files_pattern(pulseaudio_t, pulseaudio_xdg_config_t, pulseaudio_xdg_config_t)
+allow pulseaudio_t pulseaudio_xdg_config_t:file map;
+
 xdg_config_filetrans(pulseaudio_t, pulseaudio_xdg_config_t, dir, "pulse")
 
 allow pulseaudio_t pulseaudio_client:process signull;
@@ -146,7 +148,7 @@ miscfiles_read_localization(pulseaudio_t
 
 seutil_read_config(pulseaudio_t)
 
-userdom_read_user_tmpfs_files(pulseaudio_t)
+userdom_rw_user_tmpfs_files(pulseaudio_t)
 userdom_map_user_tmpfs_files(pulseaudio_t)
 userdom_delete_user_tmpfs_files(pulseaudio_t)
 userdom_search_user_home_dirs(pulseaudio_t)
@@ -155,6 +157,7 @@ userdom_search_user_home_content(pulseau
 userdom_manage_user_tmp_dirs(pulseaudio_t)
 userdom_manage_user_tmp_files(pulseaudio_t)
 userdom_manage_user_tmp_sockets(pulseaudio_t)
+userdom_write_all_user_runtime_named_sockets(pulseaudio_t)
 
 tunable_policy(`pulseaudio_execmem',`
 	allow pulseaudio_t self:process execmem;
@@ -224,6 +227,13 @@ optional_policy(`
 ')
 
 optional_policy(`
+	# for /run/systemd/seats and /run/systemd/sessions
+	systemd_read_logind_sessions_files(pulseaudio_t)
+	# for /run/systemd/users/$PID
+	systemd_read_logind_pids(pulseaudio_t)
+')
+
+optional_policy(`
 	udev_read_pid_files(pulseaudio_t)
 	udev_read_state(pulseaudio_t)
 	udev_read_db(pulseaudio_t)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12  2:38 pulseaudio patch Russell Coker
2020-02-16 15:33 ` Chris PeBenito
2020-04-05  8:44 Russell Coker
2020-04-09 13:39 ` Chris PeBenito

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org
	public-inbox-index selinux-refpolicy

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git