[lxc-devel] [PATCH 1/2] support get_config_item(lxc.seccomp) and clear_config_item(lxc.seccomp)

Stéphane Graber stgraber at ubuntu.com
Mon Feb 17 18:51:45 UTC 2014


On Mon, Feb 17, 2014 at 12:46:30PM -0600, Serge Hallyn wrote:
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  src/lxc/confile.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/lxc/confile.c b/src/lxc/confile.c
> index fa263ef..afc9e32 100644
> --- a/src/lxc/confile.c
> +++ b/src/lxc/confile.c
> @@ -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;
>  }
> -- 
> 1.9.rc1
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140217/5491359f/attachment.pgp>


More information about the lxc-devel mailing list