All of lore.kernel.org
 help / color / mirror / Atom feed
From: jason@perfinion.com (Jason Zaman)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH] cron: Allow locks to be lnk_files
Date: Mon,  1 Feb 2016 17:17:29 +0800	[thread overview]
Message-ID: <1454318249-21927-1-git-send-email-jason@perfinion.com> (raw)

The run-crons script now uses symlinks to pids as the locks instead of
just a plain file.

avc:  denied  { create } for pid=5844 comm="ln" name="cron.hourly"
scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023
tcontext=system_u:object_r:var_lock_t:s0 tclass=lnk_file permissive=0
type=PATH msg=audit(1454175001.341:80669): item=2
name="/var/lock/cron.hourly" nametype=CREATE
---
 cron.te | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cron.te b/cron.te
index b481d5d..b50d468 100644
--- a/cron.te
+++ b/cron.te
@@ -440,7 +440,8 @@ files_pid_filetrans(system_cronjob_t, cron_var_run_t, file)
 manage_files_pattern(system_cronjob_t, system_cron_spool_t, system_cron_spool_t)
 
 allow system_cronjob_t system_cronjob_lock_t:file manage_file_perms;
-files_lock_filetrans(system_cronjob_t, system_cronjob_lock_t, file)
+allow system_cronjob_t system_cronjob_lock_t:lnk_file manage_lnk_file_perms;
+files_lock_filetrans(system_cronjob_t, system_cronjob_lock_t, { file lnk_file })
 
 manage_files_pattern(system_cronjob_t, crond_tmp_t, system_cronjob_tmp_t)
 manage_lnk_files_pattern(system_cronjob_t, crond_tmp_t, system_cronjob_tmp_t)
-- 
2.4.10

             reply	other threads:[~2016-02-01  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01  9:17 Jason Zaman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-01-30 18:15 [refpolicy] [PATCH] cron: Allow locks to be lnk_files Jason Zaman
2016-01-31 13:53 ` Dominick Grift
2016-02-01  9:19   ` Jason Zaman

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=1454318249-21927-1-git-send-email-jason@perfinion.com \
    --to=jason@perfinion.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.