From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/1] RFC: Support initrc_t generated pid files with file transition
Date: Mon, 2 Jun 2014 11:23:55 -0400 [thread overview]
Message-ID: <538C970B.10608@tresys.com> (raw)
In-Reply-To: <1401384210-11405-1-git-send-email-sven.vermeulen@siphos.be>
On 05/29/2014 01:23 PM, Sven Vermeulen wrote:
> For some daemons, it is the init script that is responsible for creating
> the PID file of the daemon. As we do not want to update the init SELinux
> policy module for each of these situations, we need to introduce an
> interface that can be called by the SELinux policy module of the caller
> (the daemon domain).
>
> The initial suggestion was to transform the init_daemon_run_dir
> interface, which offers a similar approach for directories in /run, into
> a class-agnostic interface. Several names have been suggested, such as
> init_script_spec_run_content or init_script_generic_run_filetrans_spec,
> but in the end init_daemon_pid_file was used.
>
> Now the question remains if we use a single interface or stick with two.
> In other words, do we want something like this:
>
> init_daemon_pid_file(xdm_var_run_t, dir, "xdm")
> init_daemon_pid_file(postgresql_var_run_t, file, "postgresql.pid")
>
> or does it make more sense to keep the classes in the name (as the names
> already imply), like so:
>
> init_daemon_run_dir(xdm_var_run_t, "xdm")
> init_daemon_pid_file(postgresql_var_run_t, "postgresql.pid")
>
> This patch choses the latter. If not, I can easily update it to use the
> other approach, and deprecate init_daemon_run_dir in favor of
> init_daemon_pid_file.
I think we probably want the first one. Then we wouldn't run in to problems in the future when we run across an init script, for example, that wants to create a symlink or pipe, etc.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
prev parent reply other threads:[~2014-06-02 15:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 17:23 [refpolicy] [PATCH 1/1] RFC: Support initrc_t generated pid files with file transition Sven Vermeulen
2014-06-02 15:23 ` Christopher J. PeBenito [this message]
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=538C970B.10608@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.