attach: allow attach with empty conf

parent daa9fc4e
...@@ -809,6 +809,12 @@ int lxc_attach(const char *name, const char *lxcpath, ...@@ -809,6 +809,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