Blame tests/p_selinux/selinux_policy_mismatch.sh

Pablo Greco f21da5
#!/bin/bash
Pablo Greco f21da5
Pablo Greco f21da5
if [ "$centos_ver" -ge 8 ] ; then
Pablo Greco f21da5
PYTHON=python3
Pablo Greco f21da5
else
Pablo Greco f21da5
PYTHON=python
Pablo Greco f21da5
fi
Pablo Greco f21da5
Pablo Greco f21da5
t_Log "Running $0 - Testing audit2why for policy mismatch ..."
Pablo Greco f21da5
Pablo Greco f21da5
cat << __EOF__ | $PYTHON -
ef1acc
import sys
ef1acc
import selinux.audit2why as audit2why
ef1acc
ef1acc
try:
ef1acc
  audit2why.init()
ef1acc
except:
ef1acc
  sys.exit(1)
ef1acc
sys.exit(0)
Pablo Greco f21da5
__EOF__
ef1acc
Pablo Greco f21da5
t_CheckExitStatus $?