1. Feb 22, 2019
  2. Jan 26, 2019
  3. Jan 20, 2019
  4. Jan 19, 2019
    • Tobias Stoeckmann's avatar
      Use criticial section in WaitPgrp. · 23b9bdc1
      Tobias Stoeckmann authored
      
      
      A signal race exists in WaitPgrp that could result in a kill
      initiated by xsecurelock against a process that does not belong to it.
      
      This race can happen if waitpid has been called for a child that has
      already been terminated and SIGTERM is received before the pid has been
      reset to 0.
      
      In that case SIGTERM will call kill for a pid that has been already
      released to the operating system and could thus have been assigned to a
      new process again.
      
      To prevent this, the criticial section blocks SIGTERM and also SIGCHLD
      if WaitPgrp is supposed to block until a child status changes. If the
      function is supposed to block, sigsuspend() restores SIGCHLD and SIGTERM
      again and waits until a signal is delivered. These signals are blocked
      and unblocked for each iteration of the loop. This is required to
      actually get interrupted/killed by a SIGTERM in non-blocking mode.
      
      If no critical section could be installed due to failure in calling
      sigprocmask the old behaviour is kept.
      
      Signed-off-by: default avatarTobias Stoeckmann <tobias@stoeckmann.org>
      23b9bdc1
    • Tobias Stoeckmann's avatar
      Removed unconditional loop. · e4af3f6b
      Tobias Stoeckmann authored
      
      
      Having a conditional loop without breaks or returns is a better
      foundation to implement a criticial section without duplicating
      cleanups throughout the code.
      
      Signed-off-by: default avatarTobias Stoeckmann <tobias@stoeckmann.org>
      e4af3f6b
  5. Jan 15, 2019
  6. Jan 12, 2019
  7. Jan 10, 2019
  8. Jan 03, 2019
  9. Dec 21, 2018
  10. Dec 11, 2018
  11. Dec 06, 2018
    • Rudolf Polzer's avatar
      Restructure how force-grabbing works. · 0584acc6
      Rudolf Polzer authored
      The only functional difference is that in XSECURELOCK_FORCE_GRAB=1 mode,
      the new code will be holding a server grab while grabbing input even if
      it detected another xsecurelock instance.
      
      However, this difference is minor, and makes the code a lot more
      readable.
      0584acc6
  12. Dec 05, 2018
  13. Dec 04, 2018
    • divVerent's avatar
      Thou shalt have no other screen lockers · 0471192b
      divVerent authored
      Multiple screen lockers can interfere in various ways:
      
      - First of all, log spam: only the first locker is usually able to lock at all. Any others will usually fail getting the required input grabs.
      
      - Some lockers, e.g. light-locker, also have specific countermeasures against failing to lock and may interfere with xsecurelock. This has in the past caused issues such as having to unlock twice, having to unlock on a black screen because the graphics output broke, or losing all input focus after unlocking (yes, including alt-tab) and thus having a broken environment until clicking another window.
      
      - Also, potential race conditions during startup of both at the same time might cause deadlocks (e.g. if one grabs mouse first and one grabs keyboard first, while retrying indefinitely).
      
      - Even if they're not retrying indefinitely (xsecurelock isn't), this can slow down suspend to the point that systemd gives up and suspends before the screen is locked.
      0471192b
    • Rudolf Polzer's avatar
      Also bump the version here. Oops. · a7d427c8
      Rudolf Polzer authored
      a7d427c8
    • Rudolf Polzer's avatar
      d9cb853e
  14. Dec 01, 2018