From efc8ef94fb4cafdd3f1a2fcab68eb7cb5ad4765c Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 13 Jan 2014 18:44:41 +0000 Subject: [PATCH] fix another chmod on permanent tempfile to respect umask. --- usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index 7f93754d5ac..59f0ef85680 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.101 2014/01/12 20:23:29 phessler Exp $ +# $OpenBSD: PackageRepository.pm,v 1.102 2014/01/13 18:44:41 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -473,7 +473,7 @@ sub pkg_copy my $dir = $object->{cache_dir}; my ($copy, $filename) = OpenBSD::Temp::permanent_file($dir, $name) or die "Can't write copy to cache"; - chmod 0644, $filename; + chmod((0666 & ~umask), $filename); $object->{tempname} = $filename; my $handler = sub { my ($sig) = @_; -- 2.20.1