From: pebenito@ieee.org (Chris PeBenito) Date: Tue, 6 Dec 2016 20:23:24 -0500 Subject: [refpolicy] [PATCH v9 2/2] Apache OpenOffice module (contrib policy part) In-Reply-To: <1481056907.14617.3.camel@trentalancia.net> References: <1480113700.5692.4.camel@trentalancia.net> <848bd66a-ead2-97e3-b952-265ab5d8c903@ieee.org> <1480506047.4743.15.camel@trentalancia.net> <129294c5-fc05-bd28-74b0-87e9bc3c2ef8@ieee.org> <1480677884.3915.7.camel@trentalancia.net> <1480860300.13582.3.camel@trentalancia.net> <1480865168.13582.18.camel@trentalancia.net> <1480936039.11864.3.camel@trentalancia.net> <1481056907.14617.3.camel@trentalancia.net> Message-ID: To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On 12/06/16 15:41, Guido Trentalancia via refpolicy wrote: > This is a patch that I have created and tested to support Apache > OpenOffice with its own module (contrib policy part, 2/2). > > The file contexts (and initial tests) are based on the default > installation path for version 4 of the office suite. > > Since the second version it includes revisions from Dominick Grift. > > Since the third version it should correctly manage files in home > directories and allow some other major functionality. > > The fourth version of the patch introduces a boolean to enable or > disable software updates from the network (application and/or > extensions). > > The fifth version of the patch adds the ability to connect to the > X display manager (XDM) using Unix domain sockets (interface > xserver_stream_connect_xdm()). Also the fifth version splits the > whole patch into separate base policy / contrib policy patches as > required. > > The sixth version of the patch adds the ability to run the > evolution email application. > > The seventh version of the patch, improves the integration with > the evolution email application. > > The eighth version of the patch, adds the support for integration > with mozilla and improves the integration with thunderbird. > > This nineth version of the patch, avoids auditing some denial > messages. > > All released versions are safe to apply, each new version just > brings improved application functionality and better integration > with other desktop applications. > > Although this patch has only been tested with Apache OpenOffice > version 4, it might also work with earlier versions (in particular > version 3) or at least it can be easily adapted for the purpose. I've merged this, but I'd like a couple interface renames (noted below). > Signed-off-by: Guido Trentalancia > --- > policy/modules/contrib/evolution.if | 38 ++++++++++ > policy/modules/contrib/evolution.te | 5 + > policy/modules/contrib/mozilla.te | 5 + > policy/modules/contrib/openoffice.fc | 30 ++++++++ > policy/modules/contrib/openoffice.if | 88 ++++++++++++++++++++++++ > policy/modules/contrib/openoffice.te | 120 ++++++++++++++++++++++++++++++++++ > policy/modules/contrib/thunderbird.te | 5 + > 7 files changed, 291 insertions(+) > > diff -pruN refpolicy-git-25112016-orig/policy/modules/contrib/evolution.if refpolicy-git-25112016/policy/modules/contrib/evolution.if > --- refpolicy-git-25112016-orig/policy/modules/contrib/evolution.if 2016-12-04 16:02:48.317069925 +0100 > +++ refpolicy-git-25112016/policy/modules/contrib/evolution.if 2016-12-04 16:03:37.777350810 +0100 > @@ -107,6 +107,24 @@ interface(`evolution_home_filetrans',` > > ######################################## > ## > +## Read evolution home files. > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`evolution_read_evolution_home_files',` evolution_read_home_files(). > + gen_require(` > + type evolution_t, evolution_home_t; > + ') > + > + read_files_pattern($1, evolution_home_t, evolution_home_t) > +') > + > +######################################## > +## > ## Connect to evolution using a unix > ## domain stream socket. > ## [...] > diff -pruN refpolicy-git-25112016-orig/policy/modules/contrib/openoffice.if refpolicy-git-25112016/policy/modules/contrib/openoffice.if > --- refpolicy-git-25112016-orig/policy/modules/contrib/openoffice.if 1970-01-01 01:00:00.000000000 +0100 > +++ refpolicy-git-25112016/policy/modules/contrib/openoffice.if 2016-12-06 21:27:07.252411657 +0100 [...] > + > +######################################## > +## > +## Read and write temporary > +## openoffice files. > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`ooffice_rw_ooffice_tmp_files',` ooffice_rw_tmp_files() > + gen_require(` > + type ooffice_tmp_t; > + ') > + > + rw_files_pattern($1, ooffice_tmp_t, ooffice_tmp_t) > +') > + > +######################################## > +## > +## Do not audit attempts to execute > +## files in temporary directories. > +## > +## > +## > +## Domain to not audit. > +## > +## > +# > +interface(`ooffice_dontaudit_exec_tmp_files',` > + gen_require(` > + type ooffice_tmp_t; > + ') > + > + dontaudit $1 ooffice_tmp_t:file exec_file_perms; > +') -- Chris PeBenito