Commit Graph

3343 Commits (1afb78e598cc0d8c320e98c963cb98ab7935435f)
 

Author SHA1 Message Date
Alexander Golubev 95b18e6338 tdeioslave/sftp: save/restore seqNr for multi-factor auth
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>
12 months ago
Alexander Golubev 4d88b3eddd tdeioslave/sftp: imbue error messages with errors from libssh
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev ee73349644 tdeioslave/sftp: cache passwords in case they were passed to setHost()
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev f8f0b8815c tdeioslave/sftp: prevent infinite looping in kb-interactive auth
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 21ce69f338 tdeioslave/sftp: purge password in the destructor
This could be useful in case the destructor will be called before
openConnection()

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 009382772d tdeioslave/sftp: enable changing user during kb-interactive auth
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 581d266ae6 tdeioslave/sftp: pass correct username to openPassDlg()
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>
12 months ago
Alexander Golubev 2756ae762f tdeioslave/sftp: even bigger authentication overhaul
- 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>
12 months ago
Alexander Golubev d316ff14bd tdeioslave/sftp: use realmValue to distinguish different prompts
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>
12 months ago
Alexander Golubev a19610bb73 tdeioslave/sftp: avoid explicit password caching
All password caching we need actually already autmagically
done by openPassDlg().

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 9c0a0ce976 tdeioslave/sftp: use a scope guards to close connection
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>
12 months ago
Alexander Golubev 75349be43e tdeioslave/sftp: split off connection init to a dedicated function
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 688544193f tdeioslave/sftp: use free to destroy mCallbacks
As it allocated via malloc() rather than new.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev b91e220389 tdeioslave/sftp: overhaul publickey auth
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>
12 months ago
Alexander Golubev a1fa8a79bb tdeioslave/sftp: fix keyboard-interactive authentication
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>
12 months ago
Alexander Golubev a646f58853 kcontrol/smserver: rephrase fadeaway description
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 18a8b8d435 kxkb: utilize a translations provseided by xkeyboard-config
xkeyboard-config package comes with a message catalogue of its own to
translate locale, keyboard model and xkb option names. It would be
easier and more robust to utilize it instead of redoing all
translation in-house.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 1fea8982fd kxkb: add missing connect
Overvise apply button on the dialog won't be enablen when the option is
changed

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 0713c2b1c8 cmake: use pkg_get_variable() to query pkg-config variables
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev bf3ffaced3 kcontrol/input: fix incorrect statements whatsthis + some rewording
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
12 months ago
Alexander Golubev 214a743412 Translated using Weblate (Russian)
Currently translated at 100.0% (3 of 3 strings)

Translation: tdebase/kxkb - events
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/kxkb-events/ru/
12 months ago
Alexander Golubev f067db30d6 Translated using Weblate (Russian)
Currently translated at 100.0% (16 of 16 strings)

Translation: tdebase/ksplash - themes
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/ksplash-themes/ru/
12 months ago
Alexander Golubev 51e06d904a Translated using Weblate (Russian)
Currently translated at 100.0% (35 of 35 strings)

Translation: tdebase/wallpapers - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/wallpapers-desktop-files/ru/
12 months ago
Alexander Golubev ccb9a31c27 Translated using Weblate (Russian)
Currently translated at 100.0% (10 of 10 strings)

Translation: tdebase/twin clients - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/twin-clients-desktop-files/ru/
12 months ago
Alexander Golubev e3264169bf Translated using Weblate (Russian)
Currently translated at 100.0% (251 of 251 strings)

Translation: tdebase/l10n - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/l10n-desktop-files/ru/
12 months ago
Alexander Golubev de4f14d158 Translated using Weblate (Russian)
Currently translated at 100.0% (15 of 15 strings)

Translation: tdebase/tdeprint - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/tdeprint-desktop-files/ru/
12 months ago
Alexander Golubev 526d59e626 Translated using Weblate (Russian)
Currently translated at 100.0% (6 of 6 strings)

Translation: tdebase/kxkb - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/kxkb-desktop-files/ru/
12 months ago
Alexander Golubev 81b3891870 Translated using Weblate (Russian)
Currently translated at 61.8% (281 of 454 strings)

Translation: tdebase/kcontrol - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/kcontrol-desktop-files/ru/
12 months ago
Alexander Golubev 8214f3e0dd Translated using Weblate (Russian)
Currently translated at 100.0% (63 of 63 strings)

Translation: tdebase/konqueror - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/konqueror-desktop-files/ru/
12 months ago
Alexander Golubev 517f7bee6e Translated using Weblate (Russian)
Currently translated at 100.0% (71 of 71 strings)

Translation: tdebase/kicker - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/kicker-desktop-files/ru/
12 months ago
Alexander Golubev f1e7be5e53 Translated using Weblate (Russian)
Currently translated at 76.8% (266 of 346 strings)

Translation: tdebase/kappfinder - data
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/kappfinder-data/ru/
12 months ago
Alexander Golubev 55573505d5 Translated using Weblate (Russian)
Currently translated at 100.0% (63 of 63 strings)

Translation: tdebase/khotkeys - data
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/khotkeys-data/ru/
12 months ago
Alexander Golubev d582a3c553 Translated using Weblate (Russian)
Currently translated at 100.0% (40 of 40 strings)

Translation: tdebase/khelpcenter - desktop files
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/khelpcenter-desktop-files/ru/
12 months ago
Alexander Golubev c3b71a557f Translated using Weblate (Russian)
Currently translated at 100.0% (34 of 34 strings)

Translation: tdebase/color schemes
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/color-schemes/ru/
12 months ago
Alexander Golubev 2253217bee Translated using Weblate (Russian)
Currently translated at 100.0% (23 of 23 strings)

Translation: tdebase/drkonqi - presets
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/drkonqi-presets/ru/
12 months ago
Alexander Golubev 5f5e900038 Translated using Weblate (Russian)
Currently translated at 100.0% (15 of 15 strings)

Translation: tdebase/applnk - compat
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/applnk-compat/ru/
12 months ago
Alexander Golubev 361361b708 Added translation using Weblate (Russian) 1 year ago
Denis Kozadaev 220dec20f9 kcontrol-info-memory: use 64 bits variable to store memory size
Signed-off-by: Denis Kozadaev <denis@dilos.org>
1 year ago
Michele Calgaro dc9ec2711b
Simplify code since cmake minimum version is now 3.5
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Michele Calgaro 2d7d2122cf
Replace Q_WS_* defines with TQ_WS_* equivalents
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
TDE Gitea 55dd5ae822 Reset submodule main/core/tdebase/admin to latest HEAD 1 year ago
Alexander Golubev d0c145d5a3 kxkb: handle resetOld correctly in cases if all opions already set
Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/391

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
1 year ago
TDE Gitea 9c6929dc2c Reset submodule main/core/tdebase/admin to latest HEAD 1 year ago
Michele Calgaro 0d9263f836
Replace Q_SIGNALS and Q_SLOTS
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Michele Calgaro 4484e51ca6
Replace auto_ptr
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Michele Calgaro a4241b7911
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Michele Calgaro f9d06cee3d Translated using Weblate (Italian)
Currently translated at 100.0% (3 of 3 strings)

Translation: tdebase/kxkb - events
Translate-URL: https://mirror.git.trinitydesktop.org/weblate/projects/tdebase/kxkb-events/it/
1 year ago
Michele Calgaro a5b06864d3 Added translation using Weblate (Italian) 1 year ago
TDE Gitea 093c67a14a Reset submodule main/core/tdebase/admin to latest HEAD 1 year ago
Michele Calgaro 55af17246c
Remove usage of TDEDiskDeviceStatus::Hotpluggable
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago