commit
c7a4ae112f
4 changed files with 27 additions and 5 deletions
|
@ -19,5 +19,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ -e "/$__object_id" ]
|
if [ -e "/$__object_id" ]
|
||||||
then getfacl "/$__object_id" | grep -E '^((default:|)(user|group)):[a-z]' || true
|
then
|
||||||
|
getfacl "/$__object_id" 2>/dev/null \
|
||||||
|
| grep -E '^((default:)?(user|group):[^:]|(default:)?mask::)' \
|
||||||
|
|| true
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -37,13 +37,24 @@ do
|
||||||
then echo "default:$parameter:$l"
|
then echo "default:$parameter:$l"
|
||||||
fi
|
fi
|
||||||
done < "$__object/parameter/$parameter"
|
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'
|
setfacl_exec='setfacl'
|
||||||
|
|
||||||
if [ -f "$__object/parameter/recursive" ]
|
if [ -f "$__object/parameter/recursive" ]
|
||||||
then
|
then
|
||||||
if echo "$os" | grep -E 'macosx|netbsd|freebsd|openbsd'
|
if echo "$os" | grep -Eq 'macosx|netbsd|freebsd|openbsd'
|
||||||
then
|
then
|
||||||
echo "$os setfacl do not support recursive operations" >&2
|
echo "$os setfacl do not support recursive operations" >&2
|
||||||
else
|
else
|
||||||
|
@ -53,7 +64,7 @@ fi
|
||||||
|
|
||||||
if [ -f "$__object/parameter/remove" ]
|
if [ -f "$__object/parameter/remove" ]
|
||||||
then
|
then
|
||||||
if echo "$os" | grep 'solaris'
|
if echo "$os" | grep -Fq 'solaris'
|
||||||
then
|
then
|
||||||
# Solaris setfacl behaves differently.
|
# Solaris setfacl behaves differently.
|
||||||
# We will not support Solaris for now, because no way to test it.
|
# We will not support Solaris for now, because no way to test it.
|
||||||
|
|
|
@ -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.
|
See setfacl(1) and acl(5) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
OPTIONAL PARAMETERS
|
||||||
|
-------------------
|
||||||
|
mask
|
||||||
|
Add mask ACL entry.
|
||||||
|
|
||||||
|
|
||||||
OPTIONAL MULTIPLE PARAMETERS
|
OPTIONAL MULTIPLE PARAMETERS
|
||||||
----------------------------
|
----------------------------
|
||||||
user
|
user
|
||||||
|
@ -46,7 +52,8 @@ EXAMPLES
|
||||||
--user alice:rwx \
|
--user alice:rwx \
|
||||||
--user bob:r-x \
|
--user bob:r-x \
|
||||||
--group project-group:rwx \
|
--group project-group:rwx \
|
||||||
--group some-other-group:r-x
|
--group some-other-group:r-x \
|
||||||
|
--mask r-x
|
||||||
|
|
||||||
|
|
||||||
AUTHORS
|
AUTHORS
|
||||||
|
|
1
cdist/conf/type/__acl/parameter/optional
Normal file
1
cdist/conf/type/__acl/parameter/optional
Normal file
|
@ -0,0 +1 @@
|
||||||
|
mask
|
Loading…
Reference in a new issue