From bbc43b5e30171469b99634fa526f4fd6cdc7a064 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 11 Dec 2017 08:07:01 -0700 Subject: [PATCH] Change some _() into U_() since they are used for warn/fatal. We always want to issue warnings in the user's locale. --- src/parse_args.c | 2 +- src/sudo_edit.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/parse_args.c b/src/parse_args.c index 210c62e59..ab5690aea 100644 --- a/src/parse_args.c +++ b/src/parse_args.c @@ -312,7 +312,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, break; case 'C': if (strtonum(optarg, 3, INT_MAX, NULL) == 0) { - sudo_warnx(_("the argument to -C must be a number greater than or equal to 3")); + sudo_warnx(U_("the argument to -C must be a number greater than or equal to 3")); usage(1); } sudo_settings[ARG_CLOSEFROM].value = optarg; diff --git a/src/sudo_edit.c b/src/sudo_edit.c index 214fc260f..5698443a4 100644 --- a/src/sudo_edit.c +++ b/src/sudo_edit.c @@ -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; } } -- 2.40.0