Diff for /embedaddon/sudo/src/parse_args.c between versions 1.1.1.5 and 1.1.1.6

version 1.1.1.5, 2013/10/14 07:56:35 version 1.1.1.6, 2014/06/15 16:12:55
Line 185  parse_args(int argc, char **argv, int *nargc, char *** Line 185  parse_args(int argc, char **argv, int *nargc, char ***
   
     env_add = emalloc2(env_size, sizeof(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();      sudo_settings[ARG_PROGNAME].value = getprogname();
   
     /* First, check to see if we were invoked as "sudoedit". */      /* First, check to see if we were invoked as "sudoedit". */
Line 242  parse_args(int argc, char **argv, int *nargc, char *** Line 242  parse_args(int argc, char **argv, int *nargc, char ***
                     SET(flags, MODE_BACKGROUND);                      SET(flags, MODE_BACKGROUND);
                     break;                      break;
                 case 'C':                  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"));                          warningx(_("the argument to -C must be a number greater than or equal to 3"));
                         usage(1);                          usage(1);
                     }                      }
Line 405  parse_args(int argc, char **argv, int *nargc, char *** Line 405  parse_args(int argc, char **argv, int *nargc, char ***
   
     if (ISSET(flags, MODE_LOGIN_SHELL)) {      if (ISSET(flags, MODE_LOGIN_SHELL)) {
         if (ISSET(flags, MODE_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);              usage(1);
         }          }
         if (ISSET(flags, MODE_PRESERVE_ENV)) {          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);              usage(1);
         }          }
         SET(flags, MODE_SHELL);          SET(flags, MODE_SHELL);
Line 419  parse_args(int argc, char **argv, int *nargc, char *** Line 419  parse_args(int argc, char **argv, int *nargc, char ***
     if (mode == MODE_EDIT &&      if (mode == MODE_EDIT &&
        (ISSET(flags, MODE_PRESERVE_ENV) || env_add[0] != NULL)) {         (ISSET(flags, MODE_PRESERVE_ENV) || env_add[0] != NULL)) {
         if (ISSET(mode, MODE_PRESERVE_ENV))          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)          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);          usage(1);
     }      }
     if ((runas_user != NULL || runas_group != NULL) &&      if ((runas_user != NULL || runas_group != NULL) &&
Line 429  parse_args(int argc, char **argv, int *nargc, char *** Line 429  parse_args(int argc, char **argv, int *nargc, char ***
         usage(1);          usage(1);
     }      }
     if (list_user != NULL && mode != MODE_LIST && mode != MODE_CHECK) {      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);          usage(1);
     }      }
     if (ISSET(tgetpass_flags, TGP_STDIN) && ISSET(tgetpass_flags, TGP_ASKPASS)) {      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);          usage(1);
     }      }
     if ((argc == 0 && mode == MODE_EDIT) ||      if ((argc == 0 && mode == MODE_EDIT) ||
Line 516  parse_args(int argc, char **argv, int *nargc, char *** Line 516  parse_args(int argc, char **argv, int *nargc, char ***
         argv--;          argv--;
         argv[0] = "sudoedit";          argv[0] = "sudoedit";
 #else  #else
        fatalx(_("sudoedit is not supported on this platform"));        fatalx(U_("sudoedit is not supported on this platform"));
 #endif  #endif
     }      }
   
Line 589  usage_excl(int fatal) Line 589  usage_excl(int fatal)
 {  {
     debug_decl(usage_excl, SUDO_DEBUG_ARGS)      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);      usage(fatal);
 }  }
   

Removed from v.1.1.1.5  
changed lines
  Added in v.1.1.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>