diff options
author | Gregor Beck <gbeck@sernet.de> | 2013-10-14 11:43:45 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-10-30 15:23:51 -0700 |
commit | 569722ee4081d154d65caa192b9caed21730db93 (patch) | |
tree | 0e4306414469096c73c7443573063fc330c73853 /source3/libsmb/clirap.c | |
parent | 7e35a4dc7369e4389ebdc373310c6ff7c48b036f (diff) | |
download | samba-569722ee4081d154d65caa192b9caed21730db93.tar.gz |
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>
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r-- | source3/libsmb/clirap.c | 8 |
1 files changed, 7 insertions, 1 deletions
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)) { |