]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
support get_config_item(lxc.seccomp) and clear_config_item(lxc.seccomp)
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 17 Feb 2014 18:46:30 +0000 (12:46 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 17 Feb 2014 18:52:19 +0000 (13:52 -0500)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/confile.c

index fa263ef4a45f023aae70bef398c74a6bdfd13b8f..afc9e32cdd978e1187a74a0891623d48b492b773 100644 (file)
@@ -44,6 +44,7 @@
 #include "log.h"
 #include "conf.h"
 #include "network.h"
+#include "lxcseccomp.h"
 
 #if HAVE_SYS_PERSONALITY_H
 #include <sys/personality.h>
@@ -2124,6 +2125,8 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
                return lxc_get_conf_int(c, retv, inlen, c->start_order);
        else if (strcmp(key, "lxc.group") == 0)
                return lxc_get_item_groups(c, retv, inlen);
+       else if (strcmp(key, "lxc.seccomp") == 0)
+               v = c->seccomp;
        else return -1;
 
        if (!v)
@@ -2151,6 +2154,10 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
                return lxc_clear_hooks(c, key);
        else if (strncmp(key, "lxc.group", 9) == 0)
                return lxc_clear_groups(c);
+       else if (strncmp(key, "lxc.seccomp", 11) == 0) {
+               lxc_seccomp_free(c);
+               return 0;
+       }
 
        return -1;
 }