diff --git a/mystic/bbs_cfg_syscfg.pas b/mystic/bbs_cfg_syscfg.pas index d5ace28..0caf67b 100644 --- a/mystic/bbs_cfg_syscfg.pas +++ b/mystic/bbs_cfg_syscfg.pas @@ -309,9 +309,9 @@ Begin Box.Header := ' FTP Server '; - Box.Open (26, 7, 55, 18); + Box.Open (26, 7, 55, 19); - VerticalLine (47, 9, 16); + VerticalLine (47, 9, 17); Form.AddBol ('U', ' Use FTP Server', 31, 9, 49, 9, 16, 3, @bbsCfg.inetFTPUse, Topic + 'Enable FTP server'); Form.AddWord ('P', ' Server Port', 34, 10, 49, 10, 13, 5, 0, 65535, @bbsCfg.inetFTPPort, Topic + 'FTP Server port'); @@ -321,6 +321,7 @@ Begin Form.AddWord ('I', ' Data Port Min', 32, 14, 49, 14, 15, 5, 0, 65535, @bbsCfg.inetFTPPortMin, Topic + 'Passive port range (minimum)'); Form.AddWord ('A', ' Data Port Max', 32, 15, 49, 15, 15, 5, 0, 65535, @bbsCfg.inetFTPPortMax, Topic + 'Passive port range (maximum)'); Form.AddBol ('Y', ' Allow Passive', 32, 16, 49, 16, 15, 3, @bbsCfg.inetFTPPassive, Topic + 'Allow passive data transfers'); + Form.AddBol ('Q', ' Hide User QWK', 31, 17, 49, 17, 15, 3, @bbsCfg.inetFTPHideQWK, Topic + 'Hide QWK packets in listings'); Form.Execute; Form.Free; diff --git a/mystic/mis_client_ftp.pas b/mystic/mis_client_ftp.pas index 00ff9e0..517fd58 100644 --- a/mystic/mis_client_ftp.pas +++ b/mystic/mis_client_ftp.pas @@ -105,8 +105,8 @@ Const re_UserOkay = '331 User name okay, need password.'; re_NoData = '425 Unable to open data connection'; re_BadCommand = '503 Bad sequence of commands.'; - re_UserUnknown = '530 Not logged in.'; - re_BadPW = '530 Login or password incorrect'; +// re_UserUnknown = '530 Not logged in.'; + re_BadPW = '530 Invalid login'; re_BadDir = '550 Directory change failed'; re_BadFile = '550 File not found'; re_NoAccess = '550 Access denied'; @@ -570,6 +570,7 @@ Begin // update user stats posts and bbs history if not networked End; +(* Procedure TFTPServer.cmdUSER; Begin ResetSession; @@ -581,7 +582,21 @@ Begin End Else Client.WriteLine(re_UserUnknown); End; +*) +Procedure TFTPServer.cmdUSER; +Begin + ResetSession; + + If SearchForUser(Data, User, UserPos) Then + UserName := Data + Else + UserPos := -1; + + Client.WriteLine(re_UserOkay); +End; + +(* Procedure TFTPServer.cmdPASS; Begin If (UserName = '') or (UserPos = -1) Then Begin @@ -600,6 +615,26 @@ Begin End Else Client.WriteLine(re_BadPW); End; +*) + +Procedure TFTPServer.cmdPASS; +Begin + If UserName = '' Then Begin + Client.WriteLine ('332 Need account'); + Exit; + End; + + If (UserPos <> -1) and (strUpper(Data) = User.Password) Then Begin + LoggedIn := True; + + Client.WriteLine(re_LoggedIn); + + GetSecurityLevel(User.Security, SecLevel); + + Server.Status (ProcessID, User.Handle + ' logged in'); + End Else + Client.WriteLine(re_BadPW); +End; Procedure TFTPServer.cmdREIN; Begin @@ -632,8 +667,6 @@ Begin End; Procedure TFTPServer.cmdPASV; -//Var -// WaitSock : TIOSocket; Begin If LoggedIn Then Begin If Not bbsCfg.inetFTPPassive Then Begin @@ -652,30 +685,6 @@ Begin Client.WriteLine(re_PassiveOK + '(' + strReplace(Client.HostIP, '.', ',') + ',' + strI2S(WordRec(DataPort).Hi) + ',' + strI2S(WordRec(DataPort).Lo) + ').'); IsPassive := True; -(* - WaitSock := TIOSocket.Create; - - WaitSock.FTelnetServer := False; - WaitSock.FTelnetClient := False; - - {$IFDEF FTPDEBUG} LOG('PASV Init'); {$ENDIF} - - WaitSock.WaitInit(bbsCfg.inetInterface, DataPort); - - {$IFDEF FTPDEBUG} LOG('PASV Wait'); {$ENDIF} - - DataSocket := WaitSock.WaitConnection(10000); - - {$IFDEF FTPDEBUG} LOG('PASV WaitDone'); {$ENDIF} - - If Not Assigned(DataSocket) Then Begin - WaitSock.Free; - Client.WriteLine(re_NoData); - Exit; - End; - - WaitSock.Free; -*) End Else Client.WriteLine(re_BadCommand); End; @@ -736,8 +745,8 @@ Begin OpenDataSession; - // if qwlbyFTP.acs then - DataSocket.WriteLine(bbsCfg.QwkBBSID + '.qwk'); + If Not bbsCfg.inetFTPHideQWK Then + DataSocket.WriteLine(bbsCfg.QwkBBSID + '.qwk'); DirFile := TFileBuffer.Create(FileBufSize); @@ -794,8 +803,8 @@ Begin {$IFDEF FTPDEBUG} LOG('Back from data session'); {$ENDIF} - // if qwlbyFTP.acs then - DataSocket.WriteLine('-rw-r--r-- 1 ftp ftp ' + strPadL('0', 13, ' ') + ' ' + GetFTPDate(CurDateDos) + ' ' + bbsCfg.QwkBBSID + '.qwk'); + If Not bbsCfg.inetFTPHideQWK Then + DataSocket.WriteLine('-rw-r--r-- 1 ftp ftp ' + strPadL('0', 13, ' ') + ' ' + GetFTPDate(CurDateDos) + ' ' + bbsCfg.QwkBBSID + '.qwk'); FBaseFile := TFileBuffer.Create(FileBufSize); @@ -841,7 +850,8 @@ Begin DirFile.Free; - DataSocket.WriteLine('-rw-r--r-- 1 ftp ftp ' + strPadL('0', 13, ' ') + ' ' + GetFTPDate(CurDateDos) + ' ' + bbsCfg.QwkBBSID + '.qwk'); + If Not bbsCfg.inetFTPHideQWK Then + DataSocket.WriteLine('-rw-r--r-- 1 ftp ftp ' + strPadL('0', 13, ' ') + ' ' + GetFTPDate(CurDateDos) + ' ' + bbsCfg.QwkBBSID + '.qwk'); CloseDataSession; End Else @@ -1171,7 +1181,7 @@ Begin LOG('Cmd: ' + Cmd + ' Data: ' + Data); {$ENDIF} -// Server.Status (ProcessID, 'Cmd: ' + Cmd + ' Data: ' + Data); + Server.Status (ProcessID, 'Cmd: ' + Cmd + ' Data: ' + Data); If Cmd = 'APPE' Then cmdSTOR(True) Else If Cmd = 'CDUP' Then cmdCDUP Else @@ -1210,7 +1220,8 @@ Begin If GotQuit Then Begin Client.WriteLine(re_Goodbye); - Server.Status (ProcessID, User.Handle + ' logged out'); + If UserPos <> -1 Then + Server.Status (ProcessID, User.Handle + ' logged out'); End; End; diff --git a/mystic/mutil_echoimport.pas b/mystic/mutil_echoimport.pas index 89affc7..f6488ee 100644 --- a/mystic/mutil_echoimport.pas +++ b/mystic/mutil_echoimport.pas @@ -46,8 +46,6 @@ Begin MB^.SetPriv ((PKT.MsgHDR.Attribute AND pktPrivate <> 0) OR NetMail); MB^.SetCrash (PKT.MsgHDR.Attribute AND pktCrash <> 0); MB^.SetRcvd (PKT.MsgHDR.Attribute AND pktReceived <> 0); - //MB^.SetSent (PKT.MsgHDR.Attribute AND pktSent <> 0); -// MB^.SetSent (NetMail); MB^.SetSent (False); // force to send to downlinks? MB^.SetHold (PKT.MsgHDR.Attribute AND pktHold <> 0); MB^.SetKillSent (PKT.MsgHDR.Attribute AND pktKillSent <> 0); diff --git a/mystic/qwkpoll.pas b/mystic/qwkpoll.pas index f4bbbf2..a0d3565 100644 --- a/mystic/qwkpoll.pas +++ b/mystic/qwkpoll.pas @@ -1,5 +1,26 @@ Program QwkPoll; +// ==================================================================== +// Mystic BBS Software Copyright 1997-2013 By James Coyle +// ==================================================================== +// +// This file is part of Mystic BBS. +// +// Mystic BBS is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Mystic BBS is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Mystic BBS. If not, see . +// +// ==================================================================== + {$I M_OPS.PAS} Uses diff --git a/mystic/records.pas b/mystic/records.pas index 3f2cd23..f0d941d 100644 --- a/mystic/records.pas +++ b/mystic/records.pas @@ -362,7 +362,8 @@ Type inetBINKPTimeOut: Word; inetBINKPCram5 : Boolean; QwkNetMenu : String[20]; - Reserved : Array[1..757] of Char; + inetFTPHideQWK : Boolean; + Reserved : Array[1..756] of Char; End; Const diff --git a/mystic/whatsnew.txt b/mystic/whatsnew.txt index d8c15f5..c62f309 100644 --- a/mystic/whatsnew.txt +++ b/mystic/whatsnew.txt @@ -3827,4 +3827,11 @@ will now change any filenames (calculated from ECHOTAG) to replace both \ and / with a _ character. + + Mystic echomail nodes can now be configured as a "FTP" session type, which + means Mystic (FIDOPOLL) will send/receive bundles with their uplink using + the FTP protocol (as opposed to BINKP or Directory). + + + Added the ability to turn off showing the user's QWK packet in FTP + directory listings (Internet Servers > FTP) +