* sure that we didn't get spoofed by another DCE server.
*/
if (!sec_login_certify_identity(login_context, &status)) {
- (void) fprintf(stderr, "Whoa! Bogus authentication server!\n");
+ sudo_printf(SUDO_CONV_ERROR_MSG,
+ "Whoa! Bogus authentication server!\n");
(void) check_dce_status(status,"sec_login_certify_identity(1):");
debug_return_int(AUTH_FAILURE);
}
* DCE client and DCE security server...
*/
if (auth_src != sec_login_auth_src_network) {
- (void) fprintf(stderr,
+ sudo_printf(SUDO_CONV_ERROR_MSG,
"You have no network credentials.\n");
debug_return_int(AUTH_FAILURE);
}
/* Check if the password has aged and is thus no good */
if (reset_passwd) {
- (void) fprintf(stderr,
+ sudo_printf(SUDO_CONV_ERROR_MSG,
"Your DCE password needs resetting.\n");
debug_return_int(AUTH_FAILURE);
}
if (input_status == rpc_s_ok)
debug_return_int(0);
dce_error_inq_text(input_status, error_string, &error_stat);
- (void) fprintf(stderr, "%s %s\n", comment, error_string);
+ sudo_printf(SUDO_CONV_ERROR_MSG, "%s %s\n", comment, error_string);
debug_return_int(1);
}
pass = auth_getpass(prompt, def_passwd_timeout * 60,
SUDO_CONV_PROMPT_ECHO_OFF, callback);
} else if (strncmp(resp, "display ", 8) == 0) {
- fprintf(stderr, "%s\n", &resp[8]);
+ sudo_printf(SUDO_CONV_INFO_MSG, "%s\n", &resp[8]);
strlcpy(buf, "response dummy", sizeof(buf));
goto restart;
} else {
reply[n].resp = pass; /* auth_getpass() malloc's a copy */
break;
case PAM_TEXT_INFO:
- if (pm->msg)
- (void) puts(pm->msg);
+ if (pm->msg != NULL)
+ sudo_printf(SUDO_CONV_INFO_MSG, "%s\n", pm->msg);
break;
case PAM_ERROR_MSG:
- if (pm->msg) {
- (void) fputs(pm->msg, stderr);
- (void) fputc('\n', stderr);
- }
+ if (pm->msg != NULL)
+ sudo_printf(SUDO_CONV_ERROR_MSG, "%s\n", pm->msg);
break;
default:
sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
*/
/* XXX - Is setting up a new PIN within sudo's scope? */
SD_Pin(*sd, "");
- fprintf(stderr, "Your SecurID access has not yet been set up.\n");
- fprintf(stderr, "Please set up a PIN before you try to authenticate.\n");
+ sudo_printf(SUDO_CONV_ERROR_MSG,
+ "Your SecurID access has not yet been set up.\n");
+ sudo_printf(SUDO_CONV_ERROR_MSG,
+ "Please set up a PIN before you try to authenticate.\n");
rval = AUTH_FATAL;
break;