summaryrefslogtreecommitdiffstats
path: root/source/kde/kde/patch/kio-extras/eea1ecae3624c90b63a0c1378313fe8d26b00db1.patch
blob: 8173094feb4d2471bac0e739a78298fd8a968d80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From eea1ecae3624c90b63a0c1378313fe8d26b00db1 Mon Sep 17 00:00:00 2001
From: Anthony Hung <anthonyhungck@gmail.com>
Date: Wed, 22 Jun 2022 17:37:51 +0800
Subject: [PATCH] smb/kio_smb_browse: Check error code `EINVAL` to prompt the
 password dialog

With `samba-libs` >= 4.16, when user connect to the windows file sharing with incorrect user credential, the error code is `EINVAL`.

The user should get the password dialog to enter username and password if the error code is `EINVAL`.

Reference URL:
https://bugzilla.samba.org/show_bug.cgi?id=14983
https://gitlab.gnome.org/GNOME/gvfs/-/issues/611

BUG: 453090
---
 smb/kio_smb_browse.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smb/kio_smb_browse.cpp b/smb/kio_smb_browse.cpp
index 3bc25d83e..a773befa9 100644
--- a/smb/kio_smb_browse.cpp
+++ b/smb/kio_smb_browse.cpp
@@ -452,7 +452,7 @@ WorkerResult SMBWorker::listDir(const QUrl &kurl)
     if (m_current_url.getType() != SMBURLTYPE_ENTIRE_NETWORK && smbc->error() != 0) {
         // not smb:// and had an error -> handle it
         const int err = smbc->error();
-        if (err == EPERM || err == EACCES || workaroundEEXIST(err)) {
+        if (err == EPERM || err == EACCES || err == EINVAL || workaroundEEXIST(err)) {
             qCDebug(KIO_SMB_LOG) << "trying checkPassword";
             const int passwordError = checkPassword(m_current_url);
             if (passwordError == KJob::NoError) {
-- 
GitLab