File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ desc="open returns EACCES when the required permissions (for reading and/or writ
6
6
dir=` dirname $0 `
7
7
. ${dir} /../misc.sh
8
8
9
- echo " 1..65 "
9
+ echo " 1..72 "
10
10
11
11
n0=` namegen`
12
12
n1=` namegen`
@@ -82,7 +82,20 @@ expect 0 -u 65534 -g 65534 chmod ${n1} 0770
82
82
expect EACCES -u 65533 -g 65533 open ${n1} O_RDONLY
83
83
expect EACCES -u 65533 -g 65533 open ${n1} O_WRONLY
84
84
expect EACCES -u 65533 -g 65533 open ${n1} O_RDWR
85
+ #
86
+ # EACCES for opening a directory read-only with no read access
87
+ # EACCES for reading a directory with no execute access
88
+ #
89
+ cd ..
90
+ expect 0 -u 65534 -g 65534 open ${n0} O_RDONLY
91
+ expect 0 -u 65534 -g 65534 chmod ${n0} 0355
92
+ expect EACCES -u 65534 -g 65534 open ${n0} O_RDONLY
93
+ expect 0770 -u 65534 -g 65534 stat ${n0} /${n1} mode
94
+ expect 0 -u 65534 -g 65534 chmod ${n0} 0655
95
+ expect EACCES -u 65534 -g 65534 stat ${n0} /${n1} mode
85
96
97
+ expect 0 -u 65534 -g 65534 chmod ${n0} 0755
98
+ cd ${n0}
86
99
expect 0 -u 65534 -g 65534 unlink ${n1}
87
100
88
101
cd ${cdir}
You can’t perform that action at this time.
0 commit comments