diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-09-27 05:02:09 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-10-17 16:04:35 +0200 |
commit | 1c4e95cbd88e6122c1e2fb07b119abf225c94fff (patch) | |
tree | 6a48a527ab973712a38f92a43ddd2f1d8a588969 | |
parent | e0fe97c543b2845e3515ffc2c638e4252164beed (diff) | |
download | samba-1c4e95cbd88e6122c1e2fb07b119abf225c94fff.tar.gz samba-1c4e95cbd88e6122c1e2fb07b119abf225c94fff.tar.bz2 samba-1c4e95cbd88e6122c1e2fb07b119abf225c94fff.zip |
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>
-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 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); |