From 0ee3505984e5f7b63fa8ee6351af8b6638f5ff36 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 16 May 2017 00:42:30 +0200 Subject: [PATCH] start: pin rootfs when privileged Signed-off-by: Christian Brauner --- src/lxc/start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index 3963a406c..f1b3f8e11 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1153,7 +1153,7 @@ static int lxc_spawn(struct lxc_handler *handler) * it readonly. * If the container is unprivileged then skip rootfs pinning. */ - if (wants_to_map_ids) { + if (!wants_to_map_ids) { handler->pinfd = pin_rootfs(handler->conf->rootfs.path); if (handler->pinfd == -1) INFO("Failed to pin the rootfs for container \"%s\".", handler->name); -- 2.47.2