From: espie Date: Mon, 13 Jan 2014 18:44:41 +0000 (+0000) Subject: fix another chmod on permanent tempfile to respect umask. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=efc8ef94fb4cafdd3f1a2fcab68eb7cb5ad4765c;p=openbsd fix another chmod on permanent tempfile to respect umask. --- 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) = @_;