]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: userns_exec_full()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 9 Sep 2017 09:21:51 +0000 (11:21 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Sun, 24 Sep 2017 04:36:21 +0000 (00:36 -0400)
Closes #1800.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index 97663e136eed6f7828463e570d2af7a062a6d7b4..045512f53c3130c8bcef49360e7882f08a06beaa 100644 (file)
@@ -1668,8 +1668,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);
 
@@ -1687,9 +1687,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;