--- embedaddon/sudo/src/parse_args.c 2013/10/14 07:56:35 1.1.1.5 +++ embedaddon/sudo/src/parse_args.c 2014/06/15 16:12:55 1.1.1.6 @@ -185,7 +185,7 @@ parse_args(int argc, char **argv, int *nargc, char *** env_add = emalloc2(env_size, sizeof(char *)); - /* Pass progname to plugin so it can call setprogname() */ + /* Pass progname to plugin so it can call initprogname() */ sudo_settings[ARG_PROGNAME].value = getprogname(); /* First, check to see if we were invoked as "sudoedit". */ @@ -242,7 +242,7 @@ parse_args(int argc, char **argv, int *nargc, char *** SET(flags, MODE_BACKGROUND); break; case 'C': - if (atoi(optarg) < 3) { + if (strtonum(optarg, 3, INT_MAX, NULL) == 0) { warningx(_("the argument to -C must be a number greater than or equal to 3")); usage(1); } @@ -405,11 +405,11 @@ parse_args(int argc, char **argv, int *nargc, char *** if (ISSET(flags, MODE_LOGIN_SHELL)) { if (ISSET(flags, MODE_SHELL)) { - warningx(_("you may not specify both the `-i' and `-s' options")); + warningx(U_("you may not specify both the `-i' and `-s' options")); usage(1); } if (ISSET(flags, MODE_PRESERVE_ENV)) { - warningx(_("you may not specify both the `-i' and `-E' options")); + warningx(U_("you may not specify both the `-i' and `-E' options")); usage(1); } SET(flags, MODE_SHELL); @@ -419,9 +419,9 @@ parse_args(int argc, char **argv, int *nargc, char *** if (mode == MODE_EDIT && (ISSET(flags, MODE_PRESERVE_ENV) || env_add[0] != NULL)) { if (ISSET(mode, MODE_PRESERVE_ENV)) - warningx(_("the `-E' option is not valid in edit mode")); + warningx(U_("the `-E' option is not valid in edit mode")); if (env_add[0] != NULL) - warningx(_("you may not specify environment variables in edit mode")); + warningx(U_("you may not specify environment variables in edit mode")); usage(1); } if ((runas_user != NULL || runas_group != NULL) && @@ -429,11 +429,11 @@ parse_args(int argc, char **argv, int *nargc, char *** usage(1); } if (list_user != NULL && mode != MODE_LIST && mode != MODE_CHECK) { - warningx(_("the `-U' option may only be used with the `-l' option")); + warningx(U_("the `-U' option may only be used with the `-l' option")); usage(1); } if (ISSET(tgetpass_flags, TGP_STDIN) && ISSET(tgetpass_flags, TGP_ASKPASS)) { - warningx(_("the `-A' and `-S' options may not be used together")); + warningx(U_("the `-A' and `-S' options may not be used together")); usage(1); } if ((argc == 0 && mode == MODE_EDIT) || @@ -516,7 +516,7 @@ parse_args(int argc, char **argv, int *nargc, char *** argv--; argv[0] = "sudoedit"; #else - fatalx(_("sudoedit is not supported on this platform")); + fatalx(U_("sudoedit is not supported on this platform")); #endif } @@ -589,7 +589,7 @@ usage_excl(int fatal) { debug_decl(usage_excl, SUDO_DEBUG_ARGS) - warningx(_("Only one of the -e, -h, -i, -K, -l, -s, -v or -V options may be specified")); + warningx(U_("Only one of the -e, -h, -i, -K, -l, -s, -v or -V options may be specified")); usage(fatal); }