diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2023-04-19 18:07:44 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2023-04-19 18:07:44 +0000 |
commit | 8c9531ff85bdc915a9ed175233ba4b127f552fa3 (patch) | |
tree | 6974f69dfd50116e52a65abde2653b04ea7d4a7a /usr.sbin/pkg_add/OpenBSD | |
parent | 49ebc9d4054d8036312370f1b448865364ca0357 (diff) |
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@
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/AddDelete.pm | 4 |
1 files changed, 3 insertions, 1 deletions
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 <espie@openbsd.org> # @@ -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; |