(match_local_auth): handle ai_canonname not being set

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7606 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-12-16 11:45:23 +00:00
parent b0b6631bb4
commit ea9cde948d

View File

@@ -572,11 +572,12 @@ match_local_auth (Xauth* auth, struct addrinfo *ai, int disp_nr)
free (tmp_disp); free (tmp_disp);
if (auth_disp != disp_nr) if (auth_disp != disp_nr)
return 1; return 1;
if (auth->family == FamilyLocal if ((auth->family == FamilyLocal
|| auth->family == FamilyWild) { || auth->family == FamilyWild)
if (strncmp (auth->address, && ai->ai_canonname != NULL
ai->ai_canonname, && strncmp (auth->address,
auth->address_length) == 0) ai->ai_canonname,
auth->address_length) == 0)
return 0; return 0;
} }
return 1; return 1;