[PATCH 5/5] t/t1304: make a second colon optional in the mask ACL check
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Mar 15, 2010, 17:14 UTC
- Message-ID
- <YowxgPZqaOkg2MZzY1CxL2y9KYLK5N2WFlWwYu3VB6Y3RrTnbp2pATZ27RaMhDiRScZADoVUqz4@cipher.nrlssc.navy.mil>
- In-Reply-To
- <YowxgPZqaOkg2MZzY1CxL1fbmUZ7CMUf5DgqI3S0X83DgqLNI9AGfI83JRNT8LWYHqXBB-PGS1Q@cipher.nrlssc.navy.mil>
From: Brandon Casey <drafnel@gmail.com>
Solaris only uses one colon in the listing of the ACL mask, Linux uses two, so substitute egrep for grep and make the second colon optional.
The -q option for Solaris 7's /usr/xpg4/bin/egrep does not appear to be implemented, so redirect output to /dev/null.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> --- t/t1304-default-acl.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh index 85351ae..055ad00 100755 --- a/t/t1304-default-acl.sh +++ b/t/t1304-default-acl.sh @@ -25,7 +25,7 @@ check_perms_and_acl () { getfacl "$1" > actual && grep -q "user:root:rwx" actual && grep -q "user:${LOGNAME}:rwx" actual && - grep -q "mask::r--" actual && + egrep "mask::?r--" actual > /dev/null 2>&1 && grep -q "group::---" actual || false }
-- 1.6.6.2