diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-01-30 00:44:29 +0300 |
---|---|---|
committer | TDE Gitea <gitea@mirror.git.trinitydesktop.org> | 2024-03-04 11:04:11 +0000 |
commit | 1597d5f3848cdb39b7d458f0c6c33ecdfc3125d5 (patch) | |
tree | 9e4eedd7ba473317889c68139aa58cb57e7b7e07 /tdeioslave/sftp/tdeio_sftp.h | |
parent | 4b4b72db8f880027a85cb95a1510cefd5522d245 (diff) | |
download | tdebase-1597d5f3848cdb39b7d458f0c6c33ecdfc3125d5.tar.gz tdebase-1597d5f3848cdb39b7d458f0c6c33ecdfc3125d5.zip |
tdeioslave/sftp: better erros for unsupported auth methods
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>
Diffstat (limited to 'tdeioslave/sftp/tdeio_sftp.h')
-rw-r--r-- | tdeioslave/sftp/tdeio_sftp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tdeioslave/sftp/tdeio_sftp.h b/tdeioslave/sftp/tdeio_sftp.h index 54d4e8242..303014ead 100644 --- a/tdeioslave/sftp/tdeio_sftp.h +++ b/tdeioslave/sftp/tdeio_sftp.h @@ -201,13 +201,19 @@ public: /** libssh's flag for he method */ virtual int flag() = 0; /** The user-friendly (probably translated) name of the method */ - virtual TQString name() = 0; + virtual TQString name() {return flagToStr(flag());} /** Actually do perform the auth process */ virtual int authenticate(sftpProtocol *ioslave) const = 0; /** Creates a copy of derived class */ virtual SSHAuthMethod* clone() = 0; virtual ~SSHAuthMethod() {}; + + /** Returns a name for the given libssh auth method flag */ + static TQString flagToStr(int method); + + /** Returns a list of names for all the methods set in the given libssh auth method bitset */ + static TQStringList bitsetToStr(int method); }; #endif |