mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
make authfile handling compatible with smbclient 4.6.x
This commit is contained in:
parent
79b69c635b
commit
6723c97de1
3 changed files with 44 additions and 31 deletions
|
|
@ -68,8 +68,9 @@ class Share extends AbstractShare {
|
|||
);
|
||||
$connection = new Connection($command, $this->parser);
|
||||
$connection->writeAuthentication($this->server->getUser(), $this->server->getPassword());
|
||||
$connection->connect();
|
||||
if (!$connection->isValid()) {
|
||||
throw new ConnectionException();
|
||||
throw new ConnectionException($connection->readLine());
|
||||
}
|
||||
return $connection;
|
||||
}
|
||||
|
|
@ -88,7 +89,6 @@ class Share extends AbstractShare {
|
|||
|
||||
protected function reconnect() {
|
||||
$this->connection->reconnect();
|
||||
$this->connection->writeAuthentication($this->server->getUser(), $this->server->getPassword());
|
||||
if (!$this->connection->isValid()) {
|
||||
throw new ConnectionException();
|
||||
}
|
||||
|
|
@ -318,9 +318,9 @@ class Share extends AbstractShare {
|
|||
$modeString = '';
|
||||
$modeMap = array(
|
||||
FileInfo::MODE_READONLY => 'r',
|
||||
FileInfo::MODE_HIDDEN => 'h',
|
||||
FileInfo::MODE_ARCHIVE => 'a',
|
||||
FileInfo::MODE_SYSTEM => 's'
|
||||
FileInfo::MODE_HIDDEN => 'h',
|
||||
FileInfo::MODE_ARCHIVE => 'a',
|
||||
FileInfo::MODE_SYSTEM => 's'
|
||||
);
|
||||
foreach ($modeMap as $modeByte => $string) {
|
||||
if ($mode & $modeByte) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue