logind: load SELinux labelling system
authorNicolas Iooss <nicolas.iooss@m4x.org>
Tue, 2 Feb 2016 19:07:46 +0000 (20:07 +0100)
committerNicolas Iooss <nicolas.iooss@m4x.org>
Tue, 2 Feb 2016 19:07:46 +0000 (20:07 +0100)
commit4b51966cf6c06250036e428608da92f8640beb96
treefdf92c16895bf593facc71f8d9115483a3e6e639
parentb72190e90f0846956e609075fb9113dba9bc8f0f
logind: load SELinux labelling system

systemd-logind uses mkdir_label and label_fix functions without calling
first mac_selinux_init.  This makes /run/user/$UID/ directories not
labelled correctly on an Arch Linux system using SELinux.

Fix this by calling mac_selinux_init("/run") early in systemd-logind.
This makes files created in /etc/udev/rules.d and /var/lib/systemd to be
labelled through transitions in the SELinux policy instead of using
setfscreatecon (with mac_selinux_create_file_prepare).
src/login/logind-dbus.c
src/login/logind.c