Change some _() into U_() since they are used for warn/fatal.

We always want to issue warnings in the user's locale.
This commit is contained in:
Todd C. Miller
2017-12-11 08:07:01 -07:00
parent b68554b7cf
commit bbc43b5e30
2 changed files with 9 additions and 9 deletions

View File

@@ -175,7 +175,7 @@ sudo_openat(int dfd, const char *path, int flags, mode_t mode)
/* Restore cwd */
if (fchdir(odfd) == -1)
sudo_fatal(_("unable to restore current working directory"));
sudo_fatal(U_("unable to restore current working directory"));
close(odfd);
debug_return_int(fd);
@@ -264,7 +264,7 @@ done:
/* Restore cwd */
if (odfd != -1) {
if (fchdir(odfd) == -1)
sudo_fatal(_("unable to restore current working directory"));
sudo_fatal(U_("unable to restore current working directory"));
close(odfd);
}
@@ -812,11 +812,11 @@ selinux_edit_create_tfiles(struct command_details *command_details,
case SESH_SUCCESS:
break;
case SESH_ERR_BAD_PATHS:
sudo_fatalx(_("sesh: internal error: odd number of paths"));
sudo_fatalx(U_("sesh: internal error: odd number of paths"));
case SESH_ERR_NO_FILES:
sudo_fatalx(_("sesh: unable to create temporary files"));
sudo_fatalx(U_("sesh: unable to create temporary files"));
default:
sudo_fatalx(_("sesh: unknown error %d"), rc);
sudo_fatalx(U_("sesh: unknown error %d"), rc);
}
/* Restore saved command_details. */
@@ -906,15 +906,15 @@ selinux_edit_copy_tfiles(struct command_details *command_details,
ret = 0;
break;
case SESH_ERR_NO_FILES:
sudo_warnx(_("unable to copy temporary files back to their original location"));
sudo_warnx(U_("unable to copy temporary files back to their original location"));
sudo_warnx(U_("contents of edit session left in %s"), edit_tmpdir);
break;
case SESH_ERR_SOME_FILES:
sudo_warnx(_("unable to copy some of the temporary files back to their original location"));
sudo_warnx(U_("unable to copy some of the temporary files back to their original location"));
sudo_warnx(U_("contents of edit session left in %s"), edit_tmpdir);
break;
default:
sudo_warnx(_("sesh: unknown error %d"), rc);
sudo_warnx(U_("sesh: unknown error %d"), rc);
break;
}
}