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>
(cherry picked from commit
d495074ee27a5f528d5156a69800ee58d799b1eb)
*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;
}