Bug 399699 - Cannot connect and create link to SMB share in either knetattach or Dolphin address bar
Summary: Cannot connect and create link to SMB share in either knetattach or Dolphin a...
Status: RESOLVED FIXED
Alias: None
Product: knetattach
Classification: Applications
Component: general (show other bugs)
Version: 5.12.6
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-12 09:33 UTC by Cezar Tigaret
Modified: 2018-10-17 14:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cezar Tigaret 2018-10-12 09:33:29 UTC
SUMMARY

I am trying to connect to a remote SMB share on one of our institution's server.

The host I'm trying to connect to expects as username my full institutional e-mail address (including the '@' character). My credentials are stored locally in the "Windows Shares" module of systemsettings5. 

I can connect to the remote share using smbclient passing the user name (-U option), but I would like to be able to browse to it via the GUI.

STEPS TO REPRODUCE
1. In knetattach - selected Microsoft windows network drive 
2. In network folder information dialog I enter:
 - a custom name for the share (e.g "RDS")
 - server (e.g., abc.de.ac.uk)
 - folder (e.g., rds)

Create an icon for this remote server is selected

3. press "Save & Connect"

OBSERVED RESULT
In knetattach, after entering the name of the server and the folder, I get the error message dialog:

"Unable to connect to server.  Please check your settings and try again." and in the notification area on my KDE panel I get either:

"Examining failed: smb://@/xyz" where xyz is the first part of my server's name

or:

"Examining failed: Unknown error condition in stat: Software caused connection abort"

Entering the smb address directly as (smb://abc.def.ac.uk/rds) in Dolphin also fails (keeps showing dialog for credentials).


EXPECTED RESULT
A link in the network:/ Place in Dolphin, pointing to the remote smb share.

SOFTWARE VERSIONS

KDE Plasma Version: 5.12.6
KDE Frameworks Version: 5.45.0
Qt Version: 5.9.4

ADDITIONAL INFORMATION
libsmbclient 4.7.8+git.86.94b6d10f7dd-lp150.3.6.1-x86_64 from vendor openSUSE
Comment 1 Harald Sitter 2018-10-17 14:31:09 UTC
Git commit cf34ba609dc42da19339e5b0c3c1b67c7fa0d313 by Harald Sitter.
Committed on 17/10/2018 at 14:30.
Pushed by sitter into branch 'master'.

apply eexist workaround from listDir to stat as well

Summary:
knetattach stats() without first doing a listDir() so in the event that
the url requires authentication it won't work and error out on the EEXISTS.
listDir has a fallback hack for this which was missing from stat.

stat now has this workaround as well and correctly brings up an auth
dialog on shares that require it.

Test Plan:
- knetattach
- smb
- data for host (folder should require auth)
- save and connect
- auth dialog comes up
- enter details
- ok
- works

Reviewers: broulik

Reviewed By: broulik

Subscribers: kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Differential Revision: https://phabricator.kde.org/D16272

M  +1    -1    smb/kio_smb_browse.cpp

https://commits.kde.org/kio-extras/cf34ba609dc42da19339e5b0c3c1b67c7fa0d313
Comment 2 Harald Sitter 2018-10-17 14:32:42 UTC
Git commit 76402b7c61da193f32e3ff062338a2ddf6e23d4e by Harald Sitter.
Committed on 17/10/2018 at 14:32.
Pushed by sitter into branch 'Applications/18.08'.

apply eexist workaround from listDir to stat as well

Summary:
knetattach stats() without first doing a listDir() so in the event that
the url requires authentication it won't work and error out on the EEXISTS.
listDir has a fallback hack for this which was missing from stat.

stat now has this workaround as well and correctly brings up an auth
dialog on shares that require it.

Test Plan:
- knetattach
- smb
- data for host (folder should require auth)
- save and connect
- auth dialog comes up
- enter details
- ok
- works

Reviewers: broulik

Reviewed By: broulik

Subscribers: kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Differential Revision: https://phabricator.kde.org/D16272

M  +1    -1    smb/kio_smb_browse.cpp

https://commits.kde.org/kio-extras/76402b7c61da193f32e3ff062338a2ddf6e23d4e