From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/1] Cronjobs might create temporary directories
Date: Wed, 21 Sep 2011 21:23:32 +0200 [thread overview]
Message-ID: <20110921192331.GA10041@siphos.be> (raw)
Cronjobs, like makewhatis, want to create temporary directories
(and not only just temporary files).
We allow a filetrans in tmp_t for directories as well, and allow
system_cronjob_t to manage files and directories of
system_cronjob_tmp_t.
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
---
cron.te | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/cron.te b/cron.te
index f22d27c..07e2697 100644
--- a/cron.te
+++ b/cron.te
@@ -334,11 +334,13 @@ allow system_cronjob_t crond_t:process sigchld;
allow system_cronjob_t system_cronjob_lock_t:file manage_file_perms;
files_lock_filetrans(system_cronjob_t, system_cronjob_lock_t, file)
-# write temporary files
+# write temporary files/directories
manage_files_pattern(system_cronjob_t, crond_tmp_t, system_cronjob_tmp_t)
+manage_files_pattern(system_cronjob_t, system_cronjob_tmp_t, system_cronjob_tmp_t)
+manage_dirs_pattern(system_cronjob_t, system_cronjob_tmp_t, system_cronjob_tmp_t)
manage_lnk_files_pattern(system_cronjob_t, crond_tmp_t, system_cronjob_tmp_t)
filetrans_pattern(system_cronjob_t, crond_tmp_t, system_cronjob_tmp_t, { file lnk_file })
-files_tmp_filetrans(system_cronjob_t, system_cronjob_tmp_t, file)
+files_tmp_filetrans(system_cronjob_t, system_cronjob_tmp_t, { file dir })
# Read from /var/spool/cron.
allow system_cronjob_t cron_spool_t:dir list_dir_perms;
--
1.7.3.4
next reply other threads:[~2011-09-21 19:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 19:23 Sven Vermeulen [this message]
2011-09-21 20:25 ` [refpolicy] [PATCH 1/1] Cronjobs might create temporary directories Dominick Grift
2011-09-22 6:04 ` Sven Vermeulen
2011-09-22 7:54 ` Dominick Grift
2011-09-22 18:42 ` Sven Vermeulen
2011-09-23 19:11 ` Sven Vermeulen
2011-09-23 20:26 ` Dominick Grift
2011-09-27 12:49 ` 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=20110921192331.GA10041@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.