From 94b0a3ac393d0081520a0f32004ce15e2ade13af Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 9 Sep 2017 11:21:51 +0200 Subject: [PATCH] start: userns_exec_full() Closes #1800. Signed-off-by: Christian Brauner --- src/lxc/start.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index 1370d681c..4fc289557 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1596,8 +1596,8 @@ static void lxc_destroy_container_on_signal(struct lxc_handler *handler, } if (!handler->am_root) - ret = userns_exec_1(handler->conf, lxc_rmdir_onedev_wrapper, - destroy, "lxc_rmdir_onedev_wrapper"); + ret = userns_exec_full(handler->conf, lxc_rmdir_onedev_wrapper, + destroy, "lxc_rmdir_onedev_wrapper"); else ret = lxc_rmdir_onedev(destroy, NULL); @@ -1615,9 +1615,12 @@ static int lxc_rmdir_onedev_wrapper(void *data) } static bool do_destroy_container(struct lxc_handler *handler) { + int ret; + if (!handler->am_root) { - if (userns_exec_1(handler->conf, storage_destroy_wrapper, - handler->conf, "storage_destroy_wrapper") < 0) + ret = userns_exec_full(handler->conf, storage_destroy_wrapper, + handler->conf, "storage_destroy_wrapper"); + if (ret < 0) return false; return true;