Mercurial > dropbear
diff cli-auth.c @ 1821:df8d8ec1801c
added option to disable trivial auth methods (#128)
* added option to disable trivial auth methods
* rename argument to match with other ssh clients
* fixed trivial auth detection for pubkeys
author | Manfred Kaiser <37737811+manfred-kaiser@users.noreply.github.com> |
---|---|
date | Thu, 19 Aug 2021 17:37:14 +0200 |
parents | bf1912d2d6e9 |
children | d512da7b1198 |
line wrap: on
line diff
--- a/cli-auth.c Thu Aug 19 23:17:34 2021 +0800 +++ b/cli-auth.c Thu Aug 19 17:37:14 2021 +0200 @@ -261,6 +261,9 @@ if DROPBEAR_CLI_IMMEDIATE_AUTH is set */ TRACE(("received msg_userauth_success")) + if (cli_opts.disable_trivial_auth && cli_ses.is_trivial_auth) { + dropbear_exit("trivial authentication not allowed"); + } /* Note: in delayed-zlib mode, setting authdone here * will enable compression in the transport layer */ ses.authstate.authdone = 1;