diff --git a/restorecond/Makefile b/restorecond/Makefile index 50702c66..501f89df 100644 --- a/restorecond/Makefile +++ b/restorecond/Makefile @@ -50,6 +50,8 @@ install: all install -m 644 org.selinux.Restorecond.service $(DESTDIR)$(DBUSSERVICEDIR)/org.selinux.Restorecond.service -mkdir -p $(DESTDIR)$(SYSTEMDDIR)/system install -m 644 restorecond.service $(DESTDIR)$(SYSTEMDDIR)/system/ + -mkdir -p $(DESTDIR)$(SYSTEMDDIR)/user + install -m 644 restorecond-user.service $(DESTDIR)$(SYSTEMDDIR)/user/ relabel: install /sbin/restorecon $(DESTDIR)$(SBINDIR)/restorecond diff --git a/restorecond/org.selinux.Restorecond.service b/restorecond/org.selinux.Restorecond.service index 0ef5f0b5..55989a9c 100644 --- a/restorecond/org.selinux.Restorecond.service +++ b/restorecond/org.selinux.Restorecond.service @@ -1,3 +1,4 @@ [D-BUS Service] Name=org.selinux.Restorecond Exec=/usr/sbin/restorecond -u +SystemdService=restorecond-user.service diff --git a/restorecond/restorecond-user.service b/restorecond/restorecond-user.service new file mode 100644 index 00000000..28ca770f --- /dev/null +++ b/restorecond/restorecond-user.service @@ -0,0 +1,10 @@ +[Unit] +Description=Restorecon maintaining path file context (user service) +Documentation=man:restorecond(8) +ConditionPathExists=/etc/selinux/restorecond_user.conf +ConditionSecurity=selinux + +[Service] +Type=dbus +BusName=org.selinux.Restorecond +ExecStart=/usr/sbin/restorecond -u