This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/logging.c | |
/* | |
* Send a message to MAILTO user | |
*/ | |
static bool | |
send_mail(const char *fmt, ...) | |
{ | |
... | |
/* If mailer is disabled just return. */ | |
[0] if (!def_mailerpath || !def_mailto) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/def_data.h | |
#define I_MAILERPATH 39 | |
#define def_mailerpath (sudo_defs_table[I_MAILERPATH].sd_un.str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/def_data.c | |
struct sudo_defs_types sudo_defs_table[] = { | |
{ | |
... | |
}, { | |
"mailerpath", T_STR|T_BOOL|T_PATH, | |
N_("Path to mail program: %s"), | |
NULL, | |
}, { | |
"mailerflags", T_STR|T_BOOL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Structure describing compile-time and run-time options. | |
*/ | |
struct sudo_defs_types { | |
char *name; | |
int type; | |
char *desc; | |
struct def_values *values; | |
bool (*callback)(const union sudo_defs_val *); | |
union sudo_defs_val sd_un; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/parse.h | |
/* | |
* Structure describing a Defaults entry in sudoers. | |
*/ | |
struct defaults { | |
TAILQ_ENTRY(defaults) entries; | |
char *var; /* variable name */ | |
char *val; /* variable value */ | |
struct member_list *binding; /* user/host/runas binding */ | |
char *file; /* file Defaults entry was in */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/defaults.c | |
bool | |
update_defaults(int what, bool quiet) | |
{ | |
struct defaults *d; | |
... | |
/* | |
* Then set the rest of the defaults. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/sudoers.c | |
static int | |
set_cmnd(void) | |
{ | |
... | |
if (sudo_mode & (MODE_RUN | MODE_EDIT | MODE_CHECK)) { | |
... | |
/* set user_args */ | |
if (NewArgc > 1) { | |
char *to, *from, **av; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/sudoers.c | |
int | |
sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[], | |
void *closure) | |
{ | |
... | |
/* Find command in path and apply per-command Defaults. */ | |
[a] cmnd_status = set_cmnd(); | |
if (cmnd_status == NOT_FOUND_ERROR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo_1.8.23-9.el7/plugins/sudoers/defaults.c | |
struct early_default * | |
is_early_default(const char *name) | |
{ | |
struct early_default *early; | |
debug_decl(is_early_default, SUDOERS_DEBUG_DEFAULTS) | |
for (early = early_defaults; early->idx != -1; early++) { | |
if (strcmp(name, sudo_defs_table[early->idx].name) == 0) | |
debug_return_ptr(early); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sudo-1.8.30/plugins/sudoers/sudoers.c | |
//Note: sudo_1.8.30-1.ph3 does not have sources for it | |
int | |
sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[], | |
bool verbose, void *closure) | |
{ | |
... | |
/* Find command in path and apply per-command Defaults. */ | |
[A] cmnd_status = set_cmnd(); |
OlderNewer