diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-09-27 05:02:09 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-03-10 16:12:18 +0100 |
commit | 18d7628b1104a55a4266cd1e5fafe18a080cadbd (patch) | |
tree | f7339400510ca11a245dd8846a0f846d1f3a6ef3 /libcli | |
parent | 27bad7dac4124a7999c4787757af11a3e6f6eac8 (diff) | |
download | samba-18d7628b1104a55a4266cd1e5fafe18a080cadbd.tar.gz |
libcli/smb: add smbXcli_tcon_{set,get}_fs_attributes()
These are the attributes returned from the FileFsAttributeInformation
request.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 1c4e95cbd88e6122c1e2fb07b119abf225c94fff)
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 14 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 616e373330f..e9cec7c4a6b 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; @@ -5025,6 +5026,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) { @@ -5066,6 +5078,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; @@ -5105,6 +5118,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 7fab374c238..5fe40180b65 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); |