From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH] Update couchdb policy
Date: Fri, 31 Jan 2014 23:05:46 -0500 [thread overview]
Message-ID: <52EC729A.7080001@tresys.com> (raw)
In-Reply-To: <1390691888-4173-1-git-send-email-aranea@aixah.de>
On 1/25/2014 6:18 PM, Luis Ressel wrote:
> * Add separate db for couchjs, as it needs execmem
> * Add several dontaudits to hide noise caused by Erlang's disksup
> ---
> couchdb.fc | 16 +++++++---------
> couchdb.te | 26 ++++++++++++++++++++++++--
> 2 files changed, 31 insertions(+), 11 deletions(-)
>
> diff --git a/couchdb.fc b/couchdb.fc
> index c086302..5c1388a 100644
> --- a/couchdb.fc
> +++ b/couchdb.fc
> @@ -1,11 +1,9 @@
> -/etc/couchdb(/.*)? gen_context(system_u:object_r:couchdb_conf_t,s0)
> +/etc/couchdb(/.*)? gen_context(system_u:object_r:couchdb_conf_t,s0)
>
> -/etc/rc\.d/init\.d/couchdb -- gen_context(system_u:object_r:couchdb_initrc_exec_t,s0)
> +/usr/bin/couchdb -- gen_context(system_u:object_r:couchdb_exec_t,s0)
> +/usr/lib/couchdb/bin/couchjs -- gen_context(system_u:object_r:couchdb_js_exec_t,s0)
> +/usr/lib/couchdb/erlang/lib/couch-[0-9.]+/priv/couchspawnkillable -- gen_context(system_u:object_r:bin_t,s0)
>
> -/usr/bin/couchdb -- gen_context(system_u:object_r:couchdb_exec_t,s0)
> -
> -/var/lib/couchdb(/.*)? gen_context(system_u:object_r:couchdb_var_lib_t,s0)
> -
> -/var/log/couchdb(/.*)? gen_context(system_u:object_r:couchdb_log_t,s0)
> -
> -/var/run/couchdb(/.*)? gen_context(system_u:object_r:couchdb_var_run_t,s0)
> +/var/lib/couchdb(/.*)? gen_context(system_u:object_r:couchdb_var_lib_t,s0)
> +/var/log/couchdb(/.*)? gen_context(system_u:object_r:couchdb_log_t,s0)
> +/var/run/couchdb(/.*)? gen_context(system_u:object_r:couchdb_var_run_t,s0)
Typically, its preferred that whitespace fixes be sent in separate patches.
> diff --git a/couchdb.te b/couchdb.te
> index ae1c1b1..1bf163e 100644
> --- a/couchdb.te
> +++ b/couchdb.te
> @@ -81,8 +86,25 @@ dev_read_urand(couchdb_t)
>
> files_read_usr_files(couchdb_t)
>
> +# disksup tries to monitor the local disks
> fs_getattr_xattr_fs(couchdb_t)
> +fs_dontaudit_getattr_all_fs(couchdb_t)
> +files_dontaudit_search_all_mountpoints(couchdb_t)
> +files_dontaudit_getattr_lost_found_dirs(couchdb_t)
> +dontaudit couchdb_t var_t:dir list_dir_perms;
This last rule needs to use an interface instead.
> auth_use_nsswitch(couchdb_t)
>
> miscfiles_read_localization(couchdb_t)
> +
> +domtrans_pattern(couchdb_t, couchdb_js_exec_t, couchdb_js_t)
> +
> +########################################
> +#
> +# couchdb_js policy
> +#
> +
> +allow couchdb_js_t self:process { execmem getsched setsched };
> +
> +files_read_usr_files(couchdb_js_t)
> +miscfiles_read_localization(couchdb_js_t)
Is this a complete set of rules for this domain? This doesn't look like it can really do anything, since it doesn't have any output.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2014-02-01 4:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 23:18 [refpolicy] [PATCH] Update couchdb policy Luis Ressel
2014-02-01 4:05 ` Christopher J. PeBenito [this message]
2014-02-01 10:28 ` Luis Ressel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52EC729A.7080001@tresys.com \
--to=cpebenito@tresys.com \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.