|
|
d3052ee |
#!/bin/bash
|
|
|
d3052ee |
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
|
d3052ee |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
d3052ee |
#
|
|
|
d3052ee |
# runtest.sh of /CoreOS/selinux-policy/Sanity/capability2-class
|
|
|
d3052ee |
# Description: Does SELinux policy define new capabilities in capability2 class?
|
|
|
d3052ee |
# Author: Milos Malik <mmalik@redhat.com>
|
|
|
d3052ee |
#
|
|
|
d3052ee |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
d3052ee |
#
|
|
|
d3052ee |
# Copyright (c) 2020 Red Hat, Inc. All rights reserved.
|
|
|
d3052ee |
#
|
|
|
d3052ee |
# This copyrighted material is made available to anyone wishing
|
|
|
d3052ee |
# to use, modify, copy, or redistribute it subject to the terms
|
|
|
d3052ee |
# and conditions of the GNU General Public License version 2.
|
|
|
d3052ee |
#
|
|
|
d3052ee |
# This program is distributed in the hope that it will be
|
|
|
d3052ee |
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
|
d3052ee |
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
d3052ee |
# PURPOSE. See the GNU General Public License for more details.
|
|
|
d3052ee |
#
|
|
|
d3052ee |
# You should have received a copy of the GNU General Public
|
|
|
d3052ee |
# License along with this program; if not, write to the Free
|
|
|
d3052ee |
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
d3052ee |
# Boston, MA 02110-1301, USA.
|
|
|
d3052ee |
#
|
|
|
d3052ee |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
d3052ee |
|
|
|
d3052ee |
# Include Beaker environment
|
|
|
d3052ee |
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
d3052ee |
|
|
|
d3052ee |
PACKAGE="selinux-policy"
|
|
|
d3052ee |
|
|
|
d3052ee |
rlJournalStart
|
|
|
d3052ee |
rlPhaseStartSetup
|
|
|
d3052ee |
rlRun "rlImport 'selinux-policy/common'"
|
|
|
d3052ee |
rlSESatisfyRequires
|
|
|
d3052ee |
rlAssertRpm ${PACKAGE}
|
|
|
d3052ee |
rlAssertRpm ${PACKAGE}-targeted
|
|
|
d3052ee |
|
|
|
d3052ee |
rlSESetEnforce
|
|
|
d3052ee |
rlSEStatus
|
|
|
d3052ee |
rlSESetTimestamp
|
|
|
d3052ee |
sleep 2
|
|
|
d3052ee |
rlPhaseEnd
|
|
|
d3052ee |
|
|
|
d3052ee |
rlPhaseStartTest "bz#1915264"
|
|
|
d3052ee |
rlRun "seinfo --common cap2 -x"
|
|
|
d3052ee |
for CAPABILITY in perfmon bpf checkpoint_restore ; do
|
|
|
d3052ee |
rlRun "seinfo --common cap2 -x | grep -w ${CAPABILITY}"
|
|
|
d3052ee |
done
|
|
|
d3052ee |
rlPhaseEnd
|
|
|
d3052ee |
|
|
|
d3052ee |
rlPhaseStartCleanup
|
|
|
d3052ee |
sleep 2
|
|
|
d3052ee |
rlSECheckAVC
|
|
|
d3052ee |
rlPhaseEnd
|
|
|
d3052ee |
rlJournalPrintText
|
|
|
d3052ee |
rlJournalEnd
|
|
|
d3052ee |
|