#!/bin/bash

export LANG=C
set -Ceuo pipefail
set -x
type mkdir touch chmod ls strace tar cc

cc -std=gnu11 -Wall -pedantic openattest.c -o openattest

mkdir -p a/b
touch a/b/{f1,f2,f3}
chmod 0311 a
ls a/b
strace -fFeopenat ./openattest a b
strace -fFeopenat tar -C a -cvf /dev/null b
