Merge pull request #2816 from rhatdan/selinux
/dev/console must be labeled with SELinux label in containers
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user