summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-05-12 14:39:08 +0200
committerRobin Appelman <robin@icewind.nl>2020-05-12 14:39:08 +0200
commit42019c0f4fba1658bfd96b7eed061b2f2a2aee57 (patch)
tree3185ce12a9237af6c6704ea6dc93636b6ebfe97c /apps/files_external
parent703d716a32e08d0bc594ba5572452044c5fb3022 (diff)
downloadnextcloud-server-42019c0f4fba1658bfd96b7eed061b2f2a2aee57.tar.gz
nextcloud-server-42019c0f4fba1658bfd96b7eed061b2f2a2aee57.zip
update icewind/smb to 3.2.4
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/3rdparty/composer.json2
-rw-r--r--apps/files_external/3rdparty/composer.lock12
-rw-r--r--apps/files_external/3rdparty/composer/installed.json12
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php53
4 files changed, 53 insertions, 26 deletions
diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json
index 0ee0c268bb0..514108214da 100644
--- a/apps/files_external/3rdparty/composer.json
+++ b/apps/files_external/3rdparty/composer.json
@@ -9,6 +9,6 @@
},
"require": {
"icewind/streams": "0.7.1",
- "icewind/smb": "3.2.3"
+ "icewind/smb": "3.2.4"
}
}
diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock
index e0716141c5f..aae061de55c 100644
--- a/apps/files_external/3rdparty/composer.lock
+++ b/apps/files_external/3rdparty/composer.lock
@@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "ef0d9929f5f25696e010d5733eb51fbb",
+ "content-hash": "9454f546b6ab8865140c991e8f197951",
"packages": [
{
"name": "icewind/smb",
- "version": "v3.2.3",
+ "version": "v3.2.4",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
- "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4"
+ "reference": "999d6687ca9d4ac2600185c935b45206e47e604a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/SMB/zipball/db50bb51bd0a0e55506e82cf439a9ecd232f64d4",
- "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4",
+ "url": "https://api.github.com/repos/icewind1991/SMB/zipball/999d6687ca9d4ac2600185c935b45206e47e604a",
+ "reference": "999d6687ca9d4ac2600185c935b45206e47e604a",
"shasum": ""
},
"require": {
@@ -46,7 +46,7 @@
}
],
"description": "php wrapper for smbclient and libsmbclient-php",
- "time": "2020-04-08T15:20:22+00:00"
+ "time": "2020-05-11T14:12:35+00:00"
},
{
"name": "icewind/streams",
diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json
index e2b841f206a..388a48e5560 100644
--- a/apps/files_external/3rdparty/composer/installed.json
+++ b/apps/files_external/3rdparty/composer/installed.json
@@ -1,17 +1,17 @@
[
{
"name": "icewind/smb",
- "version": "v3.2.3",
- "version_normalized": "3.2.3.0",
+ "version": "v3.2.4",
+ "version_normalized": "3.2.4.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
- "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4"
+ "reference": "999d6687ca9d4ac2600185c935b45206e47e604a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/SMB/zipball/db50bb51bd0a0e55506e82cf439a9ecd232f64d4",
- "reference": "db50bb51bd0a0e55506e82cf439a9ecd232f64d4",
+ "url": "https://api.github.com/repos/icewind1991/SMB/zipball/999d6687ca9d4ac2600185c935b45206e47e604a",
+ "reference": "999d6687ca9d4ac2600185c935b45206e47e604a",
"shasum": ""
},
"require": {
@@ -22,7 +22,7 @@
"friendsofphp/php-cs-fixer": "^2.13",
"phpunit/phpunit": "^7.0"
},
- "time": "2020-04-08T15:20:22+00:00",
+ "time": "2020-05-11T14:12:35+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php
index 24344e6f0df..093cbb3b5dc 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php
@@ -32,11 +32,6 @@ class NativeFileInfo implements IFileInfo {
protected $attributeCache = null;
/**
- * @var int
- */
- protected $modeCache;
-
- /**
* @param NativeShare $share
* @param string $path
* @param string $name
@@ -69,7 +64,7 @@ class NativeFileInfo implements IFileInfo {
$rawAttributes = explode(',', $this->share->getAttribute($this->path, 'system.dos_attr.*'));
$this->attributeCache = [];
foreach ($rawAttributes as $rawAttribute) {
- [$name, $value] = explode(':', $rawAttribute);
+ list($name, $value) = explode(':', $rawAttribute);
$name = strtolower($name);
if ($name == 'mode') {
$this->attributeCache[$name] = (int)hexdec(substr($value, 2));
@@ -98,6 +93,18 @@ class NativeFileInfo implements IFileInfo {
}
/**
+ * On "mode":
+ *
+ * different smbclient versions seem to return different mode values for 'system.dos_attr.mode'
+ *
+ * older versions return the dos permissions mask as defined in `IFileInfo::MODE_*` while
+ * newer versions return the equivalent unix permission mask.
+ *
+ * Since the unix mask doesn't contain the proper hidden/archive/system flags we have to assume them
+ * as false (except for `hidden` where we use the unix dotfile convention)
+ */
+
+ /**
* @return int
*/
protected function getMode() {
@@ -109,7 +116,11 @@ class NativeFileInfo implements IFileInfo {
*/
public function isDirectory() {
$mode = $this->getMode();
- return (bool)($mode & IFileInfo::MODE_DIRECTORY);
+ if ($mode > 0x80) {
+ return (bool)($mode & 0x4000); // 0x80: unix directory flag
+ } else {
+ return (bool)($mode & IFileInfo::MODE_DIRECTORY);
+ }
}
/**
@@ -117,7 +128,11 @@ class NativeFileInfo implements IFileInfo {
*/
public function isReadOnly() {
$mode = $this->getMode();
- return (bool)($mode & IFileInfo::MODE_READONLY);
+ if ($mode > 0x80) {
+ return !(bool)($mode & 0x80); // 0x80: owner write permissions
+ } else {
+ return (bool)($mode & IFileInfo::MODE_READONLY);
+ }
}
/**
@@ -125,7 +140,11 @@ class NativeFileInfo implements IFileInfo {
*/
public function isHidden() {
$mode = $this->getMode();
- return (bool)($mode & IFileInfo::MODE_HIDDEN);
+ if ($mode > 0x80) {
+ return $this->name[0] === '.';
+ } else {
+ return (bool)($mode & IFileInfo::MODE_HIDDEN);
+ }
}
/**
@@ -133,7 +152,11 @@ class NativeFileInfo implements IFileInfo {
*/
public function isSystem() {
$mode = $this->getMode();
- return (bool)($mode & IFileInfo::MODE_SYSTEM);
+ if ($mode > 0x80) {
+ return false;
+ } else {
+ return (bool)($mode & IFileInfo::MODE_SYSTEM);
+ }
}
/**
@@ -141,7 +164,11 @@ class NativeFileInfo implements IFileInfo {
*/
public function isArchived() {
$mode = $this->getMode();
- return (bool)($mode & IFileInfo::MODE_ARCHIVE);
+ if ($mode > 0x80) {
+ return false;
+ } else {
+ return (bool)($mode & IFileInfo::MODE_ARCHIVE);
+ }
}
/**
@@ -152,8 +179,8 @@ class NativeFileInfo implements IFileInfo {
$attribute = $this->share->getAttribute($this->path, 'system.nt_sec_desc.acl.*+');
foreach (explode(',', $attribute) as $acl) {
- [$user, $permissions] = explode(':', $acl, 2);
- [$type, $flags, $mask] = explode('/', $permissions);
+ list($user, $permissions) = explode(':', $acl, 2);
+ list($type, $flags, $mask) = explode('/', $permissions);
$mask = hexdec($mask);
$acls[$user] = new ACL($type, $flags, $mask);