commit:     7c05e207dad4f635796bb3bd04cc38fbe46adfc7
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 11 18:06:21 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Apr 11 18:06:36 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c05e207

app-admin/sudo: Fixed /var/db/sudo permissions for real.

Thanks to Arfrever for pointing out that portage does not change
permissions on alrady existing directories.

Bug: https://bugs.gentoo.org/652958
Package-Manager: Portage-2.3.28, Repoman-2.3.9

 app-admin/sudo/{sudo-1.8.22-r1.ebuild => sudo-1.8.22-r2.ebuild} | 6 ++++++
 app-admin/sudo/sudo-1.8.23_beta2.ebuild                         | 6 ++++++
 app-admin/sudo/sudo-9999.ebuild                                 | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/app-admin/sudo/sudo-1.8.22-r1.ebuild 
b/app-admin/sudo/sudo-1.8.22-r2.ebuild
similarity index 97%
rename from app-admin/sudo/sudo-1.8.22-r1.ebuild
rename to app-admin/sudo/sudo-1.8.22-r2.ebuild
index c10b8c22211..69f1266724a 100644
--- a/app-admin/sudo/sudo-1.8.22-r1.ebuild
+++ b/app-admin/sudo/sudo-1.8.22-r2.ebuild
@@ -179,6 +179,12 @@ src_install() {
 }
 
 pkg_postinst() {
+       #652958
+       local sudo_db="${EROOT}/var/db/sudo"
+       if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then
+               chmod 711 "${sudo_db}" || die
+       fi
+
        if use ldap ; then
                ewarn
                ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap 
configuration."

diff --git a/app-admin/sudo/sudo-1.8.23_beta2.ebuild 
b/app-admin/sudo/sudo-1.8.23_beta2.ebuild
index eaac5af0379..b9b3625caae 100644
--- a/app-admin/sudo/sudo-1.8.23_beta2.ebuild
+++ b/app-admin/sudo/sudo-1.8.23_beta2.ebuild
@@ -179,6 +179,12 @@ src_install() {
 }
 
 pkg_postinst() {
+       #652958
+       local sudo_db="${EROOT}/var/db/sudo"
+       if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then
+               chmod 711 "${sudo_db}" || die
+       fi
+
        if use ldap ; then
                ewarn
                ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap 
configuration."

diff --git a/app-admin/sudo/sudo-9999.ebuild b/app-admin/sudo/sudo-9999.ebuild
index 82d9551bad8..661869d15fc 100644
--- a/app-admin/sudo/sudo-9999.ebuild
+++ b/app-admin/sudo/sudo-9999.ebuild
@@ -185,6 +185,12 @@ src_install() {
 }
 
 pkg_postinst() {
+       #652958
+       local sudo_db="${EROOT}/var/db/sudo"
+       if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then
+               chmod 711 "${sudo_db}" || die
+       fi
+
        if use ldap ; then
                ewarn
                ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap 
configuration."

Reply via email to