1. 16 Mar, 2020 1 commit
  2. 15 Mar, 2020 1 commit
  3. 11 Mar, 2020 1 commit
  4. 06 Mar, 2020 7 commits
    • Harald Sitter's avatar
      smb: fix wsdiscovery unknown device fallback string · 6557c6b4
      Harald Sitter authored
      Summary:
      wasn't using xi18n so <resource> wasn't parsed as markup but rather used
      verbatim. also was missing the argument for %1 so the host address wasn't
      included
      
      Test Plan: computer.clear() just prior now results in expected "Unknown device @ "::1"" names for the entries
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27900
      6557c6b4
    • Harald Sitter's avatar
      smb: do not leak pbsd resolvers · 1eacae52
      Harald Sitter authored
      Summary:
      parent them to the discoverer. discoverer lives on the stack and is unwound
      once discovery is complete (or the eventloop timeout hit)
      
      Test Plan: made a dtor that qdebugged, dtor is now executed as expected
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27901
      1eacae52
    • Harald Sitter's avatar
      smb: fix ipv6 support · bb83a071
      Harald Sitter authored
      Summary:
      libsmbc doesn't presently support smb://[ABCD::DCBA]/ uris because it
      has very opinionated colon parsing. as a workaround we convert hosts
      that are ipv6 addresses to their windows ipv6 literal representation.
      that is basically s/:/-/g and s/%/s/g and appending .ipv6-literal.net.
      
      BUG: 417682
      FIXED-IN: 20.04
      
      Test Plan: builds, test passes, `'smb://[::1]/foo'` works as expected
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: cfeck, thiago, kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27802
      bb83a071
    • Harald Sitter's avatar
      smb: add a unit test for smburl · d8d92670
      Harald Sitter authored
      Summary:
      only tests some of the obvious scenarios I can see right now.
      
      ::cd() has been changed to only support going up one path element. it's
      all we need it for and the previous code was almost certainly incorrect
      by calling setUrl with input that is definitely not anywhere near a valid
      url
      
      Test Plan: builds and test passes
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: apol, kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27801
      d8d92670
    • Harald Sitter's avatar
      smb: split module into two targets of which one is a static lib · d101d916
      Harald Sitter authored
      Summary:
      this allows us to use the intermediate static target for unit testing
      (which we'll want for smburl at the very least).
      the effective output remains unchanged, we simply have a fake library
      now before we turn it into a proper plugin .so.
      
      kdemain as a result was moved to its own file and only gets built into the
      final plugin but not the static library as it'd not have any use there
      anyway
      
      Test Plan: builds and works still
      
      Reviewers: ngraham, apol
      
      Reviewed By: apol
      
      Subscribers: apol, kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27800
      d101d916
    • Harald Sitter's avatar
      sftp: fix free space query for urls with empty path · 5cfd852a
      Harald Sitter authored
      Summary:
      e.g. `sftp://localhost` has an empty path
      
      fall back to assume it means '/'
      
      Test Plan: free space correctly listed on sftp://localhost
      
      Reviewers: ngraham, meven
      
      Reviewed By: meven
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27835
      5cfd852a
    • Harald Sitter's avatar
  5. 05 Mar, 2020 1 commit
  6. 04 Mar, 2020 1 commit
  7. 03 Mar, 2020 8 commits
  8. 29 Feb, 2020 1 commit
  9. 26 Feb, 2020 4 commits
    • Harald Sitter's avatar
      sftp: port to Result system to force serialization of error/finish condition · 74850eb2
      Harald Sitter authored
      Summary:
      the Result system was originally introduced to the FTP slave and now also
      makes an appearance in the SFTP slave. the system introduces a separation
      between logic and fronting API class to more tightly control when state
      changing calls (finished()/error()) are made. since these calls may only
      be made once during a given command multiple calls are at the very least
      indicative of bad code and at worst cause severe state confusion for the
      slavebase that it won't be able to recover from, rendering the slave
      instance broken.
      
      in the internal class Results are returned whenever an error can appear and
      these Results must be handled in some form. the only way to effectively
      produce user visible errors is to forward results up the call chain.
      
      Test Plan:
      - connect
      - copy remotely
      - overwrite remotely
      - copy to local
      - overwrite to local
      - copy from local to remote
      - copy form local to remote and overwrite
      
      Reviewers: dfaure, feverfew
      
      Reviewed By: dfaure, feverfew
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27153
      74850eb2
    • Harald Sitter's avatar
      smb: apply a whole bunch of static analyzer improvements · 70f2dc85
      Harald Sitter authored
      Summary:
      among other things:
      
      - {} initialize the posix structs
      - =default d/ctors where appropriate
      - synced argument names between header and cpp
      - no c-style casting
      - while(true) instead of while(1)
      - initialize class members that could previously have gone uninitialized
      - no single-line-multi-variable declaration
      
      Test Plan: builds
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27646
      70f2dc85
    • Harald Sitter's avatar
      smb: throw out the windows variant of the slave · 60c9ac5a
      Harald Sitter authored
      Summary:
      it hasn't been built in ages because the top level cmakelists actually only
      adds the smb dir when samba is found (which would be never I guess?).
      it is also continuously ignored when sweeping changes are made (such as
      the move to json plugin metadata or the debug category change).
      
      overall it is entirely useless as native UNC path handling seems to work
      just fine these days in for example okular and kate. so, I very much
      believe that bespoke smb handling is entirely moot on windows (as it
      should be, really)
      
      Test Plan: okular and kate still open remote UNC paths without it on windows
      
      Reviewers: ngraham, #windows, vonreth
      
      Reviewed By: ngraham, #windows, vonreth
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27647
      60c9ac5a
    • Harald Sitter's avatar
      smb: do not hide enum warnings via switch default label · d0e16b83
      Harald Sitter authored
      Summary:
      should we ever extend the url types the compiler will not warn us that
      the new type may need handling. instead return when we have handled
      a type so the fallback can be moved after the switch
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27644
      d0e16b83
  10. 24 Feb, 2020 1 commit
    • Harald Sitter's avatar
      add initial wsdiscovery support · 41397521
      Harald Sitter authored
      Summary:
      needs kdsoap >= 1.8.50 (current master).
      builds a static variant of kdsoap-ws-discovery-client but can also
      use system's version if available.
      
      also reinvents how discovery works:
      there are now Discoverers for dnssd and wsd that get started/stopped.
      the Discoverers discover servers and emit them as Discoveries. Discoveries
      are then converted to udsentries for kio.
      
      BUG: 392447
      FIXED-IN: 20.04.0
      
      Test Plan:
      discover all the things!
      
      - windows 10 test vm with remote address
      - https://github.com/christgau/wsdd on remote host
      - avahi smb on remote host
      
      Reviewers: dfaure, #frameworks, #dolphin, ngraham
      
      Reviewed By: dfaure, ngraham
      
      Subscribers: meven, schmeisser, bcooksley, ngraham, caspermeijn, davidedmundson, kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D25682
      41397521
  11. 14 Feb, 2020 7 commits
    • Harald Sitter's avatar
      smb: map EHOSTUNREACH to ERR_CANNOT_CONNECT · a813d67c
      Harald Sitter authored
      Summary:
      same as the ftp does. in fact, also steal the error message qtcpsocket
      produces. effectively this makes smb://unavailableipaddress spit out
      exactly the same error as ftp://unavailableipaddress
      
      host unreachable being so vague, the pretty string continues to be vague
      as well unfortunately.
      
      BUG: 417166
      FIXED-IN: 20.08.0
      
      Test Plan: error upon accessing the unassigned address 192.168.1.99 is same between smb and ftp
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27378
      a813d67c
    • Harald Sitter's avatar
      smb: fix horrendous indentation in auth.cpp · 233f30dc
      Harald Sitter authored
      it was all over the place.
      also reduce nesting in auth_initialize_smbc by returning early if already
      init'd. also happens to reduce the debug spam on noop calls
      233f30dc
    • Harald Sitter's avatar
      Merge branch 'release/19.12' · 101c8781
      Harald Sitter authored
      # Conflicts:
      #	smb/kio_smb_auth.cpp
      101c8781
    • Harald Sitter's avatar
      smb: enable anonymous and domain extra field in authinfo · 9d52cd9c
      Harald Sitter authored
      Summary:
      this causes kiod to query the password with the relevant functionality
      enabled. domain additionally defaults to whatever smbc_getWorkgroup returns
      
      BUG: 327484
      FIXED-IN: 19.12.3
      
      Test Plan:
      - builds
      - auth query has new functionality
      - logging in still works as expected
      
      I couldn't actually get the original problem in 327484 to appear with a samba DC I threw together, so for all I know this doesn't actually fix the bug but I have no way to test :|
      
      Reviewers: ngraham, dfaure
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27320
      9d52cd9c
    • Harald Sitter's avatar
      smb: disable mode bits getting forwarded to KIO · 718abcb6
      Harald Sitter authored
      Summary:
      mode bits in libsmb_stat are fairly cheaply constructed. file and directory
      qualification is alright, beyond that it is a bit of a shambles.
      specifically +W is set iff the DOS attribute READONLY isn't set, but
      that attribute doesn't mean what we think it means, at least not on
      NT+ systems. see exhaustive comment.
      
      long story short: we cannot represent mode bits accurately because NT's
      access controls simply do not map to posix mode bits. therefore I'm
      removing the mode setting for the udsentry, making all entries effectively
      writable.
      
      whether an entry truly is writable is hard to say anyway. specifically
      because SMB+NTFS have independent ACLs. so, the SMB ACL may allow a
      given user or group to do something, that doesn't mean they'll also
      have permissions on a file system level.
      
      BUG: 414482
      FIXED-IN: 19.12.3
      
      Test Plan:
      previously not writable shares as described in the bug report are now writable.
      permission dialog looks a bit meh now, it wasn't really designed around not knowing
      what the access situation is. gnome simply shows a "dunno what permissions we have" label
      instead of everything, that seems like a reasonable approach
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: dfaure, kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27372
      718abcb6
    • Harald Sitter's avatar
      smb: map ECONNABORTED to ERR_CONNECTION_BROKEN · 2075e763
      Harald Sitter authored
      Summary:
      seems the most reasonable candidate given the pretty strings in
      KIO::buildErrorString and the detailed causes in the detail function.
      
      this does not really improve the error message, but should dolphin
      ever learn to pick up details from detailedErrorStrings it would make
      diagnosing easier.
      
      ECONNABORTED can mean any number of things, so I guess a signle line
      error will always be incredibly vague.
      
      BUG: 415436
      FIXED-IN: 19.12.3
      
      Test Plan: hoping for the best!
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27377
      2075e763
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 58ce1a91
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      58ce1a91
  12. 13 Feb, 2020 7 commits
    • Harald Sitter's avatar
      Merge branch 'release/19.12' · 70ce3fc3
      Harald Sitter authored
      # Conflicts:
      #	CMakeLists.txt
      #	smb/kio_smb_browse.cpp
      #	smb/kio_smb_dir.cpp
      #	smb/smb.protocol.cmake
      70ce3fc3
    • Harald Sitter's avatar
      smb: install smb as both smb:// and cifs:// · a5f51238
      Harald Sitter authored
      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
      BUG: 327295
      
      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
      a5f51238
    • Harald Sitter's avatar
      smb: set the share comment as UDS_COMMENT for the UI to display · dddafae5
      Harald Sitter authored
      Summary:
      currently this seems to not really have any visibility through dolphin
      so concluding the fix also requires changes to dolphin to enable the
      comment somewhere. it is technically a column in the details view but
      that doesn't actually seem to work
      
      CCBUG: 105086
      
      Test Plan: hoping for the best in absence of a UI!
      
      Reviewers: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27292
      dddafae5
    • Harald Sitter's avatar
      smb: do not map uid and gid · 25a02064
      Harald Sitter authored
      Summary:
      libsmbc returns the uid/gid of the process, not of the file, the data
      is entirely useless to us. do not list it.
      currently there is no way to get the actual uid/gid of a dirent. internally
      there seems to be tech available that uses the samba unix extension but
      that doesn't have any public API.
      
      in short: we can't determine ownership client-side
      
      BUG: 212801
      
      Test Plan: no longer shows current user as owner. in particular when that is not true!
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27293
      25a02064
    • Harald Sitter's avatar
      smb: fix free space calculation · 6832817f
      Harald Sitter authored
      Summary:
      - collapse statvfs call, there's no purpose in manually opening the file
        when libsmbc has a convenience wrapper that does exactly what we need
        with less code on our end
      - blockSize is now calculated as per the conditional branches in
        smbc_stat.c
      - free space calculation is now backwards compatible with slightly busted
        legacy versions of libsmbc not setting f_bavail
      
      FIXED-IN: 19.12.3
      BUG: 298801
      
      Test Plan: free space calculation now works with windows10, ubuntu18.04, ubuntu19.10
      
      Reviewers: ngraham, meven
      
      Reviewed By: ngraham, meven
      
      Subscribers: meven, kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27294
      6832817f
    • Harald Sitter's avatar
      smb: support more advanced hidden file flag · e2eadb75
      Harald Sitter authored
      Summary:
      smb attaches different meaning to the +x flags of files to represent DOS
      style flags. read them and hide hidden files. we currently have no
      KIO backing for the others but for documentation purpose I've mentioned
      them in detail so we can extend this in the future without having
      to descend into samba docs.
      
      FIXED-IN: 19.12.3
      BUG: 307353
      
      Test Plan:
      - set jpgs hidden as described in bug report
      - they are now hidden in dolphin
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27295
      e2eadb75
    • Harald Sitter's avatar
      smb: call smb_cutime on the correct url to actually set mtime properly · aaedd983
      Harald Sitter authored
      Summary:
      since the introduction of partial resume dstUrl would can be the .part url
      whereas dstOrigUrl is the final destination url.
      
      i.e.
      we called smbc_utime on smb://foo/bar.part rather than smb://foo/bar
      
      BUG: 356651
      FIXED-IN: 19.12.3
      
      Test Plan: moving file to smb retains mtime
      
      Reviewers: ngraham
      
      Reviewed By: ngraham
      
      Subscribers: kde-frameworks-devel, kfm-devel
      
      Tags: #dolphin, #frameworks
      
      Differential Revision: https://phabricator.kde.org/D27351
      aaedd983