diff options
author | Colin Watson <cjwatson@debian.org> | 2011-09-06 09:45:52 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2011-09-06 09:45:52 +0100 |
commit | f38224d546cdde55f45c13d3d8225d273a3f920e (patch) | |
tree | a91a26b88ac90dc72d0ea3767feabb341eaa50a8 /ssh-agent.c | |
parent | 338146a3fc257e216fe5c10fe40e6896b40d7739 (diff) | |
parent | e90790abaf031e037f444a6658e136e48577ea49 (diff) |
merge 5.9p1
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index afba413d7..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) | |||
1097 | static void | 1097 | static void |
1098 | check_parent_exists(void) | 1098 | check_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); |
@@ -1154,7 +1158,6 @@ main(int ac, char **av) | |||
1154 | OpenSSL_add_all_algorithms(); | 1158 | OpenSSL_add_all_algorithms(); |
1155 | 1159 | ||
1156 | __progname = ssh_get_progname(av[0]); | 1160 | __progname = ssh_get_progname(av[0]); |
1157 | init_rng(); | ||
1158 | seed_rng(); | 1161 | seed_rng(); |
1159 | 1162 | ||
1160 | while ((ch = getopt(ac, av, "cdksa:t:")) != -1) { | 1163 | while ((ch = getopt(ac, av, "cdksa:t:")) != -1) { |