Skip to contentSkip to conversation

Interface to allow reading of virus signature files.

PATCH In review David Sugar 2 participants 2 messages Oct 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Interface to allow reading of virus signature files.

---
 policy/modules/services/clamav.if | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
policy/modules/services/clamav.if +28 -0
index 7ad8e800..80ac5c1e 100644
@@ -177,6 +177,34 @@ interface(`clamav_read_state_clamd',`
 	read_lnk_files_pattern($1, clamd_t, clamd_t)
 ')
 
+#######################################
+## <summary>
+##	Read clam virus signature files
+## </summary>
+## <desc>
+##	<p>
+##	Useful for when using things like 'sigtool'
+##	which provides useful information about
+##	ClamAV signature files.
+##	</p>
+## </desc>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`clamav_read_signatures',`
+	gen_require(`
+		type clamd_var_lib_t;
+	')
+
+	clamav_search_lib($1)
+	allow $1 clamd_var_lib_t:dir list_dir_perms;
+	read_files_pattern($1, clamd_var_lib_t, clamd_var_lib_t)
+	read_lnk_files_pattern($1, clamd_var_lib_t, clamd_var_lib_t)
+')
+
 ########################################
 ## <summary>
 ##	All of the rules required to
Signature · 1 line
2.14.4
#1 lore raw
Quoted 34 lines · David Sugar
---
  policy/modules/services/clamav.if | 28 ++++++++++++++++++++++++++++
  1 file changed, 28 insertions(+)
policy/modules/services/clamav.if +21 -0
index 7ad8e800..80ac5c1e 100644
@@ -177,6 +177,34 @@ interface(`clamav_read_state_clamd',`
  	read_lnk_files_pattern($1, clamd_t, clamd_t)
  ')
 
+#######################################
+## <summary>
+##	Read clam virus signature files
+## </summary>
+## <desc>
+##	<p>
+##	Useful for when using things like 'sigtool'
+##	which provides useful information about
+##	ClamAV signature files.
+##	</p>
+## </desc>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`clamav_read_signatures',`
+	gen_require(`
+		type clamd_var_lib_t;
+	')

policy/modules/services/clamav.if interface(`clamav_read_state_clamd',` · line 210

Quoted 10 lines
policy/modules/services/clamav.if +7 -0
+
+	clamav_search_lib($1)
+	allow $1 clamd_var_lib_t:dir list_dir_perms;
+	read_files_pattern($1, clamd_var_lib_t, clamd_var_lib_t)
+	read_lnk_files_pattern($1, clamd_var_lib_t, clamd_var_lib_t)
+')
+
  ########################################
  ## <summary>
  ##	All of the rules required to

Merged.

Signature · 1 line
Chris PeBenito