aboutsummaryrefslogtreecommitdiff
blob: 9387015cde92e196e265b4f97e9a1e60137e6812 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# verify dirfd handling in pre-checks #342983

addwrite $PWD

# create a dir named "one" in $PWD, then try to create
# a dir named "one" in "one/".  so ultimately we will
# have "one/one/".  if the dirfd is ignored, sandbox
# will return too soon saying "one" already exists.
mkdir one
exec mkdirat-0 0 one:O_DIRECTORY one 0