diff options
Diffstat (limited to 'auth.h')
-rw-r--r-- | auth.h | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -24,17 +24,29 @@ | |||
24 | #ifndef AUTH_H | 24 | #ifndef AUTH_H |
25 | #define AUTH_H | 25 | #define AUTH_H |
26 | 26 | ||
27 | typedef struct Authctxt Authctxt; | ||
28 | struct Authctxt { | ||
29 | int success; | ||
30 | int valid; | ||
31 | int attempt; | ||
32 | char *user; | ||
33 | char *service; | ||
34 | struct passwd *pw; | ||
35 | }; | ||
36 | |||
27 | void do_authentication(void); | 37 | void do_authentication(void); |
28 | void do_authentication2(void); | 38 | void do_authentication2(void); |
29 | 39 | ||
30 | struct passwd * | 40 | void userauth_log(Authctxt *authctxt, int authenticated, char *method); |
31 | auth_get_user(void); | 41 | void userauth_reply(Authctxt *authctxt, int authenticated); |
42 | |||
43 | int auth2_skey(Authctxt *authctxt); | ||
32 | 44 | ||
33 | int allowed_user(struct passwd * pw); | 45 | int allowed_user(struct passwd * pw); |
46 | struct passwd * auth_get_user(void); | ||
34 | 47 | ||
35 | #define AUTH_FAIL_MAX 6 | 48 | #define AUTH_FAIL_MAX 6 |
36 | #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) | 49 | #define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) |
37 | #define AUTH_FAIL_MSG "Too many authentication failures for %.100s" | 50 | #define AUTH_FAIL_MSG "Too many authentication failures for %.100s" |
38 | 51 | ||
39 | #endif | 52 | #endif |
40 | |||