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: a9f0f5e501 ("logind: split %t directory creation to a helper
unit")
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
7dd05e9472
commit
81375d8026
@@ -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"
|
||||
@@ -171,6 +172,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"))
|
||||
|
||||
Reference in New Issue
Block a user