-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20405 from nextcloud/backport/20363/stable18
[stable18] update icewind/smb to 3.2.3
- Loading branch information
Showing
25 changed files
with
373 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
}, | ||
"require": { | ||
"icewind/streams": "0.7.1", | ||
"icewind/smb": "3.1.1" | ||
"icewind/smb": "^3.2.3" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
vendor | ||
composer.lock | ||
.php_cs.cache | ||
|
||
listen.php | ||
test.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* @copyright Copyright (c) 2020 Robin Appelman <robin@icewind.nl> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
namespace Icewind\SMB; | ||
|
||
class ACL { | ||
const TYPE_ALLOW = 0; | ||
const TYPE_DENY = 1; | ||
|
||
const MASK_READ = 0x0001; | ||
const MASK_WRITE = 0x0002; | ||
const MASK_EXECUTE = 0x00020; | ||
const MASK_DELETE = 0x10000; | ||
|
||
const FLAG_OBJECT_INHERIT = 0x1; | ||
const FLAG_CONTAINER_INHERIT = 0x2; | ||
|
||
private $type; | ||
private $flags; | ||
private $mask; | ||
|
||
public function __construct(int $type, int $flags, int $mask) { | ||
$this->type = $type; | ||
$this->flags = $flags; | ||
$this->mask = $mask; | ||
} | ||
|
||
/** | ||
* Check if the acl allows a specific permissions | ||
* | ||
* Note that this does not take inherited acls into account | ||
* | ||
* @param int $mask one of the ACL::MASK_* constants | ||
* @return bool | ||
*/ | ||
public function allows(int $mask): bool { | ||
return $this->type === self::TYPE_ALLOW && ($this->mask & $mask) === $mask; | ||
} | ||
|
||
/** | ||
* Check if the acl allows a specific permissions | ||
* | ||
* Note that this does not take inherited acls into account | ||
* | ||
* @param int $mask one of the ACL::MASK_* constants | ||
* @return bool | ||
*/ | ||
public function denies(int $mask): bool { | ||
return $this->type === self::TYPE_DENY && ($this->mask & $mask) === $mask; | ||
} | ||
|
||
public function getType(): int { | ||
return $this->type; | ||
} | ||
|
||
public function getFlags(): int { | ||
return $this->flags; | ||
} | ||
|
||
public function getMask(): int { | ||
return $this->mask; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionAbortedException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2020 Robin Appelman <icewind@owncloud.com> | ||
* This file is licensed under the Licensed under the MIT license: | ||
* http://opensource.org/licenses/MIT | ||
*/ | ||
|
||
namespace Icewind\SMB\Exception; | ||
|
||
class ConnectionAbortedException extends ConnectException { | ||
} |
11 changes: 11 additions & 0 deletions
11
apps/files_external/3rdparty/icewind/smb/src/Exception/ConnectionResetException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2020 Robin Appelman <icewind@owncloud.com> | ||
* This file is licensed under the Licensed under the MIT license: | ||
* http://opensource.org/licenses/MIT | ||
*/ | ||
|
||
namespace Icewind\SMB\Exception; | ||
|
||
class ConnectionResetException extends ConnectException { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.