Mercurial > dropbear
comparison auth.h @ 297:79bf1023cf11 agent-client
propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712)
to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 01038174ec27245b51bd43a66c01ad930880f67b)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 21 Mar 2006 16:20:59 +0000 |
parents | ca7e76d981d9 475a818dd6e7 |
children | c1e9c81d1d27 |
comparison
equal
deleted
inserted
replaced
225:ca7e76d981d9 | 297:79bf1023cf11 |
---|---|
39 void svr_auth_pam(); | 39 void svr_auth_pam(); |
40 | 40 |
41 /* Client functions */ | 41 /* Client functions */ |
42 void recv_msg_userauth_failure(); | 42 void recv_msg_userauth_failure(); |
43 void recv_msg_userauth_success(); | 43 void recv_msg_userauth_success(); |
44 void recv_msg_userauth_specific_60(); | |
44 void recv_msg_userauth_pk_ok(); | 45 void recv_msg_userauth_pk_ok(); |
46 void recv_msg_userauth_info_request(); | |
45 void cli_get_user(); | 47 void cli_get_user(); |
46 void cli_auth_getmethods(); | 48 void cli_auth_getmethods(); |
47 void cli_auth_try(); | 49 void cli_auth_try(); |
48 void recv_msg_userauth_banner(); | 50 void recv_msg_userauth_banner(); |
49 void cli_pubkeyfail(); | 51 void cli_pubkeyfail(); |
50 int cli_auth_password(); | 52 void cli_auth_password(); |
51 int cli_auth_pubkey(); | 53 int cli_auth_pubkey(); |
54 void cli_auth_interactive(); | |
55 char* getpass_or_cancel(); | |
52 | 56 |
53 | 57 |
54 #define MAX_USERNAME_LEN 25 /* arbitrary for the moment */ | 58 #define MAX_USERNAME_LEN 25 /* arbitrary for the moment */ |
55 | 59 |
56 #define AUTH_TYPE_PUBKEY 1 << 0 | 60 #define AUTH_TYPE_NONE 1 |
57 #define AUTH_TYPE_PASSWORD 1 << 1 | 61 #define AUTH_TYPE_PUBKEY 1 << 1 |
62 #define AUTH_TYPE_PASSWORD 1 << 2 | |
63 #define AUTH_TYPE_INTERACT 1 << 3 | |
58 | 64 |
59 /* auth types, "none" means we should return list of acceptable types */ | 65 #define AUTH_METHOD_NONE "none" |
60 #define AUTH_METHOD_NONE "none" | |
61 #define AUTH_METHOD_NONE_LEN 4 | 66 #define AUTH_METHOD_NONE_LEN 4 |
62 #define AUTH_METHOD_PUBKEY "publickey" | 67 #define AUTH_METHOD_PUBKEY "publickey" |
63 #define AUTH_METHOD_PUBKEY_LEN 9 | 68 #define AUTH_METHOD_PUBKEY_LEN 9 |
64 #define AUTH_METHOD_PASSWORD "password" | 69 #define AUTH_METHOD_PASSWORD "password" |
65 #define AUTH_METHOD_PASSWORD_LEN 8 | 70 #define AUTH_METHOD_PASSWORD_LEN 8 |
71 #define AUTH_METHOD_INTERACT "keyboard-interactive" | |
72 #define AUTH_METHOD_INTERACT_LEN 20 | |
73 | |
74 | |
66 | 75 |
67 /* This structure is shared between server and client - it contains | 76 /* This structure is shared between server and client - it contains |
68 * relatively little extraneous bits when used for the client rather than the | 77 * relatively little extraneous bits when used for the client rather than the |
69 * server */ | 78 * server */ |
70 struct AuthState { | 79 struct AuthState { |
75 valid */ | 84 valid */ |
76 unsigned int failcount; /* Number of (failed) authentication attempts.*/ | 85 unsigned int failcount; /* Number of (failed) authentication attempts.*/ |
77 unsigned authdone : 1; /* 0 if we haven't authed, 1 if we have. Applies for | 86 unsigned authdone : 1; /* 0 if we haven't authed, 1 if we have. Applies for |
78 client and server (though has differing [obvious] | 87 client and server (though has differing [obvious] |
79 meanings). */ | 88 meanings). */ |
89 unsigned perm_warn : 1; /* Server only, set if bad permissions on | |
90 ~/.ssh/authorized_keys have already been | |
91 logged. */ | |
80 | 92 |
81 /* These are only used for the server */ | 93 /* These are only used for the server */ |
82 char *printableuser; /* stripped of control chars, used for logs etc */ | 94 char *printableuser; /* stripped of control chars, used for logs etc */ |
83 struct passwd * pw; | 95 struct passwd * pw; |
84 | 96 |