summaryrefslogtreecommitdiff
path: root/readpass.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-06-13 13:05:15 +1000
committerDamien Miller <djm@mindrot.org>2006-06-13 13:05:15 +1000
commit6b4069ad563ce578cbfa6f90e76b462d26483e67 (patch)
tree777206b388f2ef12b83275d4aeb78e96cdea1bdd /readpass.c
parenteb13e556e58a52a3ff0c734a8690ad41686cf92c (diff)
- markus@cvs.openbsd.org 2006/06/06 10:20:20
[readpass.c sshconnect.c sshconnect.h sshconnect2.c uidswap.c] replace remaining setuid() calls with permanently_set_uid() and check seteuid() return values; report Marcus Meissner; ok dtucker djm
Diffstat (limited to 'readpass.c')
-rw-r--r--readpass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/readpass.c b/readpass.c
index c3d36a02..60e4a902 100644
--- a/readpass.c
+++ b/readpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readpass.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */
+/* $OpenBSD: readpass.c,v 1.38 2006/06/06 10:20:20 markus Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
@@ -37,6 +37,7 @@
#include "pathnames.h"
#include "log.h"
#include "ssh.h"
+#include "uidswap.h"
static char *
ssh_askpass(char *askpass, const char *msg)
@@ -60,8 +61,7 @@ ssh_askpass(char *askpass, const char *msg)
return NULL;
}
if (pid == 0) {
- seteuid(getuid());
- setuid(getuid());
+ permanently_set_uid(getpwuid(getuid()));
close(p[0]);
if (dup2(p[1], STDOUT_FILENO) < 0)
fatal("ssh_askpass: dup2: %s", strerror(errno));