1 --- gftp-2.9.1b/lib/sshv2.c.old 2024-07-01 22:23:14.745126840 -0400
2 +++ gftp-2.9.1b/lib/sshv2.c 2024-07-01 22:23:49.182914494 -0400
4 static char *pwstrs[] = { "Enter passphrase for RSA key",
5 "Enter passphrase for key '",
10 char *tempstr, *temp1str, *pwstr, *yesstr = "yes\n", *securid_pass;
11 int wrotepw, ok, maxfd, ret, clear_tempstr, pwidx;
12 @@ -463,15 +464,26 @@ sshv2_start_login_sequence (gftp_request
15 tempstr[diff + rd] = '\0';
16 - request->logging_function (gftp_logging_recv, request, "%s", tempstr + diff);
17 + temp1str = g_locale_to_utf8 (tempstr + diff, -1, NULL, NULL, NULL);
18 + if (temp1str == NULL)
19 + temp1str = g_strdup (tempstr);
20 + request->logging_function (gftp_logging_recv, request, "%s", temp1str);
25 + temp1str = g_locale_to_utf8 (tempstr, -1, NULL, NULL, NULL);
26 + if (temp1str == NULL)
27 + temp1str = g_strdup (tempstr);
29 /* See if we are at the enter password prompt... */
30 for (pwidx = 0; pwstrs[pwidx] != NULL; pwidx++)
32 - if (strstr (tempstr, pwstrs[pwidx]) != NULL ||
33 - strstr (tempstr, _(pwstrs[pwidx])) != NULL)
34 + if (strstr (temp1str, pwstrs[pwidx]) != NULL ||
36 + strstr (tempstr, dgettext ("SUNW_OST_SYSOSPAM", pwstrs[pwidx])) != NULL ||
38 + strstr (temp1str, _(pwstrs[pwidx])) != NULL)
42 @@ -482,6 +494,7 @@ sshv2_start_login_sequence (gftp_request
45 ok = SSH_ERROR_BADPASS;
50 @@ -489,6 +502,7 @@ sshv2_start_login_sequence (gftp_request
51 if (gftp_fd_write (request, pwstr, strlen (pwstr), ptymfd) < 0)
58 @@ -496,13 +510,15 @@ sshv2_start_login_sequence (gftp_request
59 strstr (tempstr, _("(yes/no)?")) != NULL)
62 - if (!gftpui_protocol_ask_yes_no (request, request->hostname, tempstr))
63 + if (!gftpui_protocol_ask_yes_no (request, request->hostname, temp1str))
65 ok = SSH_ERROR_QUESTION;
72 if (gftp_fd_write (request, yesstr, strlen (yesstr), ptymfd) < 0)
75 @@ -521,9 +537,11 @@ sshv2_start_login_sequence (gftp_request
76 if (securid_pass == NULL || *securid_pass == '\0')
78 ok = SSH_ERROR_BADPASS;
84 temp1str = g_strconcat (securid_pass, "\n", NULL);
86 ret = gftp_fd_write (request, temp1str, strlen (temp1str), ptymfd);
87 @@ -543,6 +561,7 @@ sshv2_start_login_sequence (gftp_request
89 len += SSH_LOGIN_BUFSIZE;
90 rem += SSH_LOGIN_BUFSIZE;
92 tempstr = g_realloc (tempstr, len);