Todd Lewis e500ba6d97 fix uid/gid > 2^31
This MR revisits a partial fix from 2018. The problem stems from incorrect
handling of unsigned 32-bit uid_ts and gid_ts as signed when values are
large - i.e. when the high bit is set. In that case, pgrep and pkill fail to
identify processes by uid. (They succeed when finding the same processes by
username.) The primary fix for this is to impliment the "FIXME" comment in
proc/readproc.h, the implementation of which allows the removal of the (int)
casts from the partial fix from 2018.

The other fixed code in this MR consists of tests in strict_atol() that
detects and errors out on overflows.

References:
 Merge !146
2021-10-26 18:13:48 +11:00
..
2021-02-20 22:30:31 +11:00
2021-02-20 22:30:31 +11:00
2021-01-21 17:37:48 +11:00
2021-10-26 18:13:48 +11:00
2020-07-05 21:18:36 +10:00
2021-01-21 17:37:48 +11:00
2021-01-21 17:37:48 +11:00
2021-01-21 17:37:48 +11:00