#406 Does `sepolicy generate --application` detect writeable locations?
Closed 10 months ago by plautrba. Opened 10 months ago by plautrba.
tests/ plautrba/selinux sepolicy-application  into  main

@@ -0,0 +1,10 @@ 

+ summary: Does `sepolicy generate --application ...` detect writeable locations?

+ test: ./test.sh

+ framework: beakerlib

+ component:

+   - policycoreutils

+ require:

+   - policycoreutils

+   - policycoreutils-devel

+   - mariadb-server

+ tier: '3'

@@ -0,0 +1,26 @@ 

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"

+         rlRun "pushd $tmp"

+         rlRun "set -o pipefail"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "mkdir policy"

+         rlRun "sepolicy generate -p policy --application /usr/bin/mysqld_safe"

+         rlRun "cat policy/*fc"

+         for dir in `rpm -ql --dump mariadb-server | sed -n -E '\%\/var\/(log|run|lib)[[:graph:]]* [[:alnum:]]* [[:alnum:]]* [[:alnum:]]* 04.*%s%^([^ ]*).*%\1%p'`; do

+             rlRun "grep $dir policy/*.fc"

+         done

+         rlRun "rm -rf mypolicy"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $tmp" 0 "Remove tmp directory"

+     rlPhaseEnd

+ rlJournalEnd

rebased onto cad85548d9ceb0d2b92ccdf3dd8fffcb915982ce

10 months ago

rebased onto 217eb07

10 months ago

To put it mildly, the infrastructure is not in the best shape:

ERROR: Guest couldn't be provisioned: Artemis resource ended in 'error' state

[citest]

Pull-Request has been closed by plautrba

10 months ago