~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: subdomain/capabilities.sh
2
 
===================================================================
3
 
--- subdomain.orig/capabilities.sh
4
 
+++ subdomain/capabilities.sh
5
 
@@ -74,10 +74,10 @@ syscall_sethostname_args=a.dumb.example.
6
 
 syscall_setdomainname_args=dumb.example.com
7
 
 syscall_ioperm_args="0 0x3ff"
8
 
 syscall_iopl_args=3
9
 
-syscall_chroot_args=${tmpdir}
10
 
+syscall_chroot_args=${tmpdir}/
11
 
 
12
 
 # if a testcase requires extra subdomain rules, add them here
13
 
-syscall_chroot_extra_entries="/:r ${tmpdir}:r"
14
 
+syscall_chroot_extra_entries="/:r ${tmpdir}/:r"
15
 
 
16
 
 testwrapper=changehat_wrapper
17
 
 
18
 
Index: subdomain/mult_mount.sh
19
 
===================================================================
20
 
--- subdomain.orig/mult_mount.sh
21
 
+++ subdomain/mult_mount.sh
22
 
@@ -48,8 +48,8 @@ file1b=$mp1/file2
23
 
 file2a=$mp2/file
24
 
 file2b=$mp2/file2
25
 
 
26
 
-dir1=$mp1/dir
27
 
-dir2=$mp2/dir
28
 
+dir1=$mp1/dir/
29
 
+dir2=$mp2/dir/
30
 
 
31
 
 mkdirperm=w
32
 
 mkdirperm_fail=r
33
 
Index: subdomain/readdir.sh
34
 
===================================================================
35
 
--- subdomain.orig/readdir.sh
36
 
+++ subdomain/readdir.sh
37
 
@@ -30,12 +30,12 @@ mkdir $dir
38
 
 
39
 
 # CHDIR TEST
40
 
 
41
 
-genprofile $dir:$okperm
42
 
+genprofile $dir/:$okperm
43
 
 
44
 
 runchecktest "READDIR" pass $dir
45
 
 
46
 
 # CHDIR TEST (no perm)
47
 
 
48
 
-genprofile $dir:$badperm
49
 
+genprofile $dir/:$badperm
50
 
 
51
 
 runchecktest "READDIR (no perm)" fail $dir
52
 
Index: subdomain/rename.sh
53
 
===================================================================
54
 
--- subdomain.orig/rename.sh
55
 
+++ subdomain/rename.sh
56
 
@@ -24,8 +24,8 @@ bin=$pwd
57
 
 
58
 
 file1=$tmpdir/file1
59
 
 file2=$tmpdir/file2
60
 
-dir1=$tmpdir/dir1
61
 
-dir2=$tmpdir/dir2
62
 
+dir1=$tmpdir/dir1/
63
 
+dir2=$tmpdir/dir2/
64
 
 
65
 
 okfile1perm=rw
66
 
 badfile1perm1=r
67
 
Index: subdomain/access.sh
68
 
===================================================================
69
 
--- subdomain.orig/access.sh
70
 
+++ subdomain/access.sh
71
 
@@ -22,7 +22,7 @@ bin=$pwd
72
 
 
73
 
 file=$tmpdir/file
74
 
 
75
 
-dir=$tmpdir/dir
76
 
+dir=$tmpdir/dir/
77
 
 rperm=r
78
 
 rwxperm=rwix
79
 
 wxperm=wix
80
 
Index: subdomain/mkdir.sh
81
 
===================================================================
82
 
--- subdomain.orig/mkdir.sh
83
 
+++ subdomain/mkdir.sh
84
 
@@ -18,7 +18,7 @@ bin=$pwd
85
 
 
86
 
 . $bin/prologue.inc
87
 
 
88
 
-dir=$tmpdir/tmpdir
89
 
+dir=$tmpdir/tmpdir/
90
 
 perms=w
91
 
 excess_perms=wl
92
 
 badperms=r
93
 
Index: subdomain/xattrs.sh
94
 
===================================================================
95
 
--- subdomain.orig/xattrs.sh
96
 
+++ subdomain/xattrs.sh
97
 
@@ -40,7 +40,7 @@ bin=$pwd
98
 
 
99
 
 file=$tmpdir/testfile
100
 
 link=$tmpdir/testlink
101
 
-dir=$tmpdir/testdir
102
 
+dir=$tmpdir/testdir/
103
 
 okperm=rw
104
 
 badperm=r
105
 
 
106
 
Index: subdomain/openat.sh
107
 
===================================================================
108
 
--- subdomain.orig/openat.sh
109
 
+++ subdomain/openat.sh
110
 
@@ -22,43 +22,44 @@ bin=$pwd
111
 
 
112
 
 . $bin/prologue.inc
113
 
 
114
 
+dir=${tmpdir}/
115
 
 subdir=deleteme
116
 
 file=${subdir}/file
117
 
-filepath=${tmpdir}/${file}
118
 
+filepath=${dir}${file}
119
 
 okperm=rw
120
 
 badperm1=r
121
 
 badperm2=w
122
 
 
123
 
-mkdir ${tmpdir}/${subdir}
124
 
+mkdir ${dir}/${subdir}
125
 
 
126
 
 # PASS UNCONFINED
127
 
-runchecktest "OPENAT unconfined RW (create) " pass $tmpdir $file
128
 
+runchecktest "OPENAT unconfined RW (create) " pass $dir $file
129
 
 
130
 
 # PASS TEST (the file shouldn't exist, so open should create it
131
 
 rm -f ${filepath}
132
 
-genprofile ${tmpdir}:r ${filepath}:$okperm
133
 
-runchecktest "OPENAT RW (create) " pass $tmpdir $file
134
 
+genprofile ${dir}:r ${filepath}:$okperm
135
 
+runchecktest "OPENAT RW (create) " pass $dir $file
136
 
 
137
 
 # PASS TEST
138
 
-genprofile ${tmpdir}:r ${filepath}:$okperm
139
 
-runchecktest "OPENAT RW" pass $tmpdir $file
140
 
+genprofile ${dir}:r ${filepath}:$okperm
141
 
+runchecktest "OPENAT RW" pass $dir $file
142
 
 
143
 
 # FAILURE TEST (1)
144
 
-genprofile ${tmpdir}:r ${filepath}:$badperm1
145
 
-runchecktest "OPENAT R" fail $tmpdir $file
146
 
+genprofile ${dir}:r ${filepath}:$badperm1
147
 
+runchecktest "OPENAT R" fail $dir $file
148
 
 
149
 
 # FAILURE TEST (2)
150
 
-genprofile ${tmpdir}:r ${filepath}:$badperm2
151
 
-runchecktest "OPENAT W" fail $tmpdir $file
152
 
+genprofile ${dir}:r ${filepath}:$badperm2
153
 
+runchecktest "OPENAT W" fail $dir $file
154
 
 
155
 
 # FAILURE TEST (3)
156
 
-genprofile ${tmpdir}:r ${filepath}:$badperm1 cap:dac_override
157
 
-runchecktest "OPENAT R+dac_override" fail $tmpdir $file
158
 
+genprofile ${dir}:r ${filepath}:$badperm1 cap:dac_override
159
 
+runchecktest "OPENAT R+dac_override" fail $dir $file
160
 
 
161
 
 # FAILURE TEST (4)
162
 
 # This is testing for bug: https://bugs.wirex.com/show_bug.cgi?id=2885
163
 
 # When we open O_CREAT|O_RDWR, we are (were?) allowing only write access
164
 
 # to be required.
165
 
 rm -f ${filepath}
166
 
-genprofile ${tmpdir}:r ${filepath}:$badperm2
167
 
-runchecktest "OPENAT W (create)" fail $tmpdir $file
168
 
+genprofile ${dir}:r ${filepath}:$badperm2
169
 
+runchecktest "OPENAT W (create)" fail $dir $file