Gentoo Archives: gentoo-commits

From: Sven Vermeulen <sven.vermeulen@××××××.be>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/
Date: Tue, 21 Aug 2012 17:53:01
Message-Id: 1345138356.11ba636486b2173ebac439c95c6179e68fbdff92.SwifT@gentoo
1 commit: 11ba636486b2173ebac439c95c6179e68fbdff92
2 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
3 AuthorDate: Thu Aug 16 17:32:36 2012 +0000
4 Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
5 CommitDate: Thu Aug 16 17:32:36 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=11ba6364
7
8 Allow init scripts to set attribute of rundir
9
10 A previous commit allows init scripts (initrc_t) to create run directories for
11 various daemons, with the proper type transition in place. However, many init
12 scripts also require changing the ownership of the directory.
13
14 Although initrc_t has the chown capability, it also needs setattr privileges on
15 the resource (in our case, all types that have the daemonrundir attribute set)
16 in order to change the ownership (or permissions).
17
18 ---
19 policy/modules/system/init.te | 1 +
20 1 files changed, 1 insertions(+), 0 deletions(-)
21
22 diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te
23 index e0ea2db..3bd98e0 100644
24 --- a/policy/modules/system/init.te
25 +++ b/policy/modules/system/init.te
26 @@ -247,6 +247,7 @@ init_telinit(initrc_t)
27 can_exec(initrc_t, init_script_file_type)
28
29 create_dirs_pattern(initrc_t, daemonrundir, daemonrundir)
30 +setattr_dirs_pattern(initrc_t, daemonrundir, daemonrundir)
31
32 domtrans_pattern(init_run_all_scripts_domain, initrc_exec_t, initrc_t)