From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH v3 1/3] Support read/append/manage functions for various httpd content
Date: Tue, 26 Jun 2012 09:22:53 -0400 [thread overview]
Message-ID: <4FE9B7AD.6010707@tresys.com> (raw)
In-Reply-To: <20120624110826.GB995@siphos.be>
On 06/24/12 07:08, Sven Vermeulen wrote:
> Within the apache module, the apache_content_template() allows creation of
> additional derived types for "apache web content". But it is actually being
> used to label generic web content, and it creates additional types based on
> the prefix.
>
> When we want to support additional web servers (or parsers used by web
> servers) that do not run within the apache-provided domains, they have a
> hard time accessing the data. There is currently one interface available,
> called "apache_manage_all_content" but that's a lot of privileges for a
> parser that needs to read content.
>
> In this patch, we create additional attributes (like httpd_ra_content and
> httpd_rw_content) and define interfaces to manage the types that have these
> attributes assigned.
>
> Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
> ---
> apache.if | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 126 insertions(+), 2 deletions(-)
>
> diff --git a/apache.if b/apache.if
> index 6480167..a1d1905 100644
> --- a/apache.if
> +++ b/apache.if
> @@ -16,6 +16,8 @@ template(`apache_content_template',`
> attribute httpdcontent;
> attribute httpd_exec_scripts;
> attribute httpd_script_exec_type;
> + attribute httpd_rw_content;
> + attribute httpd_ra_content;
> type httpd_t, httpd_suexec_t, httpd_log_t;
> ')
> # allow write access to public file transfer
> @@ -41,11 +43,11 @@ template(`apache_content_template',`
> corecmd_shell_entry_type(httpd_$1_script_t)
> domain_entry_file(httpd_$1_script_t, httpd_$1_script_exec_t)
>
> - type httpd_$1_rw_content_t, httpdcontent; # customizable
> + type httpd_$1_rw_content_t, httpdcontent, httpd_rw_content; # customizable
> typealias httpd_$1_rw_content_t alias { httpd_$1_script_rw_t httpd_$1_content_rw_t };
> files_type(httpd_$1_rw_content_t)
>
> - type httpd_$1_ra_content_t, httpdcontent; # customizable
> + type httpd_$1_ra_content_t, httpdcontent, httpd_ra_content; # customizable
> typealias httpd_$1_ra_content_t alias { httpd_$1_script_ra_t httpd_$1_content_ra_t };
> files_type(httpd_$1_ra_content_t)
>
> @@ -448,6 +450,128 @@ interface(`apache_dontaudit_rw_tcp_sockets',`
>
> ########################################
> ## <summary>
> +## Read all appendable content.
> +## </summary>
> +## <param name="domain">
> +## <summary>
> +## Domain allowed access.
> +## </summary>
> +## </param>
> +## <rolecap/>
> +#
> +interface(`apache_read_all_ra_content',`
> + gen_require(`
> + attribute httpd_ra_content;
> + ')
> +
> + read_files_pattern($1, httpd_ra_content, httpd_ra_content)
> + read_lnk_files_pattern($1, httpd_ra_content, httpd_ra_content)
> +')
> +
> +########################################
> +## <summary>
> +## Append to all appendable web content files.
> +## </summary>
> +## <param name="domain">
> +## <summary>
> +## Domain allowed access.
> +## </summary>
> +## </param>
> +## <rolecap/>
> +#
> +interface(`apache_append_all_ra_content_files',`
Inconsistent interface naming. I'm ok w/o the _files.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2012-06-26 13:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-24 11:07 [refpolicy] [PATCH v3 0/3] Support read/append/manage functions for various httpd content Sven Vermeulen
2012-06-24 11:08 ` [refpolicy] [PATCH v3 1/3] " Sven Vermeulen
2012-06-26 13:22 ` Christopher J. PeBenito [this message]
2012-06-26 13:57 ` Dominick Grift
2012-06-26 14:04 ` Christopher J. PeBenito
2012-06-26 20:38 ` Sven Vermeulen
2012-06-26 21:10 ` Dominick Grift
2012-06-27 14:17 ` Christopher J. PeBenito
2012-06-27 14:31 ` Christopher J. PeBenito
2012-06-24 11:08 ` [refpolicy] [PATCH v3 2/3] Introducing phpfpm_t domain Sven Vermeulen
2012-06-26 13:29 ` Christopher J. PeBenito
2012-06-24 11:09 ` [refpolicy] [PATCH v3 3/3] Allow sysadm_t to administer phpfpm environment Sven Vermeulen
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=4FE9B7AD.6010707@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.