From: Christian Brauner Date: Wed, 31 May 2017 06:35:22 +0000 (+0200) Subject: confile: add getter for lxc.seccomp X-Git-Tag: lxc-2.1.0~110^2~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75f55b1f334b05f8f004c90748f1513df4359223;p=thirdparty%2Flxc.git confile: add getter for lxc.seccomp Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index d111db91a..edd09815a 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -162,6 +162,8 @@ static int set_config_console_logfile(const char *, const char *, struct lxc_con static int get_config_console_logfile(struct lxc_container *, const char *, char *, int); static int set_config_seccomp(const char *, const char *, struct lxc_conf *); +static int get_config_seccomp(struct lxc_container *, const char *, char *, int); + static int set_config_includefile(const char *, const char *, struct lxc_conf *); static int set_config_network_nic(const char *, const char *, struct lxc_conf *); static int set_config_autodev(const char *, const char *, struct lxc_conf *); @@ -233,7 +235,7 @@ static struct lxc_config_t config[] = { { "lxc.cap.keep", set_config_cap_keep, get_config_cap_keep, NULL}, { "lxc.console.logfile", set_config_console_logfile, get_config_console_logfile, NULL}, { "lxc.console", set_config_console, get_config_console, NULL}, - { "lxc.seccomp", set_config_seccomp, NULL, NULL}, + { "lxc.seccomp", set_config_seccomp, get_config_seccomp, NULL}, { "lxc.include", set_config_includefile, NULL, NULL}, { "lxc.autodev", set_config_autodev, NULL, NULL}, { "lxc.haltsignal", set_config_haltsignal, NULL, NULL}, @@ -2737,8 +2739,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv, return lxc_get_conf_int(c, retv, inlen, c->monitor_unshare); 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 if (strcmp(key, "lxc.environment") == 0) return lxc_get_item_environment(c, retv, inlen); else if (strcmp(key, "lxc.init_cmd") == 0) @@ -3903,3 +3903,9 @@ static int get_config_console_logfile(struct lxc_container *c, const char *key, { return lxc_get_conf_str(retv, inlen, c->lxc_conf->console.log_path); } + +static int get_config_seccomp(struct lxc_container *c, const char *key, + char *retv, int inlen) +{ + return lxc_get_conf_str(retv, inlen, c->lxc_conf->seccomp); +}