summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-09-02 04:37:33 +0000
committerAndrew Tridgell <tridge@samba.org>2003-09-02 04:37:33 +0000
commit0becf4d68329ca599f3e34ee97ca3f72d0e9425f (patch)
tree14a66389e715d34a43e65d590650fc356113c796 /source4/libcli
parent11c5869a450d5f78a9395889ec03f77732cc8be5 (diff)
downloadsamba-0becf4d68329ca599f3e34ee97ca3f72d0e9425f.tar.gz
samba-0becf4d68329ca599f3e34ee97ca3f72d0e9425f.tar.bz2
samba-0becf4d68329ca599f3e34ee97ca3f72d0e9425f.zip
thanks to ntfsd and some google searches I worked out what the unknown
fields in level 261 and level 262 of directory search are, plus the names of the levels the unknown fields are a 64bit unique file id, and match the 64 bit number from the internal_information qfileinfo level (This used to be commit b69f54eb028a24144a2e813f059b08644118ab09)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/rawfileinfo.c3
-rw-r--r--source4/libcli/raw/rawsearch.c53
2 files changed, 26 insertions, 30 deletions
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index 41fe1225cc..fd66080057 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -173,8 +173,7 @@ static NTSTATUS smb_raw_info_backend(struct cli_session *session,
case RAW_FILEINFO_INTERNAL_INFORMATION:
FINFO_CHECK_SIZE(8);
- parms->internal_information.out.device = IVAL(blob->data, 0);
- parms->internal_information.out.inode = IVAL(blob->data, 4);
+ parms->internal_information.out.file_id = BVAL(blob->data, 0);
return NT_STATUS_OK;
case RAW_FILEINFO_ACCESS_INFORMATION:
diff --git a/source4/libcli/raw/rawsearch.c b/source4/libcli/raw/rawsearch.c
index 222bf53623..430cf925a6 100644
--- a/source4/libcli/raw/rawsearch.c
+++ b/source4/libcli/raw/rawsearch.c
@@ -362,48 +362,45 @@ static int parse_trans2_search(struct cli_tree *tree,
return ofs;
- case RAW_SEARCH_261:
+ case RAW_SEARCH_ID_FULL_DIRECTORY_INFO:
if (blob->length < 81) return -1;
ofs = IVAL(blob->data, 0);
- data->level_261.file_index = IVAL(blob->data, 4);
- data->level_261.create_time = cli_pull_nttime(blob->data, 8);
- data->level_261.access_time = cli_pull_nttime(blob->data, 16);
- data->level_261.write_time = cli_pull_nttime(blob->data, 24);
- data->level_261.change_time = cli_pull_nttime(blob->data, 32);
- data->level_261.size = BVAL(blob->data, 40);
- data->level_261.alloc_size = BVAL(blob->data, 48);
- data->level_261.attrib = IVAL(blob->data, 56);
- data->level_261.ea_size = IVAL(blob->data, 64);
- data->level_261.unknown[0] = IVAL(blob->data, 68);
- data->level_261.unknown[1] = IVAL(blob->data, 72);
- data->level_261.unknown[2] = IVAL(blob->data, 76);
+ data->id_full_directory_info.file_index = IVAL(blob->data, 4);
+ data->id_full_directory_info.create_time = cli_pull_nttime(blob->data, 8);
+ data->id_full_directory_info.access_time = cli_pull_nttime(blob->data, 16);
+ data->id_full_directory_info.write_time = cli_pull_nttime(blob->data, 24);
+ data->id_full_directory_info.change_time = cli_pull_nttime(blob->data, 32);
+ data->id_full_directory_info.size = BVAL(blob->data, 40);
+ data->id_full_directory_info.alloc_size = BVAL(blob->data, 48);
+ data->id_full_directory_info.attrib = IVAL(blob->data, 56);
+ data->id_full_directory_info.ea_size = IVAL(blob->data, 64);
+ data->id_full_directory_info.file_id = BVAL(blob->data, 72);
len = cli_blob_pull_string(tree->session, mem_ctx, blob,
- &data->level_261.name,
+ &data->id_full_directory_info.name,
60, 80, 0);
if (ofs != 0 && ofs < 80+len) {
return -1;
}
return ofs;
- case RAW_SEARCH_262:
+ case RAW_SEARCH_ID_BOTH_DIRECTORY_INFO:
if (blob->length < 105) return -1;
ofs = IVAL(blob->data, 0);
- data->level_262.file_index = IVAL(blob->data, 4);
- data->level_262.create_time = cli_pull_nttime(blob->data, 8);
- data->level_262.access_time = cli_pull_nttime(blob->data, 16);
- data->level_262.write_time = cli_pull_nttime(blob->data, 24);
- data->level_262.change_time = cli_pull_nttime(blob->data, 32);
- data->level_262.size = BVAL(blob->data, 40);
- data->level_262.alloc_size = BVAL(blob->data, 48);
- data->level_262.attrib = SVAL(blob->data, 56);
- data->level_262.ea_size = IVAL(blob->data, 64);
+ data->id_both_directory_info.file_index = IVAL(blob->data, 4);
+ data->id_both_directory_info.create_time = cli_pull_nttime(blob->data, 8);
+ data->id_both_directory_info.access_time = cli_pull_nttime(blob->data, 16);
+ data->id_both_directory_info.write_time = cli_pull_nttime(blob->data, 24);
+ data->id_both_directory_info.change_time = cli_pull_nttime(blob->data, 32);
+ data->id_both_directory_info.size = BVAL(blob->data, 40);
+ data->id_both_directory_info.alloc_size = BVAL(blob->data, 48);
+ data->id_both_directory_info.attrib = SVAL(blob->data, 56);
+ data->id_both_directory_info.ea_size = IVAL(blob->data, 64);
cli_blob_pull_string(tree->session, mem_ctx, blob,
- &data->level_262.short_name,
+ &data->id_both_directory_info.short_name,
68, 70, STR_LEN8BIT | STR_UNICODE);
- data->level_262.unknown[0] = IVAL(blob->data, 94);
- data->level_262.unknown[1] = IVAL(blob->data, 98);
+ data->id_both_directory_info.file_id = BVAL(blob->data, 96);
len = cli_blob_pull_string(tree->session, mem_ctx, blob,
- &data->level_262.name,
+ &data->id_both_directory_info.name,
60, 104, 0);
if (ofs != 0 && ofs < 104+len) {
return -1;