GNOME Bugzilla – Bug 455190
Passes uninitialized hints to getaddrinfo()
Last modified: 2007-07-16 12:56:39 UTC
Hi, This bug was fixed in the 2.19.x series but affects 2.18.3 and seems to cause a noticeable problem with IPv6. "E L" reported in Debian bug http://bugs.debian.org/432227: """ in daemon/misc.c the function gdm_peek_local_address_list calls getaddrinfo with the uninitialized variable hints. This causes getaddrinfo to fail, which in turn cause gdm not to write the xauthority file correctly. Changing hints to NULL in the function call seems to solve the problem. """ I confirm this problem, and the fix seems to be: memset (&hints, 0, sizeof (hints)); hints.ai_family = AF_INET; #ifdef ENABLE_IPV6 hints.ai_family |= AF_INET6; #endif Bye,
Thanks. Fixed in 2.18 branch. If you could test and let me know if this works all right now, that would be great.
After a lengthy exchange in http://bugs.debian.org/432227, it turns out this is superfluous and harmful for the submitter: hints.ai_family |= AF_INET6; He says AF_UNSPEC would be more correct, and that removing the line altogether solves the issue for him.
Thanks for checking this. Fixed in 2.18 branch removing that line. I am going to release another version of GDM 2.18 sometime soon, so if you could verify that this works now that would be great.
I've requested a success report from the submitter in http://bugs.debian.org/432227, but didn't receive one so far. I did however receive a similarly looking bug from another submitter, but it isn't fixed for him with the updated patch.
(In reply to comment #4) > I did however receive a similarly looking bug from another submitter, but it > isn't fixed for him with the updated patch. (Filed as bug #457324.)
Ah, the submitter just confirmed the issue is fixed!