diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-12-06 02:55:21 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-12-11 19:08:22 +1100 |
commit | 36eaa356d391a23a2d4e3a8aaa0223abc70b9822 (patch) | |
tree | 7201924d791918374d58fb9d5bd8a14261008c5b /readpass.c | |
parent | 483cc723d1ff3b7fdafc6239348040a608ebc78d (diff) |
upstream: bring the __func__
OpenBSD-Commit-ID: 71a3a45b0fe1b8f680ff95cf264aa81f7abbff67
Diffstat (limited to 'readpass.c')
-rw-r--r-- | readpass.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/readpass.c b/readpass.c index 89788fe19..03197a0af 100644 --- a/readpass.c +++ b/readpass.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readpass.c,v 1.58 2019/11/27 05:00:17 djm Exp $ */ | 1 | /* $OpenBSD: readpass.c,v 1.59 2019/12/06 02:55:21 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -58,26 +58,26 @@ ssh_askpass(char *askpass, const char *msg) | |||
58 | void (*osigchld)(int); | 58 | void (*osigchld)(int); |
59 | 59 | ||
60 | if (fflush(stdout) != 0) | 60 | if (fflush(stdout) != 0) |
61 | error("ssh_askpass: fflush: %s", strerror(errno)); | 61 | error("%s: fflush: %s", __func__, strerror(errno)); |
62 | if (askpass == NULL) | 62 | if (askpass == NULL) |
63 | fatal("internal error: askpass undefined"); | 63 | fatal("internal error: askpass undefined"); |
64 | if (pipe(p) == -1) { | 64 | if (pipe(p) == -1) { |
65 | error("ssh_askpass: pipe: %s", strerror(errno)); | 65 | error("%s: pipe: %s", __func__, strerror(errno)); |
66 | return NULL; | 66 | return NULL; |
67 | } | 67 | } |
68 | osigchld = signal(SIGCHLD, SIG_DFL); | 68 | osigchld = signal(SIGCHLD, SIG_DFL); |
69 | if ((pid = fork()) == -1) { | 69 | if ((pid = fork()) == -1) { |
70 | error("ssh_askpass: fork: %s", strerror(errno)); | 70 | error("%s: fork: %s", __func__, strerror(errno)); |
71 | signal(SIGCHLD, osigchld); | 71 | signal(SIGCHLD, osigchld); |
72 | return NULL; | 72 | return NULL; |
73 | } | 73 | } |
74 | if (pid == 0) { | 74 | if (pid == 0) { |
75 | close(p[0]); | 75 | close(p[0]); |
76 | if (dup2(p[1], STDOUT_FILENO) == -1) | 76 | if (dup2(p[1], STDOUT_FILENO) == -1) |
77 | fatal("ssh_askpass: dup2: %s", strerror(errno)); | 77 | fatal("%s: dup2: %s", __func__, strerror(errno)); |
78 | setenv("SSH_ASKPASS_PROMPT", "confirm", 1); /* hint to UI */ | 78 | setenv("SSH_ASKPASS_PROMPT", "confirm", 1); /* hint to UI */ |
79 | execlp(askpass, askpass, msg, (char *)NULL); | 79 | execlp(askpass, askpass, msg, (char *)NULL); |
80 | fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno)); | 80 | fatal("%s: exec(%s): %s", __func__, askpass, strerror(errno)); |
81 | } | 81 | } |
82 | close(p[1]); | 82 | close(p[1]); |
83 | 83 | ||