2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat, Inc. All Rights Reserved.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
27 # remove previous $seqres.full before test
30 # real QA test starts here
35 _require_scratch_richacl
39 _scratch_mkfs_richacl >> $seqres.full
46 echo "--- runas -u 99 -g 99 $*"
47 _runas -u 99 -g 99 -- "$@"
52 echo "--- runas -u 99 -g 99 setrichacl $*"
53 _runas -u 99 -g 99 -- $SETRICHACL_PROG "$@"
59 # We cannot set the acl as another user
60 s --set 'u:99:rwc::allow' a
62 # We cannot chmod as another user
65 # Give user 99 the write_acl permission
66 $SETRICHACL_PROG --set 'u:99:rwpC::allow' a
68 # Now user 99 can setrichacl and chmod ...
69 s --set 'u:99:rwpC::allow' a
72 # ... but chmod disables the write_acl permission
73 s --set 'u:99:rwpC::allow' a