Store iolog_path in struct sudo_user for use in the event log.
This commit is contained in:
@@ -655,8 +655,8 @@ sudoers_to_eventlog(struct eventlog *evlog, char * const argv[],
|
|||||||
debug_decl(sudoers_to_eventlog, SUDOERS_DEBUG_LOGGING);
|
debug_decl(sudoers_to_eventlog, SUDOERS_DEBUG_LOGGING);
|
||||||
|
|
||||||
memset(evlog, 0, sizeof(*evlog));
|
memset(evlog, 0, sizeof(*evlog));
|
||||||
/* TODO: iolog_path */
|
|
||||||
evlog->iolog_file = sudo_user.iolog_file;
|
evlog->iolog_file = sudo_user.iolog_file;
|
||||||
|
evlog->iolog_path = sudo_user.iolog_path;
|
||||||
evlog->command = safe_cmnd ? safe_cmnd : (argv ? argv[0] : NULL);
|
evlog->command = safe_cmnd ? safe_cmnd : (argv ? argv[0] : NULL);
|
||||||
evlog->cwd = user_cwd;
|
evlog->cwd = user_cwd;
|
||||||
if (def_runchroot != NULL && strcmp(def_runchroot, "*") != 0) {
|
if (def_runchroot != NULL && strcmp(def_runchroot, "*") != 0) {
|
||||||
|
@@ -265,9 +265,9 @@ format_iolog_path(void)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stash pointer to the I/O log file for use when logging. */
|
/* Stash pointer to the I/O log for the event log. */
|
||||||
sudo_user.iolog_file =
|
sudo_user.iolog_path = iolog_path + sizeof("iolog_path=") - 1;
|
||||||
iolog_path + sizeof("iolog_path=") - 1 + strlen(dir) + 1;
|
sudo_user.iolog_file = sudo_user.iolog_path + 1 + strlen(dir);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
debug_return_str(iolog_path);
|
debug_return_str(iolog_path);
|
||||||
|
@@ -114,6 +114,7 @@ struct sudo_user {
|
|||||||
char *limitprivs;
|
char *limitprivs;
|
||||||
#endif
|
#endif
|
||||||
char *iolog_file;
|
char *iolog_file;
|
||||||
|
char *iolog_path;
|
||||||
GETGROUPS_T *gids;
|
GETGROUPS_T *gids;
|
||||||
int execfd;
|
int execfd;
|
||||||
int ngids;
|
int ngids;
|
||||||
|
Reference in New Issue
Block a user