File smb-kio_smb_browse-Check-error-code-EINVAL-to-prompt.patch of Package kdebase4-runtime
From 546c2b06e27f0e8460f5ddf1347d28aa0ec22979 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/kioslave/smb/kio_smb_browse.cpp b/kioslave/smb/kio_smb_browse.cpp
index 3bc25d83..a773befa 100644
--- a/kioslave/smb/kio_smb_browse.cpp
+++ b/kioslave/smb/kio_smb_browse.cpp
@@ -433,7 +433,7 @@ void SMBSlave::listDir( const KUrl& kurl )
    }
    else
    {
-       if (errNum == EPERM || errNum == EACCES) {
+       if (errNum == EPERM || errNum == EACCES|| errNum == EINVAL) {
            if (checkPassword(m_current_url)) {
                redirection( m_current_url );
                finished();
-- 
2.36.1