From ab99f16632631e2af5beb2286bb27a453813efd8 Mon Sep 17 00:00:00 2001 From: mdoliveira Date: Fri, 19 May 2017 10:59:47 -0300 Subject: [PATCH] Update Share.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adicionado método para definir o protocolo de SMB máximo. --- src/Share.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Share.php b/src/Share.php index ba8bbbb..71d79ce 100644 --- a/src/Share.php +++ b/src/Share.php @@ -55,14 +55,16 @@ class Share extends AbstractShare { protected function getConnection() { $workgroupArgument = ($this->server->getWorkgroup()) ? ' -W ' . escapeshellarg($this->server->getWorkgroup()) : ''; + $maxProtocolArgument = ($this->server->getMaxProtocol()) ? ' -m ' . escapeshellarg($this->server->getMaxProtocol()) : ''; $smbClientPath = $this->system->getSmbclientPath(); if (!$smbClientPath) { throw new DependencyException('Can\'t find smbclient binary in path'); } - $command = sprintf('%s%s %s --authentication-file=%s %s', + $command = sprintf('%s%s %s %s --authentication-file=%s %s', $this->system->hasStdBuf() ? 'stdbuf -o0 ' : '', $this->system->getSmbclientPath(), $workgroupArgument, + $maxProtocolArgument, System::getFD(3), escapeshellarg('//' . $this->server->getHost() . '/' . $this->name) );