diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-11-19 05:55:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:29 -0500 |
commit | 7d6f36682eab29cb23c40dd915acad61fb5d68cb (patch) | |
tree | 010c93a8e05e068af92ea1673bff3ea890a59556 /source4/libcli | |
parent | 931b1974a27b929b5b40d65d986f6381a0bc0daa (diff) | |
download | samba-7d6f36682eab29cb23c40dd915acad61fb5d68cb.tar.gz samba-7d6f36682eab29cb23c40dd915acad61fb5d68cb.tar.bz2 samba-7d6f36682eab29cb23c40dd915acad61fb5d68cb.zip |
r11800: - filled in unknown fields in SMB2 all_info level
- allow setting of the ALL_EAS flags bits in SMB2 getinfo
(This used to be commit 8c7c54a46dfb91c053d07a5e606892a41213c605)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/raw/rawfileinfo.c | 8 | ||||
-rw-r--r-- | source4/libcli/smb2/getinfo.c | 5 | ||||
-rw-r--r-- | source4/libcli/smb2/smb2_calls.h | 6 |
3 files changed, 13 insertions, 6 deletions
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c index 7119eed5e7..92d31b30ef 100644 --- a/source4/libcli/raw/rawfileinfo.c +++ b/source4/libcli/raw/rawfileinfo.c @@ -95,9 +95,9 @@ NTSTATUS smb_raw_fileinfo_passthru_parse(const DATA_BLOB *blob, TALLOC_CTX *mem_ } parms->basic_info.out.create_time = smbcli_pull_nttime(blob->data, 0); parms->basic_info.out.access_time = smbcli_pull_nttime(blob->data, 8); - parms->basic_info.out.write_time = smbcli_pull_nttime(blob->data, 16); + parms->basic_info.out.write_time = smbcli_pull_nttime(blob->data, 16); parms->basic_info.out.change_time = smbcli_pull_nttime(blob->data, 24); - parms->basic_info.out.attrib = IVAL(blob->data, 32); + parms->basic_info.out.attrib = IVAL(blob->data, 32); return NT_STATUS_OK; case RAW_FILEINFO_STANDARD_INFORMATION: @@ -236,8 +236,8 @@ NTSTATUS smb_raw_fileinfo_passthru_parse(const DATA_BLOB *blob, TALLOC_CTX *mem_ parms->all_info2.out.file_id = BVAL(blob->data, 0x40); parms->all_info2.out.ea_size = IVAL(blob->data, 0x48); parms->all_info2.out.access_mask = IVAL(blob->data, 0x4C); - parms->all_info2.out.unknown2 = BVAL(blob->data, 0x50); - parms->all_info2.out.unknown3 = BVAL(blob->data, 0x58); + parms->all_info2.out.position = BVAL(blob->data, 0x50); + parms->all_info2.out.mode = BVAL(blob->data, 0x58); smbcli_blob_pull_string(NULL, mem_ctx, blob, &parms->all_info2.out.fname, 0x60, 0x64, STR_UNICODE); return NT_STATUS_OK; diff --git a/source4/libcli/smb2/getinfo.c b/source4/libcli/smb2/getinfo.c index 85411fab92..62418a05b7 100644 --- a/source4/libcli/smb2/getinfo.c +++ b/source4/libcli/smb2/getinfo.c @@ -43,7 +43,7 @@ struct smb2_request *smb2_getinfo_send(struct smb2_tree *tree, struct smb2_getin SIVAL(req->out.body, 0x08, io->in.unknown1); SIVAL(req->out.body, 0x0C, io->in.unknown2); SIVAL(req->out.body, 0x10, io->in.flags); - SIVAL(req->out.body, 0x14, io->in.unknown4); + SIVAL(req->out.body, 0x14, io->in.flags2); smb2_push_handle(req->out.body+0x18, &io->in.handle); smb2_transport_send(req); @@ -124,6 +124,9 @@ struct smb2_request *smb2_getinfo_file_send(struct smb2_tree *tree, union smb_fi if (io->generic.level == RAW_FILEINFO_SEC_DESC) { b.in.flags = io->query_secdesc.secinfo_flags; } + if (io->generic.level == RAW_FILEINFO_SMB2_ALL_EAS) { + b.in.flags2 = io->all_eas.ea_flags; + } return smb2_getinfo_send(tree, &b); } diff --git a/source4/libcli/smb2/smb2_calls.h b/source4/libcli/smb2/smb2_calls.h index 1c41d4cd66..e6e1872d5e 100644 --- a/source4/libcli/smb2/smb2_calls.h +++ b/source4/libcli/smb2/smb2_calls.h @@ -188,6 +188,10 @@ struct smb2_close { #define SMB2_GETINFO_FS 0x02 #define SMB2_GETINFO_SECURITY 0x03 +/* flags for RAW_FILEINFO_SMB2_ALL_EAS */ +#define SMB2_GETINFO_EA_FLAG_RESTART 0x01 +#define SMB2_GETINFO_EA_FLAG_SINGLE 0x02 + /* NOTE! the getinfo fs and file levels exactly match up with the 'passthru' SMB levels, which are levels >= 1000. The SMB2 client lib uses the names from the libcli/raw/ library */ @@ -201,7 +205,7 @@ struct smb2_getinfo { uint32_t unknown1; uint32_t unknown2; uint32_t flags; /* level specific */ - uint32_t unknown4; + uint32_t flags2; /* used by all_eas level */ struct smb2_handle handle; } in; |