s3:libsmb: SMBC_getatr try pathinfo2 only once
authorGregor Beck <gbeck@sernet.de>
Fri, 11 Oct 2013 08:59:59 +0000 (10:59 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 30 Oct 2013 22:23:51 +0000 (15:23 -0700)
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/libsmb_file.c

index 32210b6..b4d9f8e 100644 (file)
@@ -558,6 +558,8 @@ SMBC_getatr(SMBCCTX * context,
                return True;
         }
 
                return True;
         }
 
+       srv->no_pathinfo2 = True;
+
        /* if this is NT then don't bother with the getatr */
        if (smb1cli_conn_capabilities(targetcli->conn) & CAP_NT_SMBS) {
                 errno = EPERM;
        /* if this is NT then don't bother with the getatr */
        if (smb1cli_conn_capabilities(targetcli->conn) & CAP_NT_SMBS) {
                 errno = EPERM;
@@ -581,7 +583,6 @@ SMBC_getatr(SMBCCTX * context,
                 if (change_time_ts != NULL) {
                         *change_time_ts = w_time_ts;
                 }
                 if (change_time_ts != NULL) {
                         *change_time_ts = w_time_ts;
                 }
-               srv->no_pathinfo2 = True;
                TALLOC_FREE(frame);
                return True;
        }
                TALLOC_FREE(frame);
                return True;
        }