Summary: | "cifs:" can and should be interchangeable with "smb:" | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio-extras | Reporter: | Orion Poplawski <orion> |
Component: | Samba | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | arthur, nate, sitter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kio-extras/a5f51238fab75c407c53dd6ec348937c08b6022d | Version Fixed In: | 19.12.3 |
Sentry Crash Report: |
Description
Orion Poplawski
2013-11-07 23:58:29 UTC
According to Implementing CIFS http://ubiqx.org/cifs/Appendix-D.html One of the fiddly bits that had to be handled when designing the SMB URL was whether the scheme identifier should be "SMB" or "CIFS". There wasn't a lot of argument over this. People just started using whichever they liked, so both were declared acceptable. In other words, "smb://" and "cifs://" both mean the same thing (and implementations should support both). We're seeing cifs: used a lot on OS X. If cifs:// and smb:// are interchangeable, it should be easy to fix. Well, not a junior-job. "smb" is scattered all over KDE code, so there is no single place to simply add the protocol alias. Don't we simply need a kservice protocol definition file? All we need to do is accept cifs:// as an entry point into the smb plugin, which should be as simply as defining a dummy protocol same as smb.protocol but with protocol=cifs. That would technically still mean we have two protocols, but given they'd be backed by the same plugin I am not sure that technical difference will matter all that much in practice. Sounds right. Git commit a5f51238fab75c407c53dd6ec348937c08b6022d by Harald Sitter. Committed on 13/02/2020 at 11:19. Pushed by sitter into branch 'master'. smb: install smb as both smb:// and cifs:// Summary: the latter while not IANA registered is apparently used in places. to cheaply support it we now configure the protocol file for both protocol 'smb' and 'cifs' and installing two protocol files. they are still both backed by the same plugin and otherwise the same. code-wise this also required adjustments to the URL validation tech as it has hardcoded checks for smb schemes. FIXED-IN: 19.12.3 Test Plan: - cifs://host/share - cifs://host - cifs:// all open correctly. they do get translated to smb because of the checkUrl code. checkUrl seems entirely pointless, SMBUrl does a bit of validation/fixing as part of updateCache. It occurs to me checkUrl should simply be incorporated into SMBUrl and we should construct an SMBUrl where we previously called checkUrl. before doing anything of value we construct SMBUrls anyway, so the isolated logic does absolutely nothing SMBUrl couldn't do just as well. also needs a unit test -.- ... too much refactoring for a bugfix though Reviewers: dfaure, ngraham Reviewed By: ngraham Subscribers: meven, feverfew, kde-frameworks-devel, kfm-devel Tags: #dolphin, #frameworks Differential Revision: https://phabricator.kde.org/D27291 M +4 -1 smb/CMakeLists.txt M +17 -3 smb/kio_smb_browse.cpp M +8 -0 smb/kio_smb_internal.cpp R +1 -1 smb/smb.protocol.cmake [from: smb/smb.protocol - 093% similarity] https://commits.kde.org/kio-extras/a5f51238fab75c407c53dd6ec348937c08b6022d |