1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s3:tests: Add test to access msdfs path with smbget

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 19 00:10:10 UTC 2022 on sn-devel-184
This commit is contained in:
Andreas Schneider 2022-07-12 11:19:13 +02:00 committed by Jeremy Allison
parent 2b32d93222
commit 965c6617ad
2 changed files with 17 additions and 0 deletions

View File

@ -2615,6 +2615,7 @@ sub provision($$)
chmod 0755, $ro_shrdir;
create_file_chmod("$ro_shrdir/readable_file", 0644) or return undef;
create_file_chmod("$ro_shrdir/unreadable_file", 0600) or return undef;
create_file_chmod("$ro_shrdir/msdfs-target", 0600) or return undef;

View File

@ -255,6 +255,20 @@ test_update()
return 0
}
# Test accessing an msdfs path.
test_msdfs_link()
{
${SMBGET} -v "-U${USERNAME}%${PASSWORD}" \
"smb://${SERVER}/msdfs-share/deeppath/msdfs-src2/readable_file"
ret=$?
if [ ${ret} -ne 0 ]; then
echo "ERROR: smbget failed with ${ret}"
return 1
fi
return 0
}
create_test_data
pushd $TMPDIR
@ -290,6 +304,8 @@ testit "resume download (modified file)" test_resume_modified ||
testit "update" test_update ||
failed=$(expr $failed + 1)
testit "msdfs" test_msdfs_link ||
failed=$((failed + 1))
clear_download_area
popd # TMPDIR