All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] [PATCH 1/1-v2] Create interfaces to write xserver log files.
@ 2017-12-06 14:38 David Sugar
  2017-12-06 15:06 ` Dominick Grift
  0 siblings, 1 reply; 3+ messages in thread
From: David Sugar @ 2017-12-06 14:38 UTC (permalink / raw)
  To: refpolicy

Add interfaces to grant write only access to inherited xserver_log_t and xsession_log_t files.

Signed-off-by: Dave Sugar <dsugar@tresys.com>
---
 policy/modules/services/xserver.if | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/policy/modules/services/xserver.if b/policy/modules/services/xserver.if
index e70046db..3a435abf 100644
--- a/policy/modules/services/xserver.if
+++ b/policy/modules/services/xserver.if
@@ -1058,6 +1058,26 @@ interface(`xserver_xsession_spec_domtrans',`

 ########################################
 ## <summary>
+##     Write to inherited  xsession log
+##     files such as .xsession-errors.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+#
+interface(`xserver_write_inherited_xsession_log',`
+       gen_require(`
+               type xsession_log_t;
+       ')
+
+       allow $1 xsession_log_t:file { append write };
+')
+
+
+########################################
+## <summary>
 ##      Read and write xsession log
 ##      files such as .xsession-errors.
 ## </summary>
@@ -1096,6 +1116,25 @@ interface(`xserver_manage_xsession_log',`

 ########################################
 ## <summary>
+##     Write to inherited X server log
+##  files like /var/log/lightdm/lightdm.log
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+#
+interface(`xserver_write_inherited_log',`
+       gen_require(`
+               type xserver_log_t;
+       ')
+
+       allow $1 xserver_log_t:file { append write };
+')
+
+########################################
+## <summary>
 ##      Get the attributes of X server logs.
 ## </summary>
 ## <param name="domain">
--
2.13.6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20171206/370dca14/attachment.html 

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

end of thread, other threads:[~2017-12-06 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 14:38 [refpolicy] [PATCH 1/1-v2] Create interfaces to write xserver log files David Sugar
2017-12-06 15:06 ` Dominick Grift
2017-12-06 18:19   ` David Sugar

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.