From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: SE-Linux <selinux@tycho.nsa.gov>
Subject: running make relabel from a cronjob
Date: Tue, 24 Aug 2004 12:07:41 +0100 [thread overview]
Message-ID: <20040824110741.GI25356@lkcl.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 742 bytes --]
the following patches allow the attached /etc/cron.d/selinux program
to successfully run.
this is for a user-only system where root access will not be given
out, and there won't be any maintenance or support, either.
i heard from someone that Fedora also has a cronjob doing a make
relabel too, so i am slightly confused that the strict selinux policy
doesn't presently have this already oh well.
l.
--
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love. If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net"> lkcl.net </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />
[-- Attachment #2: g --]
[-- Type: text/plain, Size: 1128 bytes --]
--- /usr/share/selinux/policy/default/domains/program/setfiles.te 2004-08-02 08:28:37.000000000 +0100
+++ setfiles.te 2004-08-24 12:03:19.000000000 +0100
@@ -49,9 +49,14 @@
allow setfiles_t etc_runtime_t:file read;
allow setfiles_t etc_t:file read;
+allow setfiles_t automount_etc_t:file { getattr read };
allow setfiles_t proc_t:file { getattr read };
dontaudit setfiles_t proc_t:lnk_file { getattr read };
# for config files in a home directory
allow setfiles_t home_type:file r_file_perms;
dontaudit setfiles_t sysadm_tty_device_t:chr_file { relabelfrom };
+
+# allow setfiles to be run from crond
+allow setfiles_t crond_t:fifo_file { read write };
+
--- /usr/share/selinux/policy/default/domains/program/crond.te 2004-08-02 08:28:37.000000000 +0100
+++ crond.te 2004-08-24 12:03:26.000000000 +0100
@@ -202,3 +202,11 @@
r_dir_file(system_crond_t, file_context_t)
can_getsecurity(system_crond_t)
')
+
+
+allow system_crond_t policy_src_t:file { read };
+ #EXE=/usr/bin/make NAME=Makefile : read
+
+can_exec(system_crond_t, setfiles_exec_t)
+domain_auto_trans(system_crond_t, setfiles_exec_t, setfiles_t)
+
[-- Attachment #3: selinux --]
[-- Type: text/plain, Size: 267 bytes --]
# run every 6 hours to restore contexts on filesystem
# ... just in case of damage...
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
* 0,6,12,18 * * * root nice -20 make -C /etc/selinux/src relabel
next reply other threads:[~2004-08-24 10:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-24 11:07 Luke Kenneth Casson Leighton [this message]
2004-08-24 11:55 ` running make relabel from a cronjob Stephen Smalley
2004-08-24 14:53 ` Luke Kenneth Casson Leighton
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=20040824110741.GI25356@lkcl.net \
--to=lkcl@lkcl.net \
--cc=selinux@tycho.nsa.gov \
/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.