diff options
author | Uri Simchoni <uri@samba.org> | 2017-03-26 08:10:34 +0300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-03-28 17:45:19 +0200 |
commit | ae17989de4b608981efb0342c233893cfae3b554 (patch) | |
tree | b6a3a8db3d68ddf8805149a816cb872cae6d0fac /libcli | |
parent | 401be6431c0821ee19ff08fbf5536fa870c9df66 (diff) | |
download | samba-ae17989de4b608981efb0342c233893cfae3b554.tar.gz |
libcli: introduce smbXcli_conn_support_passthrough()
This routine queries the client connenction whether
it supports query/set InfoLevels beyond 1000 (which,
in Windows OS, is a pass-through mechanism to the
file system).
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 17 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 9521fc6ca94..1fcf11e6c93 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -468,6 +468,23 @@ bool smbXcli_conn_use_unicode(struct smbXcli_conn *conn) return false; } +/* + * [MS-SMB] 2.2.2.3.5 - SMB1 support for passing through + * query/set commands to the file system + */ +bool smbXcli_conn_support_passthrough(struct smbXcli_conn *conn) +{ + if (conn->protocol >= PROTOCOL_SMB2_02) { + return true; + } + + if (conn->smb1.capabilities & CAP_W2K_SMBS) { + return true; + } + + return false; +} + void smbXcli_conn_set_sockopt(struct smbXcli_conn *conn, const char *options) { set_socket_options(conn->sock_fd, options); diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index 84f4a6bbcc5..1abeb2b180b 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -47,6 +47,7 @@ bool smbXcli_conn_dfs_supported(struct smbXcli_conn *conn); enum protocol_types smbXcli_conn_protocol(struct smbXcli_conn *conn); bool smbXcli_conn_use_unicode(struct smbXcli_conn *conn); +bool smbXcli_conn_support_passthrough(struct smbXcli_conn *conn); void smbXcli_conn_set_sockopt(struct smbXcli_conn *conn, const char *options); const struct sockaddr_storage *smbXcli_conn_local_sockaddr(struct smbXcli_conn *conn); |