Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Sep 2000 11:29:34 +0200 (CEST)
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        kris@FreeBSD.ORG
Cc:        current@FreeBSD.ORG
Subject:   Re: patch for openssh
Message-ID:  <200009170929.e8H9TZn01194@Magelan.Leidinger.net>
In-Reply-To: <200009161607.e8GG7en02911@Magelan.Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--0-1804289383-969182979=:1190
Content-Type: TEXT/plain; charset=us-ascii

On 16 Sep, To: kris@FreeBSD.ORG 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

--0-1804289383-969182979=:1190
Content-Type: TEXT/plain; CHARSET=US-ASCII
Content-Disposition: attachment; filename="openssh.diff"

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);
 	}

--0-1804289383-969182979=:1190--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009170929.e8H9TZn01194>