diff options
Diffstat (limited to 'readpass.c')
-rw-r--r-- | readpass.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/readpass.c b/readpass.c index c3d36a028..60e4a902f 100644 --- a/readpass.c +++ b/readpass.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: readpass.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ | 1 | /* $OpenBSD: readpass.c,v 1.38 2006/06/06 10:20:20 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -37,6 +37,7 @@ | |||
37 | #include "pathnames.h" | 37 | #include "pathnames.h" |
38 | #include "log.h" | 38 | #include "log.h" |
39 | #include "ssh.h" | 39 | #include "ssh.h" |
40 | #include "uidswap.h" | ||
40 | 41 | ||
41 | static char * | 42 | static char * |
42 | ssh_askpass(char *askpass, const char *msg) | 43 | ssh_askpass(char *askpass, const char *msg) |
@@ -60,8 +61,7 @@ ssh_askpass(char *askpass, const char *msg) | |||
60 | return NULL; | 61 | return NULL; |
61 | } | 62 | } |
62 | if (pid == 0) { | 63 | if (pid == 0) { |
63 | seteuid(getuid()); | 64 | permanently_set_uid(getpwuid(getuid())); |
64 | setuid(getuid()); | ||
65 | close(p[0]); | 65 | close(p[0]); |
66 | if (dup2(p[1], STDOUT_FILENO) < 0) | 66 | if (dup2(p[1], STDOUT_FILENO) < 0) |
67 | fatal("ssh_askpass: dup2: %s", strerror(errno)); | 67 | fatal("ssh_askpass: dup2: %s", strerror(errno)); |