Rename warning/fatal -> sudo_warn/sudo_fatal to avoid namespace

pollution in libsudo_util.so.
This commit is contained in:
Todd C. Miller
2014-06-27 09:30:52 -06:00
parent d36846a699
commit aecef4aa1d
59 changed files with 729 additions and 729 deletions

View File

@@ -244,7 +244,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
break;
case 'C':
if (strtonum(optarg, 3, INT_MAX, NULL) == 0) {
warningx(_("the argument to -C must be a number greater than or equal to 3"));
sudo_warnx(_("the argument to -C must be a number greater than or equal to 3"));
usage(1);
}
sudo_settings[ARG_CLOSEFROM].value = optarg;
@@ -406,11 +406,11 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
if (ISSET(flags, MODE_LOGIN_SHELL)) {
if (ISSET(flags, MODE_SHELL)) {
warningx(U_("you may not specify both the `-i' and `-s' options"));
sudo_warnx(U_("you may not specify both the `-i' and `-s' options"));
usage(1);
}
if (ISSET(flags, MODE_PRESERVE_ENV)) {
warningx(U_("you may not specify both the `-i' and `-E' options"));
sudo_warnx(U_("you may not specify both the `-i' and `-E' options"));
usage(1);
}
SET(flags, MODE_SHELL);
@@ -420,9 +420,9 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
if (mode == MODE_EDIT &&
(ISSET(flags, MODE_PRESERVE_ENV) || env_add[0] != NULL)) {
if (ISSET(mode, MODE_PRESERVE_ENV))
warningx(U_("the `-E' option is not valid in edit mode"));
sudo_warnx(U_("the `-E' option is not valid in edit mode"));
if (env_add[0] != NULL)
warningx(U_("you may not specify environment variables in edit mode"));
sudo_warnx(U_("you may not specify environment variables in edit mode"));
usage(1);
}
if ((runas_user != NULL || runas_group != NULL) &&
@@ -430,11 +430,11 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
usage(1);
}
if (list_user != NULL && mode != MODE_LIST && mode != MODE_CHECK) {
warningx(U_("the `-U' option may only be used with the `-l' option"));
sudo_warnx(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(U_("the `-A' and `-S' options may not be used together"));
sudo_warnx(U_("the `-A' and `-S' options may not be used together"));
usage(1);
}
if ((argc == 0 && mode == MODE_EDIT) ||
@@ -504,7 +504,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
settings[j] = sudo_new_key_val(sudo_settings[i].name,
sudo_settings[i].value);
if (settings[j] == NULL)
fatal(NULL);
sudo_fatal(NULL);
j++;
}
}
@@ -517,7 +517,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
argv--;
argv[0] = "sudoedit";
#else
fatalx(U_("sudoedit is not supported on this platform"));
sudo_fatalx(U_("sudoedit is not supported on this platform"));
#endif
}
@@ -590,7 +590,7 @@ usage_excl(int fatal)
{
debug_decl(usage_excl, SUDO_DEBUG_ARGS)
warningx(U_("Only one of the -e, -h, -i, -K, -l, -s, -v or -V options may be specified"));
sudo_warnx(U_("Only one of the -e, -h, -i, -K, -l, -s, -v or -V options may be specified"));
usage(fatal);
}