diff options
author | Gregor Beck <gbeck@sernet.de> | 2013-10-11 11:02:24 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-04-04 21:05:33 +0200 |
commit | 66115ff2b39d6ed732c2abf20f4d04d7e89326a1 (patch) | |
tree | d897796006edcad8a12e177e4dd3cdbd3e637d35 /source3 | |
parent | 0bea2d23b3af7f2ac063a617c31a8371de7b5fcb (diff) | |
download | samba-66115ff2b39d6ed732c2abf20f4d04d7e89326a1.tar.gz |
s3:libsmb: SMBC_getatr use pathinfo3 for second try
The pathinfo2 call might fail against NetApp because it is sending broken
packages.
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')
-rw-r--r-- | source3/include/libsmb_internal.h | 1 | ||||
-rw-r--r-- | source3/libsmb/libsmb_file.c | 13 | ||||
-rw-r--r-- | source3/libsmb/libsmb_server.c | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h index 63c96fecd1..ce73181fac 100644 --- a/source3/include/libsmb_internal.h +++ b/source3/include/libsmb_internal.h @@ -78,6 +78,7 @@ struct _SMBCSRV { dev_t dev; bool no_pathinfo; bool no_pathinfo2; + bool no_pathinfo3; bool no_nt_session; struct policy_handle pol; diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c index 09f58105b2..277ca83e33 100644 --- a/source3/libsmb/libsmb_file.c +++ b/source3/libsmb/libsmb_file.c @@ -560,6 +560,19 @@ SMBC_getatr(SMBCCTX * context, srv->no_pathinfo2 = True; + if (!srv->no_pathinfo3 && + NT_STATUS_IS_OK(cli_qpathinfo3(targetcli, targetpath, + create_time_ts, + access_time_ts, + write_time_ts, + change_time_ts, + size, mode, ino))) { + TALLOC_FREE(frame); + return True; + } + + srv->no_pathinfo3 = True; + /* if this is NT then don't bother with the getatr */ if (smb1cli_conn_capabilities(targetcli->conn) & CAP_NT_SMBS) { errno = EPERM; diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 9e4ea5cd35..517753d531 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -606,6 +606,7 @@ SMBC_server_internal(TALLOC_CTX *ctx, srv->dev = (dev_t)(str_checksum(server) ^ str_checksum(share)); srv->no_pathinfo = False; srv->no_pathinfo2 = False; + srv->no_pathinfo3 = False; srv->no_nt_session = False; done: |