From: Oliver Kurth Date: Mon, 30 Sep 2019 23:24:27 +0000 (-0700) Subject: lib/file: Close on exec bit tested incorrectly X-Git-Tag: stable-11.1.0~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=febcb55f747cdf344803b561e1615fc295aed5da;p=thirdparty%2Fopen-vm-tools.git lib/file: Close on exec bit tested incorrectly The test should be on access, not flags. --- diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c index 231082792..b79560e62 100644 --- a/open-vm-tools/lib/file/fileIOPosix.c +++ b/open-vm-tools/lib/file/fileIOPosix.c @@ -948,7 +948,7 @@ FileIOCreateRetry(FileIODescriptor *file, // OUT: #endif #if defined(__linux__) && defined(O_CLOEXEC) - if (flags & FILEIO_OPEN_CLOSE_ON_EXEC) { + if (access & FILEIO_OPEN_CLOSE_ON_EXEC) { flags |= O_CLOEXEC; } #endif