/usr/sbin/selinux-policy-upgrade is in selinux-basics 0.5.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/bin/sh
set -e
if [ "$1" != "" ]; then
SELINUXTYPE="$1"
else
. /etc/selinux/config
fi
cd /usr/share/selinux/${SELINUXTYPE}
echo "Updating \"${SELINUXTYPE}\" policy"
# remove obsolete modules
for n in procmail tmpreaper ; do
semodule -l |grep -q $n && semodule -r $n
done
semodule -b $(test -e base.pp && echo base.pp || echo base.pp.bz2) $(for n in $(semodule -s ${SELINUXTYPE} -l | cut -f1); do
if [ -e $n.pp ]; then
echo -n " -i $n.pp"
else
if [ -e $n.pp.bz2 ]; then
echo -n " -i $n.pp.bz2"
fi
fi
done
)
|