Unverified Commit c99b8a65 by Stéphane Graber Committed by GitHub

Merge pull request #1910 from brauner/2017-11-08/attach_without_conf

attach: allow attach with empty conf
parents 04c4ceba ba773996
...@@ -848,6 +848,12 @@ int lxc_attach(const char *name, const char *lxcpath, ...@@ -848,6 +848,12 @@ int lxc_attach(const char *name, const char *lxcpath,
if (!init_ctx->container) if (!init_ctx->container)
return -1; 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)) if (!fetch_seccomp(init_ctx->container, options))
WARN("Failed to get seccomp policy."); WARN("Failed to get seccomp policy.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment