1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

s3:libsmb: cli_qpathinfo3 use cli_qpathinfo2 for smb2

cli_qpathinfo3 only works (and is only needed as fallback so far) for smb1.
Use cli_qpathinfo2 in the smb2 case to make it universally usable.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Gregor Beck
2013-10-14 11:43:45 +02:00
committed by Jeremy Allison
parent 7e35a4dc73
commit 569722ee40

View File

@ -1414,7 +1414,7 @@ NTSTATUS cli_qpathinfo_standard(struct cli_state *cli, const char *fname,
}
/* like cli_qpathinfo2 but do not use SMB_QUERY_FILE_ALL_INFO */
/* like cli_qpathinfo2 but do not use SMB_QUERY_FILE_ALL_INFO with smb1 */
NTSTATUS cli_qpathinfo3(struct cli_state *cli, const char *fname,
struct timespec *create_time,
struct timespec *access_time,
@ -1428,6 +1428,12 @@ NTSTATUS cli_qpathinfo3(struct cli_state *cli, const char *fname,
uint32_t attr;
uint64_t pos;
if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
return cli_qpathinfo2(cli, fname,
create_time, access_time, write_time, change_time,
size, mode, ino);
}
if (create_time || access_time || write_time || change_time || mode) {
status = cli_qpathinfo_basic(cli, fname, &st, &attr);
if (!NT_STATUS_IS_OK(status)) {