selinux-refpolicy/policy
David Sugar bc94acf133 Add init_spec_daemon_domain interface
We have a use case on a system where we have a systemd .service unit file that is using the SELinuxContext= [1] option  to specify a context for the service being started.  The same .service file (/lib/systemd/system/foo@.service) is used to start multiple instances of the same executable that are customized with a different drop-in .conf file for each.  The context is customized in /lib/systemd/system/foo@.service file (based on using SELinuxContext=system_u:system_r:foo_%i_t:s0)  [2]

We then create /etc/systemd/system/foo@bar.service.d/bar.conf so the final running process is in the domain foo_bar_t

We have created the following interface (in init.if) to meet our needs.  The interface is very much like init_daemon_domain except for the use of spec_domtrans_pattern rather than domtrans_pattern because the automatic transition doesn't work in this case.

[1] The SELinuxContext option for systemd is explained https://www.freedesktop.org/software/systemd/man/systemd.exec.html
[2] The systemd %i (and other specifiers) along with drop-in files are explained https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Signed-off-by: Dave Sugar <dsugar@tresys.com>
2017-09-12 19:34:26 -04:00
..
flask Add nnp_nosuid_transition policycap and related class/perm definitions. 2017-08-05 12:13:21 -04:00
modules Add init_spec_daemon_domain interface 2017-09-12 19:34:26 -04:00
support refpolicy: Define and allow map permission 2017-05-24 19:53:14 -04:00
constraints remove trailing whitespaces 2016-12-06 13:45:13 +01:00
context_defaults Fix error in default_user example. 2014-04-28 10:19:22 -04:00
global_booleans
global_tunables user_udp_server tunable 2016-08-02 19:44:16 -04:00
mcs remove trailing whitespaces 2016-12-06 13:45:13 +01:00
mls remove trailing whitespaces 2016-12-06 13:45:13 +01:00
policy_capabilities Add cgroup_seclabel policycap. 2017-08-05 12:15:02 -04:00
users