summaryrefslogtreecommitdiffstats
path: root/tdeioslave/sftp/tdeio_sftp.h
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2024-01-30 00:44:29 +0300
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-03-04 23:34:45 +0900
commit11c1ec50470cc78f1ba88e01d11af61468432fbc (patch)
tree6cd6d61d49a5c1a45c1cc317406f350ad25be6b7 /tdeioslave/sftp/tdeio_sftp.h
parentc1a256a31fed9397f7754217c8e2d2149de45054 (diff)
downloadtdebase-11c1ec50470cc78f1ba88e01d11af61468432fbc.tar.gz
tdebase-11c1ec50470cc78f1ba88e01d11af61468432fbc.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> (cherry picked from commit 1597d5f3848cdb39b7d458f0c6c33ecdfc3125d5)
Diffstat (limited to 'tdeioslave/sftp/tdeio_sftp.h')
-rw-r--r--tdeioslave/sftp/tdeio_sftp.h8
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