Write an extended I/O info log in JSON format.

This will be used by sudoreplay if it exists to get more information
about the command being replayed.
This commit is contained in:
Todd C. Miller
2020-03-29 05:05:08 -06:00
parent a644c1d1d2
commit ea9b711a70
12 changed files with 270 additions and 47 deletions

View File

@@ -552,7 +552,7 @@ do_logfile_sudo(const char *reason, const struct iolog_details *details)
goto done;
}
if ((timeptr = localtime(&details->submit_time)) != NULL) {
if ((timeptr = localtime(&details->submit_time.tv_sec)) != NULL) {
/* strftime() does not guarantee to NUL-terminate so we must check. */
timebuf[sizeof(timebuf) - 1] = '\0';
if (strftime(timebuf, sizeof(timebuf), timefmt, timeptr) != 0 &&