Allow trans2 and nttrans messages to be processed in oplock break state.
authorJeremy Allison <jra@samba.org>
Fri, 19 Jul 2002 17:14:19 +0000 (17:14 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 19 Jul 2002 17:14:19 +0000 (17:14 +0000)
As noticed by Lev Iserovich <lev@ciprico.com> this seems to fix a problem
with oplock breaks and Win2k, and we are protected from problems by existing
code in trans2.c and nttrans.c
Jeremy.
(This used to be commit e3f7d6c03f100962395763a5066313d60b4761d0)

source3/smbd/nttrans.c
source3/smbd/process.c

index e03588bf0588cfc858482caaf8303d5b1ad73ae8..8f6b4ab374e85121c4253d1f1dc1330499ea0dec 100644 (file)
@@ -1636,13 +1636,15 @@ int reply_nttrans(connection_struct *conn,
        uint32 num_params_sofar, num_data_sofar;
        START_PROFILE(SMBnttrans);
 
-       if(global_oplock_break && (function_code == NT_TRANSACT_CREATE)) {
+       if(global_oplock_break &&
+                       ((function_code == NT_TRANSACT_CREATE) ||
+                        (function_code == NT_TRANSACT_RENAME))) {
                /*
                 * Queue this open message as we are the process of an oplock break.
                 */
 
-               DEBUG(2,("reply_nttrans: queueing message NT_TRANSACT_CREATE \
-due to being in oplock break state.\n" ));
+               DEBUG(2,("reply_nttrans: queueing message code 0x%x \
+due to being in oplock break state.\n", (unsigned int)function_code ));
 
                push_oplock_pending_smb_message( inbuf, length);
                END_PROFILE(SMBnttrans);
index 43d3c6c53143f37d0f4c3f365df9bc3c7b5de8da..0363165914a6ebb622b1a610bd41a5253888390a 100644 (file)
@@ -386,7 +386,7 @@ static struct smb_message_struct
 /* 0x22 */ { "SMBsetattrE",reply_setattrE,AS_USER | NEED_WRITE },
 /* 0x23 */ { "SMBgetattrE",reply_getattrE,AS_USER },
 /* 0x24 */ { "SMBlockingX",reply_lockingX,AS_USER },
-/* 0x25 */ { "SMBtrans",reply_trans,AS_USER | CAN_IPC | QUEUE_IN_OPLOCK},
+/* 0x25 */ { "SMBtrans",reply_trans,AS_USER | CAN_IPC },
 /* 0x26 */ { "SMBtranss",NULL,AS_USER | CAN_IPC},
 /* 0x27 */ { "SMBioctl",reply_ioctl,0},
 /* 0x28 */ { "SMBioctls",NULL,AS_USER},
@@ -399,7 +399,7 @@ static struct smb_message_struct
 /* 0x2f */ { "SMBwriteX",reply_write_and_X,AS_USER | CAN_IPC },
 /* 0x30 */ { NULL, NULL, 0 },
 /* 0x31 */ { NULL, NULL, 0 },
-/* 0x32 */ { "SMBtrans2", reply_trans2, AS_USER | QUEUE_IN_OPLOCK | CAN_IPC },
+/* 0x32 */ { "SMBtrans2", reply_trans2, AS_USER | CAN_IPC },
 /* 0x33 */ { "SMBtranss2", reply_transs2, AS_USER},
 /* 0x34 */ { "SMBfindclose", reply_findclose,AS_USER},
 /* 0x35 */ { "SMBfindnclose", reply_findnclose, AS_USER},