summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-10 23:43:55 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-10 23:43:55 +0200
commit7ce4d2dec962e49066f8e15a518fadbfcf25a868 (patch)
treef421c4ccb8f40c0c9695e4883e657608fe2cb521 /apps
parent2e88f8af43c6a86a4c0040cbdacc87ab7917e82b (diff)
parenta41fbf7a92cbb194e22900fa2fa0d957f1d073cb (diff)
downloadnextcloud-server-7ce4d2dec962e49066f8e15a518fadbfcf25a868.tar.gz
nextcloud-server-7ce4d2dec962e49066f8e15a518fadbfcf25a868.zip
Merge pull request #15535 from owncloud/smb-1.0.0
update icewind/smb to 1.0.0
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/3rdparty/.gitignore1
-rw-r--r--apps/files_external/3rdparty/composer.json2
-rw-r--r--apps/files_external/3rdparty/composer.lock16
-rw-r--r--apps/files_external/3rdparty/composer/installed.json12
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Parser.php5
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/RawConnection.php12
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/Share.php6
7 files changed, 38 insertions, 16 deletions
diff --git a/apps/files_external/3rdparty/.gitignore b/apps/files_external/3rdparty/.gitignore
new file mode 100644
index 00000000000..a9a7266a624
--- /dev/null
+++ b/apps/files_external/3rdparty/.gitignore
@@ -0,0 +1 @@
+example.php
diff --git a/apps/files_external/3rdparty/composer.json b/apps/files_external/3rdparty/composer.json
index b1315651c99..8992220d843 100644
--- a/apps/files_external/3rdparty/composer.json
+++ b/apps/files_external/3rdparty/composer.json
@@ -6,7 +6,7 @@
"vendor-dir": "."
},
"require": {
- "icewind/smb": "dev-master",
+ "icewind/smb": "1.0.0",
"icewind/streams": "0.2"
}
}
diff --git a/apps/files_external/3rdparty/composer.lock b/apps/files_external/3rdparty/composer.lock
index 0a7dcf89876..ffd5c7c3c65 100644
--- a/apps/files_external/3rdparty/composer.lock
+++ b/apps/files_external/3rdparty/composer.lock
@@ -4,20 +4,20 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "c854ee7f5bdcb3f2c8ee0a8cfe5e193a",
+ "hash": "2554253c9f91c67cd0db753a69105bc0",
"packages": [
{
"name": "icewind/smb",
- "version": "dev-master",
+ "version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
- "reference": "ef4b128143b7272e97665b84862d77faabf7d36d"
+ "reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/SMB/zipball/ef4b128143b7272e97665b84862d77faabf7d36d",
- "reference": "ef4b128143b7272e97665b84862d77faabf7d36d",
+ "url": "https://api.github.com/repos/icewind1991/SMB/zipball/4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
+ "reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
"shasum": ""
},
"require": {
@@ -45,7 +45,7 @@
}
],
"description": "php wrapper for smbclient and libsmbclient-php",
- "time": "2015-03-13 12:17:14"
+ "time": "2015-04-10 12:10:08"
},
{
"name": "icewind/streams",
@@ -91,9 +91,7 @@
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": {
- "icewind/smb": 20
- },
+ "stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
diff --git a/apps/files_external/3rdparty/composer/installed.json b/apps/files_external/3rdparty/composer/installed.json
index eae04e877d2..441ed1f14fa 100644
--- a/apps/files_external/3rdparty/composer/installed.json
+++ b/apps/files_external/3rdparty/composer/installed.json
@@ -43,17 +43,17 @@
},
{
"name": "icewind/smb",
- "version": "dev-master",
- "version_normalized": "9999999-dev",
+ "version": "v1.0.0",
+ "version_normalized": "1.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
- "reference": "ef4b128143b7272e97665b84862d77faabf7d36d"
+ "reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/icewind1991/SMB/zipball/ef4b128143b7272e97665b84862d77faabf7d36d",
- "reference": "ef4b128143b7272e97665b84862d77faabf7d36d",
+ "url": "https://api.github.com/repos/icewind1991/SMB/zipball/4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
+ "reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
"shasum": ""
},
"require": {
@@ -63,7 +63,7 @@
"require-dev": {
"satooshi/php-coveralls": "dev-master"
},
- "time": "2015-03-13 12:17:14",
+ "time": "2015-04-10 12:10:08",
"type": "library",
"installation-source": "source",
"autoload": {
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Parser.php b/apps/files_external/3rdparty/icewind/smb/src/Parser.php
index 381c4917a92..8b4de7825e4 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Parser.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Parser.php
@@ -92,6 +92,11 @@ class Parser {
$size = 0;
foreach ($output as $line) {
list($name, $value) = explode(':', $line, 2);
+ // A line = explode statement may not fill all array elements
+ // properly. May happen when accessing non Windows Fileservers
+ $words = explode(':', $line, 2);
+ $name = isset($words[0]) ? $words[0] : '';
+ $value = isset($words[1]) ? $words[1] : '';
$value = trim($value);
if ($name === 'write_time') {
$mtime = strtotime($value);
diff --git a/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php b/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
index 926ce3714cf..15478511a72 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
@@ -149,6 +149,18 @@ class RawConnection {
return;
}
if ($terminate) {
+ // if for case that posix_ functions are not available
+ if (function_exists('posix_kill')) {
+ $status = proc_get_status($this->process);
+ $ppid = $status['pid'];
+ $pids = preg_split('/\s+/', `ps -o pid --no-heading --ppid $ppid`);
+ foreach($pids as $pid) {
+ if(is_numeric($pid)) {
+ //9 is the SIGKILL signal
+ posix_kill($pid, 9);
+ }
+ }
+ }
proc_terminate($this->process);
}
proc_close($this->process);
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Share.php b/apps/files_external/3rdparty/icewind/smb/src/Share.php
index 025a84380a1..7c24f9f2e90 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/Share.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/Share.php
@@ -120,6 +120,12 @@ class Share implements IShare {
public function stat($path) {
$escapedPath = $this->escapePath($path);
$output = $this->execute('allinfo ' . $escapedPath);
+ // Windows and non Windows Fileserver may respond different
+ // to the allinfo command for directories. If the result is a single
+ // line = error line, redo it with a different allinfo parameter
+ if ($escapedPath == '""' && count($output) < 2) {
+ $output = $this->execute('allinfo ' . '"."');
+ }
if (count($output) < 3) {
$this->parseOutput($output, $path);
}