From owner-cvs-src@FreeBSD.ORG Sun May 15 06:16:50 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4EF016A4CE; Sun, 15 May 2005 06:16:50 +0000 (GMT) Received: from cheer.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id A525943DAE; Sun, 15 May 2005 06:16:49 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from lyrics.mahoroba.org (ume@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841]) (user=ume mech=CRAM-MD5 bits=0)j4F6GfeO062660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 15 May 2005 15:16:41 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 15 May 2005 15:16:39 +0900 Message-ID: From: Hajimu UMEMOTO To: Xin LI In-Reply-To: <200505141403.j4EE3LYX097762@repoman.freebsd.org> References: <200505141403.j4EE3LYX097762@repoman.freebsd.org> User-Agent: xcite1.38> Wanderlust/2.15.1 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd5.4) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.4-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-2.0b5 (cheer.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Sun, 15 May 2005 15:16:42 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-5.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.3 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on cheer.mahoroba.org cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/gen ttyname.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 May 2005 06:16:51 -0000 Hi, >>>>> On Sat, 14 May 2005 14:03:21 +0000 (UTC) >>>>> Xin LI said: delphij> delphij 2005-05-14 14:03:21 UTC delphij> Modified files: delphij> lib/libc/gen ttyname.c delphij> Log: delphij> Revert to old ttyname_r behavior that when _ioctl() returns 0 (SUCCEEDED), delphij> return the buffer immediately. This will permit ssh and/or PAM logins delphij> broken by previous commit. delphij> The (potential) underlying problem is still under investigation. It doesn't test return value of ttyname_r(). Index: lib/libc/gen/ttyname.c diff -u -p lib/libc/gen/ttyname.c.orig lib/libc/gen/ttyname.c --- lib/libc/gen/ttyname.c.orig Sun May 15 13:32:19 2005 +++ lib/libc/gen/ttyname.c Sun May 15 15:10:24 2005 @@ -124,7 +124,8 @@ ttyname(int fd) return (NULL); } } - ttyname_r(fd, buf, sizeof(_PATH_DEV) + MAXNAMLEN); + if (ttyname_r(fd, buf, sizeof(_PATH_DEV) + MAXNAMLEN) != 0) + return (NULL); return (buf); } Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/