summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ssh-agent.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 724bb4f1d..2831c374f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,12 @@
17 AT googlemail.com; ok dtucker@ 17 AT googlemail.com; ok dtucker@
18 NB. includes additional portability code to enable setproctitle emulation 18 NB. includes additional portability code to enable setproctitle emulation
19 on platforms that don't support it. 19 on platforms that don't support it.
20 - dtucker@cvs.openbsd.org 2011/06/03 01:37:40
21 [ssh-agent.c]
22 Check current parent process ID against saved one to determine if the parent
23 has exited, rather than attempting to send a zero signal, since the latter
24 won't work if the parent has changed privs. bz#1905, patch from Daniel Kahn
25 Gillmor, ok djm@
20 26
2120110529 2720110529
22 - (djm) OpenBSD CVS Sync 28 - (djm) OpenBSD CVS Sync
diff --git a/ssh-agent.c b/ssh-agent.c
index ae204b145..b9498e6ef 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.171 2010/11/21 01:01:13 djm Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.172 2011/06/03 01:37:40 dtucker 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
@@ -1097,7 +1097,11 @@ cleanup_handler(int sig)
1097static void 1097static void
1098check_parent_exists(void) 1098check_parent_exists(void)
1099{ 1099{
1100 if (parent_pid != -1 && kill(parent_pid, 0) < 0) { 1100 /*
1101 * If our parent has exited then getppid() will return (pid_t)1,
1102 * so testing for that should be safe.
1103 */
1104 if (parent_pid != -1 && getppid() != parent_pid) {
1101 /* printf("Parent has died - Authentication agent exiting.\n"); */ 1105 /* printf("Parent has died - Authentication agent exiting.\n"); */
1102 cleanup_socket(); 1106 cleanup_socket();
1103 _exit(2); 1107 _exit(2);