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:
@@ -227,7 +227,6 @@ audit_to_eventlog(struct eventlog *evlog, char * const command_info[],
|
|||||||
case 'i':
|
case 'i':
|
||||||
if (strncmp(*cur, "iolog_path=", sizeof("iolog_path=") - 1) == 0) {
|
if (strncmp(*cur, "iolog_path=", sizeof("iolog_path=") - 1) == 0) {
|
||||||
evlog->iolog_path = *cur + sizeof("iolog_path=") - 1;
|
evlog->iolog_path = *cur + sizeof("iolog_path=") - 1;
|
||||||
evlog->iolog_file = sudo_basename(evlog->iolog_path);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -399,7 +399,6 @@ iolog_deserialize_info(struct log_details *details, char * const user_info[],
|
|||||||
evlog->iolog_path = strdup(*cur + sizeof("iolog_path=") - 1);
|
evlog->iolog_path = strdup(*cur + sizeof("iolog_path=") - 1);
|
||||||
if (evlog->iolog_path == NULL)
|
if (evlog->iolog_path == NULL)
|
||||||
goto oom;
|
goto oom;
|
||||||
evlog->iolog_file = sudo_basename(evlog->iolog_path);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strncmp(*cur, "iolog_stdin=", sizeof("iolog_stdin=") - 1) == 0) {
|
if (strncmp(*cur, "iolog_stdin=", sizeof("iolog_stdin=") - 1) == 0) {
|
||||||
|
Reference in New Issue
Block a user