summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-18 12:27:30 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-18 12:31:55 +0100
commit7e6f3817d07645be5b56becca6ba1a6934f6a2c2 (patch)
treeea0f141327ce83169882e421ceb932b076e43ba6 /apps/files_external/3rdparty
parentc3746e866af8b68d16c5b42c98ed63b9a4a402ed (diff)
downloadnextcloud-server-7e6f3817d07645be5b56becca6ba1a6934f6a2c2.tar.gz
nextcloud-server-7e6f3817d07645be5b56becca6ba1a6934f6a2c2.zip
SMB ignore connection errors when NetBIOS is disabled
When NetBIOS is blocked or disabled, a smb::look() call can still get the list of shares from smbclient, even though the name resolution at the end of the command fails. This fix makes it ignore the connection error if we already got the list of shares. Fixed #5860
Diffstat (limited to 'apps/files_external/3rdparty')
-rw-r--r--apps/files_external/3rdparty/smb4php/smb.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php
index 1a6cd05590c..9650f809041 100644
--- a/apps/files_external/3rdparty/smb4php/smb.php
+++ b/apps/files_external/3rdparty/smb4php/smb.php
@@ -127,6 +127,7 @@ class smb {
$old_locale = getenv('LC_ALL');
putenv('LC_ALL=en_US.UTF-8');
$output = popen (SMB4PHP_SMBCLIENT." -N {$auth} {$options} {$port} {$options} {$params} 2>/dev/null", 'r');
+ $gotInfo = false;
$info = array ();
$info['info']= array ();
$mode = '';
@@ -188,7 +189,12 @@ class smb {
}
trigger_error($regs[0].' params('.$params.')', E_USER_ERROR);
case 'error-connect':
- return false;
+ // connection error can happen after obtaining share list if
+ // NetBIOS is disabled/blocked on the target server,
+ // in which case we keep the info and continue
+ if (!$gotInfo) {
+ return false;
+ }
}
if ($i) switch ($i[1]) {
case 'file':
@@ -196,6 +202,7 @@ class smb {
case 'disk':
case 'server':
case 'workgroup': $info[$i[1]][] = $i[0];
+ $gotInfo = true;
}
}
pclose($output);
pan class="s2">"user_ldap", { "Failed to clear the mappings." : "فشل مسح الارتباطات (mappings)", "Failed to delete the server configuration" : "تعذر حذف ملف إعدادات الخادم", "The configuration is valid and the connection could be established!" : "الإعدادت صحيحة", "The configuration is valid, but the Bind failed. Please check the server settings and credentials." : "الإعدادات صحيحة، لكن لم ينجح الارتباط. يرجى التأكد من إعدادات الخادم وبيانات التحقق من الدخول.", "The configuration is invalid. Please have a look at the logs for further details." : "الإعدادات غير صحيحة. يرجى الاطلاع على سجلات المتابعة للمزيد من التفاصيل.", "No action specified" : "لم يتم تحديد الإجراء", "No configuration specified" : "لم يتم تحديد الإعدادات.", "No data specified" : "لم يتم تحديد البيانات.", " Could not set configuration %s" : "تعذر تنفيذ الإعداد %s", "Configuration incorrect" : "الإعدادات غير صحيحة", "Configuration incomplete" : "الإعدادات غير مكتملة", "Configuration OK" : "الإعدادات صحيحة", "Select groups" : "إختر مجموعة", "Select object classes" : "اختر أصناف المكونات", "{nthServer}. Server" : "الخادم {nthServer}.", "Do you really want to delete the current Server Configuration?" : "هل ترغب فعلاً في حذف إعدادات الخادم الحالي؟", "Confirm Deletion" : "تأكيد الحذف", "Select attributes" : "اختر الخصائص", "_%s group found_::_%s groups found_" : ["لا توجد مجموعات: %s","تم إيجاد %s مجموعة واحدة","تم إيجاد %s مجموعتين","تم إيجاد %s مجموعات","تم إيجاد %s مجموعة","تم إيجاد %s مجموعة/مجموعات"], "Server" : "خادم", "Users" : "المستخدمين", "Groups" : "مجموعات", "Help" : "المساعدة", "Host" : "المضيف", "Port" : "المنفذ", "Password" : "كلمة المرور", "Back" : "رجوع", "Continue" : "المتابعة", "Advanced" : "تعديلات متقدمه", "Email Field" : "خانة البريد الإلكتروني" }, "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;");