From 681d869b17aa3b92bca4ed3fc245bfc8cbee4a69 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Tue, 25 Nov 2003 20:04:43 +0000 Subject: [PATCH] Updates for telnet protocol calls --- ChangeLog | 18 +++++----- SETUP.sh | 7 ++-- html/Makefile | 2 +- html/programs/index.htm | 3 +- html/programs/mbtelnetd.html | 69 ------------------------------------ mbcico/call.c | 2 -- mbcico/mbcico.c | 21 ++++------- mbcico/opentcp.c | 4 +-- mbcico/session.c | 6 ---- mbtask/outstat.c | 10 ------ 10 files changed, 22 insertions(+), 120 deletions(-) delete mode 100755 html/programs/mbtelnetd.html diff --git a/ChangeLog b/ChangeLog index 1d0ab2a2..59b02c48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,18 +12,16 @@ v0.39.2 21-Nov-2003 package incoming telnet sessions are now supported. Outgoing telnet finally works. - upgrade: - See mbtelnetd.html how to install mbtelnetd. - common.a: A small fix in printable log function. Added a safety check for the TCP registrate function to prevent stale TCP/IP mailer counts. mbcico: - If called by inetd with the -t itn parameters, mbcico aborts - and writes a short instruction in the log to install mbtelnetd. - Outgoing telnet works. + All internal references to tfido port changed to telnet port + because we now default to telnet port 23 for ITN calls. + Made outgoing telnet calls working with the help of sources + from other open source projects. mbtelnetd: New program, a proxy to handle incoming telnet/vmodem sessions. @@ -31,11 +29,11 @@ v0.39.2 21-Nov-2003 Vadim Kurland, vadim@gu.kiev.ua and Vadim Zaliva, lord@crocodile.kiev.ua. - SETUP.sh: - Added installation of mbtelnetd for new systems. + mbtask: + Restored ITN protocol. - html: - Added mbtelnetd page. + SETUP.sh: + Added installation of mailer telnet answer back for port 60177. examples: Updated file menus, added View File command. diff --git a/SETUP.sh b/SETUP.sh index 69d5e5db..547c971b 100644 --- a/SETUP.sh +++ b/SETUP.sh @@ -415,7 +415,7 @@ if [ "$FIDO" = "TRUE" ] || [ "$BINKD" = "TRUE" ]; then fi if [ "$FIDO" = "TRUE" ]; then echo -n ", fido at ports 60177, 60179" - echo "tfido 60177/tcp # mbtelnetd ITN proxy">>/etc/services + echo "tfido 60177/tcp # mbcico ITN mode (alternate port)">>/etc/services echo "fido 60179/tcp # mbcico IFC mode">>/etc/services fi chmod 644 /etc/services @@ -435,7 +435,7 @@ cat << EOF >>/etc/inetd.conf #:MBSE-BBS: bbs service binkp stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ibn fido stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ifc -tfido stream tcp nowait mbse $MHOME/bin/mbtelnetd mbtelnetd +tfido stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t itn EOF chmod 644 /etc/inetd.conf @@ -493,7 +493,8 @@ service tfido wait = no user = mbse instances = 10 - server = $MHOME/bin/mbtelnetd + server = $MHOME/bin/mbcico + server_args = -t itn } EOF diff --git a/html/Makefile b/html/Makefile index 6cd3a9b9..7c11551f 100644 --- a/html/Makefile +++ b/html/Makefile @@ -65,7 +65,7 @@ H_PROGS = programs/mbfido.html programs/mbmon.html \ programs/mbaff.html programs/mbdiff.html \ programs/mbindex.html programs/mbout.html \ programs/mbsetup.html programs/mbuseradd.html \ - programs/mball.html programs/mbtelnetd.html \ + programs/mball.html \ programs/mblang.html programs/mbsebbs.html \ programs/mbstat.html programs/mbpasswd.html \ programs/mbtask.html diff --git a/html/programs/index.htm b/html/programs/index.htm index f51bb156..721aa3f6 100644 --- a/html/programs/index.htm +++ b/html/programs/index.htm @@ -14,7 +14,7 @@
-
Last update 22-Nov-2003
+
Last update 25-Nov-2003

MBSE BBS Programs.

@@ -36,7 +36,6 @@
  • mbseq, Sequence number creator
  • mbsetup, The setup program
  • mbstat, The bbs status change program -
  • mbtelnetd, The incoming telnet proxy
  • mbtoberep, The toberep.data lister
  • mbuser, The userbase maintenance program
  • mbuseradd, The adduser wrapper diff --git a/html/programs/mbtelnetd.html b/html/programs/mbtelnetd.html deleted file mode 100755 index c771d77b..00000000 --- a/html/programs/mbtelnetd.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - -MBSE BBS Programs - mbtelnetd - Incoming telnet proxy. - - - -
    -
    Last update 22-Nov-2003
    -

    mbtelnetd - Incoming telnet proxy

    - -

    Synopsis.

    -

    -mbtelnetd -

     

    - -

    Description.

    -

    -mbtelnetd is a small proxy that handles incoming telnet/vmodem -sessions and calls mbcico via the network on the standard fido port (60179). -This small proxy was original written by Vadim Zaliva, lord@crocodile.kiev.ua, Serge -Terekhov, 2:5000/13@fidonet and Vadim Kurland, vadim@gu.kiev.ua for the ifmail -package. -

    -

     

    - -

    Installation

    -

    -To accept incoming telnet sessions to allow the ITN nodelist flag you must -install mbtelnetd in your system. You need to do this as root. The -example shown is for most GNU/Linux distributions. -Add the following line to /etc/services: -

    -tfido           60177/tcp
    -
    -Add the following line to /etc/inetd.conf: -
    -tfido   stream  tcp     nowait  mbse    /opt/mbse/bin/mbtelnetd mbtelnetd
    -
    -Or add the following lines to /etc/xinetd.d/mbsebbs if your system -uses xinetd instead of inetd: -
    -service tfido
    -{
    -	socket_type     = stream
    -	protocol        = tcp
    -	wait            = no
    -	user            = mbse
    -	instances       = 10
    -	server          = /opt/mbse/bin/mbtelnetd
    -}
    -
    -

    - - -IndexBack to index  -MainBack to Main index -

    - - - diff --git a/mbcico/call.c b/mbcico/call.c index 29cf7cac..56643466 100644 --- a/mbcico/call.c +++ b/mbcico/call.c @@ -176,11 +176,9 @@ int call(faddr *addr) tcp_mode = TCPMODE_IBN; } else if (strcmp(protocol, "fido") == 0) { tcp_mode = TCPMODE_IFC; -#ifdef USE_TELNET } else if (strcmp(protocol, "telnet") == 0) { tcp_mode = TCPMODE_ITN; telnet = TRUE; -#endif } else { Syslog('+', "No common TCP/IP protocols for node %s", nlent->name); free(inetaddr); diff --git a/mbcico/mbcico.c b/mbcico/mbcico.c index 86ca3070..9a32d950 100644 --- a/mbcico/mbcico.c +++ b/mbcico/mbcico.c @@ -83,19 +83,12 @@ void usage(void) { fprintf(stderr,"ifcico; (c) Eugene G. Crosser, 1993-1997\n"); fprintf(stderr,"mbcico ver. %s; (c) %s\n\n", VERSION, SHORTRIGHT); - fprintf(stderr,"-a \n"); - fprintf(stderr,"-n forced phone number\n"); - fprintf(stderr,"-l forced tty device\n"); -#ifdef USE_TELNET - fprintf(stderr,"-t must be one of ifc|itn|ibn, forces TCP/IP\n"); -#else - fprintf(stderr,"-t must be one of ifc|ibn, forces TCP/IP\n"); -#endif - fprintf(stderr,"-a supply internet hostname if not in nodelist\n"); - fprintf(stderr," should be in domain form, e.g. f11.n22.z3\n"); - fprintf(stderr," (this implies master mode)\n"); - fprintf(stderr,"\n or: %s tsync|yoohoo|**EMSI_INQC816|-t ibn|-t ifc\n",myname); - fprintf(stderr," (this implies slave mode)\n"); + fprintf(stderr,"mbcico [-a inetaddr[:port]] [-n phone] [-l tty] [-t ibn|-t ifc|-t itn] node\n"); + fprintf(stderr,"node should be in domain form, e.g. f11.n22.z3\n"); + fprintf(stderr," (this implies master mode)\n"); + fprintf(stderr," or:\n"); + fprintf(stderr,"mbcico tsync|yoohoo|**EMSI_INQC816|-t ibn|-t ifc|-t itn\n"); + fprintf(stderr," (this implies slave mode)\n"); } @@ -253,7 +246,7 @@ int main(int argc, char *argv[]) protocol = xstrcpy((char *)"binkp"); } else if (strncmp(p, "itn", 3) == 0) { tcp_mode = TCPMODE_ITN; - protocol = xstrcpy((char *)"tfido"); + protocol = xstrcpy((char *)"telnet"); telnet = TRUE; } else { usage(); diff --git a/mbcico/opentcp.c b/mbcico/opentcp.c index 28f2f259..b80a037b 100644 --- a/mbcico/opentcp.c +++ b/mbcico/opentcp.c @@ -103,13 +103,11 @@ int opentcp(char *name) else server.sin_port = htons(FIDOPORT); break; -#ifdef USE_TELNET - case TCPMODE_ITN: if ((se = getservbyname("tfido", "tcp"))) + case TCPMODE_ITN: if ((se = getservbyname("telnet", "tcp"))) server.sin_port = se->s_port; else server.sin_port = htons(TELNPORT); break; -#endif case TCPMODE_IBN: if ((se = getservbyname("binkd", "tcp"))) server.sin_port = se->s_port; else diff --git a/mbcico/session.c b/mbcico/session.c index 737146a3..9aa959a0 100644 --- a/mbcico/session.c +++ b/mbcico/session.c @@ -52,9 +52,7 @@ extern int tcp_mode; -#ifdef USE_TELNET extern int telnet; -#endif node *nlent; @@ -104,11 +102,9 @@ int session(faddr *a, node *nl, int role, int tp, char *dt) } else if (tcp_mode == TCPMODE_IFC) { Syslog('+', "Incoming IFC/TCP connection from %s", inet_ntoa(peeraddr.sin_addr)); IsDoing("Incoming IFC/TCP"); -#ifdef USE_TELNET } else if (tcp_mode == TCPMODE_ITN) { Syslog('+', "Incoming ITN/TCP connection from %s", inet_ntoa(peeraddr.sin_addr)); IsDoing("Incoming ITN/TCP"); -#endif } else if (tcp_mode == TCPMODE_NONE) { WriteError("Unknown TCP connection, parameter missing"); die(MBERR_COMMANDLINE); @@ -116,10 +112,8 @@ int session(faddr *a, node *nl, int role, int tp, char *dt) } session_flags |= SESSION_TCP; } -#ifdef USE_TELNET if (telnet && (session_flags & SESSION_TCP)) telnet_init(); -#endif if (data) free(data); diff --git a/mbtask/outstat.c b/mbtask/outstat.c index af1ea4d7..b33d0ba6 100644 --- a/mbtask/outstat.c +++ b/mbtask/outstat.c @@ -212,10 +212,8 @@ int outstat() ibnmask = (*tmpm)->mask; if (strcmp((*tmpm)->name, "IFC") == 0) ifcmask = (*tmpm)->mask; -#ifdef USE_TELNET if (strcmp((*tmpm)->name, "ITN") == 0) itnmask = (*tmpm)->mask; -#endif } now = time(NULL); tm = gmtime(&now); /* UTC time */ @@ -422,11 +420,7 @@ int outstat() */ if (TCFG.max_tcp && (tmp->olflags & cmmask) && (((tmp->flavors) & F_IMM) || ((tmp->flavors) & F_CRASH) || ((tmp->flavors) & F_NORMAL)) && -#ifdef USE_TELNET ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) { -#else - ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask))) { -#endif tmp->flavors |= F_CALL; } @@ -505,11 +499,7 @@ int outstat() if ((tmp->flavors) & F_CALL) { tmp->callmode = CM_NONE; -#ifdef USE_TELNET if (TCFG.max_tcp && ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) { -#else - if (TCFG.max_tcp && ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask))) { -#endif inet_calls++; tmp->callmode = CM_INET; }