run_early_defaults(void)
{
struct early_default *early;
- bool rc = true;
+ bool ret = true;
debug_decl(run_early_defaults, SUDOERS_DEBUG_DEFAULTS)
for (early = early_defaults; early->var != NULL; early++) {
continue;
if (early->def->callback != NULL) {
if (!early->def->callback(&early->def->sd_un))
- rc = false;
+ ret = false;
}
early->def = NULL;
}
- debug_return_bool(rc);
+ debug_return_bool(ret);
}
static void
update_defaults(int what, bool quiet)
{
struct defaults *def;
- bool rc = true;
+ bool ret = true;
debug_decl(update_defaults, SUDOERS_DEBUG_DEFAULTS)
sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO,
!default_binding_matches(def, what))
continue;
if (!set_early_default(def->var, def->val, def->op, quiet, early))
- rc = false;
+ ret = false;
}
if (!run_early_defaults())
- rc = false;
+ ret = false;
/*
* Then set the rest of the defaults.
!default_binding_matches(def, what))
continue;
if (!set_default(def->var, def->val, def->op, quiet))
- rc = false;
+ ret = false;
}
- debug_return_bool(rc);
+ debug_return_bool(ret);
}
/*
{
struct sudo_defs_types *cur, tmp;
struct defaults *def;
- bool rc = true;
+ bool ret = true;
debug_decl(check_defaults, SUDOERS_DEBUG_DEFAULTS)
TAILQ_FOREACH(def, &defaults, entries) {
if (cur->name == NULL) {
if (!quiet)
sudo_warnx(U_("unknown defaults entry `%s'"), def->var);
- rc = false;
+ ret = false;
} else {
/* Don't actually set the defaults value, just checking. */
tmp = *cur;
memset(&tmp.sd_un, 0, sizeof(tmp.sd_un));
if (!set_default_entry(&tmp, def->val, def->op, quiet, false))
- rc = false;
+ ret = false;
free_default(&tmp);
}
}
- debug_return_bool(rc);
+ debug_return_bool(ret);
}
static bool
struct stat sb;
gid_t parent_gid = 0;
char *slash = path;
- bool rval = true;
+ bool ret = true;
debug_decl(sudo_mkdir_parents, SUDOERS_DEBUG_UTIL)
/* If no gid specified, inherit from parent dir. */
if (errno != EEXIST) {
if (!quiet)
sudo_warn(U_("unable to mkdir %s"), path);
- rval = false;
+ ret = false;
break;
}
/* Already exists, make sure it is a directory. */
if (stat(path, &sb) != 0) {
if (!quiet)
sudo_warn(U_("unable to stat %s"), path);
- rval = false;
+ ret = false;
break;
}
if (!S_ISDIR(sb.st_mode)) {
if (!quiet)
sudo_warnx(U_("%s exists but is not a directory (0%o)"),
path, (unsigned int) sb.st_mode);
- rval = false;
+ ret = false;
break;
}
/* Inherit gid of parent dir for ownership. */
}
/* Return parent gid if none was specified by caller. */
- if (rval && *gidp == (gid_t)-1)
+ if (ret && *gidp == (gid_t)-1)
*gidp = parent_gid;
- debug_return_bool(rval);
+ debug_return_bool(ret);
}