1. 22 Apr, 2021 1 commit
  2. 20 Aug, 2020 1 commit
  3. 10 May, 2020 4 commits
  4. 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
  5. 11 Jul, 2019 1 commit
  6. 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
  7. 09 Jun, 2019 2 commits
    • Michal Srb's avatar
      Sort entries from most specific to most generic. · 42239054
      Michal Srb authored
      
      
      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
      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
  8. 22 Nov, 2018 1 commit
  9. 17 Nov, 2018 1 commit
  10. 05 May, 2018 1 commit
  11. 29 Jan, 2017 2 commits
  12. 26 Jan, 2017 5 commits
  13. 15 May, 2015 1 commit
  14. 05 Jan, 2015 2 commits
  15. 31 Dec, 2014 1 commit
  16. 23 Jun, 2014 1 commit
  17. 02 Apr, 2014 4 commits
  18. 31 Mar, 2014 1 commit
  19. 30 Dec, 2013 1 commit
    • Alan Coopersmith's avatar
      Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions · ccf30deb
      Alan Coopersmith authored
      
      
      Required on Solaris to expose definitions in system headers that
      are not defined in the XPG standards now that xtrans 1.3 defines
      _XOPEN_SOURCE to 600 on Solaris.
      
      Fixes build failures:
      gethost.c: In function ‘get_hostname’:
      gethost.c:97:21: error: ‘INET6_ADDRSTRLEN’ undeclared (first use in this function)
      gethost.c:97:21: note: each undeclared identifier is reported only once for each function it appears in
      gethost.c:97:16: warning: unused variable ‘addr’ [-Wunused-variable]
      gethost.c: In function ‘get_address_info’:
      gethost.c:196:9: error: implicit declaration of function ‘strlcpy’ [-Werror=implicit-function-declaration]
      gethost.c:196:9: warning: nested extern declaration of ‘strlcpy’ [-Wnested-externs]
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
      ccf30deb
  20. 13 Oct, 2013 2 commits
  21. 09 Oct, 2013 3 commits
  22. 08 Oct, 2013 3 commits