mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-11 15:17:15 +00:00
libsemanage: fix kernel pathname in semanage_verify_kernel()
Building with CC=clang, we get the following errors: semanage_store.c:2177:20: error: implicit conversion from enumeration type 'enum semanage_final_defs' to different enumeration type 'enum semanage_store_defs' [-Werror,-Wenum-conversion] semanage_path(SEMANAGE_FINAL_TMP, SEMANAGE_KERNEL); ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~ semanage_store.c:2177:40: error: implicit conversion from enumeration type 'enum semanage_final_path_defs' to different enumeration type 'enum semanage_sandbox_defs' [-Werror,-Wenum-conversion] semanage_path(SEMANAGE_FINAL_TMP, SEMANAGE_KERNEL); ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~ This is an actual bug; semanage_verify_kernel() was never updated to use semanage_final_path() when the rest were converted. Fix it. This pathname is only used if a kernel policy verifier is specified in semanage.conf, so this is not used by default. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
parent
9dcbc12e1f
commit
a0bd296a0d
@ -2174,7 +2174,7 @@ int semanage_verify_kernel(semanage_handle_t * sh)
|
||||
{
|
||||
int retval = -1;
|
||||
const char *kernel_filename =
|
||||
semanage_path(SEMANAGE_FINAL_TMP, SEMANAGE_KERNEL);
|
||||
semanage_final_path(SEMANAGE_FINAL_TMP, SEMANAGE_KERNEL);
|
||||
semanage_conf_t *conf = sh->conf;
|
||||
external_prog_t *e;
|
||||
if (conf->kernel_prog == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user