before log_allowed() so the session id is logged.
static struct timeval last_time;
static union script_fd io_outfile, io_timfile;
-static void
+void
io_nextid(void)
{
struct stat sb;
* Build a path containing the session id split into two-digit subdirs,
* so ID 000001 becomes /var/log/sudo-session/00/00/01.
*/
- io_nextid();
len = build_idpath(pathbuf, sizeof(pathbuf));
if (len == -1)
return -1;
validate_env_vars(sudo_user.env_vars);
}
+ if (def_transcript && (sudo_mode & (MODE_RUN | MODE_EDIT)))
+ io_nextid();
log_allowed(validated);
if (ISSET(sudo_mode, MODE_CHECK))
rval = display_cmnd(snl, list_pw ? list_pw : sudo_user.pw);
void sudoers_io_close(int exit_status, int error);
int sudoers_io_version(int verbose);
int sudoers_io_log_output(const char *buf, unsigned int len);
+void io_nextid(void);
/* env.c */
char **env_get(void);