policy/modules/services/smartmon.te: make fstools optional

Make fstools optional to avoid the following build failure raised since
version 2.20231002 and
cb068f09d2:

 Compiling targeted policy.33
 env LD_LIBRARY_PATH="/home/thomas/autobuild/instance-2/output-1/host/lib:/home/thomas/autobuild/instance-2/output-1/host/usr/lib" /home/thomas/autobuild/instance-2/output-1/host/usr/bin/checkpolicy -c 33 -U deny -S -O -E policy.conf -o policy.33
 policy/modules/services/smartmon.te:146:ERROR 'type fsadm_exec_t is not within scope' at token ';' on line 237472:
 	allow smartmon_update_drivedb_t fsadm_exec_t:file { { getattr open map read execute ioctl } ioctl lock execute_no_trans };
 #line 146
 checkpolicy:  error(s) encountered while parsing configuration
 make[1]: *** [Rules.monolithic:80: policy.33] Error 1

Fixes:
 - http://autobuild.buildroot.org/results/a01123de9a8c1927060e7e4748666bebfc82ea44

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
Fabrice Fontaine 2023-11-28 22:30:01 +01:00
parent 662502a216
commit 65eed16b58

View File

@ -143,8 +143,6 @@ corenet_tcp_connect_http_port(smartmon_update_drivedb_t)
files_read_etc_files(smartmon_update_drivedb_t)
fstools_exec(smartmon_update_drivedb_t)
kernel_dontaudit_read_system_state(smartmon_update_drivedb_t)
miscfiles_read_generic_certs(smartmon_update_drivedb_t)
@ -162,6 +160,10 @@ optional_policy(`
cron_system_entry(smartmon_update_drivedb_t, smartmon_update_drivedb_exec_t)
')
optional_policy(`
fstools_exec(smartmon_update_drivedb_t)
')
optional_policy(`
gpg_exec_agent(smartmon_update_drivedb_t)
gpg_exec(smartmon_update_drivedb_t)