From 24e7be87d17910c1f4170ecd5fe2d2a8b1419ba5 Mon Sep 17 00:00:00 2001 From: Luk Claes Date: Fri, 17 May 2013 20:41:45 +0200 Subject: libcli/smb: Introduce smbXcli_conn_dfs_supported Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Luk Claes Reviewed-by: Stefan Metzmacher Reviewed-by: Michael Adam --- libcli/smb/smbXcli_base.c | 9 +++++++++ libcli/smb/smbXcli_base.h | 2 ++ 2 files changed, 11 insertions(+) (limited to 'libcli') 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); -- cgit