version 1.35.2.1, 2006/09/30 04:06:51 |
version 1.36, 2006/03/19 18:51:18 |
|
|
/* $OpenBSD$ */ |
|
/* |
/* |
* Copyright (c) 2001 Markus Friedl. All rights reserved. |
* Copyright (c) 2001 Markus Friedl. All rights reserved. |
* |
* |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
|
|
#include "includes.h" |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/wait.h> |
#include <sys/wait.h> |
|
|
#include <errno.h> |
|
#include <fcntl.h> |
|
#include <paths.h> |
#include <paths.h> |
#include <readpassphrase.h> |
#include <readpassphrase.h> |
#include <stdarg.h> |
|
#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
|
#include <unistd.h> |
|
|
|
#include "xmalloc.h" |
#include "xmalloc.h" |
#include "misc.h" |
#include "misc.h" |
#include "pathnames.h" |
#include "pathnames.h" |
#include "log.h" |
#include "log.h" |
#include "ssh.h" |
#include "ssh.h" |
#include "uidswap.h" |
|
|
|
static char * |
static char * |
ssh_askpass(char *askpass, const char *msg) |
ssh_askpass(char *askpass, const char *msg) |
|
|
return NULL; |
return NULL; |
} |
} |
if (pid == 0) { |
if (pid == 0) { |
permanently_drop_suid(getuid()); |
seteuid(getuid()); |
|
setuid(getuid()); |
close(p[0]); |
close(p[0]); |
if (dup2(p[1], STDOUT_FILENO) < 0) |
if (dup2(p[1], STDOUT_FILENO) < 0) |
fatal("ssh_askpass: dup2: %s", strerror(errno)); |
fatal("ssh_askpass: dup2: %s", strerror(errno)); |