source: trunk/packages/xen-3.1/xen-3.1/tools/xenstore/testsuite/14complexperms.test @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 1.6 KB
Line 
1# We should not be able to tell the difference between a node which
2# doesn't exist, and a node we don't have permission on, if we don't
3# have permission on it directory.
4
5mkdir /dir
6setperm /dir 0 NONE
7
8# First when it doesn't exist
9setid 1
10expect *Permission denied
11dir /dir/file
12expect *Permission denied
13read /dir/file
14expect *Permission denied
15write /dir/file value
16expect *Permission denied
17mkdir /dir/file
18expect *Permission denied
19rm /dir/file
20expect *Permission denied
21rm /dir
22expect *Permission denied
23getperm /dir/file
24expect *Permission denied
25setperm /dir/file 0 NONE
26# We get no watch event when there's no permission.  It's a corner case.
27watchnoack /dir/file token
281 write /dir/file contents
291 rm /dir/file
30expect waitwatch failed: Connection timed out
31waitwatch
32unwatch /dir/file token
33expect *No such file or directory
34unwatch /dir/file token
35expect *Permission denied
36introduce 2 100 7 /dir/file
37
38# Now it exists
39setid 0
40write /dir/file contents
41
42setid 1
43expect *Permission denied
44dir /dir/file
45expect *Permission denied
46read /dir/file
47expect *Permission denied
48write /dir/file value
49expect *Permission denied
50mkdir /dir/file
51expect *Permission denied
52rm /dir/file
53expect *Permission denied
54rm /dir
55expect *Permission denied
56getperm /dir/file
57expect *Permission denied
58setperm /dir/file 0 NONE
59watchnoack /dir/file token
601 write /dir/file contents
611 rm /dir/file
62expect waitwatch failed: Connection timed out
63waitwatch
64unwatch /dir/file token
65expect *No such file or directory
66unwatch /dir/file token
67expect *Permission denied
68introduce 2 100 7 /dir/file
Note: See TracBrowser for help on using the repository browser.