134 lines
5.3 KiB
Plaintext
134 lines
5.3 KiB
Plaintext
--- auth-kerberos.c.orig Wed Jul 8 11:40:35 1998
|
|
+++ auth-kerberos.c Mon Dec 7 23:39:10 1998
|
|
@@ -63,11 +63,11 @@
|
|
krb5_auth_con_free(ssh_context, auth_context);
|
|
auth_context = 0;
|
|
}
|
|
- log_msg("Kerberos ticket authentication of user %s failed: %s",
|
|
+ log_msg("Kerberos ticket authentication of user %.100s failed: %.100s",
|
|
server_user, error_message(problem));
|
|
|
|
- debug("Kerberos krb5_auth_con_genaddrs (%s).", error_message(problem));
|
|
- packet_send_debug("Kerberos krb5_auth_con_genaddrs: %s",
|
|
+ debug("Kerberos krb5_auth_con_genaddrs (%.100s).", error_message(problem));
|
|
+ packet_send_debug("Kerberos krb5_auth_con_genaddrs: %.100s",
|
|
error_message(problem));
|
|
return 0;
|
|
}
|
|
@@ -80,11 +80,11 @@
|
|
krb5_auth_con_free(ssh_context, auth_context);
|
|
auth_context = 0;
|
|
}
|
|
- log_msg("Kerberos ticket authentication of user %s failed: %s",
|
|
+ log_msg("Kerberos ticket authentication of user %.100s failed: %.100s",
|
|
server_user, error_message(problem));
|
|
|
|
- debug("Kerberos V5 rd_req failed (%s).", error_message(problem));
|
|
- packet_send_debug("Kerberos V5 krb5_rd_req: %s", error_message(problem));
|
|
+ debug("Kerberos V5 rd_req failed (%.100s).", error_message(problem));
|
|
+ packet_send_debug("Kerberos V5 krb5_rd_req: %.100s", error_message(problem));
|
|
return 0;
|
|
}
|
|
|
|
@@ -93,22 +93,22 @@
|
|
if (problem)
|
|
{
|
|
krb5_free_ticket(ssh_context, ticket);
|
|
- log_msg("Kerberos ticket authentication of user %s failed: %s",
|
|
+ log_msg("Kerberos ticket authentication of user %.100s failed: %.100s",
|
|
server_user, error_message(problem));
|
|
|
|
- debug("Kerberos krb5_unparse_name failed (%s).", error_message(problem));
|
|
- packet_send_debug("Kerberos krb5_unparse_name: %s",
|
|
+ debug("Kerberos krb5_unparse_name failed (%.100s).", error_message(problem));
|
|
+ packet_send_debug("Kerberos krb5_unparse_name: %.100s",
|
|
error_message(problem));
|
|
return 0;
|
|
}
|
|
if (strncmp(server, "host/", strlen("host/")))
|
|
{
|
|
krb5_free_ticket(ssh_context, ticket);
|
|
- log_msg("Kerberos ticket authentication of user %s failed: invalid service name (%s)",
|
|
+ log_msg("Kerberos ticket authentication of user %.100s failed: invalid service name (%.100s)",
|
|
server_user, server);
|
|
|
|
- debug("Kerberos invalid service name (%s).", server);
|
|
- packet_send_debug("Kerberos invalid service name (%s).", server);
|
|
+ debug("Kerberos invalid service name (%.100s).", server);
|
|
+ packet_send_debug("Kerberos invalid service name (%.100s).", server);
|
|
krb5_xfree(server);
|
|
return 0;
|
|
}
|
|
@@ -122,11 +122,11 @@
|
|
|
|
if (problem)
|
|
{
|
|
- log_msg("Kerberos ticket authentication of user %s failed: %s",
|
|
+ log_msg("Kerberos ticket authentication of user %.100s failed: %.100s",
|
|
server_user, error_message(problem));
|
|
- debug("Kerberos krb5_copy_principal failed (%s).",
|
|
+ debug("Kerberos krb5_copy_principal failed (%.100s).",
|
|
error_message(problem));
|
|
- packet_send_debug("Kerberos krb5_copy_principal: %s",
|
|
+ packet_send_debug("Kerberos krb5_copy_principal: %.100s",
|
|
error_message(problem));
|
|
return 0;
|
|
}
|
|
@@ -135,11 +135,11 @@
|
|
/* Make the reply - so that mutual authentication can be done */
|
|
if ((problem = krb5_mk_rep(ssh_context, auth_context, &reply)))
|
|
{
|
|
- log_msg("Kerberos ticket authentication of user %s failed: %s",
|
|
+ log_msg("Kerberos ticket authentication of user %.100s failed: %.100s",
|
|
server_user, error_message(problem));
|
|
- debug("Kerberos krb5_mk_rep failed (%s).",
|
|
+ debug("Kerberos krb5_mk_rep failed (%.100s).",
|
|
error_message(problem));
|
|
- packet_send_debug("Kerberos krb5_mk_rep failed: %s",
|
|
+ packet_send_debug("Kerberos krb5_mk_rep failed: %.100s",
|
|
error_message(problem));
|
|
return 0;
|
|
}
|
|
@@ -160,7 +160,7 @@
|
|
{
|
|
krb5_creds **creds;
|
|
krb5_error_code retval;
|
|
- static char ccname[128];
|
|
+ static char ccname[512];
|
|
krb5_ccache ccache = NULL;
|
|
struct passwd *pwd;
|
|
extern char *ticket;
|
|
@@ -208,9 +208,9 @@
|
|
|
|
if (retval = krb5_rd_cred(ssh_context, auth_context, krb5data, &creds, NULL))
|
|
{
|
|
- log_msg("Kerberos V5 tgt rejected for user %.100s : %s", server_user,
|
|
+ log_msg("Kerberos V5 tgt rejected for user %.100s : %.100s", server_user,
|
|
error_message(retval));
|
|
- packet_send_debug("Kerberos V5 tgt rejected for %.100s : %s",
|
|
+ packet_send_debug("Kerberos V5 tgt rejected for %.100s : %.100s",
|
|
server_user,
|
|
error_message(retval));
|
|
packet_start(SSH_SMSG_FAILURE);
|
|
@@ -234,7 +234,7 @@
|
|
goto errout;
|
|
|
|
ticket = xmalloc(strlen(ccname) + 1);
|
|
- (void) sprintf(ticket, "%s", ccname);
|
|
+ (void) sprintf(ticket, "%.100s", ccname);
|
|
|
|
/* Successful */
|
|
packet_start(SSH_SMSG_SUCCESS);
|
|
@@ -244,9 +244,9 @@
|
|
|
|
errout:
|
|
krb5_free_tgt_creds(ssh_context, creds);
|
|
- log_msg("Kerberos V5 tgt rejected for user %.100s :%s", server_user,
|
|
+ log_msg("Kerberos V5 tgt rejected for user %.100s :%.100s", server_user,
|
|
error_message(retval));
|
|
- packet_send_debug("Kerberos V5 tgt rejected for %.100s : %s", server_user,
|
|
+ packet_send_debug("Kerberos V5 tgt rejected for %.100s : %.100s", server_user,
|
|
error_message(retval));
|
|
packet_start(SSH_SMSG_FAILURE);
|
|
packet_send();
|