Commit 77655c65 authored by Ralph Boehme's avatar Ralph Boehme Committed by Karolin Seeger

selftest: run vfs.fruit test against a share that deletes empty resource forks

This reveals a bug in the AppleDouble conversion code: the conversion code that
unlinks an empty resource fork AppleDouble sidecar file ("._file") gets
triggered as part of open_file_ntcreate(..., "file:AFP_AfpResource", ...):

after SMB_VFS_OPEN() has been called with O_CREAT, what created the file, we
call SMB_VFS_FSTAT() on the just created filehandle. This ends up in
ad_convert(), finds the resource fork empty and thus deletes the file.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13958Signed-off-by: 's avatarRalph Boehme <slow@samba.org>
Reviewed-by: 's avatarJeremy Allison <jra@samba.org>
(cherry picked from commit 8ed9b6b457923d2353d1d18838f4a278db48c6b9)
parent 45de537d
^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\)
^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion without embedded xattr\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.copyfile\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.resource fork IO\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.SMB2/CREATE context AAPL\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.truncate resource fork to 0 bytes\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.opening and creating resource fork\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.create delete-on-close AFP_AfpResource\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.setinfo delete-on-close AFP_AfpResource\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.delete\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.read open rsrc after rename\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.readdir_attr with names with illegal ntfs characters\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.copy-chunk streams\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.empty_stream\(nt4_dc\)
^samba3.vfs.fruit fruit_delete_empty_adfiles.setinfo eof AFP_AfpResource\(nt4_dc\)
......@@ -538,6 +538,7 @@ for t in tests:
plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit', 'metadata_netatalk')
plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_metadata_stream -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit', 'metadata_stream')
plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_stream_depot -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit_stream_depot', 'streams_depot')
plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_delete_empty_adfiles -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share --option=torture:share2=vfs_wo_fruit', 'fruit_delete_empty_adfiles')
elif t == "vfs.fruit_netatalk":
plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/vfs_fruit_xattr -U$USERNAME%$PASSWORD --option=torture:localdir=$SELFTEST_PREFIX/nt4_dc/share')
elif t == "vfs.fruit_timemachine":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment