summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorLuk Claes <luk@debian.org>2013-05-17 20:41:45 +0200
committerMichael Adam <obnox@samba.org>2013-10-17 16:01:39 +0200
commit24e7be87d17910c1f4170ecd5fe2d2a8b1419ba5 (patch)
tree5ad1981054ce7aa7479bf0d03d8d72a754e4f0ed /libcli
parenta2b38e0bc94d329963cdad76e6861d3234ede8d4 (diff)
downloadsamba-24e7be87d17910c1f4170ecd5fe2d2a8b1419ba5.tar.gz
samba-24e7be87d17910c1f4170ecd5fe2d2a8b1419ba5.tar.bz2
samba-24e7be87d17910c1f4170ecd5fe2d2a8b1419ba5.zip
libcli/smb: Introduce smbXcli_conn_dfs_supported
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Luk Claes <luk@debian.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smbXcli_base.c9
-rw-r--r--libcli/smb/smbXcli_base.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index 9e5891afe6..f1ac0d5396 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -2461,6 +2461,15 @@ bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn)
|| (talloc_array_length(conn->pending) != 0));
}
+bool smbXcli_conn_dfs_supported(struct smbXcli_conn *conn)
+{
+ if (conn->protocol >= PROTOCOL_SMB2_02) {
+ return (smb2cli_conn_server_capabilities(conn) & SMB2_CAP_DFS);
+ }
+
+ return (smb1cli_conn_capabilities(conn) & CAP_DFS);
+}
+
bool smb2cli_conn_req_possible(struct smbXcli_conn *conn, uint32_t *max_dyn_len)
{
uint16_t credits = 1;
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index 852fc7143a..e2de07333c 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -43,6 +43,8 @@ void smbXcli_conn_disconnect(struct smbXcli_conn *conn, NTSTATUS status);
bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn);
+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);