Rename warning/fatal -> sudo_warn/sudo_fatal to avoid namespace
pollution in libsudo_util.so.
This commit is contained in:
@@ -177,7 +177,7 @@ set_var_group_source(const char *entry, const char *conf_file)
|
||||
} else if (strcasecmp(entry, "dynamic") == 0) {
|
||||
sudo_conf_data.group_source = GROUP_SOURCE_DYNAMIC;
|
||||
} else {
|
||||
warningx(U_("unsupported group source `%s' in %s, line %d"), entry,
|
||||
sudo_warnx(U_("unsupported group source `%s' in %s, line %d"), entry,
|
||||
conf_file, conf_lineno);
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ set_var_max_groups(const char *entry, const char *conf_file)
|
||||
if (max_groups > 0) {
|
||||
sudo_conf_data.max_groups = max_groups;
|
||||
} else {
|
||||
warningx(U_("invalid max groups `%s' in %s, line %d"), entry,
|
||||
sudo_warnx(U_("invalid max groups `%s' in %s, line %d"), entry,
|
||||
conf_file, conf_lineno);
|
||||
}
|
||||
}
|
||||
@@ -406,20 +406,20 @@ sudo_conf_read(const char *conf_file)
|
||||
case SUDO_PATH_MISSING:
|
||||
/* Root should always be able to read sudo.conf. */
|
||||
if (errno != ENOENT && geteuid() == ROOT_UID)
|
||||
warning(U_("unable to stat %s"), conf_file);
|
||||
sudo_warn(U_("unable to stat %s"), conf_file);
|
||||
goto done;
|
||||
case SUDO_PATH_BAD_TYPE:
|
||||
warningx(U_("%s is not a regular file"), conf_file);
|
||||
sudo_warnx(U_("%s is not a regular file"), conf_file);
|
||||
goto done;
|
||||
case SUDO_PATH_WRONG_OWNER:
|
||||
warningx(U_("%s is owned by uid %u, should be %u"),
|
||||
sudo_warnx(U_("%s is owned by uid %u, should be %u"),
|
||||
conf_file, (unsigned int) sb.st_uid, ROOT_UID);
|
||||
goto done;
|
||||
case SUDO_PATH_WORLD_WRITABLE:
|
||||
warningx(U_("%s is world writable"), conf_file);
|
||||
sudo_warnx(U_("%s is world writable"), conf_file);
|
||||
goto done;
|
||||
case SUDO_PATH_GROUP_WRITABLE:
|
||||
warningx(U_("%s is group writable"), conf_file);
|
||||
sudo_warnx(U_("%s is group writable"), conf_file);
|
||||
goto done;
|
||||
default:
|
||||
/* NOTREACHED */
|
||||
@@ -429,7 +429,7 @@ sudo_conf_read(const char *conf_file)
|
||||
|
||||
if ((fp = fopen(conf_file, "r")) == NULL) {
|
||||
if (errno != ENOENT && geteuid() == ROOT_UID)
|
||||
warning(U_("unable to open %s"), conf_file);
|
||||
sudo_warn(U_("unable to open %s"), conf_file);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user