mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34: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() {
|
protected function getConnection() {
|
||||||
$workgroupArgument = ($this->server->getWorkgroup()) ? ' -W ' . escapeshellarg($this->server->getWorkgroup()) : '';
|
$workgroupArgument = ($this->server->getWorkgroup()) ? ' -W ' . escapeshellarg($this->server->getWorkgroup()) : '';
|
||||||
|
$maxProtocolArgument = ($this->server->getMaxProtocol()) ? ' -m ' . escapeshellarg($this->server->getMaxProtocol()) : '';
|
||||||
$smbClientPath = $this->system->getSmbclientPath();
|
$smbClientPath = $this->system->getSmbclientPath();
|
||||||
if (!$smbClientPath) {
|
if (!$smbClientPath) {
|
||||||
throw new DependencyException('Can\'t find smbclient binary in path');
|
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->hasStdBuf() ? 'stdbuf -o0 ' : '',
|
||||||
$this->system->getSmbclientPath(),
|
$this->system->getSmbclientPath(),
|
||||||
$workgroupArgument,
|
$workgroupArgument,
|
||||||
|
$maxProtocolArgument,
|
||||||
System::getFD(3),
|
System::getFD(3),
|
||||||
escapeshellarg('//' . $this->server->getHost() . '/' . $this->name)
|
escapeshellarg('//' . $this->server->getHost() . '/' . $this->name)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue