[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#211047: marked as done (libc6 - ttyname failes on systems with devfs and devpts)



Your message dated Mon, 5 Feb 2007 19:29:50 +0100
with message-id <20070205182950.GA25266@mad.intersec.eu>
and subject line Bug#211047: libc6 - ttyname fails with more than 21 allocated pts
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6
Version: 2.3.2-7
Severity: important

ttyname failes on devfs systems if there are more than 21 allocated pts
and the readlink call failes (suid/sgid binary).

trace with 18 pts:
readlink("/proc/self/fd/0", 0x8049628, 4095) = -1 EACCES (Permission denied)
fstat64(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 5), ...}) = 0
stat64("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open("/dev/pts", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 20 entries */, 1024)   = 480
getdents64(3, /* 0 entries */, 1024)    = 0
close(3)                                = 0
stat64("/dev/vc", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/dev/vc", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 42 entries */, 1024)   = 1008
stat64("/dev/vc/5", {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 5), ...}) = 0
close(3)                                = 0

trace with 26 pts:
readlink("/proc/self/fd/0", 0x8049628, 4095) = -1 EACCES (Permission denied)
fstat64(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 5), ...}) = 0
stat64("/dev/pts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open("/dev/pts", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 29 entries */, 1024)   = 696
stat64("/dev/pts/22", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 22), ...}) = 0
getdents64(3, /* 0 entries */, 1024)    = 0
close(3)                                = 0
stat64("/dev/vc", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/dev/vc", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 42 entries */, 1024)   = 1008
stat64("/dev/pts5", 0xbffff7a0)         = -1 ENOENT (No such file or directory)
getdents64(3, /* 24 entries */, 1024)   = 576
getdents64(3, /* 0 entries */, 1024)    = 0
close(3)                                = 0
stat64("/dev/tts", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/dev/tts", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 4 entries */, 1024)    = 96
getdents64(3, /* 0 entries */, 1024)    = 0
close(3)                                = 0
open("/dev", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 39 entries */, 1024)   = 1016
getdents64(3, /* 22 entries */, 1024)   = 632
getdents64(3, /* 0 entries */, 1024)    = 0
close(3)                                = 0
open("/dev", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 39 entries */, 1024)   = 1016
stat64("/dev/..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/dev/.", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat64("/dev/.devfsd", {st_mode=S_IFCHR|0600, st_rdev=makedev(8, 0), ...}) = 0
stat64("/dev/cpu", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat64("/dev/shm", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat64("/dev/mem", {st_mode=S_IFCHR|0640, st_rdev=makedev(1, 1), ...}) = 0
[...]


-- 
Kirk to Enterprise -- beam down yeoman Rand and a six-pack.

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Version: 2.3.6.ds1-10

On Sat, Dec 13, 2003 at 08:40:48PM +0100, Bastian Blank wrote:
> On Thu, Sep 18, 2003 at 09:49:03AM +0900, GOTO Masanori wrote:
> > I don't use devfs, so could someone tell me that this is glibc issue
> > or not?
> 
> i found the problem:
> getttyname (sysdeps/unix/sysv/linux/ttyname.c:43) don't clean
> getttyname_name if it already exists. thats way the weird check for
> "/dev/pts5" occour, the "/dev/pts" is left from the first call.

  I've looked at the code, it seems to be fixed here, at least
getttyname_name seems to be correctly reset each time the loop is run.

  I've not been able to reproduce your strace output with version in
etch either.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpfGhERtUqhV.pgp
Description: PGP signature


--- End Message ---

Reply to: