From: Christian Brauner Date: Tue, 8 May 2018 15:58:36 +0000 (+0200) Subject: execute: do not check inherited fds again X-Git-Tag: lxc-2.0.10~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a52c0f8330118e9b2216535af42bf3fa2523ea3;p=thirdparty%2Flxc.git execute: do not check inherited fds again 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 --- diff --git a/src/lxc/execute.c b/src/lxc/execute.c index 60dd81dd9..ba73b6b9e 100644 --- a/src/lxc/execute.c +++ b/src/lxc/execute.c @@ -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);