Mercurial > gftp.yaz
changeset 77:100a4b310c60
2002-12-4 Brian Masney <masneyb@gftp.org>
* lib/misc.c (ssh_start_login_sequence) - if the word WARNING appears
in the banner, don't log into the server
* docs/sample.gftp/gftprc - removed use_default_dl_types line
author | masneyb |
---|---|
date | Fri, 06 Dec 2002 02:28:19 +0000 |
parents | fe308e435ed5 |
children | f67a57fc7fa8 |
files | ChangeLog docs/sample.gftp/gftprc lib/misc.c |
diffstat | 3 files changed, 25 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Dec 05 00:43:07 2002 +0000 +++ b/ChangeLog Fri Dec 06 02:28:19 2002 +0000 @@ -1,3 +1,9 @@ +2002-12-4 Brian Masney <masneyb@gftp.org> + * lib/misc.c (ssh_start_login_sequence) - if the word WARNING appears + in the banner, don't log into the server + + * docs/sample.gftp/gftprc - removed use_default_dl_types line + 2002-12-4 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_set_data_type) - return 0 if there is no protocol specific set_data_type function @@ -373,7 +379,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.46 2002/12/05 00:43:06 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.47 2002/12/06 02:28:18 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/docs/sample.gftp/gftprc Thu Dec 05 00:43:07 2002 +0000 +++ b/docs/sample.gftp/gftprc Fri Dec 06 02:28:19 2002 +0000 @@ -125,10 +125,6 @@ # listboxes. 0=View file 1=Edit file 2=Transfer file list_dblclk_action=2 -# (*) If this is set, and there is a ext= line below for the file extension, -# it will download the file as specified below -use_default_dl_types=1 - # The default width of the local files listbox listbox_local_width=313
--- a/lib/misc.c Thu Dec 05 00:43:07 2002 +0000 +++ b/lib/misc.c Fri Dec 06 02:28:19 2002 +0000 @@ -848,6 +848,7 @@ #define SSH_LOGIN_BUFSIZE 200 #define SSH_ERROR_BADPASS -1 #define SSH_ERROR_QUESTION -2 +#define SSH_WARNING -3 char * ssh_start_login_sequence (gftp_request * request, int fd) @@ -887,6 +888,13 @@ ok = SSH_ERROR_BADPASS; break; } + + if (strstr (tempstr, "WARNING") != NULL || + strstr (tempstr, _("WARNING")) != NULL) + { + ok = SSH_WARNING; + break; + } wrotepw = 1; if (gftp_write (request, pwstr, strlen (pwstr), fd) < 0) @@ -906,6 +914,13 @@ break; } + if (strstr (tempstr, "WARNING") != NULL || + strstr (tempstr, _("WARNING")) != NULL) + { + ok = SSH_WARNING; + break; + } + wrotepw = 1; if (gftp_write (request, pwstr, strlen (pwstr), fd) < 0) { @@ -946,6 +961,9 @@ else if (ok == SSH_ERROR_QUESTION) request->logging_function (gftp_logging_error, request->user_data, _("Please connect to this host with the command line SSH utility and answer this question appropriately.\n")); + else if (ok == SSH_WARNING) + request->logging_function (gftp_logging_error, request->user_data, + _("Please correct the above warning to connect to this host.\n")); g_free (tempstr); return (NULL);