Bug 11662 - smbclient does not print disk usage relative to current directory when using SMB2 and later
Summary: smbclient does not print disk usage relative to current directory when using ...
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.3.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2016-01-05 22:28 UTC by Uri Simchoni
Modified: 2016-01-18 08:26 UTC (History)
2 users (show)

See Also:

git-am fix for 4.3.next (8.50 KB, patch)
2016-01-06 05:07 UTC, Uri Simchoni
jra: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Uri Simchoni 2016-01-05 22:28:00 UTC
In a Windows command shell, when typing "dir" on an SMB2 shared folder, the printed disk usage is relative to the directory being listed (meaning that the SMB2 query is made relative to the folder and not to the share's root). This has significance in the following cases:
A. if a Windows server uses folder quotas
B. if any server has a different file system mounted on a subfolder of the share
C. for a Samba server - if the "dfree command" is being used for some custom calculation, the folder is passed on to the script.

AFAICT this is a feature of the SMB2 protocol, not available in SMB1 protocol.

smbclient always queries the share's root folder, even when using SMB2.
Comment 1 Uri Simchoni 2016-01-06 05:07:02 UTC
Created attachment 11758 [details]
git-am fix for 4.3.next
Comment 2 Jeremy Allison 2016-01-06 18:11:16 UTC
Comment on attachment 11758 [details]
git-am fix for 4.3.next

Comment 3 Jeremy Allison 2016-01-06 18:11:42 UTC
Re-assigning to Karolin for inclusion in 4.3.next.
Comment 4 Karolin Seeger 2016-01-14 09:08:43 UTC
Pushed to autobuild-v4-3-test.
Comment 5 Karolin Seeger 2016-01-18 08:26:42 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to v4-3-test.
Closing out bug report.