X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/82aeee5ddee3f8a691a30a6c027af2b19b6b3af3..aacab402991cf3ce8991ada093d5f3058f4170af:/readpass.c diff --git a/readpass.c b/readpass.c index 60e4a902..bd144c2e 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.38 2006/06/06 10:20:20 markus Exp $ */ +/* $OpenBSD: readpass.c,v 1.47 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -28,9 +28,16 @@ #include #include +#include +#include #ifdef HAVE_PATHS_H # include #endif +#include +#include +#include +#include +#include #include "xmalloc.h" #include "misc.h" @@ -61,7 +68,7 @@ ssh_askpass(char *askpass, const char *msg) return NULL; } if (pid == 0) { - permanently_set_uid(getpwuid(getuid())); + permanently_drop_suid(getuid()); close(p[0]); if (dup2(p[1], STDOUT_FILENO) < 0) fatal("ssh_askpass: dup2: %s", strerror(errno));