sudo  1.9.11p3
About: Sudo (su "do") allows a system administrator to delegate authority to give certain users the ability to run some commands as root or another user.
  Fossies Dox: sudo-1.9.11p3.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

audit.c File Reference
#include <config.h>
#include <sys/wait.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sudoers.h"
Include dependency graph for audit.c:

Go to the source code of this file.

Functions

static int audit_success (char *const argv[])
 
static int audit_failure_int (char *const argv[], const char *message)
 
int vaudit_failure (char *const argv[], char const *const fmt, va_list ap)
 
int audit_failure (char *const argv[], char const *const fmt,...)
 
static int sudoers_audit_open (unsigned int version, sudo_conv_t conversation, sudo_printf_t plugin_printf, char *const settings[], char *const user_info[], int submit_optind, char *const submit_argv[], char *const submit_envp[], char *const plugin_options[], const char **errstr)
 
static void audit_to_eventlog (struct eventlog *evlog, char *const command_info[], char *const run_argv[], char *const run_envp[], const char *uuid_str)
 
static bool log_server_accept (struct eventlog *evlog)
 
static void log_server_exit (int status_type, int status)
 
static int sudoers_audit_accept (const char *plugin_name, unsigned int plugin_type, char *const command_info[], char *const run_argv[], char *const run_envp[], const char **errstr)
 
static int sudoers_audit_reject (const char *plugin_name, unsigned int plugin_type, const char *message, char *const command_info[], const char **errstr)
 
static int sudoers_audit_error (const char *plugin_name, unsigned int plugin_type, const char *message, char *const command_info[], const char **errstr)
 
void sudoers_audit_close (int status_type, int status)
 
static int sudoers_audit_version (int verbose)
 

Variables

char * audit_msg = NULL
 
sudo_dso_public struct audit_plugin sudoers_audit
 

Function Documentation

◆ audit_failure()

int audit_failure ( char *const  argv[],
char const *const  fmt,
  ... 
)

◆ audit_failure_int()

static int audit_failure_int ( char *const  argv[],
const char *  message 
)
static

◆ audit_success()

static int audit_success ( char *const  argv[])
static

◆ audit_to_eventlog()

static void audit_to_eventlog ( struct eventlog evlog,
char *const  command_info[],
char *const  run_argv[],
char *const  run_envp[],
const char *  uuid_str 
)
static

◆ log_server_accept()

static bool log_server_accept ( struct eventlog evlog)
static

Definition at line 325 of file audit.c.

Referenced by sudoers_audit_accept().

◆ log_server_exit()

static void log_server_exit ( int  status_type,
int  status 
)
static

Definition at line 331 of file audit.c.

Referenced by sudoers_audit_close().

◆ sudoers_audit_accept()

static int sudoers_audit_accept ( const char *  plugin_name,
unsigned int  plugin_type,
char *const  command_info[],
char *const  run_argv[],
char *const  run_envp[],
const char **  errstr 
)
static

◆ sudoers_audit_close()

void sudoers_audit_close ( int  status_type,
int  status 
)

Definition at line 436 of file audit.c.

References log_server_exit().

◆ sudoers_audit_error()

static int sudoers_audit_error ( const char *  plugin_name,
unsigned int  plugin_type,
const char *  message,
char *const  command_info[],
const char **  errstr 
)
static

◆ sudoers_audit_open()

static int sudoers_audit_open ( unsigned int  version,
sudo_conv_t  conversation,
sudo_printf_t  plugin_printf,
char *const  settings[],
char *const  user_info[],
int  submit_optind,
char *const  submit_argv[],
char *const  submit_envp[],
char *const  plugin_options[],
const char **  errstr 
)
static

◆ sudoers_audit_reject()

static int sudoers_audit_reject ( const char *  plugin_name,
unsigned int  plugin_type,
const char *  message,
char *const  command_info[],
const char **  errstr 
)
static

◆ sudoers_audit_version()

static int sudoers_audit_version ( int  verbose)
static

◆ vaudit_failure()

int vaudit_failure ( char *const  argv[],
char const *const  fmt,
va_list  ap 
)

Variable Documentation

◆ audit_msg

◆ sudoers_audit

sudo_dso_public struct audit_plugin sudoers_audit
Initial value:
= {
3 ,
((( 1 ) << 16) | ( 19 )) ,
NULL,
NULL,
NULL
}
static int sudoers_audit_accept(const char *plugin_name, unsigned int plugin_type, char *const command_info[], char *const run_argv[], char *const run_envp[], const char **errstr)
Definition: audit.c:338
static int sudoers_audit_reject(const char *plugin_name, unsigned int plugin_type, const char *message, char *const command_info[], const char **errstr)
Definition: audit.c:373
static int sudoers_audit_error(const char *plugin_name, unsigned int plugin_type, const char *message, char *const command_info[], const char **errstr)
Definition: audit.c:403
static int sudoers_audit_open(unsigned int version, sudo_conv_t conversation, sudo_printf_t plugin_printf, char *const settings[], char *const user_info[], int submit_optind, char *const submit_argv[], char *const submit_envp[], char *const plugin_options[], const char **errstr)
Definition: audit.c:146
static int sudoers_audit_version(int verbose)
Definition: audit.c:442
void sudoers_audit_close(int status_type, int status)
Definition: audit.c:436

Definition at line 452 of file audit.c.

Referenced by sudoers_audit_open().