From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3882 invoked by alias); 28 Oct 2010 12:55:58 -0000 Received: (qmail 3874 invoked by uid 22791); 28 Oct 2010 12:55:58 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Oct 2010 12:55:55 +0000 From: "miklos at szeredi dot hu" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/12167] ttyname() and ttyname_r() may return wrong value X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: miklos at szeredi dot hu X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 28 Oct 2010 12:55:00 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00177.txt.bz2 Message-ID: <20101028125500.sLG0TrosAy7tAtsxCjiY4L6KIhgLbVNP8UwVYvYQRBc@z> http://sourceware.org/bugzilla/show_bug.cgi?id=12167 --- Comment #2 from Miklos Szeredi 2010-10-28 12:55:45 UTC --- Created attachment 5094 --> http://sourceware.org/bugzilla/attachment.cgi?id=5094 Verify in ttyname() that the symlink is valid This patch verifies the path resulting from reading the symlink in /proc/self/fd is valid and refer to the same inode as the file descriptor. If the original path is unreachable, try if the path from the global root is valid from this context as well. If not valid, then fall back to iterating through the device files under /dev. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.