#!/bin/sh # Verify the a and A entries of tmpfiles, POSIX ACLs. The sysroot has # no getfacl, so this looks at what an ACL does to the mode: the group # bits show the mask, and a default ACL replaces the umask for what is # created in the directory. set -eu TEST_DIR=$(dirname "$0") DIR=/tmp/acl CONF=/tmp/acl.conf tmpfiles() { run "cat > $CONF" run "/libexec/finit/tmpfiles --create $CONF" } assert_mode() { assert "Mode of $1 is $2" "$(texec stat -c %a "$1")" = "$2" } test_teardown() { say "Running test teardown." run "rm -rf $DIR $CONF" } # shellcheck source=/dev/null . "$TEST_DIR/lib/setup.sh" sep say 'Default ACL on a directory, as in tpm2-tss-fapi.conf' tmpfiles <