diff options
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -14,7 +14,7 @@ Functions for connecting the local authentication agent. | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$Id: authfd.c,v 1.4 1999/11/16 02:37:16 damien Exp $"); | 17 | RCSID("$Id: authfd.c,v 1.5 1999/11/17 06:29:08 damien Exp $"); |
18 | 18 | ||
19 | #include "ssh.h" | 19 | #include "ssh.h" |
20 | #include "rsa.h" | 20 | #include "rsa.h" |
@@ -50,6 +50,13 @@ ssh_get_authentication_socket() | |||
50 | sock = socket(AF_UNIX, SOCK_STREAM, 0); | 50 | sock = socket(AF_UNIX, SOCK_STREAM, 0); |
51 | if (sock < 0) | 51 | if (sock < 0) |
52 | return -1; | 52 | return -1; |
53 | |||
54 | /* close on exec */ | ||
55 | if (fcntl(sock, F_SETFD, 1) == -1) | ||
56 | { | ||
57 | close(sock); | ||
58 | return -1; | ||
59 | } | ||
53 | 60 | ||
54 | if (connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) | 61 | if (connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) |
55 | { | 62 | { |