Add argc and argv to I/O logger open function.

This commit is contained in:
Todd C. Miller
2010-05-17 10:38:56 -04:00
parent fa717176b2
commit 55ef027d88
8 changed files with 191 additions and 162 deletions

View File

@@ -178,7 +178,8 @@ build_idpath(char *pathbuf, size_t pathsize)
int
sudoers_io_open(unsigned int version, sudo_conv_t conversation,
sudo_printf_t plugin_printf, char * const settings[],
char * const user_info[], char * const user_env[])
char * const user_info[], int argc, char * const argv[],
char * const user_env[])
{
char pathbuf[PATH_MAX];
FILE *io_logfile;
@@ -250,6 +251,7 @@ sudoers_io_open(unsigned int version, sudo_conv_t conversation,
gettimeofday(&last_time, NULL);
/* XXX - log more stuff? window size? environment? */
/* XXX - use passed in argv instead of using sudoers policy info. */
fprintf(io_logfile, "%ld:%s:%s:%s:%s\n", last_time.tv_sec, user_name,
runas_pw->pw_name, runas_gr ? runas_gr->gr_name : "", user_tty);
fprintf(io_logfile, "%s\n", user_cwd);