This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12167] ttyname() and ttyname_r() may return wrong value


http://sourceware.org/bugzilla/show_bug.cgi?id=12167

--- Comment #2 from Miklos Szeredi <miklos at szeredi dot hu> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]