https://bugs.kde.org/show_bug.cgi?id=453090
Bug ID: 453090
Summary: Can't connect to a Windows samba share with samba-libs
4.16
Product: kio-extras
Version: 21.12.3
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Samba
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
Hello
after upgrading samba-libs from 4.13 to 4.16, I can't display files on my
windows computer from linux in dolphin anymore. I open the smb:// URL, the
remote system shows up, then I click on it and it shows an error "Soubor nebo
složka smb://laptop-jvsbr4b4.local/ neexistuje." (File or directory doesn't
exist).
I bisected this in samba down to this commit:
commit 34771e1931587807d0395c7ac7f4be18654997f4 (refs/bisect/bad)
Author: Elia Geretto <[email protected]>
Date: Fri Mar 11 19:32:30 2022 +0100
s3:libsmb: Fix errno for failed authentication in SMBC_server_internal()
In SMBC_server_internal(), when authentication fails, the errno value is
currently hard-coded to EPERM, while it should be EACCES instead. Use the
NT_STATUS map to set the appropriate value.
This bug was found because it breaks listing printers protected by
authentication in GNOME Control Panel.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14983
Signed-off-by: Elia Geretto <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Autobuild-User(master): Jeremy Allison <[email protected]>
Autobuild-Date(master): Wed Mar 16 19:44:18 UTC 2022 on sn-devel-184
(cherry picked from commit 70b9977a46e5242174b4461a7f49d5f640c1db62)
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index b92477c88fe..09d27868c0e 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -572,7 +572,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
!NT_STATUS_IS_OK(cli_session_setup_anon(c))) {
cli_shutdown(c);
- errno = EPERM;
+ errno = map_errno_from_nt_status(status);
return NULL;
}
}
The debugging messages from kio are:
kf.kio.slaves.smb: open "smb:///" url-type: 1 dirfd: -1 errNum: 111
kf.kio.slaves.smb: QUrl("smb://")
kf.kio.slaves.smb: QUrl("smb://laptop-jvsbr4b4.kio-discovery-wsd/")
kf.kio.slaves.smb: checkURL QUrl("smb://laptop-jvsbr4b4.kio-discovery-wsd/")
kf.kio.slaves.smb: Resolved DNSSD name: "laptop-jvsbr4b4.local"
kf.kio.slaves.smb: checkURL return3 QUrl("smb://laptop-jvsbr4b4.local/")
kf.kio.slaves.smb: QUrl("smb://laptop-jvsbr4b4.local/")
kf.kio.slaves.smb: checkURL QUrl("smb://laptop-jvsbr4b4.local/")
kf.kio.slaves.smb: checkURL return3 QUrl("smb://laptop-jvsbr4b4.local/")
kf.kio.slaves.smb: updateCache "/"
kf.kio.slaves.smb: Starting discovery.
kf.kio.slaves.smb: auth_smbc_get_dat: set user= jirka , workgroup= WORKGROUP
server= laptop-jvsbr4b4.local , share= IPC$
kf.kio.slaves.smb: updateCache "/IPC$"
kf.kio.slaves.smb: libsmb-auth-callback URL:
QUrl("smb://laptop-jvsbr4b4.local/IPC$")
kf.kio.slaves.smb: auth_smbc_get_dat: set user= jirka , workgroup= WORKGROUP
server= laptop-jvsbr4b4.local , share= IPC$
kf.kio.slaves.smb: updateCache "/IPC$"
kf.kio.slaves.smb: libsmb-auth-callback URL:
QUrl("smb://laptop-jvsbr4b4.local/IPC$")
kf.kio.slaves.smb: open "smb://laptop-jvsbr4b4.local/" url-type: 2 dirfd: -1
errNum: 22
kf.kio.slaves.smb: Discovery finished.
kf.kio.slaves.smb: reporting generic error: 22
kf.kio.slaves.smb: errNum 22
kf.kio.core: "Soubor nebo složka smb://laptop-jvsbr4b4.local/ neexistuje."
SOFTWARE/OS VERSIONS
Windows: 10
Linux: 5.16.18
(available in About System)
KDE Plasma Version:
KDE Frameworks Version:
Qt Version:
--
You are receiving this mail because:
You are watching all bug changes.