Changeset View
Changeset View
Standalone View
Standalone View
crypto/openssh/monitor.c
| Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | |||||
| #include "channels.h" | #include "channels.h" | ||||
| #include "session.h" | #include "session.h" | ||||
| #include "sshlogin.h" | #include "sshlogin.h" | ||||
| #include "canohost.h" | #include "canohost.h" | ||||
| #include "log.h" | #include "log.h" | ||||
| #include "misc.h" | #include "misc.h" | ||||
| #include "servconf.h" | #include "servconf.h" | ||||
| #include "monitor.h" | #include "monitor.h" | ||||
| #include "blacklist_client.h" | |||||
| #ifdef GSSAPI | #ifdef GSSAPI | ||||
| #include "ssh-gss.h" | #include "ssh-gss.h" | ||||
| #endif | #endif | ||||
| #include "monitor_wrap.h" | #include "monitor_wrap.h" | ||||
| #include "monitor_fdpass.h" | #include "monitor_fdpass.h" | ||||
| #include "compat.h" | #include "compat.h" | ||||
| #include "ssh2.h" | #include "ssh2.h" | ||||
| #include "authfd.h" | #include "authfd.h" | ||||
| ▲ Show 20 Lines • Show All 252 Lines • ▼ Show 20 Lines | if (ent->flags & (MON_AUTHDECIDE|MON_ALOG)) { | ||||
| if (!partial && !authenticated) | if (!partial && !authenticated) | ||||
| authctxt->failures++; | authctxt->failures++; | ||||
| if (authenticated || partial) { | if (authenticated || partial) { | ||||
| auth2_update_session_info(authctxt, | auth2_update_session_info(authctxt, | ||||
| auth_method, auth_submethod); | auth_method, auth_submethod); | ||||
| } | } | ||||
| } | } | ||||
| if (authctxt->failures > options.max_authtries) { | if (authctxt->failures > options.max_authtries) { | ||||
| BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, | |||||
| "Too many authentication attempts"); | |||||
| /* Shouldn't happen */ | /* Shouldn't happen */ | ||||
| fatal_f("privsep child made too many authentication " | fatal_f("privsep child made too many authentication " | ||||
| "attempts"); | "attempts"); | ||||
| } | } | ||||
| } | } | ||||
| if (!authctxt->valid) | if (!authctxt->valid) { | ||||
| BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, | |||||
| "Authenticated invalid user"); | |||||
| fatal_f("authenticated invalid user"); | fatal_f("authenticated invalid user"); | ||||
| if (strcmp(auth_method, "unknown") == 0) | } | ||||
| if (strcmp(auth_method, "unknown") == 0) { | |||||
| BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, | |||||
| "Authentication method name unknown"); | |||||
| fatal_f("authentication method name unknown"); | fatal_f("authentication method name unknown"); | ||||
| } | |||||
| debug_f("user %s authenticated by privileged process", authctxt->user); | debug_f("user %s authenticated by privileged process", authctxt->user); | ||||
| auth_attempted = 0; | auth_attempted = 0; | ||||
| ssh->authctxt = NULL; | ssh->authctxt = NULL; | ||||
| ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user); | ssh_packet_set_log_preamble(ssh, "user %s", authctxt->user); | ||||
| mm_get_keystate(ssh, pmonitor); | mm_get_keystate(ssh, pmonitor); | ||||
| ▲ Show 20 Lines • Show All 1,694 Lines • Show Last 20 Lines | |||||