Skip to contentSkip to conversation

pcscd.if: Permit access to pid files inside /var/run/pcscd/.

PATCH New Luis Ressel 2 participants 4 messages Feb 14, 2014 – Feb 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pcscd.if: Permit access to pid files inside /var/run/pcscd/.

Gentoo places pcscd's pid file in /var/run/pcscd/ instead of /var/run/, but pcscd_read_pid_files() doesn't grant enough permissions for this.

---
 pcscd.if | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
pcscd.if +1 -1
index 43d50f9..7f77d32 100644
@@ -50,7 +50,7 @@ interface(`pcscd_read_pid_files',`
 	')
 
 	files_search_pids($1)
-	allow $1 pcscd_var_run_t:file read_file_perms;
+	read_files_pattern($1, pcscd_var_run_t, pcscd_var_run_t)
 ')
 
 ########################################
Signature · 1 line
1.8.5.4
#1 lore raw

PATCH 2/2 Allow gpg-agent's scdaemon to connect to pcscd.

---
 gpg.te | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
gpg.te +5 -1
index 4cfa305..06a4679 100644
@@ -1,4 +1,4 @@
-policy_module(gpg, 2.8.2)
+policy_module(gpg, 2.8.3)
 
 ########################################
 #
@@ -273,6 +273,10 @@ optional_policy(`
 	mozilla_dontaudit_rw_user_home_files(gpg_agent_t)
 ')
 
+optional_policy(`
+	pcscd_stream_connect(gpg_agent_t)
+')
+
 ##############################
 #
 # Pinentry local policy
Signature · 1 line
1.8.5.4
#2 lore raw

PATCH 2/2 Allow gpg-agent's scdaemon to connect to pcscd.

Quoted 15 lines · Luis Ressel
---
 gpg.te | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
gpg.te +1 -1
index 4cfa305..06a4679 100644
@@ -1,4 +1,4 @@
-policy_module(gpg, 2.8.2)
+policy_module(gpg, 2.8.3)
 
 ########################################
 #

gpg.te optional_policy(` · line 282

Quoted 10 lines
gpg.te +4 -0
@@ -273,6 +273,10 @@ optional_policy(`
 	mozilla_dontaudit_rw_user_home_files(gpg_agent_t)
 ')
 
+optional_policy(`
+	pcscd_stream_connect(gpg_agent_t)
+')
+
 ##############################
 #
 # Pinentry local policy

Merged.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
#3 lore raw

PATCH 1/2 pcscd.if: Permit access to pid files inside /var/run/pcscd/.

In reply to Luis Ressel
Quoted 11 lines · Luis Ressel

Gentoo places pcscd's pid file in /var/run/pcscd/ instead of /var/run/, but pcscd_read_pid_files() doesn't grant enough permissions for this.

---
 pcscd.if | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
pcscd.if +0 -0
index 43d50f9..7f77d32 100644

pcscd.if interface(`pcscd_read_pid_files',` · line 56

Quoted 8 lines
pcscd.if +1 -1
@@ -50,7 +50,7 @@ interface(`pcscd_read_pid_files',`
 	')
 
 	files_search_pids($1)
-	allow $1 pcscd_var_run_t:file read_file_perms;
+	read_files_pattern($1, pcscd_var_run_t, pcscd_var_run_t)
 ')
 
 ########################################

Merged.

Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com