~mathiaz/apparmor/ubuntu-mathiaz

« back to all changes in this revision

Viewing changes to tests/regression/subdomain/for-mainline/openat.patch

  • Committer: Mathias Gug
  • Date: 2008-02-04 18:57:00 UTC
  • mfrom: (885.1.5 apparmor)
  • Revision ID: mathiaz@ubuntu.com-20080204185700-wwlyq0ksssxclv8w
Merge  ubuntu branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
6
 
 
7
 
 # PASS TEST (the file shouldn't exist, so open should create it
8
 
 resettest
9
 
-genprofile ${dir}:r ${filepath}:$okperm
10
 
+genprofile ${dir}/:r ${filepath}:$okperm
11
 
 runchecktest "OPENAT RW (create) " pass $dir $file
12
 
 
13
 
 # PASS TEST
14
 
 resettest
15
 
 touch ${filepath}
16
 
-genprofile ${dir}:r ${filepath}:$okperm
17
 
+genprofile ${dir}/:r ${filepath}:$okperm
18
 
 runchecktest "OPENAT RW (exists)" pass $dir $file
19
 
 
20
 
 # FAILURE TEST (1)
21
 
 resettest
22
 
 touch ${filepath}
23
 
-genprofile ${dir}:r ${filepath}:$badperm1
24
 
+genprofile ${dir}/:r ${filepath}:$badperm1
25
 
 runchecktest "OPENAT R" fail $dir $file
26
 
 
27
 
 # FAILURE TEST (2)
28
 
 resettest
29
 
 touch ${filepath}
30
 
-genprofile ${dir}:r ${filepath}:$badperm2
31
 
+genprofile ${dir}/:r ${filepath}:$badperm2
32
 
 runchecktest "OPENAT W (exists)" fail $dir $file
33
 
 
34
 
 # FAILURE TEST (3)
35
 
 resettest
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
39
 
 
40
 
 # FAILURE TEST (4)
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
43
 
 # to be required.
44
 
+# This test currently passes when it should fail because of the o_creat bug
45
 
 resettest
46
 
-genprofile ${dir}:r ${filepath}:$badperm2
47
 
+genprofile ${dir}/:r ${filepath}:$badperm2
48
 
 runchecktest "OPENAT W (create)" fail $dir $file
49
 
 
50
 
 # PASS rename of directory in between opendir/openat
51
 
 resettest
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
55
 
 
56
 
 # PASS rename of directory in between opendir/openat - file exists
57
 
 resettest
58
 
 touch ${filepath}
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
62
 
 
63
 
 # FAIL rename of directory in between opendir/openat - use old name
64
 
 resettest
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
68
 
-exit
69
 
 
70
 
 # FAIL rename of directory in between opendir/openat - use old name, file exists
71
 
 resettest
72
 
 touch ${filepath}
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