All of lore.kernel.org
 help / color / mirror / Atom feed
From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] RFC init_daemon_run_file
Date: Tue, 4 Mar 2014 18:25:07 +0100	[thread overview]
Message-ID: <20140304172506.GA17317@siphos.be> (raw)

Hi all

A couple of init scripts create PID files for their respective daemons
(domains) in the /run location. Right now, the SELinux policy supports
transitions for directories that are created in /run through the
init_daemon_run_dir() method.

In order to support PID files (and the proper transition) either the init
module needs to be extended with all those daemons' *_pid_filetrans()
calls and *_manage_pid_files() calls, but imo that breaks a bit the
isolation we want to introduce (and of which init_daemon_run_dir() is a nice
example).

I'm thinking about introducing an init_daemon_run_file() method and
daemonpidfile attribute, granting the initrc_t domain manage rights on the
daemonpidfile attribute (file class) and introducing the proper
files_pid_filetrans(initrc_t, $1, file, $2) in it.

I wouldn't reuse "pidfile" attribute as it is used for client application
PID files as well.

A second thought would be to update init_daemon_run_dir() as well to use
daemonpidfile. As "pidfile" as an attribute is used for directories as well,
it might be a good idea to use the same for daemonpidfile. After all, we
don't have a "rundir" attribute.

In other words, deprecate daemonrundir and use daemonpidfile instead.

What's your thoughts on this?

Wkr,
	Sven Vermeulen

             reply	other threads:[~2014-03-04 17:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 17:25 Sven Vermeulen [this message]
2014-03-04 18:15 ` [refpolicy] RFC init_daemon_run_file Sven Vermeulen
2014-03-17 13:41   ` Christopher J. PeBenito

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=20140304172506.GA17317@siphos.be \
    --to=sven.vermeulen@siphos.be \
    --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.