From 4cd0c31a821ba9155edfca87a93c569b93dd18a4 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 19 Jul 2018 19:38:42 -0400 Subject: [PATCH] SELinuxPolicy: Add additional debugging messages in potential policy logic. --- setools/policyrep/selinuxpolicy.pxi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setools/policyrep/selinuxpolicy.pxi b/setools/policyrep/selinuxpolicy.pxi index 84ac35d..d55a6e2 100644 --- a/setools/policyrep/selinuxpolicy.pxi +++ b/setools/policyrep/selinuxpolicy.pxi @@ -171,8 +171,14 @@ cdef class SELinuxPolicy: def _potential_policies(self): """Generate a list of potential policies to use.""" + self.log.debug("SELinuxfs exists: {}".format(selinux.selinuxfs_exists())) + self.log.debug("Sepol version range: {}-{}".format(sepol.sepol_policy_kern_vers_min(), + sepol.sepol_policy_kern_vers_max())) + self.log.debug("Binary policy path: {}".format(selinux.selinux_binary_policy_path())) + # try libselinux for current policy if selinux.selinuxfs_exists(): + self.log.debug("Current policy path: {}".format(selinux.selinux_current_policy_path())) yield selinux.selinux_current_policy_path() # otherwise look through the supported policy versions