mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
allow setting protocol levels
This commit is contained in:
parent
b69c20d21a
commit
61012e6196
9 changed files with 149 additions and 60 deletions
|
|
@ -91,6 +91,14 @@ class NativeState {
|
|||
$this->state = smbclient_state_new();
|
||||
smbclient_option_set($this->state, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN, false);
|
||||
smbclient_option_set($this->state, SMBCLIENT_OPT_TIMEOUT, $options->getTimeout() * 1000);
|
||||
|
||||
if (function_exists('smbclient_client_protocols')) {
|
||||
$maxProtocol = $options->getMaxProtocol();
|
||||
$minProtocol = $options->getMinProtocol();
|
||||
|
||||
smbclient_client_protocols($this->state, $minProtocol, $maxProtocol);
|
||||
}
|
||||
|
||||
$auth->setExtraSmbClientOptions($this->state);
|
||||
$result = @smbclient_state_init($this->state, $auth->getWorkgroup(), $auth->getUsername(), $auth->getPassword());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue