summaryrefslogtreecommitdiff
path: root/auth.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-03-21 16:20:59 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-03-21 16:20:59 +0000
commit8025a0b95530e4cb4c4c173497aa235d468ee61d (patch)
tree4d32de11b18d5f6296207961b5f25d0949af80c0 /auth.h
parentbfbe624301cb1dc0eef9dc00c235edb339e98082 (diff)
parent9ca5291d86458f30a2896ef004c982134fa13a89 (diff)
downloaddropbear-8025a0b95530e4cb4c4c173497aa235d468ee61d.tar.gz
propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712)
to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 01038174ec27245b51bd43a66c01ad930880f67b)
Diffstat (limited to 'auth.h')
-rw-r--r--auth.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/auth.h b/auth.h
index 2bfd428..580e5b6 100644
--- a/auth.h
+++ b/auth.h
@@ -41,28 +41,37 @@ 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();
+char* getpass_or_cancel();
#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
@@ -77,6 +86,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 */