Skip to content

Instantly share code, notes, and snippets.

@saidelike
Created July 6, 2021 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saidelike/301aa32078fbcfdcc6a02ec8ffde1221 to your computer and use it in GitHub Desktop.
Save saidelike/301aa32078fbcfdcc6a02ec8ffde1221 to your computer and use it in GitHub Desktop.
//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.
*/
TAILQ_FOREACH(d, &defaults, entries) {
...
/* Copy the value to sudo_defs_table and run callback (if any) */
if (!set_default(d->var, d->val, d->op, d->file, d->lineno, quiet))
ret = false;
}
debug_return_bool(ret);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment