summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2013-10-24 16:42:33 -0500
committerNathan Straz <nstraz@redhat.com>2013-11-22 16:05:21 -0500
commitb8eb214852d65bad8d031b6cb814fa5394c60ac1 (patch)
tree9af4ce7cdf513fe56c079777f61ac30d524c325a
parent76def9a53192c9748808616eaf49f6a476385f17 (diff)
downloadqarsh-b8eb214852d65bad8d031b6cb814fa5394c60ac1.zip
qarsh-b8eb214852d65bad8d031b6cb814fa5394c60ac1.tar.gz
qarsh-b8eb214852d65bad8d031b6cb814fa5394c60ac1.tar.xz
Need to remove optional policy from the rule too
-rw-r--r--SELinux/rebuild-policy.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/SELinux/rebuild-policy.sh b/SELinux/rebuild-policy.sh
index f25c0e2..f024d69 100644
--- a/SELinux/rebuild-policy.sh
+++ b/SELinux/rebuild-policy.sh
@@ -13,7 +13,11 @@ mark_bad()
get_rule()
{
- head -n $1 qarshd.te | tail -n 1 | sed -e 's/(qarshd_t)//'
+ line=`head -n $1 qarshd.te | tail -n 1`
+ line=${line%(qarshd_t)\')}
+ line=${line#optional_policy(\`}
+ echo $line
+
}
lookup_rule()