diff options
-rw-r--r-- | libcli/smb/smbXcli_base.c | 9 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 2 |
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); |