# HG changeset patch # User masneyb # Date 1039141699 0 # Node ID 100a4b310c6038842df0823c8dd11412d34b8248 # Parent fe308e435ed5c85045e169cf31bb58fab261a8f8 2002-12-4 Brian Masney * 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 diff -r fe308e435ed5 -r 100a4b310c60 ChangeLog --- 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 + * 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 * 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 diff -r fe308e435ed5 -r 100a4b310c60 docs/sample.gftp/gftprc --- 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 diff -r fe308e435ed5 -r 100a4b310c60 lib/misc.c --- 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);