From: Todd C. Miller Date: Fri, 17 Aug 2018 21:58:17 +0000 (-0600) Subject: Fix get_starttime() on HP-UX. X-Git-Tag: SUDO_1_8_24^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92975ee7c7596dd9d348358242f07201d499bcd0;p=sudo Fix get_starttime() on HP-UX. --- diff --git a/plugins/sudoers/starttime.c b/plugins/sudoers/starttime.c index d5df0ffd7..00a99b1ec 100644 --- a/plugins/sudoers/starttime.c +++ b/plugins/sudoers/starttime.c @@ -273,7 +273,7 @@ get_starttime(pid_t pid, struct timespec *starttime) * Determine the start time from pst_start in struct pst_status. * We may get EOVERFLOW if the whole thing doesn't fit but that is OK. */ - rc = pstat_getproc(&pstat, sizeof(pstat), (size_t)0, (int)getpid()); + rc = pstat_getproc(&pstat, sizeof(pstat), (size_t)0, (int)pid); if (rc != -1 || errno == EOVERFLOW) { starttime->tv_sec = pstat.pst_start; starttime->tv_nsec = 0;