On 16 Sep, To: [EMAIL PROTECTED] wrote:

> But I think I found some other bugs, please have a look at the attached
> diff.

Oops, sorry, wrong diff.

Bye,
Alexander.

-- 
              To boldly go where I surely don't belong.

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = 7423 F3E6 3A7E B334 A9CC  B10A 1F5F 130A A638 6E7E
Index: authfd.c
===================================================================
RCS file: /big/FreeBSD-CVS/src/crypto/openssh/authfd.c,v
retrieving revision 1.6
diff -u -r1.6 authfd.c
--- authfd.c    2000/09/10 09:35:37     1.6
+++ authfd.c    2000/09/16 15:27:25
@@ -178,7 +178,7 @@
        if (sock < 0)
                return NULL;
 
-       auth = xmalloc(sizeof(*auth));
+       auth = xmalloc(sizeof(AuthenticationConnection));
        auth->fd = sock;
        buffer_init(&auth->identities);
        auth->howmany = 0;
Index: ssh-agent.c
===================================================================
RCS file: /big/FreeBSD-CVS/src/crypto/openssh/ssh-agent.c,v
retrieving revision 1.7
diff -u -r1.7 ssh-agent.c
--- ssh-agent.c 2000/09/10 09:35:38     1.7
+++ ssh-agent.c 2000/09/17 09:24:21
@@ -577,6 +577,8 @@
                                        perror("accept from AUTH_SOCKET");
                                        break;
                                }
+                               slen -= sizeof(sunaddr.sun_len) + 
+sizeof(sunaddr.sun_family);
+                               sunaddr.sun_path[slen] = 0;
                                new_socket(AUTH_CONNECTION, sock);
                        }
                        break;
@@ -741,7 +743,8 @@
        memset(&sunaddr, 0, sizeof(sunaddr));
        sunaddr.sun_family = AF_UNIX;
        strlcpy(sunaddr.sun_path, socket_name, sizeof(sunaddr.sun_path));
-       if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) {
+       sunaddr.sun_len = SUN_LEN(&sunaddr)+1;
+       if (bind(sock, (struct sockaddr *) & sunaddr, sunaddr.sun_len) < 0) {
                perror("bind");
                cleanup_exit(1);
        }

Reply via email to