mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
rework the is_null test to not include deny
The deny information is not used as valid accept state information, so remove it from the is_null test. This does not change the dfa generated but does result in the dumped information changing, as states that don't have any accept information are no longer reported as accepting. This is what changes the number of states reported in the minimize tests. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-By: Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
parent
e7f6e0f9f1
commit
3c9cdfb841
2 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ class perms_t {
|
|||
public:
|
||||
perms_t(void) throw(int): allow(0), deny(0), audit(0), quiet(0), exact(0) { };
|
||||
|
||||
bool is_null(void) { return !(allow | deny | audit | quiet); }
|
||||
bool is_null(void) { return !(allow | audit | quiet); }
|
||||
|
||||
void dump(ostream &os)
|
||||
{
|
||||
|
|
|
@ -127,7 +127,7 @@ echo "ok"
|
|||
# {c} (0x 40030/0/0/0)
|
||||
|
||||
echo -n "Minimize profiles audit deny perms "
|
||||
if [ `echo "/t { /a r, /b w, /c a, /d l, /e k, /f m, audit deny /** w, }" | ../apparmor_parser -QT -O minimize -D dfa-states 2>&1 | grep -v '<==' | grep '^{.*} (.*)$' | wc -l` -ne 6 ] ; then
|
||||
if [ `echo "/t { /a r, /b w, /c a, /d l, /e k, /f m, audit deny /** w, }" | ../apparmor_parser -QT -O minimize -D dfa-states 2>&1 | grep -v '<==' | grep '^{.*} (.*)$' | wc -l` -ne 5 ] ; then
|
||||
echo "failed"
|
||||
exit 1;
|
||||
fi
|
||||
|
@ -192,7 +192,7 @@ echo "ok"
|
|||
# {3} (0x 0/fe17f85/0/0)
|
||||
|
||||
echo -n "Minimize profiles audit deny xtrans "
|
||||
if [ `echo "/t { /b px, audit deny /* xr, /a Cx -> foo, }" | ../apparmor_parser -QT -O minimize -D dfa-states 2>&1 | grep -v '<==' | grep '^{.*} (.*)$' | wc -l` -ne 1 ] ; then
|
||||
if [ `echo "/t { /b px, audit deny /* xr, /a Cx -> foo, }" | ../apparmor_parser -QT -O minimize -D dfa-states 2>&1 | grep -v '<==' | grep '^{.*} (.*)$' | wc -l` -ne 0 ] ; then
|
||||
echo "failed"
|
||||
exit 1;
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue