Merge pull request #2816 from rhatdan/selinux

/dev/console must be labeled with SELinux label in containers
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-03-09 23:47:00 -05:00
+7
View File
@@ -87,6 +87,7 @@
#ifdef HAVE_SECCOMP
#include "seccomp-util.h"
#endif
#include "selinux-util.h"
#include "signal-util.h"
#include "socket-util.h"
#include "stat-util.h"
@@ -3284,6 +3285,12 @@ int main(int argc, char *argv[]) {
goto finish;
}
if (arg_selinux_apifs_context) {
r = mac_selinux_apply(console, arg_selinux_apifs_context);
if (r < 0)
goto finish;
}
if (unlockpt(master) < 0) {
r = log_error_errno(errno, "Failed to unlock tty: %m");
goto finish;