diff options
author | Colin Watson <cjwatson@debian.org> | 2011-09-06 09:45:52 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2011-09-06 09:45:52 +0100 |
commit | f38224d546cdde55f45c13d3d8225d273a3f920e (patch) | |
tree | a91a26b88ac90dc72d0ea3767feabb341eaa50a8 /authfd.c | |
parent | 338146a3fc257e216fe5c10fe40e6896b40d7739 (diff) | |
parent | e90790abaf031e037f444a6658e136e48577ea49 (diff) |
merge 5.9p1
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfd.c,v 1.84 2010/08/31 11:54:45 djm Exp $ */ | 1 | /* $OpenBSD: authfd.c,v 1.86 2011/07/06 18:09:21 tedu Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -102,6 +102,7 @@ ssh_get_authentication_socket(void) | |||
102 | if (!authsocket) | 102 | if (!authsocket) |
103 | return -1; | 103 | return -1; |
104 | 104 | ||
105 | bzero(&sunaddr, sizeof(sunaddr)); | ||
105 | sunaddr.sun_family = AF_UNIX; | 106 | sunaddr.sun_family = AF_UNIX; |
106 | strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); | 107 | strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); |
107 | 108 | ||
@@ -110,7 +111,7 @@ ssh_get_authentication_socket(void) | |||
110 | return -1; | 111 | return -1; |
111 | 112 | ||
112 | /* close on exec */ | 113 | /* close on exec */ |
113 | if (fcntl(sock, F_SETFD, 1) == -1) { | 114 | if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1) { |
114 | close(sock); | 115 | close(sock); |
115 | return -1; | 116 | return -1; |
116 | } | 117 | } |