diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | authfd.c | 10 |
2 files changed, 10 insertions, 8 deletions
@@ -10,6 +10,12 @@ | |||
10 | [readconf.c readconf.h scp.c sftp.c ssh.1] | 10 | [readconf.c readconf.h scp.c sftp.c ssh.1] |
11 | add ClearAllForwardings ssh option and set it in scp and sftp; ok | 11 | add ClearAllForwardings ssh option and set it in scp and sftp; ok |
12 | markus@ | 12 | markus@ |
13 | - stevesk@cvs.openbsd.org 2001/09/19 19:35:30 | ||
14 | [authfd.c] | ||
15 | use sizeof addr vs. SUN_LEN(addr) for sockaddr_un. Stevens | ||
16 | blesses this and we do it this way elsewhere. this helps in | ||
17 | portable because not all systems have SUN_LEN() and | ||
18 | sockaddr_un.sun_len. ok markus@ | ||
13 | 19 | ||
14 | 20010918 | 20 | 20010918 |
15 | - (djm) Configure support for smartcards. Based on Ben's work. | 21 | - (djm) Configure support for smartcards. Based on Ben's work. |
@@ -6517,4 +6523,4 @@ | |||
6517 | - Wrote replacements for strlcpy and mkdtemp | 6523 | - Wrote replacements for strlcpy and mkdtemp |
6518 | - Released 1.0pre1 | 6524 | - Released 1.0pre1 |
6519 | 6525 | ||
6520 | $Id: ChangeLog,v 1.1544 2001/09/20 00:57:55 mouring Exp $ | 6526 | $Id: ChangeLog,v 1.1545 2001/09/20 01:03:31 mouring Exp $ |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.44 2001/08/07 10:37:46 markus Exp $"); | 38 | RCSID("$OpenBSD: authfd.c,v 1.45 2001/09/19 19:35:30 stevesk Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -67,7 +67,7 @@ int | |||
67 | ssh_get_authentication_socket(void) | 67 | ssh_get_authentication_socket(void) |
68 | { | 68 | { |
69 | const char *authsocket; | 69 | const char *authsocket; |
70 | int sock, len; | 70 | int sock; |
71 | struct sockaddr_un sunaddr; | 71 | struct sockaddr_un sunaddr; |
72 | 72 | ||
73 | authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME); | 73 | authsocket = getenv(SSH_AUTHSOCKET_ENV_NAME); |
@@ -76,10 +76,6 @@ ssh_get_authentication_socket(void) | |||
76 | 76 | ||
77 | sunaddr.sun_family = AF_UNIX; | 77 | sunaddr.sun_family = AF_UNIX; |
78 | strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); | 78 | strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); |
79 | len = SUN_LEN(&sunaddr)+1; | ||
80 | #ifdef HAVE_SUN_LEN_IN_SOCKADDR_UN | ||
81 | sunaddr.sun_len = len; | ||
82 | #endif /* HAVE_SUN_LEN_IN_SOCKADDR_UN */ | ||
83 | 79 | ||
84 | sock = socket(AF_UNIX, SOCK_STREAM, 0); | 80 | sock = socket(AF_UNIX, SOCK_STREAM, 0); |
85 | if (sock < 0) | 81 | if (sock < 0) |
@@ -90,7 +86,7 @@ ssh_get_authentication_socket(void) | |||
90 | close(sock); | 86 | close(sock); |
91 | return -1; | 87 | return -1; |
92 | } | 88 | } |
93 | if (connect(sock, (struct sockaddr *) & sunaddr, len) < 0) { | 89 | if (connect(sock, (struct sockaddr *) &sunaddr, sizeof sunaddr) < 0) { |
94 | close(sock); | 90 | close(sock); |
95 | return -1; | 91 | return -1; |
96 | } | 92 | } |