1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

18 Commits

Author SHA1 Message Date
Ralph Boehme
180f25f7bb libcli/smb: add FSCTL_PIPE_WAIT
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-25 22:23:38 +00:00
Ralph Boehme
3afd4bd610 idl: declare token array of storage_offload_token as in-line
This ensures the order of the struct element is the same as in the IDL
definition. For an conformant array using the [sizeis(n)] syntax the sizeis
member is stored as first element in the marshall buffer.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-10-08 19:28:32 +00:00
Gary Lockyer
575d39048e idl: limit recurion on recursive elements
Limit the max_recursion on self recursive definitions in the idl to
20,000. This value is hopefully large eneough to not impact normal
operation, but small eneough to prevent stack over flow issues.

Credit to OSS-Fuzz

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19820
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 27 02:29:21 UTC 2020 on sn-devel-184
2020-02-27 02:29:20 +00:00
Ralph Boehme
d6a8a79fcb librpc/idl: make use storage_offload_token
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-07-03 19:59:07 +02:00
Ralph Boehme
e3cb6a936d librpc/idl: fix STORAGE_OFFLOAD_TOKEN_TYPE_ZERO_DATA definition
STORAGE_OFFLOAD_TOKEN_TYPE_ZERO_DATA is defined as 0xffff0001 in MS-FSCC
2.3.79.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-07-03 19:59:07 +02:00
Ralph Boehme
ebee4589fb librpc/idl: convert offload flags to a bitmap
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-07-03 19:59:07 +02:00
Ralph Boehme
dc4bd3f751 s3/smbd: move copychunk ioctl limits to IDL
This will be needed in the next commit in vfs_default.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-03-28 17:45:20 +02:00
David Disseldorp
0ad260e8f0 idl/ioctl: fix DUPLICATE_EXTENTS_TO_FILE fid field
This idl was based on an earlier draft documentation version. The
current documentation now shows:
"SourceFileID (16 bytes): An SMB2_FILEID structure, as specified in
[MS-SMB2] section 2.2.14.1, that is an identifier of the open to the
source file.".

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-22 20:40:08 +02:00
Michael Adam
bc9e1fc70c librpc:idl: define FSCTL_NET_IFACE_NONE_CAPABLE in ioctl.idl
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-01-26 07:33:16 +01:00
David Disseldorp
5776904def idl: FSCTL_FILE_LEVEL_TRIM request & response structs
As defined in MS-FSCC 2.3.73 - 2.3.74.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-18 18:57:21 +01:00
David Disseldorp
8fef2c82c1 idl: define FSCTL_DUPLICATE_EXTENTS_TO_FILE
As specified in the recent 20150129 revision of MS-FSCC.
Add a note regarding the FileHandle field, which was confirmed to
correspond to the volatile part of the fileid:
https://lists.samba.org/archive/samba-technical/2015-February/105454.html

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-11 16:11:07 +01:00
David Disseldorp
b5a635fb0a idl/ioctl: change QAR response array to a DATA_BLOB
[MS-FSCC] specifies:
  The number of FILE_ALLOCATED_RANGE_BUFFER elements returned is
  computed by dividing the size of the returned output buffer (from
  either SMB or SMB2, the lower-layer protocol that carries the FSCTL)
  by the size of the FILE_ALLOCATED_RANGE_BUFFER element.

Ideally, this requirement could be defined in idl with the following:
  [flag(NDR_REMAINING)] file_alloced_range_buf array[];

However, this is not currently supported by PIDL, so just use an opaque
data blob for now.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-09 21:27:07 +01:00
Richard Sharpe
3450347c8e Add a definition of the NETWORK_RESILIENCY_REQUEST so I can write a torture test for it.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-06 19:18:04 +02:00
David Disseldorp
de2164bb3d idl: define sparse file fsctl structures
As documented in MS-FSCC 2.3.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allson <jra@samba.org>
2014-08-29 19:40:13 +02:00
Anubhav Rakshit
09fb44d122 librpc: Add NETWORK_INTERFACE_INFO IDL data structure
This is in preparation for adding NETWORK_INTERFACE_INFO Ioctl smbtorture test
case. This data structure is described in MS-SMB2 Sec. 2.2.32.5

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-24 19:07:06 +02:00
David Disseldorp
8fde65e199 lib: add FSCTL_[GET/SET]_COMPRESSION constants
Values taken from MS-FSCC.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-09 11:10:01 -07:00
David Disseldorp
e5ebe67e38 idl: add offload data transfer ioctl types
For future use in handling FSCTL_OFFLOAD_READ, FSCTL_OFFLOAD_WRITE and
IOCTL_STORAGE_QUERY_PROPERTY requests new to Windows 8.

Based on preliminary data structure documentation from:
http://msdn.microsoft.com/en-us/library/windows/hardware/hh451101%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/hardware/hh451122%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/hh449428%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/hardware/hh451469%28v=vs.85%29.aspx

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Lars Müller <lars@samba.org>

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Thu Mar 15 18:40:11 CET 2012 on sn-devel-104
2012-03-15 18:40:11 +01:00
David Disseldorp
2e1168d0a8 idl: add copychunk and request_resume_key ioctl definitions 2011-10-31 17:55:05 +01:00