From 569722ee4081d154d65caa192b9caed21730db93 Mon Sep 17 00:00:00 2001 From: Gregor Beck Date: Mon, 14 Oct 2013 11:43:45 +0200 Subject: [PATCH] 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 Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- source3/libsmb/clirap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index cedd6a65cdd..7e6f8d74ba4 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -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)) { -- 2.11.4.GIT