Add a compound statfs function to the smb2 fuse module

Stefan Metzmacher metze at samba.org
Mon May 22 06:35:41 UTC 2017


Hi Ronnie,

> From efa461dd61436e8db04bfe1ff6d0d712566fd3bb Mon Sep 17 00:00:00 2001
> From: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> Date: Sat, 20 May 2017 17:20:21 -0700
> Subject: [PATCH 7/8] Update the CHAINED flag in smb2cli_req_compound_submit
> 
> Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> ---
>  libcli/smb/smbXcli_base.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
> index 4f9385f..b0ec238 100644
> --- a/libcli/smb/smbXcli_base.c
> +++ b/libcli/smb/smbXcli_base.c
> @@ -3166,6 +3166,13 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs,
>  
>  		state = tevent_req_data(reqs[i], struct smbXcli_req_state);
>  
> +		if (i>0) {
> +			uint32_t flags;
> +			flags = SVAL(state->smb2.hdr, SMB2_HDR_FLAGS) |
> +				SMB2_HDR_FLAG_CHAINED;
> +			SIVAL(state->smb2.hdr, SMB2_HDR_FLAGS, flags);
> +		}
> +

This should be done by the caller by passing it via
additional_flags as compound requests can be related or unrelated,
and SMB2_HDR_FLAG_CHAINED should only be used for related requests.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170522/35acb6c0/signature.sig>


More information about the samba-technical mailing list