# We should not be able to tell the difference between a node which # doesn't exist, and a node we don't have permission on, if we don't # have permission on it directory. mkdir /dir setperm /dir 0 NONE # First when it doesn't exist setid 1 expect *Permission denied dir /dir/file expect *Permission denied read /dir/file expect *Permission denied write /dir/file value expect *Permission denied mkdir /dir/file expect *Permission denied rm /dir/file expect *Permission denied rm /dir expect *Permission denied getperm /dir/file expect *Permission denied setperm /dir/file 0 NONE # We get no watch event when there's no permission. It's a corner case. watchnoack /dir/file token 1 write /dir/file contents 1 rm /dir/file expect waitwatch failed: Connection timed out waitwatch unwatch /dir/file token expect *No such file or directory unwatch /dir/file token expect *Permission denied introduce 2 100 7 /dir/file # Now it exists setid 0 write /dir/file contents setid 1 expect *Permission denied dir /dir/file expect *Permission denied read /dir/file expect *Permission denied write /dir/file value expect *Permission denied mkdir /dir/file expect *Permission denied rm /dir/file expect *Permission denied rm /dir expect *Permission denied getperm /dir/file expect *Permission denied setperm /dir/file 0 NONE watchnoack /dir/file token 1 write /dir/file contents 1 rm /dir/file expect waitwatch failed: Connection timed out waitwatch unwatch /dir/file token expect *No such file or directory unwatch /dir/file token expect *Permission denied introduce 2 100 7 /dir/file