1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

libcli/raw: make it possible to not send CAP_LEVEL_II_OPLOCKS

But the keep the default to always send it
when the server supports it too.

metze
(This used to be commit 33caaef2e46557525a8ffb79d6dd0db46a079529)
This commit is contained in:
Stefan Metzmacher 2008-03-06 15:11:16 +01:00
parent c24329dc07
commit 3cbe47b2ae
3 changed files with 9 additions and 5 deletions

View File

@ -187,6 +187,10 @@ NTSTATUS smb_raw_negotiate_recv(struct smbcli_request *req)
transport->negotiate.capabilities &= ~CAP_STATUS32;
}
if (!transport->options.use_level2_oplocks) {
transport->negotiate.capabilities &= ~CAP_LEVEL_II_OPLOCKS;
}
failed:
return smbcli_request_destroy(req);
}

View File

@ -2614,6 +2614,6 @@ void lp_smbcli_options(struct loadparm_context *lp_ctx,
options->ntstatus_support = lp_nt_status_support(lp_ctx);
options->max_protocol = lp_cli_maxprotocol(lp_ctx);
options->unicode = lp_unicode(lp_ctx);
options->use_oplocks = false;
options->use_level2_oplocks = false;
options->use_oplocks = true;
options->use_level2_oplocks = true;
}

View File

@ -478,6 +478,9 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
lp_smbcli_options(tctx->lp_ctx, &options);
options.use_oplocks = torture_setting_bool(tctx, "use_oplocks", true);
options.use_level2_oplocks = torture_setting_bool(tctx, "use_level2_oplocks", true);
status = smbcli_full_connection(mem_ctx, c, hostname,
lp_smb_ports(tctx->lp_ctx),
sharename, NULL,
@ -489,9 +492,6 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
return false;
}
(*c)->transport->options.use_oplocks = torture_setting_bool(tctx, "use_oplocks", false);
(*c)->transport->options.use_level2_oplocks = torture_setting_bool(tctx, "use_level2_oplocks", false);
return true;
}