summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2023-03-31 15:51:14 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2023-03-31 15:51:14 -0600
commitddf9a519378691be85a79ddd47f2006ce3ac3882 (patch)
tree5696207b36cda9b538fc022d344ab972351348f0
parentbfc317e7251f2529997a51bc23fc1369986cf3dc (diff)
downloadsudo-ddf9a519378691be85a79ddd47f2006ce3ac3882.tar.gz
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.
-rw-r--r--plugins/sudoers/audit.c1
-rw-r--r--plugins/sudoers/iolog.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/plugins/sudoers/audit.c b/plugins/sudoers/audit.c
index 5a03bfeec..56153d099 100644
--- a/plugins/sudoers/audit.c
+++ b/plugins/sudoers/audit.c
@@ -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;
diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c
index ec93698f4..d84182ae6 100644
--- a/plugins/sudoers/iolog.c
+++ b/plugins/sudoers/iolog.c
@@ -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) {