summaryrefslogtreecommitdiffstats
path: root/tdeioslave
Commit message (Collapse)AuthorAgeFilesLines
* Don't stat files twice when sending to trashmio2024-10-281-4/+11
| | | | | | | | | TQDir::entryInfoList will call some variation of stat on each file when creating the return list, so there is no need to stat the file again. See: TDE/tdebase#445 Signed-off-by: mio <stigma@disroot.org> (cherry picked from commit 425bcff801905548dbee6ad2b8c053551f7c06d9)
* Remote protocol: add UDS_LOCAL_PATH atom to remote foldersMavridis Philippe2024-08-011-1/+4
| | | | | | | | | This change makes it possible for network folders in Remote Places to be moved to and restored from the Trash folder. Before this change, such folders could only be removed via deletion (shift+delete) and could not be restored afterwards. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> (cherry picked from commit e6fc9bed16c981e42418340772b984ba8a02114b)
* Replace kdemacros.h with tdemacros.hMichele Calgaro2024-07-012-2/+2
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 8fca33b35b68d1deef3677ae5e50927bd7a5c78d)
* Adds thumbnail generation for WebP imagesAlex Kent Hajnal2024-05-191-1/+1
| | | | | | | This resolves issue #380 Signed-off-by: Alex Kent Hajnal <software@alephnull.net> (cherry picked from commit 50c75e9adaa8be09c366a1d3d5c1d9e1988faa5c)
* Replace KDE_DEPRECATED with TDE_DEPRECATEDMichele Calgaro2024-05-151-1/+1
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 1759a437e3254dc033d902a364b74e6280a42b42)
* Replace KDE_[NO_]EXPORT with TDE_[NO_]EXPORTMichele Calgaro2024-05-0538-38/+38
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 026828840f8255b5c4fde83ea95209f6f1f5ef8f)
* tdeioslave/sftp: make source c++11-compatibleAlexander Golubev2024-03-041-6/+9
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 0e615e5c9090c5a0477865db0e687849a04aa5a2)
* tdeioslave/sftp: get rid of goto in openConnection()Alexander Golubev2024-03-041-118/+119
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 3a4538b4c3da7432407ccab20a9336663f3a1ed8)
* tdeioslave/sftp: use unsigned to store auth method flags/bitsetsAlexander Golubev2024-03-042-11/+11
| | | | | | | | The libssh defines those flags as unsigned. Technically ssh_auth_list() still returns int, but its guranteed to be bitset of those flags. Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 5b9585e42977f46639dc3784352e9c4be4cd9cac)
* tdeioslave/sftp: better erros for unsupported auth methodsAlexander Golubev2024-03-042-21/+44
| | | | | | | | | | | Also: - do not translate auth methods names as the names appear in config files verbatim - libssh actually doesn't supports hostbased auth, so exclude it from bitset of supported Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 1597d5f3848cdb39b7d458f0c6c33ecdfc3125d5)
* tdeioslave/sftp: better cancelation handling in case of several publickeysAlexander Golubev2024-03-042-7/+13
| | | | | | | | Consider publickey auth canceled only if user canceled it for each of the prompted keys. Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 4b4b72db8f880027a85cb95a1510cefd5522d245)
* tdeioslave/sftp: save/restore seqNr for multi-factor authAlexander Golubev2024-03-042-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the server is set up for multi-factor authentication we could be have to query several things from the user like password, a key passphrase, their mother's maiden name etc. It doesn't make a big difference during an initial connection, but it butchers the reconnection process: it can retrieve the answer of the user to the first question (e.g. their password), but it fails to retrieve the second one (e.g. the key passphrase). So the user would be forced to reenter the answer for the second question upon each reconnection. The reason for this is the passwdserver's desig (see DESIGN [1]): Each query for AuthInfo with the openPassDlg() has an secNr number associated with it. If it's smaller than the one of the one stored for the privious request, than the one from the cache will be returned automagically, if it's bigger the dialog will be prompted to the user. Each call to openPassDlg() advances s_seqNr to the last value reported by the passwdserver. So the first call will return the cached value and subsequent calls will actually display the dialog to the user (assuming authentication with the cached data failed). But in case of multi-factor auth we have to query user for several independent values. And we want to try to retrieve each one of those from the cache. So we have to get a bit hacky and manually manipulate the SlaveBase::s_seqNr value. [1]: https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/src/branch/master/tdeio/kpasswdserver/DESIGN Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 95b18e63382c4f0013c4eb2473d04f6020a84b7a)
* tdeioslave/sftp: imbue error messages with errors from libsshAlexander Golubev2024-03-042-15/+28
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 4d88b3edddc46ab56e773c4c73cd29b3292b3181)
* tdeioslave/sftp: cache passwords in case they were passed to setHost()Alexander Golubev2024-03-041-7/+23
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit ee73349644fdf2a3a2ac122d7f930f84b00bcdba)
* tdeioslave/sftp: prevent infinite looping in kb-interactive authAlexander Golubev2024-03-041-0/+12
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit f8f0b8815ca821ad6764149a915122f8b2f0bf8b)
* tdeioslave/sftp: purge password in the destructorAlexander Golubev2024-03-041-0/+2
| | | | | | | | This could be useful in case the destructor will be called before openConnection() Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 21ce69f338efb0636e9eef0e7405825b5dd7c0b0)
* tdeioslave/sftp: enable changing user during kb-interactive authAlexander Golubev2024-03-041-3/+15
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 009382772da4cb5a56749ea67ed29c09658a4f69)
* tdeioslave/sftp: pass correct username to openPassDlg()Alexander Golubev2024-03-042-12/+30
| | | | | | | | | | | | | We should always pass to the openPassDlg() exactly the same username otherwise it may result in incorrect caching of passwords especially in case if the username is changed by the user. Also don't allow username change in case it was passed to setHost() (i.e. it was specified in the URL like e.g. sftp://username@host/). In such a case after changing it'd be impossible to properly cache it. Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 581d266ae6f085317b4247b2d1ddbc12c8fa09fb)
* tdeioslave/sftp: even bigger authentication overhaulAlexander Golubev2024-03-042-162/+326
| | | | | | | | | | - Move authentication methods into separate functions so it would be easier to correctly handle error after those and select which should be called in which order. - A lot of minor improvements along the way Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 2756ae762fefc3fe86463174866674a987856d89)
* tdeioslave/sftp: use realmValue to distinguish different promptsAlexander Golubev2024-03-042-24/+20
| | | | | | | | | | | This will help kpasswdserver not to confuse different user's answers to different questions. Also avoid passing/returning TDE::AuthInfo for kb-interactive auth as it isn't really necessary when we don't manually caching passwords anymore. Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit d316ff14bdcc6c7e402276cba2a15c1ac8bb5278)
* tdeioslave/sftp: avoid explicit password cachingAlexander Golubev2024-03-042-16/+5
| | | | | | | | All password caching we need actually already autmagically done by openPassDlg(). Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit a19610bb735faf89fcd27c6885bf81e53c9b2d7a)
* tdeioslave/sftp: use a scope guards to close connectionAlexander Golubev2024-03-041-17/+14
| | | | | | | | | There were a couple of missing closeConnection() calls after connection errors. The probably haven't caused any major bugs, but use scope guards to be on the safe side. Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 9c0a0ce976549c1849eecb497be2d8bdf49d7aa5)
* tdeioslave/sftp: split off connection init to a dedicated functionAlexander Golubev2024-03-042-61/+75
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 75349be43e1b4ced52502f98316148a7b55c1352)
* tdeioslave/sftp: use free to destroy mCallbacksAlexander Golubev2024-03-041-1/+1
| | | | | | | As it allocated via malloc() rather than new. Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 688544193fb40241435b07f83135d91ad708c6df)
* tdeioslave/sftp: overhaul publickey authAlexander Golubev2024-03-042-78/+196
| | | | | | | | | | | | | | | | | Several enhancements to public key authentication and some other stuff: - Fix passphrase entry for encrypted keys (was either hanging up or segfaulting) - Use scope guard idiom for cleanup calls for more reliable cleanup in case of errors - Add normal prompt for public key's passphrase entry dialog - Correctly differentiate passphrase to password when cached (yes they are getting cached regardless of keepPassword, at least for some duration of time) - Centrilize AuthInfo initialization and some rejig of it kbd-interactive authentification Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit b91e2203891ce7ef627a241ea05c3f11180fcfc1)
* tdeioslave/sftp: fix keyboard-interactive authenticationAlexander Golubev2024-03-041-43/+85
| | | | | | | | | This is a partial fix to the sftp ioslave. Subsequent commits will fix other issues. Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/443 Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit a1fa8a79bbd7f6385d312cce709768944506d960)
* Replace Q_WS_* defines with TQ_WS_* equivalentsMichele Calgaro2024-02-141-2/+2
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 2d7d2122cf33aa713cebef95981305039c798003)
* Replace Q_SIGNALS and Q_SLOTSMichele Calgaro2024-02-041-4/+4
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 0d9263f836b892b03742c494bd236d57b63ebb19)
* Replace auto_ptrMichele Calgaro2024-01-231-3/+2
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 4484e51ca69d3080fac8692a7a203c49dc47ab1e)
* Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT definesMichele Calgaro2024-01-1635-191/+191
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit a4241b7911d2e0b36edfb02f616b8b282050c0ec)
* Replace various '#define' strings - part 6Michele Calgaro2023-12-261-1/+1
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit c4a6487c827add9382001ff1892b8fb3bfa94682)
* Make dependency upon libssh optionalAlexander Golubev2023-12-251-1/+1
| | | | | Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit f2dbf5b9035e9a4861b7d0ad348f4f86c4caba03)
* Replaced various '#define' with actual strings - part 4Michele Calgaro2023-11-261-1/+1
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 82c1dbe490f7afcb5b48fdfb8748bde249bcf4f7)
* Replaced various '#define' with actual strings - part 3Michele Calgaro2023-11-251-1/+1
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 36f2e08fd382c7042fbd3c8e7708f3ba1b9c9bd7)
* Replace Qt with TQtMichele Calgaro2023-11-146-8/+8
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit b965cbac5b21345e9dfc768a7e4f660ffa4aa72f)
* Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, ↵Michele Calgaro2023-09-258-9/+9
| | | | | | | QIODevice with TQ* version Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 33c7d159890b81da8f44ee330a349e3abd553bec)
* Replace various Q_* and QT_* defines with TQ_* and TQT_*Michele Calgaro2023-09-071-4/+4
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 75a74bedaee5c942c8d3cf8d353b33f10cf460b2)
* Drop USE_TQT4 codeMichele Calgaro2023-08-312-5/+3
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 014f6d2586905e03681aa6fb9a85c2c8190e53f4)
* Drop TQT_TQ*_OBJECT definesMichele Calgaro2023-08-081-1/+1
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 7bc43c68b3c095631628e1fb691242315687d15b)
* Replace Q_OBJECT with TQ_OBJECTMichele Calgaro2023-07-2039-41/+41
| | | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 814bf5fc4f403c13b0d8274c7f13fbef183c5c84)
* Replace _OBJECT_NAME_STRING defines with actual strings. This relates to the ↵Michele Calgaro2023-07-131-1/+1
| | | | | | | merging of tqtinterface with tqt3. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 22625693f124aae09863f4d33e30b625a96c3557)
* SunOS specific patchesDenis Kozadaev2023-05-231-2/+6
| | | | | Signed-off-by: Denis Kozadaev <denis@dilos.org> (cherry picked from commit 4d58a4ea8daf1a3cb91b7d8c6e574dd6f5bdb685)
* hwmanager: use alphabetically sorted menus in tdehwdevicetray.Michele Calgaro2023-03-131-0/+1
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* tdeioslave mediamanager: show the device node in the label also for ↵Michele Calgaro2023-03-121-3/+3
| | | | | | removable drives and CD/DVD disks. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* SFTP: compatibility with older libssh versionsMavridis Philippe2022-07-152-6/+40
| | | | | Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
* SFTP: Various fixes and improvementsMavridis Philippe2022-07-155-92/+154
| | | | | | | | | | | For details see PR #279. Portions of code borrowed from KDE5 SFTP ioslave: Source: https://invent.kde.org/network/kio-extras/-/blob/master/sftp/kio_sftp.cpp Licence: LGPLv2 or later Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
* Replaced old sftp ioslave with backported versionMavridis Philippe2022-07-1520-5431/+1518
| | | | | | | | | Source: https://github.com/sandsmark/kde2-kio-sftp-kde4 Licence: GPLv2 or later This resolves issue #276. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
* FISH: Security fix backport from KDEMavridis Philippe2022-06-271-1/+3
| | | | | | | | | | | | "Only store password in KWallet if the user asked for it" https://invent.kde.org/network/kio-extras/-/commit/d813cef3cecdec9af1532a40d677a203ff979145 Author: David Faure Licence: GPLv2 This mitigates CVE-2020-12755. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
* tdeio-man: add TDE specific man folder to the list of the search paths.Michele Calgaro2022-05-131-0/+1
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
* Add 'safeRemove' and 'safeRemoveByNode' to mediamanager DCOP interface.Michele Calgaro2022-03-276-82/+56
| | | | Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>