]> git.proxmox.com Git - pve-common.git/commitdiff
Fix #1188: tempfile: use /run by default
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 2 Nov 2016 11:25:49 +0000 (12:25 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 2 Nov 2016 11:43:16 +0000 (12:43 +0100)
as /tmp is not a tmpfs by default and some file systems
(like ZFS) don't support O_TMPFILE

src/PVE/Tools.pm

index 7ee3450f9eb603c92a0ea7b613c216104f1673d0..305e1bf7407fe515fd6a844e7280edec6a203dbf 100644 (file)
@@ -1304,7 +1304,7 @@ sub tempfile {
     # default permissions are stricter than with file_set_contents
     $perm = 0600 if !defined($perm);
 
-    my $dir = $opts{dir} // '/tmp';
+    my $dir = $opts{dir} // '/run';
     my $mode = $opts{mode} // O_RDWR;
     $mode |= O_EXCL if !$opts{allow_links};