]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Catch seccomp violations by init
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 24 Feb 2014 17:28:10 +0000 (11:28 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 24 Feb 2014 17:33:04 +0000 (12:33 -0500)
Note that if a task other than init violates the seccomp policy,
we cannot catch that.  Init will catch it and (if it feels like
it) log it.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/start.c

index 2faad8edf6a6289e7619a75492b740f0b51bec45..f44be963c87092bac79b16d52bee32cbb5cbbba4 100644 (file)
@@ -1050,6 +1050,9 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
                        DEBUG("Container rebooting");
                        handler->conf->reboot = 1;
                        break;
+               case SIGSYS: /* seccomp */
+                       DEBUG("Container violated its seccomp policy");
+                       break;
                default:
                        DEBUG("unknown exit status for init: %d", WTERMSIG(status));
                        break;