Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2000 18:07:38 +0200 (CEST)
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        kris@freebsd.org
Cc:        current@freebsd.org
Subject:   patch for openssh
Message-ID:  <200009161607.e8GG7en02911@Magelan.Leidinger.net>

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

Hi,

I tried to find the bug which prevents me from using pam_ssh, but I was
not able to find it so far (output from xdm: "xdm error (pid 2530):
Unknown session exit code 2816 from process 2727", I assume proc 2727 is
"ssh-agent").

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

Bye,
Alexander.

-- 
            The dark ages were caused by the Y1K problem.

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = 7423 F3E6 3A7E B334 A9CC  B10A 1F5F 130A A638 6E7E

--0-1804289383-969120463=:2908
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/16 15:57:22
@@ -571,7 +571,7 @@
 			break;
 		case AUTH_SOCKET:
 			if (FD_ISSET(sockets[i].fd, readset)) {
-				slen = sizeof(sunaddr);
+				slen = SUN_LEN(&sunaddr)+1;
 				sock = accept(sockets[i].fd, (struct sockaddr *) & sunaddr, &slen);
 				if (sock < 0) {
 					perror("accept from AUTH_SOCKET");
@@ -741,7 +741,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-969120463=:2908--


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?200009161607.e8GG7en02911>