diff --git a/cdist/conf/type/__acl/explorer/acl_is b/cdist/conf/type/__acl/explorer/acl_is index 9ca30281..a693c023 100755 --- a/cdist/conf/type/__acl/explorer/acl_is +++ b/cdist/conf/type/__acl/explorer/acl_is @@ -27,6 +27,5 @@ then fi getfacl "/$__object_id" 2>/dev/null \ - | grep -E '^(default:)?(user|group|(mask|other):):[^:]' \ - | sed -r 's/\s*#.+$//' \ + | grep -Eo '^(default:)?(user|group|(mask|other):):[^:][[:graph:]]+' \ || true diff --git a/cdist/conf/type/__acl/gencode-remote b/cdist/conf/type/__acl/gencode-remote index 96b4a57c..08ba60ac 100755 --- a/cdist/conf/type/__acl/gencode-remote +++ b/cdist/conf/type/__acl/gencode-remote @@ -37,7 +37,7 @@ do while read -r acl do - if echo "$acl" | sed -r 's/(.*)://' | grep -Fq 'X' + if echo "$acl" | awk -F: '{ print $NF }' | grep -Fq 'X' then if [ "$is_dir" = '1' ] then @@ -46,7 +46,7 @@ do rep=- fi - acl="$( echo "$acl" | sed -r "s/(.*)X/\1$rep/" )" + acl="$( echo "$acl" | sed "s/\(.*\)X/\1$rep/" )" fi if echo "$parameter" | grep -Eq '(mask|other)' @@ -98,7 +98,7 @@ then then continue fi - no_bits="$( echo "$acl" | sed -r 's/:[rwx-]+$//' )" + no_bits="$( echo "$acl" | sed 's/:...$//' )" echo "$setfacl_exec -x \"$no_bits\" \"$acl_path\"" done