From owner-freebsd-current Sat Sep 16 9: 8:46 2000 Delivered-To: freebsd-current@freebsd.org Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by hub.freebsd.org (Postfix) with ESMTP id F2CCC37B423; Sat, 16 Sep 2000 09:08:40 -0700 (PDT) Received: from [194.97.50.136] (helo=mx3.freenet.de) by mout0.freenet.de with esmtp (Exim 3.16 #20) id 13aKW8-0000pH-00; Sat, 16 Sep 2000 18:08:40 +0200 Received: from a3822.pppool.de ([213.6.56.34] helo=Magelan.Leidinger.net) by mx3.freenet.de with esmtp (Exim 3.16 #21) id 13aKW7-00067y-00; Sat, 16 Sep 2000 18:08:39 +0200 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.11.0/8.11.0) with ESMTP id e8GG7en02911; Sat, 16 Sep 2000 18:07:41 +0200 (CEST) (envelope-from netchild@Leidinger.net) Message-Id: <200009161607.e8GG7en02911@Magelan.Leidinger.net> Date: Sat, 16 Sep 2000 18:07:38 +0200 (CEST) From: Alexander Leidinger Subject: patch for openssh To: kris@freebsd.org Cc: current@freebsd.org MIME-Version: 1.0 Content-Type: MULTIPART/mixed; BOUNDARY="0-1804289383-969120463=:2908" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --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