diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-11-27 05:00:17 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-11-27 16:02:46 +1100 |
commit | f79364bacaebde4f1c260318ab460fceacace02f (patch) | |
tree | 6737d9b7f258794bdae553f899030cf026b660b1 | |
parent | 70ec5e5e2681bcd409a9df94a2fec6f57a750945 (diff) |
upstream: use error()+_exit() instead of fatal() to avoid running
cleanup handlers in child process; spotted via weird regress failures in
portable
OpenBSD-Commit-ID: 6902a9bb3987c7d347774444f7979b8a9ba7f412
-rw-r--r-- | readpass.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/readpass.c b/readpass.c index 42cbe41f6..89788fe19 100644 --- a/readpass.c +++ b/readpass.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readpass.c,v 1.57 2019/11/15 00:32:40 djm Exp $ */ | 1 | /* $OpenBSD: readpass.c,v 1.58 2019/11/27 05:00:17 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -251,7 +251,8 @@ notify_start(int force_askpass, const char *fmt, ...) | |||
251 | closefrom(STDERR_FILENO + 1); | 251 | closefrom(STDERR_FILENO + 1); |
252 | setenv("SSH_ASKPASS_PROMPT", "none", 1); /* hint to UI */ | 252 | setenv("SSH_ASKPASS_PROMPT", "none", 1); /* hint to UI */ |
253 | execlp(askpass, askpass, prompt, (char *)NULL); | 253 | execlp(askpass, askpass, prompt, (char *)NULL); |
254 | fatal("%s: exec(%s): %s", __func__, askpass, strerror(errno)); | 254 | error("%s: exec(%s): %s", __func__, askpass, strerror(errno)); |
255 | _exit(1); | ||
255 | /* NOTREACHED */ | 256 | /* NOTREACHED */ |
256 | } | 257 | } |
257 | if ((ret = calloc(1, sizeof(*ret))) == NULL) { | 258 | if ((ret = calloc(1, sizeof(*ret))) == NULL) { |