Skip to contentSkip to conversation

Allow clamd to use sent file descriptor

PATCH In review David Sugar 2 participants 2 messages Nov 2, 2018 – Nov 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow clamd to use sent file descriptor

This allows a process connecting to a local clamd server to send an open file descriptor for A/V scanning. This still requires the file type to be readable by clamd.

---
 policy/modules/services/clamav.if | 2 ++
 1 file changed, 2 insertions(+)
policy/modules/services/clamav.if +2 -0
index 2adb1230..7b6df49e 100644
@@ -35,6 +35,8 @@ interface(`clamav_stream_connect',`
 		type clamd_t, clamd_var_run_t;
 	')
 
+	allow clamd_t $1:fd use;
+
 	files_search_pids($1)
 	stream_connect_pattern($1, clamd_var_run_t, clamd_var_run_t, clamd_t)
 ')
Signature · 1 line
2.14.4
#1 lore raw
Quoted 14 lines · David Sugar

This allows a process connecting to a local clamd server to send an open file descriptor for A/V scanning. This still requires the file type to be readable by clamd.

---
  policy/modules/services/clamav.if | 2 ++
  1 file changed, 2 insertions(+)
policy/modules/services/clamav.if +0 -0
index 2adb1230..7b6df49e 100644

policy/modules/services/clamav.if interface(`clamav_stream_connect',` · line 42

Quoted 8 lines
policy/modules/services/clamav.if +2 -0
@@ -35,6 +35,8 @@ interface(`clamav_stream_connect',`
  		type clamd_t, clamd_var_run_t;
  	')
 
+	allow clamd_t $1:fd use;
+
  	files_search_pids($1)
  	stream_connect_pattern($1, clamd_var_run_t, clamd_var_run_t, clamd_t)
  ')

Merged.

Signature · 1 line
Chris PeBenito