diff options
author | Volker Lendecke <vl@samba.org> | 2014-06-20 09:55:04 +0000 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-06-21 20:38:11 +0200 |
commit | 5aeebc3eb04245a059a3cffde649b0437aa1e332 (patch) | |
tree | 4780eda3e818e2c66776aa3d3e170057454321b9 /source3 | |
parent | 78827623eb9ebf96df13dfbe8e1a0ec3aa6d16a3 (diff) | |
download | samba-5aeebc3eb04245a059a3cffde649b0437aa1e332.tar.gz |
libsmb: Enable oplocks for smb2 cli_ntcreate
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clifile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index aee1745af4d..3ec5e9aafb1 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -1950,6 +1950,11 @@ struct tevent_req *cli_ntcreate_send(TALLOC_CTX *mem_ctx, if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { state->recv = cli_smb2_create_fnum_recv; + + if (cli->use_oplocks) { + create_flags |= REQUEST_OPLOCK|REQUEST_BATCH_OPLOCK; + } + subreq = cli_smb2_create_fnum_send( state, ev, cli, fname, create_flags, desired_access, file_attributes, share_access, create_disposition, |