Mercurial > dropbear
comparison svr-authpam.c @ 594:a98a2138364a
Improve capitalisation for all logged strings
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 23 Feb 2011 15:50:30 +0000 |
parents | d3ea8b9672f0 |
children | a842469ce8ad |
comparison
equal
deleted
inserted
replaced
593:ea103e4476ce | 594:a98a2138364a |
---|---|
99 case PAM_PROMPT_ECHO_OFF: | 99 case PAM_PROMPT_ECHO_OFF: |
100 | 100 |
101 if (!(strcmp(compare_message, "password:") == 0)) { | 101 if (!(strcmp(compare_message, "password:") == 0)) { |
102 /* We don't recognise the prompt as asking for a password, | 102 /* We don't recognise the prompt as asking for a password, |
103 so can't handle it. Add more above as required for | 103 so can't handle it. Add more above as required for |
104 different pam modules/implementations */ | 104 different pam modules/implementations. If you need |
105 to add an entry here please mail the Dropbear developer */ | |
105 dropbear_log(LOG_NOTICE, "PAM unknown prompt '%s' (no echo)", | 106 dropbear_log(LOG_NOTICE, "PAM unknown prompt '%s' (no echo)", |
106 compare_message); | 107 compare_message); |
107 rc = PAM_CONV_ERR; | 108 rc = PAM_CONV_ERR; |
108 break; | 109 break; |
109 } | 110 } |
128 || (strcmp(compare_message, "please enter username:") == 0) | 129 || (strcmp(compare_message, "please enter username:") == 0) |
129 || (strcmp(compare_message, "username:") == 0) | 130 || (strcmp(compare_message, "username:") == 0) |
130 )) { | 131 )) { |
131 /* We don't recognise the prompt as asking for a username, | 132 /* We don't recognise the prompt as asking for a username, |
132 so can't handle it. Add more above as required for | 133 so can't handle it. Add more above as required for |
133 different pam modules/implementations */ | 134 different pam modules/implementations. If you need |
135 to add an entry here please mail the Dropbear developer */ | |
134 dropbear_log(LOG_NOTICE, "PAM unknown prompt '%s' (with echo)", | 136 dropbear_log(LOG_NOTICE, "PAM unknown prompt '%s' (with echo)", |
135 compare_message); | 137 compare_message); |
136 rc = PAM_CONV_ERR; | 138 rc = PAM_CONV_ERR; |
137 break; | 139 break; |
138 } | 140 } |
224 | 226 |
225 if ((rc = pam_authenticate(pamHandlep, 0)) != PAM_SUCCESS) { | 227 if ((rc = pam_authenticate(pamHandlep, 0)) != PAM_SUCCESS) { |
226 dropbear_log(LOG_WARNING, "pam_authenticate() failed, rc=%d, %s\n", | 228 dropbear_log(LOG_WARNING, "pam_authenticate() failed, rc=%d, %s\n", |
227 rc, pam_strerror(pamHandlep, rc)); | 229 rc, pam_strerror(pamHandlep, rc)); |
228 dropbear_log(LOG_WARNING, | 230 dropbear_log(LOG_WARNING, |
229 "bad PAM password attempt for '%s' from %s", | 231 "Bad PAM password attempt for '%s' from %s", |
230 ses.authstate.pw_name, | 232 ses.authstate.pw_name, |
231 svr_ses.addrstring); | 233 svr_ses.addrstring); |
232 send_msg_userauth_failure(0, 1); | 234 send_msg_userauth_failure(0, 1); |
233 goto cleanup; | 235 goto cleanup; |
234 } | 236 } |
235 | 237 |
236 if ((rc = pam_acct_mgmt(pamHandlep, 0)) != PAM_SUCCESS) { | 238 if ((rc = pam_acct_mgmt(pamHandlep, 0)) != PAM_SUCCESS) { |
237 dropbear_log(LOG_WARNING, "pam_acct_mgmt() failed, rc=%d, %s\n", | 239 dropbear_log(LOG_WARNING, "pam_acct_mgmt() failed, rc=%d, %s\n", |
238 rc, pam_strerror(pamHandlep, rc)); | 240 rc, pam_strerror(pamHandlep, rc)); |
239 dropbear_log(LOG_WARNING, | 241 dropbear_log(LOG_WARNING, |
240 "bad PAM password attempt for '%s' from %s", | 242 "Bad PAM password attempt for '%s' from %s", |
241 ses.authstate.pw_name, | 243 ses.authstate.pw_name, |
242 svr_ses.addrstring); | 244 svr_ses.addrstring); |
243 send_msg_userauth_failure(0, 1); | 245 send_msg_userauth_failure(0, 1); |
244 goto cleanup; | 246 goto cleanup; |
245 } | 247 } |