2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat, Inc. All Rights Reserved.
10 _begin_fstest auto quick richacl
12 # Import common functions.
14 # real QA test starts here
19 _require_scratch_richacl
23 _scratch_mkfs_richacl >> $seqres.full
30 echo "--- runas -u 99 -g 99 $*"
31 _runas -u 99 -g 99 -- "$@"
36 echo "--- runas -u 99 -g 99 setrichacl $*"
37 _runas -u 99 -g 99 -- $SETRICHACL_PROG "$@"
43 # We cannot set the acl as another user
44 s --set 'u:99:rwc::allow' a
46 # We cannot chmod as another user
49 # Give user 99 the write_acl permission
50 $SETRICHACL_PROG --set 'u:99:rwpC::allow' a
52 # Now user 99 can setrichacl and chmod ...
53 s --set 'u:99:rwpC::allow' a
56 # ... but chmod disables the write_acl permission
57 s --set 'u:99:rwpC::allow' a