summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/rawfileinfo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-18 18:31:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:08 -0500
commitacc885855ac17d3fafaa309ac2e6b7ac3c899f52 (patch)
treea6e2f2ef9acb4b73cb8415b712a2a0e5855301cf /source4/libcli/raw/rawfileinfo.c
parentc3a2584bb485e41d580e4098731984c194602fc8 (diff)
downloadsamba-acc885855ac17d3fafaa309ac2e6b7ac3c899f52.tar.gz
samba-acc885855ac17d3fafaa309ac2e6b7ac3c899f52.tar.bz2
samba-acc885855ac17d3fafaa309ac2e6b7ac3c899f52.zip
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)
Diffstat (limited to 'source4/libcli/raw/rawfileinfo.c')
-rw-r--r--source4/libcli/raw/rawfileinfo.c15
1 files changed, 15 insertions, 0 deletions
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: