After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 455190 - Passes uninitialized hints to getaddrinfo()
Passes uninitialized hints to getaddrinfo()
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.18.x
Other Linux
: Normal trivial
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-09 15:39 UTC by Loïc Minier
Modified: 2007-07-16 12:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Loïc Minier 2007-07-09 15:39:18 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,
Comment 1 Brian Cameron 2007-07-09 20:37:53 UTC
Thanks.  Fixed in 2.18 branch.  If you could test and let me know if this works all right now, that would be great.
Comment 2 Loïc Minier 2007-07-12 13:22:29 UTC
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.
Comment 3 Brian Cameron 2007-07-12 15:04:52 UTC
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.
Comment 4 Loïc Minier 2007-07-16 11:34:27 UTC
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.
Comment 5 Loïc Minier 2007-07-16 11:38:39 UTC
(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.)
Comment 6 Loïc Minier 2007-07-16 12:56:39 UTC
Ah, the submitter just confirmed the issue is fixed!