mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 09:14:06 +02:00
Merge f82d996f5d into 20efdbafe8
This commit is contained in:
commit
d8c415ef4b
1 changed files with 8 additions and 2 deletions
|
|
@ -13,11 +13,14 @@ class BasicAuth implements IAuth {
|
|||
private $workgroup;
|
||||
/** @var string */
|
||||
private $password;
|
||||
/** @var int|null */
|
||||
private $port = null;
|
||||
|
||||
public function __construct(string $username, ?string $workgroup, string $password) {
|
||||
public function __construct(string $username, ?string $workgroup, string $password, int $port = null) {
|
||||
$this->username = $username;
|
||||
$this->workgroup = $workgroup;
|
||||
$this->password = $password;
|
||||
$this->port = $port;
|
||||
}
|
||||
|
||||
public function getUsername(): ?string {
|
||||
|
|
@ -33,7 +36,10 @@ class BasicAuth implements IAuth {
|
|||
}
|
||||
|
||||
public function getExtraCommandLineArguments(): string {
|
||||
return ($this->workgroup) ? '-W ' . escapeshellarg($this->workgroup) : '';
|
||||
$ret = '';
|
||||
if ($this->workgroup) $ret .= ' -W ' . escapeshellarg($this->workgroup);
|
||||
if ($this->port) $ret .= ' -p ' . escapeshellarg($this->port);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function setExtraSmbClientOptions($smbClientState): void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue