Skip to content

Commit

Permalink
Merge pull request systemd#2816 from rhatdan/selinux
Browse files Browse the repository at this point in the history
/dev/console must be labeled with SELinux label in containers
  • Loading branch information
keszybz committed Mar 10, 2016
2 parents 0551ec7 + 68b0204 commit ef240bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/nspawn/nspawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ef240bf

Please sign in to comment.