sshd.c (faebc97a1cb4f0a36a39f0ba9c1b266e070c5f4f) | sshd.c (b2af61ec69826890d075ceb3e20e206be20d6fea) |
---|---|
1/* $OpenBSD: sshd.c,v 1.465 2016/02/15 09:47:49 dtucker Exp $ */ 2/* 3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 5 * All rights reserved 6 * This program is the ssh daemon. It listens for connections from clients, 7 * and performs authentication, executes use commands or shell, and forwards 8 * information to/from the application to the user client over an encrypted --- 121 unchanged lines hidden (view full) --- 130#include "monitor.h" 131#ifdef GSSAPI 132#include "ssh-gss.h" 133#endif 134#include "monitor_wrap.h" 135#include "ssh-sandbox.h" 136#include "version.h" 137#include "ssherr.h" | 1/* $OpenBSD: sshd.c,v 1.465 2016/02/15 09:47:49 dtucker Exp $ */ 2/* 3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 5 * All rights reserved 6 * This program is the ssh daemon. It listens for connections from clients, 7 * and performs authentication, executes use commands or shell, and forwards 8 * information to/from the application to the user client over an encrypted --- 121 unchanged lines hidden (view full) --- 130#include "monitor.h" 131#ifdef GSSAPI 132#include "ssh-gss.h" 133#endif 134#include "monitor_wrap.h" 135#include "ssh-sandbox.h" 136#include "version.h" 137#include "ssherr.h" |
138#include "blacklist_client.h" |
|
138 139#ifdef LIBWRAP 140#include <tcpd.h> 141#include <syslog.h> 142int allow_severity; 143int deny_severity; 144#endif /* LIBWRAP */ 145 --- 237 unchanged lines hidden (view full) --- 383 * Try to kill any processes that we have spawned, E.g. authorized 384 * keys command helpers. 385 */ 386 if (getpgid(0) == getpid()) { 387 signal(SIGTERM, SIG_IGN); 388 kill(0, SIGTERM); 389 } 390 | 139 140#ifdef LIBWRAP 141#include <tcpd.h> 142#include <syslog.h> 143int allow_severity; 144int deny_severity; 145#endif /* LIBWRAP */ 146 --- 237 unchanged lines hidden (view full) --- 384 * Try to kill any processes that we have spawned, E.g. authorized 385 * keys command helpers. 386 */ 387 if (getpgid(0) == getpid()) { 388 signal(SIGTERM, SIG_IGN); 389 kill(0, SIGTERM); 390 } 391 |
392 BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); 393 |
|
391 /* Log error and exit. */ 392 sigdie("Timeout before authentication for %s", get_remote_ipaddr()); 393} 394 395/* 396 * Signal handler for the key regeneration alarm. Note that this 397 * alarm only occurs in the daemon waiting for connections, and it does not 398 * do anything with the private key or random state before forking. --- 1847 unchanged lines hidden (view full) --- 2246 2247 /* XXX global for cleanup, access from other modules */ 2248 the_authctxt = authctxt; 2249 2250 /* prepare buffer to collect messages to display to user after login */ 2251 buffer_init(&loginmsg); 2252 auth_debug_reset(); 2253 | 394 /* Log error and exit. */ 395 sigdie("Timeout before authentication for %s", get_remote_ipaddr()); 396} 397 398/* 399 * Signal handler for the key regeneration alarm. Note that this 400 * alarm only occurs in the daemon waiting for connections, and it does not 401 * do anything with the private key or random state before forking. --- 1847 unchanged lines hidden (view full) --- 2249 2250 /* XXX global for cleanup, access from other modules */ 2251 the_authctxt = authctxt; 2252 2253 /* prepare buffer to collect messages to display to user after login */ 2254 buffer_init(&loginmsg); 2255 auth_debug_reset(); 2256 |
2257 BLACKLIST_INIT(); 2258 |
|
2254 if (use_privsep) { 2255 if (privsep_preauth(authctxt) == 1) 2256 goto authenticated; 2257 } else if (compat20 && have_agent) { 2258 if ((r = ssh_get_authentication_socket(&auth_sock)) != 0) { 2259 error("Unable to get agent socket: %s", ssh_err(r)); 2260 have_agent = 0; 2261 } --- 439 unchanged lines hidden --- | 2259 if (use_privsep) { 2260 if (privsep_preauth(authctxt) == 1) 2261 goto authenticated; 2262 } else if (compat20 && have_agent) { 2263 if ((r = ssh_get_authentication_socket(&auth_sock)) != 0) { 2264 error("Unable to get agent socket: %s", ssh_err(r)); 2265 have_agent = 0; 2266 } --- 439 unchanged lines hidden --- |