summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/smb/smbXcli_base.c14
-rw-r--r--libcli/smb/smbXcli_base.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index 1f31bdb48c..7554bd7316 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -168,6 +168,7 @@ struct smbXcli_session {
struct smbXcli_tcon {
bool is_smb1;
+ uint32_t fs_attributes;
struct {
uint16_t tcon_id;
@@ -5027,6 +5028,17 @@ struct smbXcli_tcon *smbXcli_tcon_create(TALLOC_CTX *mem_ctx)
return tcon;
}
+void smbXcli_tcon_set_fs_attributes(struct smbXcli_tcon *tcon,
+ uint32_t fs_attributes)
+{
+ tcon->fs_attributes = fs_attributes;
+}
+
+uint32_t smbXcli_tcon_get_fs_attributes(struct smbXcli_tcon *tcon)
+{
+ return tcon->fs_attributes;
+}
+
bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon *tcon)
{
if (tcon == NULL) {
@@ -5068,6 +5080,7 @@ bool smb1cli_tcon_set_values(struct smbXcli_tcon *tcon,
const char *fs_type)
{
tcon->is_smb1 = true;
+ tcon->fs_attributes = 0;
tcon->smb1.tcon_id = tcon_id;
tcon->smb1.optional_support = optional_support;
tcon->smb1.maximal_access = maximal_access;
@@ -5107,6 +5120,7 @@ void smb2cli_tcon_set_values(struct smbXcli_tcon *tcon,
uint32_t maximal_access)
{
tcon->is_smb1 = false;
+ tcon->fs_attributes = 0;
tcon->smb2.tcon_id = tcon_id;
tcon->smb2.type = type;
tcon->smb2.flags = flags;
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index fc21fdc71c..11dbf219bd 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -299,6 +299,9 @@ NTSTATUS smb2cli_session_set_channel_key(struct smbXcli_session *session,
NTSTATUS smb2cli_session_encryption_on(struct smbXcli_session *session);
struct smbXcli_tcon *smbXcli_tcon_create(TALLOC_CTX *mem_ctx);
+void smbXcli_tcon_set_fs_attributes(struct smbXcli_tcon *tcon,
+ uint32_t fs_attributes);
+uint32_t smbXcli_tcon_get_fs_attributes(struct smbXcli_tcon *tcon);
bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon *tcon);
uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon *tcon);
void smb1cli_tcon_set_id(struct smbXcli_tcon *tcon, uint16_t tcon_id);