1
Index: subdomain/openat.sh
2
===================================================================
3
--- subdomain.orig/openat.sh
4
+++ subdomain/openat.sh
5
@@ -40,59 +40,59 @@ runchecktest "OPENAT unconfined RW (crea
7
# PASS TEST (the file shouldn't exist, so open should create it
9
-genprofile ${dir}:r ${filepath}:$okperm
10
+genprofile ${dir}/:r ${filepath}:$okperm
11
runchecktest "OPENAT RW (create) " pass $dir $file
16
-genprofile ${dir}:r ${filepath}:$okperm
17
+genprofile ${dir}/:r ${filepath}:$okperm
18
runchecktest "OPENAT RW (exists)" pass $dir $file
23
-genprofile ${dir}:r ${filepath}:$badperm1
24
+genprofile ${dir}/:r ${filepath}:$badperm1
25
runchecktest "OPENAT R" fail $dir $file
30
-genprofile ${dir}:r ${filepath}:$badperm2
31
+genprofile ${dir}/:r ${filepath}:$badperm2
32
runchecktest "OPENAT W (exists)" fail $dir $file
36
-genprofile ${dir}:r ${filepath}:$badperm1 cap:dac_override
37
+genprofile ${dir}/:r ${filepath}:$badperm1 cap:dac_override
38
runchecktest "OPENAT R+dac_override" fail $dir $file
41
# This is testing for bug: https://bugs.wirex.com/show_bug.cgi?id=2885
42
# When we open O_CREAT|O_RDWR, we are (were?) allowing only write access
44
+# This test currently passes when it should fail because of the o_creat bug
46
-genprofile ${dir}:r ${filepath}:$badperm2
47
+genprofile ${dir}/:r ${filepath}:$badperm2
48
runchecktest "OPENAT W (create)" fail $dir $file
50
# PASS rename of directory in between opendir/openat
52
-genprofile ${dir}/${subdir}:rw ${dir}/otherdir:w ${dir}/otherdir/file:rw
53
+genprofile ${dir}/${subdir}/:rw ${dir}/otherdir/:w ${dir}/otherdir/file:rw
54
runchecktest "OPENAT RW (rename/newpath)" pass --rename ${dir}/otherdir ${dir}/${subdir} file
56
# PASS rename of directory in between opendir/openat - file exists
59
-genprofile ${dir}/${subdir}:rw ${dir}/otherdir:w ${dir}/otherdir/file:rw
60
+genprofile ${dir}/${subdir}/:rw ${dir}/otherdir/:w ${dir}/otherdir/file:rw
61
runchecktest "OPENAT RW (rename/newpath)" pass --rename ${dir}/otherdir ${dir}/${subdir} file
63
# FAIL rename of directory in between opendir/openat - use old name
65
-genprofile ${dir}/${subdir}:rw ${dir}/otherdir:w ${dir}/${subdir}/file:rw
66
+genprofile ${dir}/${subdir}/:rw ${dir}/otherdir/:w ${dir}/${subdir}/file:rw
67
runchecktest "OPENAT RW (rename/newpath)" fail --rename ${dir}/otherdir ${dir}/${subdir} file
70
# FAIL rename of directory in between opendir/openat - use old name, file exists
73
-genprofile ${dir}/${subdir}:rw ${dir}/otherdir:w ${dir}/${subdir}/file:rw
74
+genprofile ${dir}/${subdir}/:rw ${dir}/otherdir/:w ${dir}/${subdir}/file:rw
75
runchecktest "OPENAT RW (rename/newpath)" fail --rename ${dir}/otherdir ${dir}/${subdir} file