Skip to content

Commit

Permalink
attach: allow attach with empty conf
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Nov 10, 2017
1 parent d4d324b commit 0f3d594
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lxc/attach.c
Expand Up @@ -848,6 +848,12 @@ int lxc_attach(const char *name, const char *lxcpath,
if (!init_ctx->container)
return -1;

if (!init_ctx->container->lxc_conf) {
init_ctx->container->lxc_conf = lxc_conf_init();
if (!init_ctx->container->lxc_conf)
return -ENOMEM;
}

if (!fetch_seccomp(init_ctx->container, options))
WARN("Failed to get seccomp policy.");

Expand Down

0 comments on commit 0f3d594

Please sign in to comment.