summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-10-17 11:39:02 -0700
committerAndreas Schneider <asn@cryptomilk.org>2019-10-18 16:07:35 +0000
commitd495074ee27a5f528d5156a69800ee58d799b1eb (patch)
tree649cb8dfaea7e91a4d566a392eb15a0bf68bba02 /source3/libsmb
parent7c83b1ade7a79770689d876e985e245f5af276ad (diff)
downloadsamba-d495074ee27a5f528d5156a69800ee58d799b1eb.tar.gz
s3: libsmb: Ensure SMB1 cli_qpathinfo2() doesn't return an inode number.
The info level it uses doesn't return that, previously we were using the field that is returned as the EA size as the inode number (which is usually zero, so the code in libsmbclient would then synthesize an inode number from a hash of the pathname, which is all it can do for SMB1). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14161 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clirap.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index d12d2b07604..c0b9dcdff39 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -878,7 +878,15 @@ NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
*size = IVAL2_TO_SMB_BIG_UINT(state->data,48);
}
if (ino) {
- *ino = IVAL(state->data, 64);
+ /*
+ * SMB1 qpathinfo2 uses SMB_QUERY_FILE_ALL_INFO
+ * which doesn't return an inode number (fileid).
+ * We can't change this to one of the FILE_ID
+ * info levels as only Win2003 and above support
+ * these [MS-SMB: 2.2.2.3.1] and the SMB1 code
+ * needs to support older servers.
+ */
+ *ino = 0;
}
return NT_STATUS_OK;
}