Bug 12968 - smbclient tarmode doesn't work with SMB2/3
Summary: smbclient tarmode doesn't work with SMB2/3
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 4.7.0rc4
Hardware: All All
: P5 regression (vote)
Target Milestone: 4.7
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-16 04:26 UTC by Stefan Metzmacher
Modified: 2017-08-30 07:15 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for master. (4.00 KB, patch)
2017-08-16 22:52 UTC, Jeremy Allison
no flags Details
git-am fix for 4.7.0. (4.68 KB, patch)
2017-08-22 20:31 UTC, Jeremy Allison
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2017-08-16 04:26:31 UTC
do_tar_op() uses make_remote_path() via tar_send_file().

And make_remote_path() uses cli_chkpath() and cli_mkdir(),
which both don't support SMB2/3.
Comment 1 Stefan Metzmacher 2017-08-16 04:34:25 UTC
(In reply to Stefan Metzmacher from comment #0)

Ok, cli_mkdir() calls cli_smb2_mkdir() but cli_chkpath() is still a problem
Comment 2 Jeremy Allison 2017-08-16 22:37:44 UTC
I think we can do an open with FILE_READ_ATTRIBUTES followed by close to simulate cli_chkpath() in SMB2. Ah, this is actually a call to cli_smb2_qpathinfo_basic().

Patch to follow...
Comment 3 Jeremy Allison 2017-08-16 22:52:00 UTC
Created attachment 13479 [details]
git-am fix for master.

Patch I've submitted to the list. Can't use cli_smb2_qpathinfo_basic() directly, but I think this works.
Comment 4 Jeremy Allison 2017-08-22 20:31:38 UTC
Created attachment 13489 [details]
git-am fix for 4.7.0.

Cherry-pick from the code that went into master.
Comment 5 Karolin Seeger 2017-08-28 08:38:44 UTC
Pushed to autobuild-v4-7-test.
Comment 6 Karolin Seeger 2017-08-30 07:15:47 UTC
Pushed to v4-7-test.
Closing out bug report.

Thanks!