STEP12a HACK fix...
authorStefan Metzmacher <metze@samba.org>
Fri, 13 Jun 2014 00:10:12 +0000 (02:10 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 4 Sep 2015 16:02:43 +0000 (18:02 +0200)
source3/librpc/idl/smbXsrv.idl
source3/smbd/smb2_server.c

index fcbf8bc9ff61b65d597b2d4ad73f17a64d4edbcc..de4bfd0a93877c9513755ee5f28fce8f9770ff1e 100644 (file)
@@ -414,6 +414,7 @@ interface smbXsrv
                boolean8                                durable;
                DATA_BLOB                               backend_cookie;
                [flag(NDR_PAHEX)] uint8                 lock_sequence_array[64];
+               hyper channel_sequence;
        } smbXsrv_open_global0;
 
        typedef union {
@@ -452,6 +453,8 @@ interface smbXsrv
                NTSTATUS                                status;
                NTTIME                                  idle_time;
                [ignore] files_struct                   *compat;
+               hyper request_count;
+               hyper pre_request_count;
        } smbXsrv_open;
 
        typedef union {
index 391e99798a812277f1a3042b52fc50de6328ac4d..87ffa2052363b5b02e8171599d56938dcf278d98 100644 (file)
@@ -99,7 +99,7 @@ static const struct smbd_smb2_dispatch_table {
                .need_session = true,
                .need_tcon = true,
                .fileid_ofs = 0x10,
-               .modify = true;
+               .modify = true,
        },{
                _OP(SMB2_OP_LOCK),
                .need_session = true,
@@ -111,7 +111,7 @@ static const struct smbd_smb2_dispatch_table {
                .need_tcon = true,
                .fileid_ofs = 0x08,
                .allow_invalid_fileid = true,
-               .modify = true;
+               .modify = true,
        },{
                _OP(SMB2_OP_CANCEL),
                .as_root = true,
@@ -138,7 +138,7 @@ static const struct smbd_smb2_dispatch_table {
                .need_session = true,
                .need_tcon = true,
                .fileid_ofs = 0x10,
-               .modify = true;
+               .modify = true,
        },{
                _OP(SMB2_OP_BREAK),
                .need_session = true,
@@ -2301,7 +2301,8 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
 
        if ((xconn->protocol >= PROTOCOL_SMB2_22) && (op != NULL)) {
                int cmp = channel_sequence - op->global->channel_sequence;
-               bool overflow = false;
+               //bool overflow = false;
+               bool update_open = false;
 
                if (abs(cmp) > INT16_MAX) {
                        /*
@@ -2310,7 +2311,7 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
                         * If the difference between the numbers
                         * if more than 15-bit, it is likely to be an overflow.
                         */
-                       overflow = true;
+                       //overflow = true;
                        cmp *= -1;
                }
 
@@ -2352,6 +2353,13 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
                                }
                        }
                }
+
+               if (update_open) {
+                       status = smbXsrv_open_update(op);
+                       if (!NT_STATUS_IS_OK(status)) {
+                               return smbd_smb2_request_error(req, status);
+                       }
+               }
        }
 
        if (call->as_root) {