1 --- gftp-2.0.19/lib/sshv2.c.orig 2008-01-25 08:28:32.000000000 +0900
2 +++ gftp-2.0.19/lib/sshv2.c 2008-12-09 14:32:52.172140155 +0900
3 @@ -379,6 +379,7 @@ sshv2_start_login_sequence (gftp_request
4 N_("Enter passphrase for key '"),
9 char *tempstr, *temp1str, *pwstr, *yesstr = "yes\n", *securid_pass;
10 int wrotepw, ok, maxfd, ret, clear_tempstr, pwidx;
11 @@ -463,15 +464,26 @@ sshv2_start_login_sequence (gftp_request
14 tempstr[diff + rd] = '\0';
15 - request->logging_function (gftp_logging_recv, request, "%s", tempstr + diff);
16 + temp1str = g_locale_to_utf8 (tempstr + diff, -1, NULL, NULL, NULL);
17 + if (temp1str == NULL)
18 + temp1str = g_strdup (tempstr);
19 + request->logging_function (gftp_logging_recv, request, "%s", temp1str);
24 + temp1str = g_locale_to_utf8 (tempstr, -1, NULL, NULL, NULL);
25 + if (temp1str == NULL)
26 + temp1str = g_strdup (tempstr);
28 /* See if we are at the enter password prompt... */
29 for (pwidx = 0; pwstrs[pwidx] != NULL; pwidx++)
31 - if (strstr (tempstr, pwstrs[pwidx]) != NULL ||
32 - strstr (tempstr, _(pwstrs[pwidx])) != NULL)
33 + if (strstr (temp1str, pwstrs[pwidx]) != NULL ||
35 + strstr (tempstr, dgettext ("SUNW_OST_SYSOSPAM", pwstrs[pwidx])) != NULL ||
37 + strstr (temp1str, _(pwstrs[pwidx])) != NULL)
41 @@ -482,6 +494,7 @@ sshv2_start_login_sequence (gftp_request
44 ok = SSH_ERROR_BADPASS;
49 @@ -489,6 +502,7 @@ sshv2_start_login_sequence (gftp_request
50 if (gftp_fd_write (request, pwstr, strlen (pwstr), ptymfd) < 0)
57 @@ -496,13 +510,15 @@ sshv2_start_login_sequence (gftp_request
58 strstr (tempstr, _("(yes/no)?")) != NULL)
61 - if (!gftpui_protocol_ask_yes_no (request, request->hostname, tempstr))
62 + if (!gftpui_protocol_ask_yes_no (request, request->hostname, temp1str))
64 ok = SSH_ERROR_QUESTION;
71 if (gftp_fd_write (request, yesstr, strlen (yesstr), ptymfd) < 0)
74 @@ -521,9 +537,11 @@ sshv2_start_login_sequence (gftp_request
75 if (securid_pass == NULL || *securid_pass == '\0')
77 ok = SSH_ERROR_BADPASS;
83 temp1str = g_strconcat (securid_pass, "\n", NULL);
85 ret = gftp_fd_write (request, temp1str, strlen (temp1str), ptymfd);
86 @@ -543,6 +561,7 @@ sshv2_start_login_sequence (gftp_request
88 len += SSH_LOGIN_BUFSIZE;
89 rem += SSH_LOGIN_BUFSIZE;
91 tempstr = g_realloc (tempstr, len);