Commit graph

64 commits

Author SHA1 Message Date
Albert Vaca Cintora
4f3a896833 Remove SSH flag to enable deprecated algorithms and keys
New OpenSSH versions don't ship them, causing an error:
 Bad key types '+ssh-dss,ssh-rsa'

We will add compatibility with newer keys on the Android side soon, as
part of this year's GSOC project.
2024-07-12 14:14:01 +00:00
Albert Vaca Cintora
7bbc8b0e7d Reformat sshfs arguments so they are easier to read 2023-08-24 18:21:42 +02:00
Albert Vaca Cintora
45615f8acf Cleanup signals and slots in SftpPlugin 2023-08-24 18:15:26 +02:00
Alexander Lohnau
e598a997e7 Use initializer list syntax where appropiate 2023-08-07 19:28:37 +02:00
Alexander Lohnau
2e67f95017 Add explicit moc includes to cpp files
The rationale is explained in https://planet.kde.org/friedrich-kossebau-2023-06-28-include-also-moc-files-of-headers/

In case of KDEConnect, it impressively speeds up compilation. Before it
took 390 seconds on a clean build and with this change it took 330 seconds.
This is due to the mocs_compilation having to include the header files
and thus all their headers. Due to the lots of small plugins we have,
this means that the same headers must be compiled plenty of times.
When we include the moc files directly in the C++ file, they are already
available.
2023-07-30 07:27:45 +00:00
Alexander Lohnau
1ee75463e0 Get rid of QOverload/static_cast for overloaded signals
By exclusing deprecated API in the KF5 build, the deprecated signal no
longer cause an ambiguity
2023-07-22 16:17:24 +02:00
Albert Vaca Cintora
204207f2e6 Fix ssh authentication using pubkey on recent openssh versions
BUG: 443155
2022-12-12 21:21:46 +01:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Albert Vaca Cintora
460eb70a81 Allow ssh-rsa when mounting sshfs
Fixes "Unable to negotiate with 192.168.0.10 port 1741: no matching host
key type found. Their offer: ssh-rsa"
2021-10-24 23:36:25 +02:00
Natsumi Higa
67a92451e4 Fix IPv6 address format 2021-04-13 16:51:33 +00:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Felix Yan
237975da35
Correct typos in sftp plugin 2020-08-06 19:51:31 +08:00
Antonio Larrosa
1d36164230 Use ecm_qt_declare_logging_category to declare the logging categories
This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.

Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
2020-05-26 18:55:47 +02:00
Nicolas Fella
39fe270cd1 Port Kdeconnectconfig to reference based singleton
It's more expressive in the sense that it makes clear that the user should not delete the object
2019-09-08 17:09:52 +02:00
Nicolas Fella
e601755644 Force usage of QStringLiteral and port remaining offenders 2019-06-10 14:40:28 +00:00
Nicolas Fella
b04dcde70e [sftp] Fix error message wording 2019-04-28 19:28:06 +00:00
Nicolas Fella
93ebcc99a9 Port to new connect syntax 2019-04-28 16:35:44 +02:00
Nicolas Fella
3fcb87e0ed [sftp] Improve error reporting 2019-04-25 18:53:09 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Nicolas Fella
b7768ca29f Add context object 2019-02-28 14:18:47 +01:00
Erik Duisters
273c9bb6e4 Handle errorMessage in kdeconnect.sftp packet 2019-01-22 18:42:00 +01:00
Mark Dominus
e409cdfdaa Spelling corrections in kde-connect sftp plugin
Reviewers: kdeconnect, nicolasfella

Reviewed By: nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15478
2018-09-13 16:56:00 +02:00
Albert Vaca
9bfa255a60 It's DSS we want to enable
My previous commit changed it to RSA by mistake
2018-09-04 14:40:42 +02:00
Albert Vaca
91d54b9db1 Also allow modern algorithms, for compat with future apps 2018-08-31 10:47:22 +02:00
Albert Vaca
171eb0b571 Added -o reconnect to sshfs
It has been reported to fix some errors
2018-04-09 18:30:14 +02:00
Albert Vaca
f47f517827 Rename NetworkPackage -> NetworkPacket
Summary: KDE Connect, now with correct naming!

Test Plan: It still builds.

Reviewers: #kde_connect, apol, nicolasfella

Reviewed By: #kde_connect, apol, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D11036
2018-03-05 20:03:23 +01:00
Aleix Pol
956d515fe9 Merge branch '1.x' 2017-09-18 20:02:53 +02:00
Tobias C. Berner
c93d83dfb2 Add support for the normal 'umount' porgram.
Summary: FreeBSD does not install fusermount, so we need to use 'umount'.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Differential Revision: https://phabricator.kde.org/D6945
2017-09-05 22:25:01 +02:00
Albert Vaca
7907f41cc0 Triggers a bug -> fixes a bug
lol
2017-07-26 00:10:10 +02:00
Albert Vaca
aec736fe56 Fix file corruption bug on SFTP plugin 2017-07-25 15:20:11 +02:00
Jean Vincent
25b86c6c7f Determine which IP address to use for sshfs
Summary:
There is currently an issue where the device doesn't send the correct IP address for sshfs when a VPN is present.

Instead of asking the device to find and send its address, we can store it from when the device link is created then reuse it.

Test Plan:
All unit tests pass.

In these different situations:
  - without a VPN
  - with a VPN running
  - with a VPN started then stopped (the tun interface might still be there)
Try to remotely browse the device. It should work in all cases.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, apol, nicolasfella, sredman

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6730
2017-07-22 11:18:06 +02:00
Albert Vaca
a5ff478896 Removed -o reconnect
As discussed in https://git.reviewboard.kde.org/r/130015/
2017-03-27 20:27:34 +02:00
Yuxuan Shui
9af480163d Add keep alive options to sshfs.
REVIEW: 130015
2017-03-15 19:48:37 +01:00
Yuxuan Shui
0b3f0acde5 Fix files under sshfs being owned by root.
This patch sets uid/gid to the user running kdeconnectd.
2017-03-15 17:39:38 +01:00
Yuxuan Shui
353f2053e3 Automatically reconnect sftp
BUG: 377040
2017-03-15 11:35:36 +01:00
Yuxuan Shui
f2925b7661 Fix SFTP unmount
REVIEW: 129993
2017-03-15 11:34:49 +01:00
Albert Vaca
7c4dbdad3c Use mulit-argument arg 2016-11-26 16:36:34 +01:00
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
Albert Vaca
a1340c8042 Fixed old style connects with clazy 2016-11-26 15:14:19 +01:00
Albert Vaca
e97107156b Ignore user config as it might cause our connection to fail
BUG: 369098
2016-09-20 11:32:50 +02:00
Albert Vaca
5933c6810c More unused includes cleanup 2016-07-05 14:27:53 +02:00
Aleix Pol
f9406e8afc Introduce QVariantMap as an argument of NetworkPackage
Makes it possible to specify the different properties sent at once,
rather than one by one as we used to do.

Also port whenever possible to the initializer-list syntax.

REVIEW: 128269
2016-06-21 20:07:12 +02:00
Albert Vaca
c89b032569 Merge branch 'master' into sslrefactor 2016-06-03 00:48:15 +02:00
Albert Vaca
73f5996f14 Consistent naming of _REQUEST package type macros 2016-06-03 00:47:03 +02:00
Albert Vaca
2f33fa0fc7 Hack to fix crash 2016-02-17 05:06:37 -08:00
Albert Vaca
a0deb776c1 Use passwords for sftp since Android doesn't have our pubkey anymore. 2016-02-17 04:51:28 -08:00
Albert Vaca
36e62891ca This syntax also works on older OpenSSH versions.
Like the one that Ubuntu distributes

BUG: 355015
2016-01-02 12:45:18 -08:00
Albert Vaca
30f00fb3fa Fix a crash where unmount was called again after m_proc had been destroyed
This happened because of scheduling m_proc->kill() from unmount 5 seconds
after the destructor was called (which was who called unmount first).

Simplified unmount logic a bit as well. Known bug: we might end with a fuse
mountpoint still mounted after killing the sshfs process.

BUG: 352861
2015-10-17 17:31:17 -07:00
Aleix Pol
d58f6314fe run Clang Modernize
Minus the auto change
2015-09-08 10:47:37 +02:00
Albert Vaca
bc3fb512d4 Fixed incompatibility with OpenSSH 7.0
BUG: 351725
2015-08-24 21:27:24 -07:00