All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] [PATCH 18/34]: patch for the policykit module (labeling, start from dbus, read xdm files)
@ 2011-02-16  6:22 Guido Trentalancia
  2011-02-28 13:56 ` Christopher J. PeBenito
  0 siblings, 1 reply; 10+ messages in thread
From: Guido Trentalancia @ 2011-02-16  6:22 UTC (permalink / raw)
  To: refpolicy

This patch adds a file context for the /var/lib/polkit-1 directory.
It then allows policykit to be started from dbus. It also adds
some other permissions needed to run policykit and a new interface
which is used to read xdm files.

diff -pruN refpolicy-git-02022011-test-apply2/policy/modules/services/policykit.fc refpolicy-git-02022011-test-apply3/policy/modules/services/policykit.fc
--- refpolicy-git-02022011-test-apply2/policy/modules/services/policykit.fc	2011-01-08 19:07:21.280747356 +0100
+++ refpolicy-git-02022011-test-apply3/policy/modules/services/policykit.fc	2011-02-07 03:31:53.547856778 +0100
@@ -11,5 +11,6 @@
 /var/lib/misc/PolicyKit.reload			gen_context(system_u:object_r:policykit_reload_t,s0)
 /var/lib/PolicyKit(/.*)?			gen_context(system_u:object_r:policykit_var_lib_t,s0)
 /var/lib/PolicyKit-public(/.*)?			gen_context(system_u:object_r:policykit_var_lib_t,s0)
+/var/lib/polkit-1(/.*)?				gen_context(system_u:object_r:policykit_var_lib_t,s0)
 /var/run/PolicyKit(/.*)?			gen_context(system_u:object_r:policykit_var_run_t,s0)
 
diff -pruN refpolicy-git-02022011-test-apply2/policy/modules/services/policykit.te refpolicy-git-02022011-test-apply3/policy/modules/services/policykit.te
--- refpolicy-git-02022011-test-apply2/policy/modules/services/policykit.te	2011-02-07 03:31:24.763790944 +0100
+++ refpolicy-git-02022011-test-apply3/policy/modules/services/policykit.te	2011-02-07 03:31:53.550857306 +0100
@@ -35,8 +35,8 @@ files_pid_file(policykit_var_run_t)
 # policykit local policy
 #
 
-allow policykit_t self:capability { setgid setuid };
-allow policykit_t self:process getattr;
+allow policykit_t self:capability { setgid setuid sys_ptrace };
+allow policykit_t self:process { getattr getsched signal };
 allow policykit_t self:fifo_file rw_file_perms;
 allow policykit_t self:unix_dgram_socket create_socket_perms;
 allow policykit_t self:unix_stream_socket create_stream_socket_perms;
@@ -57,6 +57,7 @@ manage_files_pattern(policykit_t, policy
 files_pid_filetrans(policykit_t, policykit_var_run_t, { file dir })
 
 kernel_read_kernel_sysctls(policykit_t)
+kernel_read_system_state(policykit_t)
 
 files_read_etc_files(policykit_t)
 files_read_usr_files(policykit_t)
@@ -78,6 +79,14 @@ optional_policy(`
 	gnome_read_config(policykit_t)
 ')
 
+optional_policy(`
+	dbus_system_domain(policykit_t, policykit_exec_t)
+')
+
+optional_policy(`
+	xserver_read_xdm_files(policykit_t)
+')
+
 ########################################
 #
 # polkit_auth local policy
diff -pruN refpolicy-git-02022011-test-apply2/policy/modules/services/xserver.if refpolicy-git-02022011-test-apply3/policy/modules/services/xserver.if
--- refpolicy-git-02022011-test-apply2/policy/modules/services/xserver.if	2011-01-08 19:07:21.344757464 +0100
+++ refpolicy-git-02022011-test-apply3/policy/modules/services/xserver.if	2011-02-07 03:31:53.552857658 +0100
@@ -638,6 +638,25 @@ interface(`xserver_rw_console',`
 
 ########################################
 ## <summary>
+##      Read xdm files.
+## </summary>
+## <param name="domain">
+##      <summary>
+##      Domain allowed access.
+##      </summary>
+## </param>
+#
+interface(`xserver_read_xdm_files',`
+        gen_require(`
+		type xdm_t;
+	')
+
+	allow $1 xdm_t:dir list_dir_perms;
+	read_files_pattern($1, xdm_t, xdm_t)
+')
+
+########################################
+## <summary>
 ##	Use file descriptors for xdm.
 ## </summary>
 ## <param name="domain">

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

end of thread, other threads:[~2011-03-03 13:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16  6:22 [refpolicy] [PATCH 18/34]: patch for the policykit module (labeling, start from dbus, read xdm files) Guido Trentalancia
2011-02-28 13:56 ` Christopher J. PeBenito
2011-02-28 15:28   ` Daniel J Walsh
2011-02-28 19:07   ` Guido Trentalancia
2011-03-01 19:12     ` Christopher J. PeBenito
2011-03-01 22:47       ` Guido Trentalancia
2011-03-02 13:51         ` Christopher J. PeBenito
2011-03-02 14:47           ` Sven Vermeulen
2011-03-02 19:55           ` Guido Trentalancia
2011-03-03 13:28             ` Christopher J. PeBenito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.