[Heimdal-source-changes] [heimdal/heimdal] 237cd8: kdc: unused pid element is (pid_t)-1 not zero

GitHub noreply at github.com
Fre Juli 28 05:03:53 CEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/heimdal/heimdal
  Commit: 237cd892d9e9625b135f8c9d078d50dfa44bba91
      https://github.com/heimdal/heimdal/commit/237cd892d9e9625b135f8c9d078d50dfa44bba91
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2017-07-27 (Thu, 27 Jul 2017)

  Changed paths:
    M kdc/connect.c

  Log Message:
  -----------
  kdc: unused pid element is (pid_t)-1 not zero

When the termination of a child process is observed by reap_kid() it
clears the pids[] element by assigning it the invalid pid value
(pid_t)-1. However, start_kdc() assumes that the unused pid[[] element
value is 0.  As a result, each pid[] element's associated child process
can only be restarted once since start_kdc() will not be able to locate
an unused element.

This change alters start_kdc() to initialize all elements of pids[] to
(pid_t)-1 and use that as the marker for unused elements.  By doing so
start_kdc() can properly record child process pids and indefinitely
restart child processes as necessary.

Change-Id: Ia93c9284ab21289994eca7fc9cf1278be7c00683




More information about the Heimdal-source-changes mailing list