From acc885855ac17d3fafaa309ac2e6b7ac3c899f52 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 18 Aug 2004 18:31:23 +0000 Subject: r1893: add a commented out lump of code to implement the "by the SPEC" ALL_INFO queryfileinfo level. It is useful having it here as many non-Microsoft servers implement it this way, which breaks just about all the torture tests, so when testing against these broken systems just change this one #if line and recompile smbtorture. (This used to be commit cd8887293e7735d8ee1cc2daebda233673801775) --- source4/libcli/raw/rawfileinfo.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source4/libcli/raw') diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c index 8dc220b0b4..9b82bf6fa0 100644 --- a/source4/libcli/raw/rawfileinfo.c +++ b/source4/libcli/raw/rawfileinfo.c @@ -138,9 +138,24 @@ static NTSTATUS smb_raw_info_backend(struct smbcli_session *session, parms->all_info.out.nlink = IVAL(blob->data, 56); parms->all_info.out.delete_pending = CVAL(blob->data, 60); parms->all_info.out.directory = CVAL(blob->data, 61); +#if 1 parms->all_info.out.ea_size = IVAL(blob->data, 64); smbcli_blob_pull_string(session, mem_ctx, blob, &parms->all_info.out.fname, 68, 72, STR_UNICODE); +#else + /* this is what the CIFS spec says - and its totally + wrong, but its useful having it here so we can + quickly adapt to broken servers when running + tests */ + parms->all_info.out.ea_size = IVAL(blob->data, 72); + /* access flags 4 bytes at 76 + current_position 8 bytes at 80 + mode 4 bytes at 88 + alignment 4 bytes at 92 + */ + smbcli_blob_pull_string(session, mem_ctx, blob, + &parms->all_info.out.fname, 96, 100, STR_UNICODE); +#endif return NT_STATUS_OK; case RAW_FILEINFO_ALT_NAME_INFO: -- cgit