start: move reading seccomp profile after pre-start hook

This allows users to generate custom profiles at startup. Closes #1848. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent df706de4
......@@ -737,11 +737,6 @@ int lxc_init(const char *name, struct lxc_handler *handler)
lsm_init();
TRACE("Initialized LSM");
ret = lxc_read_seccomp_config(conf);
if (ret < 0)
return log_error(-1, "Failed loading seccomp policy");
TRACE("Read seccomp policy");
/* Begin by setting the state to STARTING. */
ret = lxc_set_state(name, handler, STARTING);
if (ret < 0)
......@@ -840,6 +835,11 @@ int lxc_init(const char *name, struct lxc_handler *handler)
}
TRACE("Initialized cgroup driver");
ret = lxc_read_seccomp_config(conf);
if (ret < 0)
return log_error(-1, "Failed loading seccomp policy");
TRACE("Read seccomp policy");
ret = lsm_process_prepare(conf, handler->lxcpath);
if (ret < 0) {
ERROR("Failed to initialize LSM");
......
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