1. Apr 15, 2019
  2. Apr 13, 2019
  3. Apr 03, 2019
  4. Mar 15, 2019
  5. Mar 13, 2019
  6. Mar 01, 2019
  7. Feb 28, 2019
  8. Feb 22, 2019
  9. Jan 26, 2019
  10. Jan 20, 2019
  11. 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
  12. Jan 17, 2019
  13. Jan 15, 2019