Release Notes Patch TNT V1.0 -> V1.0a1 -------------------------------------- Here it is, the first update to V1.0. In V1.0 password generation for FLEXNET does not work correctly, the patch to V1.0a1 makes it work again. No other fixes are included. (The patch to V1.0a released 01.02.97 is not working correctly and shall not be used, sorry...) The patch must be saved to a file (e.g. /work/pat10a1). Then you must 'cd' to your tnt1.0-source directory. There give 'patch H or H\015"; diff -u tnt1.0/priv.c tnt1.0a/priv.c --- tnt1.0/priv.c Wed Jan 22 22:55:44 1997 +++ tnt1.0a/priv.c Sat Feb 1 11:08:26 1997 @@ -3,7 +3,7 @@ For license details see documentation Procedures for remote passwords (priv.c) created: Mark Wahl DL4YBG 94/12/21 - updated: Mark Wahl DL4YBG 97/01/22 + updated: Mark Wahl DL4YBG 97/02/01 */ #include "tnt.h" @@ -307,6 +307,58 @@ } } +/* try to find password request */ +void scan_pw_request(channel,buffer,len) +int channel; +char *buffer; +int len; +{ + char buffer_tmp[257]; + int flex_value; + int tmp_value; + int flex_result; + int res,flag; + char tmpstr[256]; + char *ptr; + + if (ch_stat[channel].conn_state != CS_CONN) return; + if (pw_stat[channel].pwmode == PW_NONE) return; + + switch (pw_stat[channel].pwmode) { + case PW_FLEXNET: + if (!pw_stat[channel].pass_wait) return; + strncpy(buffer_tmp,buffer,len); + buffer_tmp[len] = '\0'; + ptr = strchr(buffer_tmp,'('); + if (ptr == NULL) return; + res = sscanf(ptr,"(%d) %d>",&tmp_value,&flex_value); + if (res != 2) return; + if (flex_value > 99999) return; + + flex_result = (flex_value / 10000) * + (pw_stat[channel].entry->pw_file[0] - '0'); + flex_value = flex_value % 10000; + flex_result += (flex_value / 1000) * + (pw_stat[channel].entry->pw_file[1] - '0'); + flex_value = flex_value % 1000; + flex_result += (flex_value / 100) * + (pw_stat[channel].entry->pw_file[2] - '0'); + flex_value = flex_value % 100; + flex_result += (flex_value / 10) * + (pw_stat[channel].entry->pw_file[3] - '0'); + flex_value = flex_value % 10; + flex_result += flex_value * + (pw_stat[channel].entry->pw_file[4] - '0'); + sprintf(tmpstr,"%d%s",flex_result,rem_newlin_str); + len = strlen(tmpstr); + rem_data_display(channel,tmpstr); + flag = 0; + queue_cmd_data(channel,X_DATA,len,flag,tmpstr); + pw_stat[channel].pass_wait = 0; + break; + } +} + /* try to find login time for DieBox */ void scan_login_received(channel,buffer,len) int channel; @@ -317,9 +369,6 @@ char buffer_tmp[257]; char tmpstr[256]; char tmpstr2[40]; - int flex_value; - int tmp_value; - int flex_result; int res,flag; int tn_val[5]; char ch; @@ -335,6 +384,7 @@ char *hlpptr; if (ch_stat[channel].conn_state != CS_CONN) return; + if (pw_stat[channel].pwmode == PW_NONE) return; switch (pw_stat[channel].pwmode) { case PW_DIEBOX: @@ -356,37 +406,6 @@ } } /* end additional code, DL4NER */ - break; - case PW_FLEXNET: - if (!pw_stat[channel].pass_wait) return; - strncpy(buffer_tmp,buffer,len); - buffer_tmp[len] = '\0'; - ptr = strchr(buffer_tmp,'('); - if (ptr == NULL) return; - res = sscanf(ptr,"(%d) %d>",&tmp_value,&flex_value); - if (res != 2) return; - if (flex_value > 99999) return; - - flex_result = (flex_value / 10000) * - (pw_stat[channel].entry->pw_file[0] - '0'); - flex_value = flex_value % 10000; - flex_result += (flex_value / 1000) * - (pw_stat[channel].entry->pw_file[1] - '0'); - flex_value = flex_value % 1000; - flex_result += (flex_value / 100) * - (pw_stat[channel].entry->pw_file[2] - '0'); - flex_value = flex_value % 100; - flex_result += (flex_value / 10) * - (pw_stat[channel].entry->pw_file[3] - '0'); - flex_value = flex_value % 10; - flex_result += flex_value * - (pw_stat[channel].entry->pw_file[4] - '0'); - sprintf(tmpstr,"%d%s",flex_result,rem_newlin_str); - len = strlen(tmpstr); - rem_data_display(channel,tmpstr); - flag = 0; - queue_cmd_data(channel,X_DATA,len,flag,tmpstr); - pw_stat[channel].pass_wait = 0; break; case PW_THENET: if (!pw_stat[channel].pass_wait) return; ---------------------------------snip---------------------------- ------------------------------------------------------------------------ Mark Wahl, DL4YBG EMAIL: wahlm-at-berlin-snafu-de WWW: http://www.snafu.de/~wahlm/ HamRadio: DL4YBG @ DB0GR.#BLN.DEU.EU ------------------------------------------------------------------------