]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
execute: do not check inherited fds again
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 May 2018 15:58:36 +0000 (17:58 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 23 Aug 2018 21:02:47 +0000 (23:02 +0200)
This is already done in do_lxcapi_start{l}() so a) no need to do it again here
and b) this would close the state socket pair sockets, corrup the fd, and lead
to EBADF.

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

index 60dd81dd9883d694daa53fa86415573f3220f37b..ba73b6b9ee5dc77af141582f9940374b219a4b8a 100644 (file)
@@ -150,9 +150,6 @@ int lxc_execute(const char *name, char *const argv[], int quiet,
 {
        struct execute_args args = {.argv = argv, .quiet = quiet};
 
-       if (lxc_check_inherited(handler->conf, false, &handler->conf->maincmd_fd, 1))
-               return -1;
-
        handler->conf->is_execute = 1;
        return __lxc_start(name, handler, &execute_start_ops, &args, lxcpath,
                           backgrounded, error_num);