Fix #1188: tempfile: use /run by default

as /tmp is not a tmpfs by default and some file systems
(like ZFS) don't support O_TMPFILE
This commit is contained in:
Wolfgang Bumiller 2016-11-02 12:25:49 +01:00 committed by Dietmar Maurer
parent 7c1617b01d
commit f0cfc20e65

View 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};