1. 10 May, 2020 4 commits
  2. 03 May, 2020 1 commit
    • Tobias Stoeckmann's avatar
      Fix segmentation fault on invalid add argument. · cb98d3b3
      Tobias Stoeckmann authored
      The hex key supplied with an add command can be quoted, in which
      case the quotation marks are removed.
      
      The check itself makes sure that a given string starts with a
      double quotation mark and ends with a double quotation mark.
      
      Buf if only " is supplied, the code crashes because it subtracts
      2 from the length (which is 1) and therefore copies too much
      memory into a 0 allocated memory area.
      
      Proof of concept:
      
      $ xauth add :0 0 \"
      cb98d3b3
  3. 20 Jun, 2019 1 commit
    • Adam Jackson's avatar
      process: Close a window where no authority file would exist · 0932418d
      Adam Jackson authored
      unlink()ing the old auth file before link()ing the temp to the new is
      just silly. rename() is atomic and will happily clobber the destination,
      and the only thing link() can give you here is the ability to fail on
      filesystems that don't support hardlinks.
      
      Fixes: #2
      0932418d
  4. 09 Jun, 2019 2 commits
    • Michal Srb's avatar
      Sort entries from most specific to most generic. · 42239054
      Michal Srb authored and Alan Coopersmith's avatar Alan Coopersmith committed
      
      
      There is no point in adding entry or merging lists if a FamilyWild entry would
      end in front of any entry, or entry without display number would end in front
      of entry with number.
      
      This sorts all entries in order:
        * FamilyWild without display number
        * FamilyWild with display number
        * Other family without display number
        * Other family with display number
      
      The order of the entries in each category is kept.
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      42239054
    • Michal Srb's avatar
      Merge only entries with equal dpy and protoname. · 06a21f7c
      Michal Srb authored and Alan Coopersmith's avatar Alan Coopersmith committed
      Merging two lists, or adding entry a into list acts unexpectedly if the list
      contains FamilyWild or entry with an empty display numbers. For example:
      
        > xauth list
        #ffff#6f70656e737573652d74756d626c6577656564#:  MIT-MAGIC-COOKIE-1  1500d80327733252cc42ba469138a259
      
        > xauth add test/unix:2 MIT-MAGIC-COOKIE-1 aabbccddeeff00112233445566778899
        > xauth list
        test/unix:2  MIT-MAGIC-COOKIE-1  aabbccddeeff00112233445566778899
      
      This is because merge_entries compares entries using `match_auth`, which
      follows the same rules as XauGetBestAuthByAddr. Following these rules is good
      when filtering the output of `xauth list`, but for merging we should compare
      for equality. It used to be done that way before commit 1555fff4
      
      . That commit
      changed it to improve the `xauth list` behavior, but did not seem consider the
      impact on merge.
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      06a21f7c
  5. 05 May, 2018 1 commit
  6. 23 Jun, 2014 1 commit
  7. 13 Oct, 2013 1 commit
  8. 08 Oct, 2013 1 commit
  9. 06 Oct, 2013 3 commits
  10. 29 Sep, 2013 1 commit
  11. 24 Sep, 2013 2 commits
  12. 23 Sep, 2013 1 commit
  13. 23 Feb, 2013 1 commit
  14. 05 Nov, 2012 1 commit
  15. 29 Sep, 2011 3 commits
  16. 24 May, 2011 1 commit
  17. 07 May, 2011 1 commit
  18. 07 Oct, 2010 1 commit
  19. 26 Aug, 2010 1 commit
  20. 10 Oct, 2009 1 commit
  21. 19 Jul, 2009 1 commit
  22. 07 Mar, 2009 1 commit
  23. 02 Dec, 2007 1 commit
  24. 12 Dec, 2006 1 commit
  25. 26 Jul, 2005 1 commit
  26. 24 Apr, 2004 1 commit
  27. 23 Apr, 2004 1 commit
  28. 14 Mar, 2004 1 commit
  29. 03 Mar, 2004 1 commit
  30. 26 Feb, 2004 2 commits