diff options
author | Jeremy Allison <jra@samba.org> | 2000-11-16 00:59:18 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-11-16 00:59:18 +0000 |
commit | 213cd0b5192307cd4b0026cae94b2f52fb1b0c02 (patch) | |
tree | b23420f37b2748b7a05f74fc33717f4cea9dcc4c /source/libsmb/clifile.c | |
parent | b2b59b93ff1c5bdc43b099e2db1ee86fe8514152 (diff) | |
download | samba-213cd0b5192307cd4b0026cae94b2f52fb1b0c02.tar.gz samba-213cd0b5192307cd4b0026cae94b2f52fb1b0c02.tar.xz samba-213cd0b5192307cd4b0026cae94b2f52fb1b0c02.zip |
Ok - fixed a bug in our levelII oplock code. We need to break a level II on
a byte range lock (write lock only, but Win2k breaks on read lock also so I
do the same) - if you think about why, this is obvious. Also fixed our client
code to do level II oplocks, if requested, and fixed the code where we would
assume the client wanted level II if it advertised itself as being level II
capable - it may not want that.
Jeremy.
Diffstat (limited to 'source/libsmb/clifile.c')
-rw-r--r-- | source/libsmb/clifile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/libsmb/clifile.c b/source/libsmb/clifile.c index 63f6f8cc6c6..2f183ea1354 100644 --- a/source/libsmb/clifile.c +++ b/source/libsmb/clifile.c @@ -182,7 +182,10 @@ int cli_nt_create(struct cli_state *cli, char *fname) cli_setup_packet(cli); SSVAL(cli->outbuf,smb_vwv0,0xFF); - SIVAL(cli->outbuf,smb_ntcreate_Flags, 0x06); + if (cli->use_oplocks) + SIVAL(cli->outbuf,smb_ntcreate_Flags, REQUEST_OPLOCK|REQUEST_BATCH_OPLOCK); + else + SIVAL(cli->outbuf,smb_ntcreate_Flags, 0); SIVAL(cli->outbuf,smb_ntcreate_RootDirectoryFid, 0x0); SIVAL(cli->outbuf,smb_ntcreate_DesiredAccess, 0x2019f); SIVAL(cli->outbuf,smb_ntcreate_FileAttributes, 0x0); |