sqlite_orm: 1.9 -> 1.9.1 (#379250)
[NixPkgs.git] / pkgs / by-name / st / storeBackup / CVE-2020-7040.patch
blob9b78f9bab95fafaf2b80027dd9e5520f2125d6bc
1 Index: storeBackup/lib/fileDir.pl
2 ===================================================================
3 --- storeBackup.orig/lib/fileDir.pl
4 +++ storeBackup/lib/fileDir.pl
5 @@ -21,7 +21,7 @@
8 use Digest::MD5 qw(md5_hex);
9 -use Fcntl qw(O_RDWR O_CREAT);
10 +use Fcntl qw(O_RDWR O_CREAT O_WRONLY O_EXCL);
11 use Fcntl ':mode';
12 use POSIX;
13 use Cwd 'abs_path';
14 @@ -482,7 +482,7 @@ sub checkLockFile
15 '-str' => ["creating lock file <$lockFile>"]);
17 &::checkDelSymLink($lockFile, $prLog, 0x01);
18 - open(FILE, '>', $lockFile) or
19 + sysopen(FILE, $lockFile, O_WRONLY | O_CREAT | O_EXCL) or
20 $prLog->print('-kind' => 'E',
21 '-str' => ["cannot create lock file <$lockFile>"],
22 '-exit' => 1);