2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 22:35:35 +00:00

add owner parser tests

This commit is contained in:
John Johansen
2007-12-20 12:58:16 +00:00
parent ace86e6d01
commit edda8c2604
9 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
#
#=DESCRIPTION owner is not allowed on capability rules
#=EXRESULT FAIL
#
/usr/bin/foo {
owner capability sys_admin,
}

View File

@@ -0,0 +1,8 @@
#
#=DESCRIPTION owner is not allowed on network rules
#=EXRESULT FAIL
#
/usr/bin/foo {
owner network,
}

View File

@@ -0,0 +1,8 @@
#
#=DESCRIPTION owner can not follow path name
#=EXRESULT FAIL
#
/usr/bin/foo {
/foo owner rw,
}

View File

@@ -0,0 +1,8 @@
#
#=DESCRIPTION owner cannot follow permission
#=EXRESULT FAIL
#
/usr/bin/foo {
/foo rw owner,
}

View File

@@ -0,0 +1,8 @@
#
#=DESCRIPTION owner rules must have comma termination
#=EXRESULT FAIL
#
/usr/bin/foo {
owner /foo rw
/bar rw,
}

View File

@@ -0,0 +1,8 @@
#
#=DESCRIPTION owner not allowed after forward perm
#=EXRESULT FAIL
#
/usr/bin/foo {
rw owner /foo,
}

View File

@@ -0,0 +1,8 @@
#
#=DESCRIPTION owner not allowed after pathname in forward rule
#=EXRESULT FAIL
#
/usr/bin/foo {
rw /foo owner,
}

View File

@@ -0,0 +1,9 @@
#
#=DESCRIPTION owner block needs } termination
#=EXRESULT FAIL
#
/usr/bin/foo {
owner {
rw foo,
}

View File

@@ -0,0 +1,25 @@
#
#=DESCRIPTION test owner flag for file rules
#=EXRESULT PASS
#
/usr/bin/foo {
owner /foo rw,
owner /foo/** rw,
owner rw /bar,
owner rw /bar/**,
owner {
/one rw,
/one/** rw,
rw /two,
rw /two/**,
}
owner {
}
}