]> granicus.if.org Git - sudo/commitdiff
Fix get_starttime() on HP-UX.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Fri, 17 Aug 2018 21:58:17 +0000 (15:58 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Fri, 17 Aug 2018 21:58:17 +0000 (15:58 -0600)
plugins/sudoers/starttime.c

index d5df0ffd7d3c83b0c3c96a4f7c0097de7c6560dc..00a99b1eccb6f604bf5ef8eeb58ac017dfb4449c 100644 (file)
@@ -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;