selinux-refpolicy/policy/modules
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
..
admin Remove complement and wildcard in allow rules. 2017-08-13 16:21:44 -04:00
apps Bump module versions for release. 2017-08-05 12:59:42 -04:00
contrib@f90040d303 Several module version bumps. 2017-09-11 20:34:13 -04:00
kernel kernel: Add map permission to the dev_{read, write}_sound* interfaces 2017-09-12 19:29:34 -04:00
roles Bump module versions for release. 2017-08-05 12:59:42 -04:00
services Remove complement and wildcard in allow rules. 2017-08-13 16:21:44 -04:00
system Add init_spec_daemon_domain interface 2017-09-12 19:34:26 -04:00