mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Update Share.php
Adicionado método para definir o protocolo de SMB máximo.
This commit is contained in:
parent
499148909e
commit
ab99f16632
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue