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