From 751acd62965a11f7480d9127c84030997b536a91 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Tue, 20 Sep 2005 08:59:46 +0000 Subject: Log when pubkey auth fails because of bad pubkey perms/ownership --- auth.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'auth.h') diff --git a/auth.h b/auth.h index 548e017..6d6ebc7 100644 --- a/auth.h +++ b/auth.h @@ -77,6 +77,9 @@ struct AuthState { unsigned authdone : 1; /* 0 if we haven't authed, 1 if we have. Applies for client and server (though has differing [obvious] meanings). */ + unsigned perm_warn : 1; /* Server only, set if bad permissions on + ~/.ssh/authorized_keys have already been + logged. */ /* These are only used for the server */ char *printableuser; /* stripped of control chars, used for logs etc */ -- cgit v1.2.1 From 2df50ab063fb07b72771b7fdeb2849f908188e45 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Tue, 20 Sep 2005 17:35:21 +0000 Subject: added keyboard-interactive client support --- auth.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'auth.h') diff --git a/auth.h b/auth.h index 6d6ebc7..7e83247 100644 --- a/auth.h +++ b/auth.h @@ -41,28 +41,36 @@ void svr_auth_pam(); /* Client functions */ void recv_msg_userauth_failure(); void recv_msg_userauth_success(); +void recv_msg_userauth_specific_60(); void recv_msg_userauth_pk_ok(); +void recv_msg_userauth_info_request(); void cli_get_user(); void cli_auth_getmethods(); void cli_auth_try(); void recv_msg_userauth_banner(); void cli_pubkeyfail(); -int cli_auth_password(); +void cli_auth_password(); int cli_auth_pubkey(); +void cli_auth_interactive(); #define MAX_USERNAME_LEN 25 /* arbitrary for the moment */ -#define AUTH_TYPE_PUBKEY 1 << 0 -#define AUTH_TYPE_PASSWORD 1 << 1 +#define AUTH_TYPE_NONE 1 +#define AUTH_TYPE_PUBKEY 1 << 1 +#define AUTH_TYPE_PASSWORD 1 << 2 +#define AUTH_TYPE_INTERACT 1 << 3 -/* auth types, "none" means we should return list of acceptable types */ -#define AUTH_METHOD_NONE "none" +#define AUTH_METHOD_NONE "none" #define AUTH_METHOD_NONE_LEN 4 #define AUTH_METHOD_PUBKEY "publickey" #define AUTH_METHOD_PUBKEY_LEN 9 #define AUTH_METHOD_PASSWORD "password" #define AUTH_METHOD_PASSWORD_LEN 8 +#define AUTH_METHOD_INTERACT "keyboard-interactive" +#define AUTH_METHOD_INTERACT_LEN 20 + + /* This structure is shared between server and client - it contains * relatively little extraneous bits when used for the client rather than the -- cgit v1.2.1 From 0a99145750994c66008be1d95bdc8690db926c05 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sun, 15 Jan 2006 06:43:24 +0000 Subject: Cancel a dbclient password prompt if the user presses ctrl-c. Enter still has to be pressed since glibc blocks ctrl-c in getpass() --- auth.h | 1 + 1 file changed, 1 insertion(+) (limited to 'auth.h') diff --git a/auth.h b/auth.h index 7e83247..c407ad5 100644 --- a/auth.h +++ b/auth.h @@ -52,6 +52,7 @@ void cli_pubkeyfail(); void cli_auth_password(); int cli_auth_pubkey(); void cli_auth_interactive(); +char* getpass_or_cancel(); #define MAX_USERNAME_LEN 25 /* arbitrary for the moment */ -- cgit v1.2.1