summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 6d2f1341c..c849ca393 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.226 2010/10/05 05:13:18 djm Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.227 2010/10/06 06:39:28 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -66,12 +66,13 @@ char *server_version_string = NULL;
66 66
67static int matching_host_key_dns = 0; 67static int matching_host_key_dns = 0;
68 68
69static pid_t proxy_command_pid = 0;
70
69/* import */ 71/* import */
70extern Options options; 72extern Options options;
71extern char *__progname; 73extern char *__progname;
72extern uid_t original_real_uid; 74extern uid_t original_real_uid;
73extern uid_t original_effective_uid; 75extern uid_t original_effective_uid;
74extern pid_t proxy_command_pid;
75 76
76static int show_other_keys(const char *, Key *); 77static int show_other_keys(const char *, Key *);
77static void warn_changed_key(Key *); 78static void warn_changed_key(Key *);
@@ -167,6 +168,17 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
167 return 0; 168 return 0;
168} 169}
169 170
171void
172ssh_kill_proxy_command(void)
173{
174 /*
175 * Send SIGHUP to proxy command if used. We don't wait() in
176 * case it hangs and instead rely on init to reap the child
177 */
178 if (proxy_command_pid > 1)
179 kill(SIGHUP, proxy_command_pid);
180}
181
170/* 182/*
171 * Creates a (possibly privileged) socket for use as the ssh connection. 183 * Creates a (possibly privileged) socket for use as the ssh connection.
172 */ 184 */