(match_local_auth): only look for FamilyLocal (and FamilyWild)
cookies. This will not work when we start talking tcp to the local X-server but `connect_local_xsocket' and the rest of the code doesn't handle it anyway and the old code could (and did) pick up the wrong cookie sometimes. If we have to match FamilyInternet cookies, the search order has to be changed anyway git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7058 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -581,7 +581,8 @@ match_local_auth (Xauth* auth, struct hostent *disp_he, int disp_nr)
|
||||
free (tmp_disp);
|
||||
if (auth_disp != disp_nr)
|
||||
return 1;
|
||||
if (auth->family == FamilyLocal) {
|
||||
if (auth->family == FamilyLocal
|
||||
|| auth->family == FamilyWild) {
|
||||
int i;
|
||||
|
||||
if (strncmp (auth->address,
|
||||
@@ -594,16 +595,6 @@ match_local_auth (Xauth* auth, struct hostent *disp_he, int disp_nr)
|
||||
disp_he->h_aliases[i],
|
||||
auth->address_length) == 0)
|
||||
return 0;
|
||||
} else if (auth->family == FamilyInternet
|
||||
&& disp_he->h_addrtype == AF_INET
|
||||
&& auth->address_length == disp_he->h_length) {
|
||||
int i;
|
||||
|
||||
for (i = 0; disp_he->h_addr_list[i] != NULL; ++i)
|
||||
if (memcmp (disp_he->h_addr_list[i],
|
||||
auth->address,
|
||||
auth->address_length) == 0)
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user