summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 937bb773d..299d4f4e3 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.173 2009/10/24 11:13:54 andreas Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.174 2009/11/10 04:30:45 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -32,6 +32,7 @@
32#include <sys/stat.h> 32#include <sys/stat.h>
33 33
34#include <errno.h> 34#include <errno.h>
35#include <fcntl.h>
35#include <netdb.h> 36#include <netdb.h>
36#include <pwd.h> 37#include <pwd.h>
37#include <signal.h> 38#include <signal.h>
@@ -1527,6 +1528,8 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
1527 return -1; 1528 return -1;
1528 } 1529 }
1529 if (pid == 0) { 1530 if (pid == 0) {
1531 /* keep the socket on exec */
1532 fcntl(packet_get_connection_in(), F_SETFD, 0);
1530 permanently_drop_suid(getuid()); 1533 permanently_drop_suid(getuid());
1531 close(from[0]); 1534 close(from[0]);
1532 if (dup2(from[1], STDOUT_FILENO) < 0) 1535 if (dup2(from[1], STDOUT_FILENO) < 0)