Skip to content

Commit

Permalink
start: add crucial details about lxc_spawn()
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 authored and stgraber committed May 11, 2017
1 parent 9a135d2 commit e6bbc40
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lxc/start.c
Expand Up @@ -1046,6 +1046,13 @@ void resolve_clone_flags(struct lxc_handler *handler)
INFO("Inheriting a UTS namespace.");
}

/* lxc_spawn() performs crucial setup tasks and clone()s the new process which
* exec()s the requested container binary.
* Note that lxc_spawn() runs in the parent namespaces. Any operations performed
* right here should be double checked if they'd pose a security risk. (For
* example, any {u}mount() operations performed here will be reflected on the
* host!)
*/
static int lxc_spawn(struct lxc_handler *handler)
{
int failed_before_rename = 0;
Expand Down

0 comments on commit e6bbc40

Please sign in to comment.