aboutsummaryrefslogtreecommitdiff
blob: d557c1a879f23ac1fadce566a5b7be2a1676f8fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# make sure `mkdir` works in an unreadable dir as non-root.
# based on mkdir/p-3 test from coreutils.

[ ${SB_UID} -eq 0 ] && exit 77

addwrite $PWD

chmod -R a+rwx base 2>/dev/null
rm -rf base

set -e

mkdir -p base/d
cd base/d
chmod a-r .
chmod a-rx ..

mkdir-0 0 a 0777
mkdir-0 0 a/b 0777

chmod a+rx ..
chmod a+r .

exit 0