diff options
author | Ralph Boehme <slow@samba.org> | 2017-10-08 11:16:27 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-10-09 23:01:17 +0200 |
commit | 1fabe25339166e381ab0e118667f9c19781b49df (patch) | |
tree | d638911fe508141c0321cdec23c50240cd4a2034 /source3/script/tests | |
parent | 71a2d06a1e41a1c412c82e58b3966e14c29c6159 (diff) | |
download | samba-1fabe25339166e381ab0e118667f9c19781b49df.tar.gz |
selftest: fix acl_xattr test: grep ouput before munging
The check of the smbclient getfacl output for presence of a "^# group:"
line must be done before munging the saved output with a sed filter.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-x | source3/script/tests/test_acl_xattr.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/script/tests/test_acl_xattr.sh b/source3/script/tests/test_acl_xattr.sh index bc3326cf919..463969363fb 100755 --- a/source3/script/tests/test_acl_xattr.sh +++ b/source3/script/tests/test_acl_xattr.sh @@ -109,8 +109,8 @@ nt_affects_chgrp() { test "$b4_expected" != "$af_expected" || exit 1 b4_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "getfacl $fname" 2>/dev/null) || exit 1 - b4_actual=$(echo "$b4_actual" | sed -rn 's/^# group: (.*)/\1/p') echo "${b4_actual}" | grep -q "^# group:" || exit 1 + b4_actual=$(echo "$b4_actual" | sed -rn 's/^# group: (.*)/\1/p') $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -G domadmins 2>/dev/null || exit 1 af_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "getfacl $fname" 2>/dev/null) || exit 1 echo "${af_actual}" | grep -q "^# group:" || exit 1 |