summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-08-22 19:56:16 +0000
committerJeremy Allison <jra@samba.org>2002-08-22 19:56:16 +0000
commit7490b8c2c74c18c675902f3d6b7c48320d891858 (patch)
tree0b103e871593d8a3f690704fecf4d1564b26c6db /source3/smbd
parentb781c7af193b0e6cc0ba50bc91ea7b19ae0baf52 (diff)
downloadsamba-7490b8c2c74c18c675902f3d6b7c48320d891858.tar.gz
samba-7490b8c2c74c18c675902f3d6b7c48320d891858.tar.bz2
samba-7490b8c2c74c18c675902f3d6b7c48320d891858.zip
We were returning incorrect flags in smb_action....
IFSTEST strikes again :-). Jeremy. (This used to be commit 4e0a2564302bdb18087e395576208fa0f0c5c32e)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/nttrans.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 529d68f6e3..722a7ff8bf 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -563,6 +563,8 @@ int reply_ntcreate_and_X(connection_struct *conn,
files_struct *fsp=NULL;
char *p = NULL;
time_t c_time;
+ BOOL extended_oplock_granted = False;
+
START_PROFILE(SMBntcreateX);
DEBUG(10,("reply_ntcreateX: flags = 0x%x, desired_access = 0x%x \
@@ -810,10 +812,10 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
*/
if (oplock_request && lp_fake_oplocks(SNUM(conn)))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
#if 0
/* W2K sends back 42 words here ! If we do the same it breaks offline sync. Go figure... ? JRA. */
@@ -829,7 +831,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
* exclusive & batch here.
*/
- if (smb_action & EXTENDED_OPLOCK_GRANTED) {
+ if (extended_oplock_granted) {
if (flags & REQUEST_BATCH_OPLOCK) {
SCVAL(p,0, BATCH_OPLOCK_RETURN);
} else {
@@ -1034,6 +1036,7 @@ static int call_nt_transact_create(connection_struct *conn,
BOOL bad_path = False;
files_struct *fsp = NULL;
char *p = NULL;
+ BOOL extended_oplock_granted = False;
uint32 flags;
uint32 desired_access;
uint32 file_attributes;
@@ -1261,10 +1264,10 @@ static int call_nt_transact_create(connection_struct *conn,
*/
if (oplock_request && lp_fake_oplocks(SNUM(conn)))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
if(oplock_request && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type))
- smb_action |= EXTENDED_OPLOCK_GRANTED;
+ extended_oplock_granted = True;
}
/*
@@ -1289,7 +1292,7 @@ static int call_nt_transact_create(connection_struct *conn,
memset((char *)params,'\0',69);
p = params;
- if (smb_action & EXTENDED_OPLOCK_GRANTED)
+ if (extended_oplock_granted)
SCVAL(p,0, BATCH_OPLOCK_RETURN);
else if (LEVEL_II_OPLOCK_TYPE(fsp->oplock_type))
SCVAL(p,0, LEVEL_II_OPLOCK_RETURN);