Call gettext() on parameters for warning()/warningx() instead of

having warning() do it for us.
This commit is contained in:
Todd C. Miller
2012-11-25 09:34:04 -05:00
parent 15c69e0e3f
commit 7b3d268687
31 changed files with 205 additions and 216 deletions

View File

@@ -100,28 +100,28 @@ group_plugin_load(char *plugin_info)
goto done;
}
if (sb.st_uid != ROOT_UID) {
warningx(N_("%s must be owned by uid %d"), path, ROOT_UID);
warningx(_("%s must be owned by uid %d"), path, ROOT_UID);
goto done;
}
if ((sb.st_mode & (S_IWGRP|S_IWOTH)) != 0) {
warningx(N_("%s must only be writable by owner"), path);
warningx(_("%s must only be writable by owner"), path);
goto done;
}
/* Open plugin and map in symbol. */
group_handle = dlopen(path, RTLD_LAZY|RTLD_GLOBAL);
if (!group_handle) {
warningx(N_("unable to dlopen %s: %s"), path, dlerror());
warningx(_("unable to dlopen %s: %s"), path, dlerror());
goto done;
}
group_plugin = dlsym(group_handle, "group_plugin");
if (group_plugin == NULL) {
warningx(N_("unable to find symbol \"group_plugin\" in %s"), path);
warningx(_("unable to find symbol \"group_plugin\" in %s"), path);
goto done;
}
if (GROUP_API_VERSION_GET_MAJOR(group_plugin->version) != GROUP_API_VERSION_MAJOR) {
warningx(N_("%s: incompatible group plugin major version %d, expected %d"),
warningx(_("%s: incompatible group plugin major version %d, expected %d"),
path, GROUP_API_VERSION_GET_MAJOR(group_plugin->version),
GROUP_API_VERSION_MAJOR);
goto done;