summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-10-08 11:12:48 +0200
committerKarolin Seeger <kseeger@samba.org>2017-10-25 08:43:01 +0200
commit784071fddc5acfed200e1060f3613116ec4deab1 (patch)
tree274d4641e96b10ca9298757836657bdb611f710d /source3/script
parentfd3e3a5d6472b68fa6ed42fa8f990f1d44c496e0 (diff)
downloadsamba-784071fddc5acfed200e1060f3613116ec4deab1.tar.gz
selftest: fix acl_xattr test: changing owner
Don't give ownership to user "force_user" as user "$USERNAME", this would fail with NT_STATUS_INVALID_OWNER, instead just take ownership as user "force_user". Adding a corresponding ACE for "force_user" with FULL rights ensures this works. 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> (cherry picked from commit 0f8de2dee5451c9791f96050f85e4f007bec2819)
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/test_acl_xattr.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/script/tests/test_acl_xattr.sh b/source3/script/tests/test_acl_xattr.sh
index ddccf4fce8a..9697f06a43b 100755
--- a/source3/script/tests/test_acl_xattr.sh
+++ b/source3/script/tests/test_acl_xattr.sh
@@ -77,7 +77,8 @@ nt_affects_chown() {
b4_actual=$($SMBCLIENT //$SERVER/$share -U $USERNAME%$PASSWORD -c "getfacl $fname" 2>/dev/null) || exit 1
echo "${b4_actual}" | grep -q "^# owner:" || exit 1
b4_actual=$(echo "$b4_actual" | sed -rn 's/^# owner: (.*)/\1/p')
- $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -C force_user 2>/dev/null || exit 1
+ $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "ACL:$SERVER\force_user:ALLOWED/0x0/FULL" || exit 1
+ $SMBCACLS //$SERVER/$share $fname -U force_user%$PASSWORD -C force_user 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 "^# owner:" || exit 1
af_actual=$(echo "$af_actual" | sed -rn 's/^# owner: (.*)/\1/p')