]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add one missing use of O_CLOEXEC in vtape_dev.c
authorEric Bollengier <eric@baculasystems.com>
Thu, 3 Dec 2020 16:45:37 +0000 (17:45 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:59 +0000 (09:02 +0100)
bacula/src/stored/vtape_dev.c

index 644b86a754031ab199cac4eb827f91e4d047b0a0..f68078db7856ef5b81deb187dfa44f0d36a9ebb1 100644 (file)
@@ -927,7 +927,7 @@ int vtape::d_open(const char *pathname, int uflags)
    strcpy(lockfile, pathname);
    strcat(lockfile, ".l");
 
-   lockfd = ::open(lockfile, O_CREAT | O_RDWR | O_LARGEFILE, 0600);
+   lockfd = ::open(lockfile, O_CREAT | O_RDWR | O_LARGEFILE | O_CLOEXEC, 0600);
    if (lockfd < 0) {
       berrno be;
       Dmsg2(0, "Unable to open vtape device lock %s ERR=%s\n", lockfile, be.bstrerror());