diff options
author | Alan Jenkins <alan.christopher.jenkins@gmail.com> | 2018-09-03 11:10:24 +0100 |
---|---|---|
committer | Sven Eden <sven.eden@prydeworx.com> | 2018-10-29 10:18:25 +0100 |
commit | e81229d2391d2d1d4ecf3639ef41b905d566d4ea (patch) | |
tree | 0da1a3f72d57db0603de933f333f02ea47e9c189 /src/login | |
parent | 7117eb1d26432a0043286729bc9c82a1c947b572 (diff) |
user-runtime-dir: fix selinux regression
Fix #9993. When this code was split out to user-runtime-dir, it forgot to
include the call to mac_selinux_init(). So mkdir_label() stopped working.
Fixes: a9f0f5e50104 ("logind: split %t directory creation to a helper
unit")
(cherry picked from commit 81375d802672f34205bef9f301c58854af5fc568)
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/user-runtime-dir.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c index 9dde42c30..3ba4af3f2 100644 --- a/src/login/user-runtime-dir.c +++ b/src/login/user-runtime-dir.c @@ -10,6 +10,7 @@ #include "mount-util.h" #include "path-util.h" #include "rm-rf.h" +//#include "selinux-util.h" #include "smack-util.h" #include "stdio-util.h" #include "string-util.h" @@ -180,6 +181,12 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } + r = mac_selinux_init(); + if (r < 0) { + log_error_errno(r, "Could not initialize labelling: %m\n"); + return EXIT_FAILURE; + } + umask(0022); if (streq(argv[1], "start")) |