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

Michal Srb msrb at suse.com
Wed Jun 6 06:34:29 UTC 2018


On úterý 5. června 2018 17:46:05 CEST Walter Harms wrote:
> MMh, so far i understand you do an add and then sort the whole thing.
> perhaps it would be more easy to start with a sorted field and insert (add)
> a key on the correct location ?

That would work if we have the guarantee that the list is sorted to begin 
with. The list will be sorted now if it was created by xauth. But if it was 
made by anything else (e.g. some display manager) it can be in any order. So 
when adding new entry, xauth will re-sort it.

Alternative would be to just insert the new entry in front of the first more 
general entry and ignore any entries that are never used because of their 
position in the list.

I don't have opinion on which is better. Both would work for my usecase.

Michal Srb


More information about the xorg-devel mailing list