Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php')
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php
index e1a13ce3e72..088e6f733d1 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php
@@ -38,6 +38,14 @@ class NativeState {
/** @var bool */
protected $connected = false;
+ /**
+ * sync the garbage collection cycle
+ * __deconstruct() of KerberosAuth should not called too soon
+ *
+ * @var IAuth|null $auth
+ */
+ protected $auth = null;
+
// see error.h
const EXCEPTION_MAP = [
1 => ForbiddenException::class,
@@ -107,6 +115,11 @@ class NativeState {
}
$auth->setExtraSmbClientOptions($this->state);
+
+ // sync the garbage collection cycle
+ // __deconstruct() of KerberosAuth should not caled too soon
+ $this->auth = $auth;
+
/** @var bool $result */
$result = @smbclient_state_init($this->state, $auth->getWorkgroup(), $auth->getUsername(), $auth->getPassword());