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

@@ -56,22 +56,22 @@ sudo_fwtk_init(struct passwd *pw, sudo_auth *auth)
debug_decl(sudo_fwtk_init, SUDO_DEBUG_AUTH)
if ((confp = cfg_read("sudo")) == (Cfg *)-1) {
warningx(U_("unable to read fwtk config"));
sudo_warnx(U_("unable to read fwtk config"));
debug_return_int(AUTH_FATAL);
}
if (auth_open(confp)) {
warningx(U_("unable to connect to authentication server"));
sudo_warnx(U_("unable to connect to authentication server"));
debug_return_int(AUTH_FATAL);
}
/* Get welcome message from auth server */
if (auth_recv(resp, sizeof(resp))) {
warningx(U_("lost connection to authentication server"));
sudo_warnx(U_("lost connection to authentication server"));
debug_return_int(AUTH_FATAL);
}
if (strncmp(resp, "Authsrv ready", 13) != 0) {
warningx(U_("authentication server error:\n%s"), resp);
sudo_warnx(U_("authentication server error:\n%s"), resp);
debug_return_int(AUTH_FATAL);
}
@@ -91,7 +91,7 @@ sudo_fwtk_verify(struct passwd *pw, char *prompt, sudo_auth *auth)
(void) snprintf(buf, sizeof(buf), "authorize %s 'sudo'", pw->pw_name);
restart:
if (auth_send(buf) || auth_recv(resp, sizeof(resp))) {
warningx(U_("lost connection to authentication server"));
sudo_warnx(U_("lost connection to authentication server"));
debug_return_int(AUTH_FATAL);
}
@@ -114,7 +114,7 @@ restart:
strlcpy(buf, "response dummy", sizeof(buf));
goto restart;
} else {
warningx("%s", resp);
sudo_warnx("%s", resp);
debug_return_int(AUTH_FATAL);
}
if (!pass) { /* ^C or error */
@@ -124,7 +124,7 @@ restart:
/* Send the user's response to the server */
(void) snprintf(buf, sizeof(buf), "response '%s'", pass);
if (auth_send(buf) || auth_recv(resp, sizeof(resp))) {
warningx(U_("lost connection to authentication server"));
sudo_warnx(U_("lost connection to authentication server"));
error = AUTH_FATAL;
goto done;
}
@@ -136,7 +136,7 @@ restart:
/* Main loop prints "Permission Denied" or insult. */
if (strcmp(resp, "Permission Denied.") != 0)
warningx("%s", resp);
sudo_warnx("%s", resp);
error = AUTH_FAILURE;
done:
memset_s(pass, SUDO_PASS_MAX, 0, strlen(pass));