From 57ad43797e59e0f6ff3c27c678ae6698df26d323 Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 19 Apr 2023 18:07:43 +0000 Subject: [PATCH] Force a standard umask before adding/deleting packages. If not done and the user has a restrictive mask, various items (new directories, @sample'd files, /var/db/pkg entries, mandoc databases) end up not readable. feedback/ok espie@ --- usr.sbin/pkg_add/OpenBSD/AddDelete.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm index f0603b01cf3..bdf04f6c984 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddDelete.pm,v 1.96 2022/05/16 14:13:19 espie Exp $ +# $OpenBSD: AddDelete.pm,v 1.97 2023/04/19 18:07:43 sthen Exp $ # # Copyright (c) 2007-2010 Marc Espie # @@ -73,6 +73,8 @@ sub do_the_main_work return; } + umask 0022; + my $handler = sub { $state->fatal("Caught SIG#1", shift); }; local $SIG{'INT'} = $handler; local $SIG{'QUIT'} = $handler; -- 2.20.1