Skip to content

Commit cd78273

Browse files
authored
Merge pull request #20405 from nextcloud/backport/20363/stable18
[stable18] update icewind/smb to 3.2.3
2 parents 0856745 + c9696ed commit cd78273

25 files changed

+373
-106
lines changed

apps/files_external/3rdparty/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
},
1010
"require": {
1111
"icewind/streams": "0.7.1",
12-
"icewind/smb": "3.1.1"
12+
"icewind/smb": "^3.2.3"
1313
}
1414
}

apps/files_external/3rdparty/composer.lock

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_external/3rdparty/composer/autoload_classmap.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
$baseDir = $vendorDir;
77

88
return array(
9+
'Icewind\\SMB\\ACL' => $vendorDir . '/icewind/smb/src/ACL.php',
910
'Icewind\\SMB\\AbstractServer' => $vendorDir . '/icewind/smb/src/AbstractServer.php',
1011
'Icewind\\SMB\\AbstractShare' => $vendorDir . '/icewind/smb/src/AbstractShare.php',
1112
'Icewind\\SMB\\AnonymousAuth' => $vendorDir . '/icewind/smb/src/AnonymousAuth.php',
@@ -15,8 +16,10 @@
1516
'Icewind\\SMB\\Exception\\AlreadyExistsException' => $vendorDir . '/icewind/smb/src/Exception/AlreadyExistsException.php',
1617
'Icewind\\SMB\\Exception\\AuthenticationException' => $vendorDir . '/icewind/smb/src/Exception/AuthenticationException.php',
1718
'Icewind\\SMB\\Exception\\ConnectException' => $vendorDir . '/icewind/smb/src/Exception/ConnectException.php',
19+
'Icewind\\SMB\\Exception\\ConnectionAbortedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionAbortedException.php',
1820
'Icewind\\SMB\\Exception\\ConnectionException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionException.php',
1921
'Icewind\\SMB\\Exception\\ConnectionRefusedException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionRefusedException.php',
22+
'Icewind\\SMB\\Exception\\ConnectionResetException' => $vendorDir . '/icewind/smb/src/Exception/ConnectionResetException.php',
2023
'Icewind\\SMB\\Exception\\DependencyException' => $vendorDir . '/icewind/smb/src/Exception/DependencyException.php',
2124
'Icewind\\SMB\\Exception\\Exception' => $vendorDir . '/icewind/smb/src/Exception/Exception.php',
2225
'Icewind\\SMB\\Exception\\FileInUseException' => $vendorDir . '/icewind/smb/src/Exception/FileInUseException.php',
@@ -55,6 +58,16 @@
5558
'Icewind\\SMB\\Options' => $vendorDir . '/icewind/smb/src/Options.php',
5659
'Icewind\\SMB\\ServerFactory' => $vendorDir . '/icewind/smb/src/ServerFactory.php',
5760
'Icewind\\SMB\\System' => $vendorDir . '/icewind/smb/src/System.php',
61+
'Icewind\\SMB\\Test\\AbstractShareTest' => $vendorDir . '/icewind/smb/tests/AbstractShareTest.php',
62+
'Icewind\\SMB\\Test\\NativeShareTest' => $vendorDir . '/icewind/smb/tests/NativeShareTest.php',
63+
'Icewind\\SMB\\Test\\NativeStreamTest' => $vendorDir . '/icewind/smb/tests/NativeStreamTest.php',
64+
'Icewind\\SMB\\Test\\NotifyHandlerTest' => $vendorDir . '/icewind/smb/tests/NotifyHandlerTest.php',
65+
'Icewind\\SMB\\Test\\ParserTest' => $vendorDir . '/icewind/smb/tests/ParserTest.php',
66+
'Icewind\\SMB\\Test\\ServerFactoryTest' => $vendorDir . '/icewind/smb/tests/ServerFactoryTest.php',
67+
'Icewind\\SMB\\Test\\ServerTest' => $vendorDir . '/icewind/smb/tests/ServerTest.php',
68+
'Icewind\\SMB\\Test\\ShareTest' => $vendorDir . '/icewind/smb/tests/ShareTest.php',
69+
'Icewind\\SMB\\Test\\TestCase' => $vendorDir . '/icewind/smb/tests/TestCase.php',
70+
'Icewind\\SMB\\Test\\TimeZoneProviderTest' => $vendorDir . '/icewind/smb/tests/TimeZoneProviderTest.php',
5871
'Icewind\\SMB\\TimeZoneProvider' => $vendorDir . '/icewind/smb/src/TimeZoneProvider.php',
5972
'Icewind\\SMB\\Wrapped\\Connection' => $vendorDir . '/icewind/smb/src/Wrapped/Connection.php',
6073
'Icewind\\SMB\\Wrapped\\ErrorCodes' => $vendorDir . '/icewind/smb/src/Wrapped/ErrorCodes.php',

apps/files_external/3rdparty/composer/autoload_real.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ public static function loadClassLoader($class)
1313
}
1414
}
1515

16+
/**
17+
* @return \Composer\Autoload\ClassLoader
18+
*/
1619
public static function getLoader()
1720
{
1821
if (null !== self::$loader) {

apps/files_external/3rdparty/composer/autoload_static.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3
3636
);
3737

3838
public static $classMap = array (
39+
'Icewind\\SMB\\ACL' => __DIR__ . '/..' . '/icewind/smb/src/ACL.php',
3940
'Icewind\\SMB\\AbstractServer' => __DIR__ . '/..' . '/icewind/smb/src/AbstractServer.php',
4041
'Icewind\\SMB\\AbstractShare' => __DIR__ . '/..' . '/icewind/smb/src/AbstractShare.php',
4142
'Icewind\\SMB\\AnonymousAuth' => __DIR__ . '/..' . '/icewind/smb/src/AnonymousAuth.php',
@@ -45,8 +46,10 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3
4546
'Icewind\\SMB\\Exception\\AlreadyExistsException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AlreadyExistsException.php',
4647
'Icewind\\SMB\\Exception\\AuthenticationException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/AuthenticationException.php',
4748
'Icewind\\SMB\\Exception\\ConnectException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectException.php',
49+
'Icewind\\SMB\\Exception\\ConnectionAbortedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionAbortedException.php',
4850
'Icewind\\SMB\\Exception\\ConnectionException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionException.php',
4951
'Icewind\\SMB\\Exception\\ConnectionRefusedException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionRefusedException.php',
52+
'Icewind\\SMB\\Exception\\ConnectionResetException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/ConnectionResetException.php',
5053
'Icewind\\SMB\\Exception\\DependencyException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/DependencyException.php',
5154
'Icewind\\SMB\\Exception\\Exception' => __DIR__ . '/..' . '/icewind/smb/src/Exception/Exception.php',
5255
'Icewind\\SMB\\Exception\\FileInUseException' => __DIR__ . '/..' . '/icewind/smb/src/Exception/FileInUseException.php',
@@ -85,6 +88,16 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3
8588
'Icewind\\SMB\\Options' => __DIR__ . '/..' . '/icewind/smb/src/Options.php',
8689
'Icewind\\SMB\\ServerFactory' => __DIR__ . '/..' . '/icewind/smb/src/ServerFactory.php',
8790
'Icewind\\SMB\\System' => __DIR__ . '/..' . '/icewind/smb/src/System.php',
91+
'Icewind\\SMB\\Test\\AbstractShareTest' => __DIR__ . '/..' . '/icewind/smb/tests/AbstractShareTest.php',
92+
'Icewind\\SMB\\Test\\NativeShareTest' => __DIR__ . '/..' . '/icewind/smb/tests/NativeShareTest.php',
93+
'Icewind\\SMB\\Test\\NativeStreamTest' => __DIR__ . '/..' . '/icewind/smb/tests/NativeStreamTest.php',
94+
'Icewind\\SMB\\Test\\NotifyHandlerTest' => __DIR__ . '/..' . '/icewind/smb/tests/NotifyHandlerTest.php',
95+
'Icewind\\SMB\\Test\\ParserTest' => __DIR__ . '/..' . '/icewind/smb/tests/ParserTest.php',
96+
'Icewind\\SMB\\Test\\ServerFactoryTest' => __DIR__ . '/..' . '/icewind/smb/tests/ServerFactoryTest.php',
97+
'Icewind\\SMB\\Test\\ServerTest' => __DIR__ . '/..' . '/icewind/smb/tests/ServerTest.php',
98+
'Icewind\\SMB\\Test\\ShareTest' => __DIR__ . '/..' . '/icewind/smb/tests/ShareTest.php',
99+
'Icewind\\SMB\\Test\\TestCase' => __DIR__ . '/..' . '/icewind/smb/tests/TestCase.php',
100+
'Icewind\\SMB\\Test\\TimeZoneProviderTest' => __DIR__ . '/..' . '/icewind/smb/tests/TimeZoneProviderTest.php',
88101
'Icewind\\SMB\\TimeZoneProvider' => __DIR__ . '/..' . '/icewind/smb/src/TimeZoneProvider.php',
89102
'Icewind\\SMB\\Wrapped\\Connection' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/Connection.php',
90103
'Icewind\\SMB\\Wrapped\\ErrorCodes' => __DIR__ . '/..' . '/icewind/smb/src/Wrapped/ErrorCodes.php',

apps/files_external/3rdparty/composer/installed.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
[
22
{
33
"name": "icewind/smb",
4-
"version": "v3.1.1",
5-
"version_normalized": "3.1.1.0",
4+
"version": "v3.2.3",
5+
"version_normalized": "3.2.3.0",
66
"source": {
77
"type": "git",
88
"url": "https://github.com/icewind1991/SMB.git",
9-
"reference": "26b7b8780342d0e61313b464b880d50a2ea898e2"
9+
"reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4"
1010
},
1111
"dist": {
1212
"type": "zip",
13-
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/26b7b8780342d0e61313b464b880d50a2ea898e2",
14-
"reference": "26b7b8780342d0e61313b464b880d50a2ea898e2",
13+
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/db50bb51bd0a0e55506e82cf439a9ecd232f64d4",
14+
"reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4",
1515
"shasum": ""
1616
},
1717
"require": {
1818
"icewind/streams": ">=0.2.0",
19-
"php": ">=5.6"
19+
"php": ">=7.1"
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "^2.13",
23-
"phpunit/phpunit": "^5.7"
23+
"phpunit/phpunit": "^7.0"
2424
},
25-
"time": "2019-03-04T15:02:42+00:00",
25+
"time": "2020-04-08T15:20:22+00:00",
2626
"type": "library",
2727
"installation-source": "dist",
2828
"autoload": {

apps/files_external/3rdparty/icewind/smb/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
vendor
33
composer.lock
44
.php_cs.cache
5-
5+
listen.php
6+
test.php

apps/files_external/3rdparty/icewind/smb/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use Icewind\SMB\BasicAuth;
2626
require('vendor/autoload.php');
2727

2828
$serverFactory = new ServerFactory();
29-
$auth = new BasicAuth('test', 'workgroup', 'test');
29+
$auth = new BasicAuth('user', 'workgroup', 'password');
3030
$server = $serverFactory->createServer('localhost', $auth);
3131

3232
$share = $server->getShare('test');

apps/files_external/3rdparty/icewind/smb/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
}
1010
],
1111
"require" : {
12-
"php": ">=5.6",
12+
"php": ">=7.1",
1313
"icewind/streams": ">=0.2.0"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^5.7",
16+
"phpunit/phpunit": "^7.0",
1717
"friendsofphp/php-cs-fixer": "^2.13"
1818
},
1919
"autoload" : {
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?php declare(strict_types=1);
2+
/**
3+
* @copyright Copyright (c) 2020 Robin Appelman <robin@icewind.nl>
4+
*
5+
* @license GNU AGPL version 3 or any later version
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU Affero General Public License as
9+
* published by the Free Software Foundation, either version 3 of the
10+
* License, or (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU Affero General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Affero General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*
20+
*/
21+
22+
namespace Icewind\SMB;
23+
24+
class ACL {
25+
const TYPE_ALLOW = 0;
26+
const TYPE_DENY = 1;
27+
28+
const MASK_READ = 0x0001;
29+
const MASK_WRITE = 0x0002;
30+
const MASK_EXECUTE = 0x00020;
31+
const MASK_DELETE = 0x10000;
32+
33+
const FLAG_OBJECT_INHERIT = 0x1;
34+
const FLAG_CONTAINER_INHERIT = 0x2;
35+
36+
private $type;
37+
private $flags;
38+
private $mask;
39+
40+
public function __construct(int $type, int $flags, int $mask) {
41+
$this->type = $type;
42+
$this->flags = $flags;
43+
$this->mask = $mask;
44+
}
45+
46+
/**
47+
* Check if the acl allows a specific permissions
48+
*
49+
* Note that this does not take inherited acls into account
50+
*
51+
* @param int $mask one of the ACL::MASK_* constants
52+
* @return bool
53+
*/
54+
public function allows(int $mask): bool {
55+
return $this->type === self::TYPE_ALLOW && ($this->mask & $mask) === $mask;
56+
}
57+
58+
/**
59+
* Check if the acl allows a specific permissions
60+
*
61+
* Note that this does not take inherited acls into account
62+
*
63+
* @param int $mask one of the ACL::MASK_* constants
64+
* @return bool
65+
*/
66+
public function denies(int $mask): bool {
67+
return $this->type === self::TYPE_DENY && ($this->mask & $mask) === $mask;
68+
}
69+
70+
public function getType(): int {
71+
return $this->type;
72+
}
73+
74+
public function getFlags(): int {
75+
return $this->flags;
76+
}
77+
78+
public function getMask(): int {
79+
return $this->mask;
80+
}
81+
}

0 commit comments

Comments
 (0)