summaryrefslogtreecommitdiff
path: root/source3/script/tests
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-10-08 11:16:27 +0200
committerJeremy Allison <jra@samba.org>2017-10-09 23:01:17 +0200
commit1fabe25339166e381ab0e118667f9c19781b49df (patch)
treed638911fe508141c0321cdec23c50240cd4a2034 /source3/script/tests
parent71a2d06a1e41a1c412c82e58b3966e14c29c6159 (diff)
downloadsamba-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-xsource3/script/tests/test_acl_xattr.sh2
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