mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Simplify the nss interface such that each sudoers provider fills
in a per-nss list of userspecs and defaults instead of using separate lookup and list functions. This makes it possible to have a single implementation of the code for sudoers lookup and listing.
This commit is contained in:
@@ -725,11 +725,11 @@ default_binding_matches(struct defaults *d, int what)
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the defaults based on what was set by sudoers.
|
||||
* Update the global defaults based on the given defaults list.
|
||||
* Pass in an OR'd list of which default types to update.
|
||||
*/
|
||||
bool
|
||||
update_defaults(int what, bool quiet)
|
||||
update_defaults(struct defaults_list *defs, int what, bool quiet)
|
||||
{
|
||||
struct defaults *d;
|
||||
bool ret = true;
|
||||
@@ -741,7 +741,7 @@ update_defaults(int what, bool quiet)
|
||||
/*
|
||||
* First apply Defaults values marked as early.
|
||||
*/
|
||||
TAILQ_FOREACH(d, &defaults, entries) {
|
||||
TAILQ_FOREACH(d, defs, entries) {
|
||||
struct early_default *early = is_early_default(d->var);
|
||||
if (early == NULL)
|
||||
continue;
|
||||
@@ -763,7 +763,7 @@ update_defaults(int what, bool quiet)
|
||||
/*
|
||||
* Then set the rest of the defaults.
|
||||
*/
|
||||
TAILQ_FOREACH(d, &defaults, entries) {
|
||||
TAILQ_FOREACH(d, defs, entries) {
|
||||
/* Skip Defaults marked as early, we already did them. */
|
||||
if (is_early_default(d->var))
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user