The I/O log file name is not just the basename of the full iolog_path.

The audit plugin already has the correct value for iolog_file, don't
overwrite it with basename(iolog_path).  In the future we may wish
to pass in iolog_file and iolog_dir in addition to iolog_path.
Fixes Bug #1046.
This commit is contained in:
Todd C. Miller
2023-03-31 15:51:14 -06:00
parent ac12f82d86
commit 0a4c8872a8
2 changed files with 0 additions and 2 deletions

View File

@@ -227,7 +227,6 @@ audit_to_eventlog(struct eventlog *evlog, char * const command_info[],
case 'i':
if (strncmp(*cur, "iolog_path=", sizeof("iolog_path=") - 1) == 0) {
evlog->iolog_path = *cur + sizeof("iolog_path=") - 1;
evlog->iolog_file = sudo_basename(evlog->iolog_path);
continue;
}
break;

View File

@@ -399,7 +399,6 @@ iolog_deserialize_info(struct log_details *details, char * const user_info[],
evlog->iolog_path = strdup(*cur + sizeof("iolog_path=") - 1);
if (evlog->iolog_path == NULL)
goto oom;
evlog->iolog_file = sudo_basename(evlog->iolog_path);
continue;
}
if (strncmp(*cur, "iolog_stdin=", sizeof("iolog_stdin=") - 1) == 0) {