Fwd: Setting FS Quota against SAMBA share from windows2k12
jra at samba.org
Tue Mar 29 16:44:55 UTC 2016
On Mon, Mar 28, 2016 at 10:23:38PM -0700, Partha Sarathi wrote:
> Hi Folks,
> Attached the patch which fixes the SMB2_SETINFO to handle
> the SMB2_INFO_FILESYSTEM info type and SMB_FS_QUOTA_INFORMATION info level.
> Please let me now your feedback on the patch.
Thanks so much for the patch !
Quick look over, one change I'd like is to change
the parameters to smbd_do_setfsinfo() from int to
+ int data_size;
+ int ret_size = 0;
I know the previous versions of these functions
took 'int' but these things really are unsigned,
so I'd like to tighten this up for future code.
> ---------- Forwarded message ----------
> From: Partha Sarathi <partha at exablox.com>
> Date: Fri, Mar 25, 2016 at 12:00 PM
> Subject: Setting FS Quota against SAMBA share from windows2k12
> To: samba at lists.samba.org, samba-technical <samba-technical at lists.samba.org>
> Hi Folks,
> I tried to set quota(soft limit and hard limit) on a share from
> Windows2k12R2 and I noticed "NT_STATUS_INVALID_PARAMETER" error for the
> SMB2 setinfo request. Attached the packet capture for your reference.
> SAMBA version 4.3.4
> The below is the corresponding debug log
> [2016/03/25 10:38:21.333815, 10, pid=17987, effective(0, 110000513),
> real(0, 0)] ../source3/smbd/smb2_setinfo.c:379(smbd_smb2_setinfo_send)
> smbd_smb2_setinfo_send: $Extend/$Quota:$Q:$INDEX_ALLOCATION - fnum
> [2016/03/25 10:38:21.333824, 10, pid=17987, effective(0, 110000513),
> real(0, 0)] ../source3/smbd/smb2_server.c:2789(smbd_smb2_request_error_ex)
> smbd_smb2_request_error_ex: idx status[NT_STATUS_INVALID_PARAMETER] ||
> at ../source3/smbd/smb2_setinfo.c:132
> [2016/03/25 10:38:21.333831, 10, pid=17987, effective(0, 110000513),
> real(0, 0)] ../source3/smbd/smb2_server.c:2680(smbd_smb2_request_done_ex)
> smbd_smb2_request_done_ex: idx status[NT_STATUS_INVALID_PARAMETER]
> body dyn[yes:1] at ../source3/smbd/smb2_server.c:2837
> When I looked at the code the
> The* smbd_smb2_setinfo_send()* is handling only the below two info types
> and its not handling *SMB2_0_INFO_FILESYSTEM*.
> case 0x01:/* SMB2_SETINFO_FILE */
> case 0x03:/* SMB2_SETINFO_SECURITY */
> From the MS-SMB2 spec it looks like there is a specific info type for
> handling the FILESYSTEM requests as below and in samba this info type is
> not considered . Is it a known issue or I am missing anything ?
> *126.96.36.199.2 Handling SMB2_0_INFO_FILESYSTEM *
> The information classes that are supported for setting underlying object
> store information are listed in section 2.2.39. Documentation for these is
> provided [MS-FSCC] section 2.5. Requests for information classes not listed
> in section 2.2.39 but documented in section 2.5 of [MS-FSCC] for Uses of
> "Set" or "LOCAL" MUST be failed with STATUS_NOT_SUPPORTED. Requests for
> information classes not documented in section 2.5 of [MS-FSCC] or
> documented in section 2.5 of [MS-FSCC] for Uses of only "Query" MUST be
> failed with STATUS_INVALID_INFO_CLASS.
> If the object store supports security and the information class is
> FileFsControlInformation or FileFsObjectIdInformation and Open.GrantedAccess
> does not include FILE_WRITE_DATA, the server MUST fail the request with
> The server MUST apply the information requested to the underlying object
> store.<359> If the underlying object store returns an error, the server
> MUST fail the request with the error code received. Otherwise, the server
> MUST initialize an SMB2 SET_INFO Response following the syntax given in
> section 2.2.40. The response MUST then be sent to the client.
More information about the samba-technical