[PATCH app/xauth 2/2] Sort entries from most specific to most generic.

Michal Srb msrb at suse.com
Thu Jun 7 14:01:25 UTC 2018


On čtvrtek 7. června 2018 14:59:44 CEST Walter Harms wrote:
> I was thinking about a more permanent solution and sofar i see the correct
> way would to add the two functions to libXau since i do not see that other
> applications would be more clever that xauth.

That would be nice, sadly libXau does not provide any functions to manipulate 
the list of xauth records. Just functions for writing and reading of a single 
record, locking and matching.

One option would be to change the semantics of XauGetBestAuthByAddr to return 
the most precise match first, instead of returning the first match of any 
kind. But I don't think changing that behavior is good idea.

Alternatively we can just take the patch #1, so that xauth does overwrite 
records with other random records. I believe that is correct fix. And we can 
ignore this patch #2 that does the sorting. I could probably workaround my 
issue by invoking xauth differently. (I could create 1-item list first 
containing the new record and then merge the original list into it, so the new 
record will end up on top.)

Michal Srb


More information about the xorg-devel mailing list