version 1.97, 2012/10/30 21:29:54 |
version 1.98, 2012/12/02 20:34:09 |
|
|
} |
} |
|
|
void |
void |
auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) |
auth_log(Authctxt *authctxt, int authenticated, int partial, |
|
const char *method, const char *submethod, const char *info) |
{ |
{ |
void (*authlog) (const char *fmt,...) = verbose; |
void (*authlog) (const char *fmt,...) = verbose; |
char *authmsg; |
char *authmsg; |
|
|
|
|
if (authctxt->postponed) |
if (authctxt->postponed) |
authmsg = "Postponed"; |
authmsg = "Postponed"; |
|
else if (partial) |
|
authmsg = "Partial"; |
else |
else |
authmsg = authenticated ? "Accepted" : "Failed"; |
authmsg = authenticated ? "Accepted" : "Failed"; |
|
|
authlog("%s %s for %s%.100s from %.200s port %d%s", |
authlog("%s %s%s%s for %s%.100s from %.200s port %d%s", |
authmsg, |
authmsg, |
method, |
method, |
|
submethod != NULL ? "/" : "", submethod == NULL ? "" : submethod, |
authctxt->valid ? "" : "invalid user ", |
authctxt->valid ? "" : "invalid user ", |
authctxt->user, |
authctxt->user, |
get_remote_ipaddr(), |
get_remote_ipaddr(), |
|
|
* Check whether root logins are disallowed. |
* Check whether root logins are disallowed. |
*/ |
*/ |
int |
int |
auth_root_allowed(char *method) |
auth_root_allowed(const char *method) |
{ |
{ |
switch (options.permit_root_login) { |
switch (options.permit_root_login) { |
case PERMIT_YES: |
case PERMIT_YES: |