Add support for ACL mask.

This commit is contained in:
Dimitrios Apostolou 2019-04-15 13:04:07 +02:00
parent d18584b4ff
commit 45e9ed441e
4 changed files with 25 additions and 3 deletions

View file

@ -19,5 +19,8 @@
#
if [ -e "/$__object_id" ]
then getfacl "/$__object_id" | grep -E '^((default:|)(user|group)):[a-z]' || true
then
getfacl "/$__object_id" \
| grep -E '^((default:)?(user|group):[^:]|(default:)?mask::)' \
|| true
fi

View file

@ -37,7 +37,18 @@ do
then echo "default:$parameter:$l"
fi
done < "$__object/parameter/$parameter"
done )"
done
if [ -f "$__object/parameter/mask" ]
then
l=$( cat "$__object/parameter/mask" )
echo "mask::$l"
if [ -f "$__object/parameter/default" ]
then echo "default:mask::$l"
fi
fi
)"
setfacl_exec='setfacl'

View file

@ -13,6 +13,12 @@ ACL must be defined as 3-symbol combination, using `r`, `w`, `x` and `-`.
See setfacl(1) and acl(5) for more details.
OPTIONAL PARAMETERS
-------------------
mask
Add mask ACL entry.
OPTIONAL MULTIPLE PARAMETERS
----------------------------
user
@ -46,7 +52,8 @@ EXAMPLES
--user alice:rwx \
--user bob:r-x \
--group project-group:rwx \
--group some-other-group:r-x
--group some-other-group:r-x \
--mask r-x
AUTHORS

View file

@ -0,0 +1 @@
mask