Fwd: Setting FS Quota against SAMBA share from windows2k12

Partha Sarathi partha at exablox.com
Tue Mar 29 05:23:38 UTC 2016


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.

Regards,
--Partha


---------- 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
2762575723
[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[1] 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[1] status[NT_STATUS_INVALID_PARAMETER]
body[8] 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 ?

*3.3.5.21.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
STATUS_ACCESS_DENIED.

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.

--Partha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quota_setinfo.patch
Type: application/octet-stream
Size: 5306 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160328/29c85211/quota_setinfo.obj>


More information about the samba-technical mailing list