All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH v3 1/3] Introduce init_daemon_run_dir transformation
Date: Thu, 23 Aug 2012 09:19:00 -0400	[thread overview]
Message-ID: <50362DC4.1010709@tresys.com> (raw)
In-Reply-To: <20120816112537.GA30585@siphos.be>

On 08/16/12 07:25, Sven Vermeulen wrote:
> On Tue, Aug 14, 2012 at 07:28:17PM +0200, Sven Vermeulen wrote:
>> Due to the introduction of /run, many init scripts need to create the daemon run
>> dirs (such as /run/udev for the udev init script). To simplify this, we
>> introduce the "daemonrundir" attribute to which initrc_t has the necessary
>> create_dirs_perms granted.
> [...]
>> @@ -242,6 +245,8 @@ init_telinit(initrc_t)
>>  
>>  can_exec(initrc_t, init_script_file_type)
>>  
>> +create_dirs_pattern(initrc_t, daemonrundir, daemonrundir)
>> +
>>  domtrans_pattern(init_run_all_scripts_domain, initrc_exec_t, initrc_t)
>>  
>>  manage_dirs_pattern(initrc_t, initrc_state_t, initrc_state_t)
> 
> I seem to have a few cases where the init script is also responsible for
> changing the ownership of the directories (actually every time the service
> itself doesn't run as root), which would need the following added as well:
> 
> 	setattr_dirs_pattern(initrc_t, daemonrundir, daemonrundir)
> 
> (or the allow-rule).
> 
> Does it make sense to add it here as well (so allow this generally)? If not,
> I'd need to enhance the initrc_t domain with all the necessary
> *_setattr_run_dir interface calls anyhow.

I'm ok with adding this.


-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

  reply	other threads:[~2012-08-23 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 17:27 [refpolicy] [PATCH v3 0/3] Support /run/* creation for initrc_t Sven Vermeulen
2012-08-14 17:28 ` [refpolicy] [PATCH v3 1/3] Introduce init_daemon_run_dir transformation Sven Vermeulen
2012-08-16 11:25   ` Sven Vermeulen
2012-08-23 13:19     ` Christopher J. PeBenito [this message]
2012-08-14 17:28 ` [refpolicy] [PATCH v3 2/3] Use the init_daemon_run_dir interface for udev Sven Vermeulen
2012-08-14 17:29 ` [refpolicy] [PATCH v3 3/3] Allow initrc_t to create run dirs for dbus, mysqld and tor 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=50362DC4.1010709@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.