mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
Update NativeState.php
sync garbage collection cycle of KerberosAuth and NativeState
This commit is contained in:
parent
319d05e645
commit
38fd1a794d
1 changed files with 9 additions and 0 deletions
|
|
@ -34,6 +34,10 @@ class NativeState {
|
||||||
protected $handlerSet = false;
|
protected $handlerSet = false;
|
||||||
|
|
||||||
protected $connected = false;
|
protected $connected = false;
|
||||||
|
|
||||||
|
// sync the garbage collection cycle
|
||||||
|
// __deconstruct() of KerberosAuth should not called too soon
|
||||||
|
protected $auth;
|
||||||
|
|
||||||
// see error.h
|
// see error.h
|
||||||
const EXCEPTION_MAP = [
|
const EXCEPTION_MAP = [
|
||||||
|
|
@ -85,6 +89,11 @@ class NativeState {
|
||||||
$this->state = smbclient_state_new();
|
$this->state = smbclient_state_new();
|
||||||
smbclient_option_set($this->state, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN, false);
|
smbclient_option_set($this->state, SMBCLIENT_OPT_AUTO_ANONYMOUS_LOGIN, false);
|
||||||
$auth->setExtraSmbClientOptions($this->state);
|
$auth->setExtraSmbClientOptions($this->state);
|
||||||
|
|
||||||
|
// sync the garbage collection cycle
|
||||||
|
// __deconstruct() of KerberosAuth should not called too soon
|
||||||
|
$this->auth = $auth;
|
||||||
|
|
||||||
$result = @smbclient_state_init($this->state, $auth->getWorkgroup(), $auth->getUsername(), $auth->getPassword());
|
$result = @smbclient_state_init($this->state, $auth->getWorkgroup(), $auth->getUsername(), $auth->getPassword());
|
||||||
|
|
||||||
$this->testResult($result, '');
|
$this->testResult($result, '');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue