The Samba-Bugzilla – Attachment 14471 Details for
Bug 13441
vfs_fruit: delete 0 byte size streams if AAPL is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Follow-up patch for 4.7 and 4.8, cherry-picked from master
bug13441-v47,v48.patch (text/plain), 4.50 KB, created by
Ralph Böhme
on 2018-09-04 09:29:21 UTC
(
hide
)
Description:
Follow-up patch for 4.7 and 4.8, cherry-picked from master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2018-09-04 09:29:21 UTC
Size:
4.50 KB
patch
obsolete
>From 82e7cbaf79e1f4a5e8dda1c44327256a5d925da3 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Tue, 7 Aug 2018 15:11:22 +0200 >Subject: [PATCH 1/2] torture: Make sure that fruit_ftruncate only unlinks > streams > >Follow-up to > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441 > >Signed-off-by: Volker Lendecke <vl@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> >(cherry picked from commit c39ec64231b261fe4ada02f1f1b9aa344cf35bb5) >--- > selftest/knownfail.d/samba3.vfs.fruit | 1 + > source4/torture/vfs/fruit.c | 45 +++++++++++++++++++++++++++++++++++ > 2 files changed, 46 insertions(+) > >diff --git a/selftest/knownfail.d/samba3.vfs.fruit b/selftest/knownfail.d/samba3.vfs.fruit >index 8df25bccb79..d858452eb52 100644 >--- a/selftest/knownfail.d/samba3.vfs.fruit >+++ b/selftest/knownfail.d/samba3.vfs.fruit >@@ -1 +1,2 @@ > ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\) >+^samba3.vfs.fruit .*.setinfo eof stream\(nt4_dc\) >diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c >index 6a987de70a1..ab9bbf4ed22 100644 >--- a/source4/torture/vfs/fruit.c >+++ b/source4/torture/vfs/fruit.c >@@ -4768,6 +4768,51 @@ static bool test_setinfo_stream_eof(struct torture_context *tctx, > tctx, status, NT_STATUS_OBJECT_NAME_NOT_FOUND, ret, done, > "Unexpected status\n"); > >+ torture_comment( >+ tctx, "Setting main file EOF to 1 to force 0-truncate\n"); >+ >+ status = torture_smb2_testfile_access( >+ tree, >+ fname, >+ &h1, >+ SEC_FILE_WRITE_DATA); >+ torture_assert_ntstatus_ok_goto(tctx, status, ret, done, >+ "torture_smb2_testfile failed\n"); >+ >+ ZERO_STRUCT(sfinfo); >+ sfinfo.generic.in.file.handle = h1; >+ sfinfo.generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION; >+ sfinfo.position_information.in.position = 1; >+ status = smb2_setinfo_file(tree, &sfinfo); >+ torture_assert_ntstatus_ok_goto( >+ tctx, >+ status, >+ ret, >+ done, >+ "set eof 1 failed\n"); >+ >+ sfinfo.position_information.in.position = 0; >+ status = smb2_setinfo_file(tree, &sfinfo); >+ torture_assert_ntstatus_ok_goto( >+ tctx, >+ status, >+ ret, >+ done, >+ "set eof 0 failed\n"); >+ >+ smb2_util_close(tree, h1); >+ >+ ZERO_STRUCT(create); >+ create.in.desired_access = SEC_FILE_READ_ATTRIBUTE; >+ create.in.share_access = NTCREATEX_SHARE_ACCESS_MASK; >+ create.in.file_attributes = FILE_ATTRIBUTE_NORMAL; >+ create.in.create_disposition = NTCREATEX_DISP_OPEN; >+ create.in.fname = fname; >+ >+ status = smb2_create(tree, tctx, &create); >+ torture_assert_ntstatus_ok_goto(tctx, status, ret, done, >+ "torture_smb2_testfile failed\n"); >+ smb2_util_close(tree, h1); > done: > smb2_util_unlink(tree, fname); > smb2_util_rmdir(tree, BASEDIR); >-- >2.13.6 > > >From b0ac0c649c8b4c2ae16b7b0d4efe3cbc2cb9f0f4 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Tue, 7 Aug 2018 15:10:31 +0200 >Subject: [PATCH 2/2] vfs_fruit: Don't unlink the main file > >The original fix for bug 13441 was missing a check that verifies that >fruit_ftruncate() is actually called on a stream. > >Follow-up to > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441 > >Pair-Programmed-With: Volker Lendecke <vl@samba.org> > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Thu Aug 23 15:28:48 CEST 2018 on sn-devel-144 > >(cherry picked from commit 8c14234871820eacde46670d722a676fb5f3a46c) >--- > selftest/knownfail.d/samba3.vfs.fruit | 1 - > source3/modules/vfs_fruit.c | 6 +++++- > 2 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/selftest/knownfail.d/samba3.vfs.fruit b/selftest/knownfail.d/samba3.vfs.fruit >index d858452eb52..8df25bccb79 100644 >--- a/selftest/knownfail.d/samba3.vfs.fruit >+++ b/selftest/knownfail.d/samba3.vfs.fruit >@@ -1,2 +1 @@ > ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\) >-^samba3.vfs.fruit .*.setinfo eof stream\(nt4_dc\) >diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c >index c7777ae22b7..78d3720a9e7 100644 >--- a/source3/modules/vfs_fruit.c >+++ b/source3/modules/vfs_fruit.c >@@ -5545,7 +5545,11 @@ static int fruit_ftruncate(struct vfs_handle_struct *handle, > (intmax_t)offset); > > if (fio == NULL) { >- if (offset == 0 && global_fruit_config.nego_aapl) { >+ if (offset == 0 && >+ global_fruit_config.nego_aapl && >+ is_ntfs_stream_smb_fname(fsp->fsp_name) && >+ !is_ntfs_default_stream_smb_fname(fsp->fsp_name)) >+ { > return SMB_VFS_NEXT_UNLINK(handle, fsp->fsp_name); > } > return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset); >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review?
(
jra
)
metze
:
review+
Actions:
View
Attachments on
bug 13441
:
14311
|
14470
| 14471