accent (grave) mark and apostrophe.
__func__, conf_file, lineno, entry);
debug_return_int(false);
bad:
- sudo_warnx(U_("invalid Path value `%s' in %s, line %u"),
+ sudo_warnx(U_("invalid Path value \"%s\" in %s, line %u"),
entry, conf_file, lineno);
debug_return_int(false);
}
debug_decl(set_var_disable_coredump, SUDO_DEBUG_UTIL)
if (val == -1) {
- sudo_warnx(U_("invalid value for %s `%s' in %s, line %u"),
+ sudo_warnx(U_("invalid value for %s \"%s\" in %s, line %u"),
"disable_coredump", strval, conf_file, lineno);
debug_return_bool(false);
}
} else if (strcasecmp(strval, "dynamic") == 0) {
sudo_conf_data.group_source = GROUP_SOURCE_DYNAMIC;
} else {
- sudo_warnx(U_("unsupported group source `%s' in %s, line %u"), strval,
+ sudo_warnx(U_("unsupported group source \"%s\" in %s, line %u"), strval,
conf_file, lineno);
debug_return_bool(false);
}
max_groups = strtonum(strval, 1, INT_MAX, NULL);
if (max_groups <= 0) {
- sudo_warnx(U_("invalid max groups `%s' in %s, line %u"), strval,
+ sudo_warnx(U_("invalid max groups \"%s\" in %s, line %u"), strval,
conf_file, lineno);
debug_return_bool(false);
}
debug_decl(set_var_probe_interfaces, SUDO_DEBUG_UTIL)
if (val == -1) {
- sudo_warnx(U_("invalid value for %s `%s' in %s, line %u"),
+ sudo_warnx(U_("invalid value for %s \"%s\" in %s, line %u"),
"probe_interfaces", strval, conf_file, lineno);
debug_return_bool(false);
}
HLTQ_TO_TAILQ(&a->members, members, entries);
switch (rbinsert(aliases, a, NULL)) {
case 1:
- snprintf(errbuf, sizeof(errbuf), N_("Alias `%s' already defined"), name);
+ snprintf(errbuf, sizeof(errbuf), N_("Alias \"%s\" already defined"), name);
alias_free(a);
debug_return_str(errbuf);
case -1:
if (!ISSET(def->type, T_BOOL) || op != false) {
if (!ISSET(flags, FLAG_QUIET)) {
if (lineno > 0) {
- sudo_warnx(U_("%s:%d no value specified for `%s'"),
+ sudo_warnx(U_("%s:%d no value specified for \"%s\""),
file, lineno, def->name);
} else {
- sudo_warnx(U_("%s: no value specified for `%s'"),
+ sudo_warnx(U_("%s: no value specified for \"%s\""),
file, def->name);
}
}
if (ISSET(def->type, T_PATH) && val != NULL && *val != '/') {
if (!ISSET(flags, FLAG_QUIET)) {
if (lineno > 0) {
- sudo_warnx(U_("%s:%d values for `%s' must start with a '/'"),
+ sudo_warnx(U_("%s:%d values for \"%s\" must start with a '/'"),
file, lineno, def->name);
} else {
- sudo_warnx(U_("%s: values for `%s' must start with a '/'"),
+ sudo_warnx(U_("%s: values for \"%s\" must start with a '/'"),
file, def->name);
}
}
if (val != NULL) {
if (!ISSET(flags, FLAG_QUIET)) {
if (lineno > 0) {
- sudo_warnx(U_("%s:%d option `%s' does not take a value"),
+ sudo_warnx(U_("%s:%d option \"%s\" does not take a value"),
file, lineno, def->name);
} else {
- sudo_warnx(U_("%s: option `%s' does not take a value"),
+ sudo_warnx(U_("%s: option \"%s\" does not take a value"),
file, def->name);
}
}
default:
if (!ISSET(flags, FLAG_QUIET)) {
if (lineno > 0) {
- sudo_warnx(U_("%s:%d invalid Defaults type 0x%x for option `%s'"),
+ sudo_warnx(U_("%s:%d invalid Defaults type 0x%x for option \"%s\""),
file, lineno, def->type, def->name);
} else {
- sudo_warnx(U_("%s: invalid Defaults type 0x%x for option `%s'"),
+ sudo_warnx(U_("%s: invalid Defaults type 0x%x for option \"%s\""),
file, def->type, def->name);
}
}
case false:
if (!ISSET(flags, FLAG_QUIET)) {
if (lineno > 0) {
- sudo_warnx(U_("%s:%d value `%s' is invalid for option `%s'"),
+ sudo_warnx(U_("%s:%d value \"%s\" is invalid for option \"%s\""),
file, lineno, val, def->name);
} else {
- sudo_warnx(U_("%s: value `%s' is invalid for option `%s'"),
+ sudo_warnx(U_("%s: value \"%s\" is invalid for option \"%s\""),
file, val, def->name);
}
}
if (!cur->name) {
if (!ISSET(flags, FLAG_QUIET)) {
if (lineno > 0) {
- sudo_warnx(U_("%s:%d unknown defaults entry `%s'"),
+ sudo_warnx(U_("%s:%d unknown defaults entry \"%s\""),
file, lineno, var);
} else {
- sudo_warnx(U_("%s: unknown defaults entry `%s'"),
+ sudo_warnx(U_("%s: unknown defaults entry \"%s\""),
file, var);
}
}
if (cur->name == NULL) {
if (!quiet) {
if (lineno > 0) {
- sudo_warnx(U_("%s:%d unknown defaults entry `%s'"),
+ sudo_warnx(U_("%s:%d unknown defaults entry \"%s\""),
file, lineno, var);
} else {
- sudo_warnx(U_("%s: unknown defaults entry `%s'"),
+ sudo_warnx(U_("%s: unknown defaults entry \"%s\""),
file, var);
}
}
if (flags == NOT_FOUND)
sudo_warnx(U_("%s: command not found"), user_cmnd);
else if (flags == NOT_FOUND_DOT)
- sudo_warnx(U_("ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run."), user_cmnd, user_cmnd, user_cmnd);
+ sudo_warnx(U_("ignoring \"%s\" found in '.'\nUse \"sudo ./%s\" if this is the \"%s\" you wish to run."), user_cmnd, user_cmnd, user_cmnd);
}
debug_return_bool(ret);
/* Finally tell the user if the command did not exist. */
if (cmnd_status == NOT_FOUND_DOT) {
audit_failure(NewArgc, NewArgv, N_("command in current directory"));
- sudo_warnx(U_("ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run."), user_cmnd, user_cmnd, user_cmnd);
+ sudo_warnx(U_("ignoring \"%s\" found in '.'\nUse \"sudo ./%s\" if this is the \"%s\" you wish to run."), user_cmnd, user_cmnd, user_cmnd);
goto bad;
} else if (cmnd_status == NOT_FOUND) {
if (ISSET(sudo_mode, MODE_CHECK)) {
}
/*
- * Initialize timezone and fill in ``sudo_user'' struct.
+ * Initialize timezone and fill in sudo_user struct.
*/
static bool
init_vars(char * const envp[])
if (login_class && strcmp(login_class, "-") != 0) {
if (user_uid != 0 && pw->pw_uid != 0) {
- sudo_warnx(U_("only root can use `-c %s'"), login_class);
+ sudo_warnx(U_("only root can use \"-c %s\""), login_class);
ret = false;
goto done;
}
if (!quiet) {
if (errno == ELOOP) {
sudo_warnx(strict ?
- U_("Error: cycle in %s `%s'") :
- U_("Warning: cycle in %s `%s'"),
+ U_("Error: cycle in %s \"%s\"") :
+ U_("Warning: cycle in %s \"%s\""),
alias_type_to_string(type), name);
} else {
sudo_warnx(strict ?
- U_("Error: %s `%s' referenced but not defined") :
- U_("Warning: %s `%s' referenced but not defined"),
+ U_("Error: %s \"%s\" referenced but not defined") :
+ U_("Warning: %s \"%s\" referenced but not defined"),
alias_type_to_string(type), name);
}
}
{
struct alias *a = (struct alias *)v1;
- sudo_warnx_nodebug(U_("Warning: unused %s `%s'"),
+ sudo_warnx_nodebug(U_("Warning: unused %s \"%s\""),
alias_type_to_string(a->type), a->name);
return 0;
}
TAILQ_FOREACH_SAFE(def, &defaults, entries, next) {
type = get_defaults_type(def);
if (type == -1) {
- sudo_warnx(U_("unknown defaults entry `%s'"), def->var);
+ sudo_warnx(U_("unknown defaults entry \"%s\""), def->var);
/* XXX - just pass it through as a string anyway? */
continue;
}
def = next;
type = get_defaults_type(def);
if (type == -1) {
- sudo_warnx(U_("unknown defaults entry `%s'"), def->var);
+ sudo_warnx(U_("unknown defaults entry \"%s\""), def->var);
/* XXX - just pass it through as a string anyway? */
break;
}
if (info->path[0] == '/') {
if (strlcpy(fullpath, info->path, pathsize) >= pathsize) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("%s: %s"), info->path, strerror(ENAMETOOLONG));
goto done;
/* Check static symbols. */
if (strcmp(info->path, SUDOERS_PLUGIN) == 0) {
if (strlcpy(fullpath, info->path, pathsize) >= pathsize) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("%s: %s"), info->path, strerror(ENAMETOOLONG));
goto done;
len = snprintf(fullpath, pathsize, "%s%s", sudo_conf_plugin_dir_path(),
info->path);
if (len <= 0 || (size_t)len >= pathsize) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("%s%s: %s"), sudo_conf_plugin_dir_path(), info->path,
strerror(ENAMETOOLONG));
debug_decl(sudo_check_plugin, SUDO_DEBUG_PLUGIN)
if (sudo_stat_plugin(info, fullpath, pathsize, &sb) != 0) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warn("%s%s",
sudo_conf_plugin_dir_path() ? sudo_conf_plugin_dir_path() : "",
goto done;
}
if (sb.st_uid != ROOT_UID) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("%s must be owned by uid %d"), fullpath, ROOT_UID);
goto done;
}
if ((sb.st_mode & (S_IWGRP|S_IWOTH)) != 0) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("%s must be only be writable by owner"), fullpath);
goto done;
handle = sudo_dso_load(path, SUDO_DSO_LAZY|SUDO_DSO_GLOBAL);
if (!handle) {
const char *errstr = sudo_dso_strerror();
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("unable to load %s: %s"), path,
errstr ? errstr : "unknown error");
}
plugin = sudo_dso_findsym(handle, info->symbol_name);
if (!plugin) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
- sudo_warnx(U_("unable to find symbol `%s' in %s"), info->symbol_name, path);
+ sudo_warnx(U_("unable to find symbol \"%s\" in %s"), info->symbol_name, path);
goto bad;
}
if (plugin->type != SUDO_POLICY_PLUGIN && plugin->type != SUDO_IO_PLUGIN) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("unknown policy type %d found in %s"), plugin->type, path);
goto bad;
}
if (SUDO_API_VERSION_GET_MAJOR(plugin->version) != SUDO_API_VERSION_MAJOR) {
- sudo_warnx(U_("error in %s, line %d while loading plugin `%s'"),
+ sudo_warnx(U_("error in %s, line %d while loading plugin \"%s\""),
_PATH_SUDO_CONF, info->lineno, info->symbol_name);
sudo_warnx(U_("incompatible plugin major version %d (expected %d) found in %s"),
SUDO_API_VERSION_GET_MAJOR(plugin->version),
if (policy_plugin->handle != NULL) {
/* Ignore duplicate entries. */
if (strcmp(policy_plugin->name, info->symbol_name) != 0) {
- sudo_warnx(U_("ignoring policy plugin `%s' in %s, line %d"),
+ sudo_warnx(U_("ignoring policy plugin \"%s\" in %s, line %d"),
info->symbol_name, _PATH_SUDO_CONF, info->lineno);
sudo_warnx(U_("only a single policy plugin may be specified"));
goto bad;
}
- sudo_warnx(U_("ignoring duplicate policy plugin `%s' in %s, line %d"),
+ sudo_warnx(U_("ignoring duplicate policy plugin \"%s\" in %s, line %d"),
info->symbol_name, _PATH_SUDO_CONF, info->lineno);
goto bad;
}
/* Check for duplicate entries. */
TAILQ_FOREACH(container, io_plugins, entries) {
if (strcmp(container->name, info->symbol_name) == 0) {
- sudo_warnx(U_("ignoring duplicate I/O plugin `%s' in %s, line %d"),
+ sudo_warnx(U_("ignoring duplicate I/O plugin \"%s\" in %s, line %d"),
info->symbol_name, _PATH_SUDO_CONF, info->lineno);
sudo_dso_unload(handle);
handle = NULL;