This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=c08dcba7b1fad89053c9abf348f052bb2c5e45d1 commit c08dcba7b1fad89053c9abf348f052bb2c5e45d1 Author: Guillem Jover <[email protected]> AuthorDate: Fri May 22 04:53:38 2020 +0200 u-a: Set the umask to 022 on program start We need to set a safe umask so that any write we perform on the filesystem, including our own database, gets expected permissions. Reported-by: Paul Wise <[email protected]> --- debian/changelog | 2 ++ utils/update-alternatives.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index f053ccb9b..dcebc240d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ dpkg (1.20.1) UNRELEASED; urgency=medium - Print the actual wrong character and print what is expected. * libdpkg: Do not use econtext->errmsg on out of context abort, as it might be uninitialized. + * update-alternatives: Set the umask to 022 on program start. + Reported by Paul Wise <[email protected]>. * Portability: - libdpkg: When using uselocale(), include <xlocale.h> for locale_t if the header is available. Needed on BSDs. diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c index c01bd6549..5a6285dab 100644 --- a/utils/update-alternatives.c +++ b/utils/update-alternatives.c @@ -2666,6 +2666,8 @@ main(int argc, char **argv) bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + umask(022); + admdir = admindir_init(); if (setvbuf(stdout, NULL, _IONBF, 0)) -- Dpkg.Org's dpkg

