Mercurial > dropbear
comparison auth.h @ 1739:13d834efc376 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 15 Oct 2020 19:55:15 +0800 |
parents | 8a485389330f |
children | bf1912d2d6e9 |
comparison
equal
deleted
inserted
replaced
1562:768ebf737aa0 | 1739:13d834efc376 |
---|---|
35 /* Server functions */ | 35 /* Server functions */ |
36 void recv_msg_userauth_request(void); | 36 void recv_msg_userauth_request(void); |
37 void send_msg_userauth_failure(int partial, int incrfail); | 37 void send_msg_userauth_failure(int partial, int incrfail); |
38 void send_msg_userauth_success(void); | 38 void send_msg_userauth_success(void); |
39 void send_msg_userauth_banner(const buffer *msg); | 39 void send_msg_userauth_banner(const buffer *msg); |
40 void svr_auth_password(void); | 40 void svr_auth_password(int valid_user); |
41 void svr_auth_pubkey(void); | 41 void svr_auth_pubkey(int valid_user); |
42 void svr_auth_pam(void); | 42 void svr_auth_pam(int valid_user); |
43 | 43 |
44 #if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT | 44 #if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT |
45 int svr_pubkey_allows_agentfwd(void); | 45 int svr_pubkey_allows_agentfwd(void); |
46 int svr_pubkey_allows_tcpfwd(void); | 46 int svr_pubkey_allows_tcpfwd(void); |
47 int svr_pubkey_allows_x11fwd(void); | 47 int svr_pubkey_allows_x11fwd(void); |
76 void cli_auth_interactive(void); | 76 void cli_auth_interactive(void); |
77 char* getpass_or_cancel(const char* prompt); | 77 char* getpass_or_cancel(const char* prompt); |
78 void cli_auth_pubkey_cleanup(void); | 78 void cli_auth_pubkey_cleanup(void); |
79 | 79 |
80 | 80 |
81 #define MAX_USERNAME_LEN 25 /* arbitrary for the moment */ | 81 #define MAX_USERNAME_LEN 100 /* arbitrary for the moment */ |
82 | 82 |
83 #define AUTH_TYPE_NONE 1 | 83 #define AUTH_TYPE_NONE 1 |
84 #define AUTH_TYPE_PUBKEY (1 << 1) | 84 #define AUTH_TYPE_PUBKEY (1 << 1) |
85 #define AUTH_TYPE_PASSWORD (1 << 2) | 85 #define AUTH_TYPE_PASSWORD (1 << 2) |
86 #define AUTH_TYPE_INTERACT (1 << 3) | 86 #define AUTH_TYPE_INTERACT (1 << 3) |
106 valid */ | 106 valid */ |
107 unsigned int failcount; /* Number of (failed) authentication attempts.*/ | 107 unsigned int failcount; /* Number of (failed) authentication attempts.*/ |
108 unsigned int authdone; /* 0 if we haven't authed, 1 if we have. Applies for | 108 unsigned int authdone; /* 0 if we haven't authed, 1 if we have. Applies for |
109 client and server (though has differing | 109 client and server (though has differing |
110 meanings). */ | 110 meanings). */ |
111 | |
111 unsigned int perm_warn; /* Server only, set if bad permissions on | 112 unsigned int perm_warn; /* Server only, set if bad permissions on |
112 ~/.ssh/authorized_keys have already been | 113 ~/.ssh/authorized_keys have already been |
113 logged. */ | 114 logged. */ |
114 unsigned int checkusername_failed; /* Server only, set if checkusername | 115 unsigned int checkusername_failed; /* Server only, set if checkusername |
115 has already failed */ | 116 has already failed */ |
117 struct timespec auth_starttime; /* Server only, time of receiving current | |
118 SSH_MSG_USERAUTH_REQUEST */ | |
116 | 119 |
117 /* These are only used for the server */ | 120 /* These are only used for the server */ |
118 uid_t pw_uid; | 121 uid_t pw_uid; |
119 gid_t pw_gid; | 122 gid_t pw_gid; |
120 char *pw_dir; | 123 char *pw_dir; |