gnome-terminal acts funny in recent 2.5 series
Quoted 7 lines · OGAWA Hirofumi
libzvt was using file descriptor passing via UNIX domain socket for pseudo terminal. Then because ->passcred was not initialized in
sock_alloc(), unexpected credential data was passing to libzvt.The following patch fixed this problem, but I'm not sure. Could you review the patch? (attached file are test program)
I sent simillar patch to Linus and DaveM on Sunday. Unfortunately it did not found its way into either of these two trees (and IPX oops fix too). In addition to yours I moved these 'sock->XXX = NULL' into sock_alloc_inode, as I see no reason why sock->wait should be initialized in sock_alloc_inode, but all other members in sock_alloc. It caused confusion to me, and from your comment it looks like that you missed it too. Besides that root of sockfs uses sock's inode with sock->ops, sk and file being 0x5a5a5a5a without moving initialization from sock_alloc to sock_alloc_inode.
socket.c Tue Feb 19 16:20:18 2002 struct socket *sock_alloc(void) · line 508
Quoted 11 lines
socket.c Tue Feb 19 16:20:18 2002 renamed from socket.c.orig Mon Feb 11 18:21:59 2002 +2
-0@@ -501,6 +501,8 @@ struct socket *sock_alloc(void) sock->ops = NULL; sock->sk = NULL; sock->file = NULL; +// init_waitqueue_head(&sock->wait); this is needed? + sock->passcred = 0; sockets_in_use[smp_processor_id()].counter++; return sock;
Best regards,
Petr Vandrovec [email protected]
Quoted 9 lines · Petr Vandrovec
Quoted 7 lines · OGAWA Hirofumi
libzvt was using file descriptor passing via UNIX domain socket for pseudo terminal. Then because ->passcred was not initialized in
sock_alloc(), unexpected credential data was passing to libzvt.The following patch fixed this problem, but I'm not sure. Could you review the patch? (attached file are test program)
Quoted 8 lines
I sent simillar patch to Linus and DaveM on Sunday. Unfortunately it did not found its way into either of these two trees (and IPX oops fix too). In addition to yours I moved these '
sock->XXX= NULL' intosock_alloc_inode, as I see no reason whysock->waitshould be initialized insock_alloc_inode, but all other members insock_alloc. It caused confusion to me, and from your comment it looks like that you missed it too. Besides that root of sockfs uses sock's inode withsock->ops, sk and file being0x5a5a5a5awithout moving initialization fromsock_alloctosock_alloc_inode.
I wish your patch apply to the tree. Thanks.
Signature · 1 line
OGAWA Hirofumi <[email protected]>