allow setting protocol levels

This commit is contained in:
Robin Appelman 2021-03-02 21:20:17 +01:00
commit 61012e6196
9 changed files with 149 additions and 60 deletions

View file

@ -80,14 +80,18 @@ class Share extends AbstractShare {
}
protected function getConnection() {
$maxProtocol = $this->server->getOptions()->getMaxProtocol();
$minProtocol = $this->server->getOptions()->getMinProtocol();
$command = sprintf(
'%s %s%s -t %s %s %s %s',
'%s %s%s -t %s %s %s %s %s %s',
self::EXEC_CMD,
$this->system->getStdBufPath() ? $this->system->getStdBufPath() . ' -o0 ' : '',
$this->system->getSmbclientPath(),
$this->server->getOptions()->getTimeout(),
$this->getAuthFileArgument(),
$this->server->getAuth()->getExtraCommandLineArguments(),
$maxProtocol ? "--option='client max protocol=" . $maxProtocol . "'" : "",
$minProtocol ? "--option='client min protocol=" . $minProtocol . "'" : "",
escapeshellarg('//' . $this->server->getHost() . '/' . $this->name)
);
$connection = new Connection($command, $this->parser);