From c0e95ed326b639cc62d11477a0b5f3ae60e8a1a4 Mon Sep 17 00:00:00 2001
From: Laurent Bigonville <bigon@bigon.be>
Date: Sun, 9 Nov 2014 10:36:56 +0100
Subject: [PATCH] On Debian, systemd binaries are installed in / not /usr

On Debian, systemd binaries are installed in / not /usr, add an
equivalence for this.
---
 config/file_contexts.subs_dist        | 1 +
 policy/modules/kernel/corecommands.fc | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/config/file_contexts.subs_dist b/config/file_contexts.subs_dist
index d392decfe..e233ea700 100644
--- a/config/file_contexts.subs_dist
+++ b/config/file_contexts.subs_dist
@@ -9,6 +9,7 @@
 # example, but aliasing.
 # 
 /etc/init.d /etc/rc.d/init.d
+/lib/systemd /usr/lib/systemd
 /lib32 /lib
 /lib64 /lib
 /run /var/run
diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc
index 77d6a1802..9f33e4d33 100644
--- a/policy/modules/kernel/corecommands.fc
+++ b/policy/modules/kernel/corecommands.fc
@@ -135,7 +135,6 @@ ifdef(`distro_debian',`
 /lib/nut/.*			--	gen_context(system_u:object_r:bin_t,s0)
 /lib/readahead(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 /lib/security/pam_krb5/pam_krb5_storetmp -- gen_context(system_u:object_r:bin_t,s0)
-/lib/systemd/systemd.*		--	gen_context(system_u:object_r:bin_t,s0)
 /lib/udev/[^/]*			--	gen_context(system_u:object_r:bin_t,s0)
 /lib/udev/scsi_id		--	gen_context(system_u:object_r:bin_t,s0)
 /lib/upstart(/.*)?			gen_context(system_u:object_r:bin_t,s0)
@@ -235,6 +234,7 @@ ifdef(`distro_gentoo',`
 /usr/lib/rpm/rpmv		-- 	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/sftp-server		--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/sudo/sesh		--	gen_context(system_u:object_r:shell_exec_t,s0)
+/usr/lib/systemd/systemd.*	--	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/systemd/system-generators(/.*)? gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/systemd/user-generators(/.*)?	gen_context(system_u:object_r:bin_t,s0)
 /usr/lib/tumbler-1/tumblerd	--	gen_context(system_u:object_r:bin_t,s0)