Revert "s3:smbd: SMB ReadX with size > 0xffff should only possible for samba clients."
[nivanova/samba-autobuild/.git] / source3 / smbd / reply.c
index b511025d8035b3dd85ff64b2082282477398f96b..210b7010d9fa8bd4c2c49e0d566effa2622842d6 100644 (file)
@@ -3854,7 +3854,6 @@ nosendfile_read:
 
 void reply_read_and_X(struct smb_request *req)
 {
-       struct smbd_server_connection *sconn = req->sconn;
        connection_struct *conn = req->conn;
        files_struct *fsp;
        off_t startpos;
@@ -3893,15 +3892,7 @@ void reply_read_and_X(struct smb_request *req)
                return;
        }
 
-       if ((sconn->smb1.unix_info.client_cap_low & CIFS_UNIX_LARGE_READ_CAP) ||
-           (get_remote_arch() == RA_SAMBA)) {
-               /*
-                * This is Samba only behavior (up to Samba 3.6)!
-                *
-                * Windows 2008 R2 ignores the upper_size,
-                * so we do unless unix extentions are active
-                * or "smbclient" is talking to us.
-                */
+       if (global_client_caps & CAP_LARGE_READX) {
                size_t upper_size = SVAL(req->vwv+7, 0);
                smb_maxcnt |= (upper_size<<16);
                if (upper_size > 1) {