Blame SOURCES/0010-setfacl-the-nss-DBs-to-our-authorized-users-not-just.patch

b8b9f4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
664c67
From: Peter Jones <pjones@redhat.com>
664c67
Date: Thu, 19 Nov 2015 11:36:59 -0500
b8b9f4
Subject: [PATCH] setfacl the nss DBs to our authorized users, not just the
b8b9f4
 socket.
664c67
664c67
Signed-off-by: Peter Jones <pjones@redhat.com>
664c67
(cherry picked from commit 1a9a8eefe8f9a9b21996151a5afd956df22921ea)
664c67
---
664c67
 src/pesign-authorize-groups | 2 ++
664c67
 src/pesign-authorize-users  | 2 ++
664c67
 2 files changed, 4 insertions(+)
664c67
664c67
diff --git a/src/pesign-authorize-groups b/src/pesign-authorize-groups
664c67
index e3864ce..2236bea 100644
664c67
--- a/src/pesign-authorize-groups
664c67
+++ b/src/pesign-authorize-groups
664c67
@@ -13,5 +13,7 @@ if [[ -r /etc/pesign/groups ]]; then
664c67
     for group in $(cat /etc/pesign/groups); do
664c67
         setfacl -m g:${group}:rx /var/run/pesign
664c67
         setfacl -m g:${group}:rw /var/run/pesign/socket
664c67
+        setfacl -m g:${username}:rx /etc/pki/pesign
664c67
+        setfacl -m g:${username}:r /etc/pki/pesign/{cert8,key3,secmod}.db
664c67
     done
664c67
 fi
664c67
diff --git a/src/pesign-authorize-users b/src/pesign-authorize-users
664c67
index e500204..9c38a25 100644
664c67
--- a/src/pesign-authorize-users
664c67
+++ b/src/pesign-authorize-users
664c67
@@ -13,5 +13,7 @@ if [[ -r /etc/pesign/users ]]; then
664c67
     for username in $(cat /etc/pesign/users); do
664c67
         setfacl -m u:${username}:rx /var/run/pesign
664c67
         setfacl -m u:${username}:rw /var/run/pesign/socket
664c67
+        setfacl -m u:${username}:rx /etc/pki/pesign
664c67
+        setfacl -m u:${username}:r /etc/pki/pesign/{cert8,key3,secmod}.db
664c67
     done
664c67
 fi