diff -Nru hplip-3.20.3+dfsg0/debian/changelog hplip-3.20.3+dfsg0/debian/changelog --- hplip-3.20.3+dfsg0/debian/changelog 2020-04-01 01:51:28.000000000 -0500 +++ hplip-3.20.3+dfsg0/debian/changelog 2021-10-29 13:50:18.000000000 -0500 @@ -1,3 +1,9 @@ +hplip (3.20.3+dfsg0-2ubuntu1) focal; urgency=medium + + * Restrict permissions on .hplip/.gnupg directory (LP: #1938442) + + -- William 'jawn-smith' Wilson Fri, 29 Oct 2021 13:50:18 -0500 + hplip (3.20.3+dfsg0-2) unstable; urgency=medium * Patch upstream for python3.8 support: diff -Nru hplip-3.20.3+dfsg0/debian/patches/0075-fix-permissions-on-gnupg-dir.patch hplip-3.20.3+dfsg0/debian/patches/0075-fix-permissions-on-gnupg-dir.patch --- hplip-3.20.3+dfsg0/debian/patches/0075-fix-permissions-on-gnupg-dir.patch 1969-12-31 18:00:00.000000000 -0600 +++ hplip-3.20.3+dfsg0/debian/patches/0075-fix-permissions-on-gnupg-dir.patch 2021-10-29 13:46:08.000000000 -0500 @@ -0,0 +1,21 @@ +Description: Change .gnupg directory permissions to 700 + The .hplip/.gnupg directory has permissions of 755. While + only public keys are stored in this directory, it can still + be seen as a privacy issue that the keys are readable by + any user. Changing the permissions to 700 fixes this issue +Author: zdohnal +Bug: https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1938442 +Last-Update: 2021-10-29 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/base/validation.py ++++ b/base/validation.py +@@ -53,7 +53,7 @@ + + if not os.path.exists(self.__gpg_dir): + try: +- os.mkdir(self.__gpg_dir, 0o755) ++ os.mkdir(self.__gpg_dir, 0o700) + except OSError: + log.error("Failed to create %s" % self.__gpg_dir) + self.__change_owner() diff -Nru hplip-3.20.3+dfsg0/debian/patches/series hplip-3.20.3+dfsg0/debian/patches/series --- hplip-3.20.3+dfsg0/debian/patches/series 2020-04-01 01:51:28.000000000 -0500 +++ hplip-3.20.3+dfsg0/debian/patches/series 2021-10-29 13:44:05.000000000 -0500 @@ -72,3 +72,4 @@ 0072-Fix-building-with-Python-3.8.patch 0073-py3.8-Fix-SyntaxWarning-is-is-not-with-a-literal.patch 0074-py3.8-Assume-the-python3-distro-package-is-available.patch +0075-fix-permissions-on-gnupg-dir.patch