From: dsugar@tresys.com (David Sugar) Date: Wed, 6 Dec 2017 14:38:49 +0000 Subject: [refpolicy] [PATCH 1/1-v2] Create interfaces to write xserver log files. Message-ID: To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com Add interfaces to grant write only access to inherited xserver_log_t and xsession_log_t files. Signed-off-by: Dave Sugar --- 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',` ######################################## ## +## Write to inherited xsession log +## files such as .xsession-errors. +## +## +## +## Domain allowed access. +## +## +# +interface(`xserver_write_inherited_xsession_log',` + gen_require(` + type xsession_log_t; + ') + + allow $1 xsession_log_t:file { append write }; +') + + +######################################## +## ## Read and write xsession log ## files such as .xsession-errors. ## @@ -1096,6 +1116,25 @@ interface(`xserver_manage_xsession_log',` ######################################## ## +## Write to inherited X server log +## files like /var/log/lightdm/lightdm.log +## +## +## +## Domain allowed access. +## +## +# +interface(`xserver_write_inherited_log',` + gen_require(` + type xserver_log_t; + ') + + allow $1 xserver_log_t:file { append write }; +') + +######################################## +## ## Get the attributes of X server logs. ## ## -- 2.13.6 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20171206/370dca14/attachment.html