]> andersk Git - openssh.git/blobdiff - readpass.c
- djm@cvs.openbsd.org 2010/01/30 02:54:53
[openssh.git] / readpass.c
index 60e4a902f2d637e6db5bb9a37dddb44bd1d49c3f..bd144c2e39177a15f8fd21535782b9e141de6d8e 100644 (file)
@@ -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.
  *
 #include <sys/types.h>
 #include <sys/wait.h>
 
+#include <errno.h>
+#include <fcntl.h>
 #ifdef HAVE_PATHS_H
 # include <paths.h>
 #endif
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
 #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));
This page took 0.672804 seconds and 4 git commands to generate.