Compare commits
27
Commits
ad1776c805
...
0.25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de81a82f43 | ||
|
|
6ebf2fc7a3 | ||
|
|
2c58629de4 | ||
|
|
721fa8fdf1 | ||
|
|
fdbeb83ab6 | ||
|
|
deafdc34c7 | ||
|
|
7879eb0cdc | ||
|
|
bcf0d456ee | ||
|
|
39dd885dd0 | ||
|
|
8b10d9f48a | ||
|
|
27b4c624b3 | ||
|
|
c2e418676b | ||
|
|
0b2630f624 | ||
|
|
097b39faa7 | ||
|
|
30e860885f | ||
|
|
132a6641f4 | ||
|
|
f80d94413f | ||
|
|
ae156c4689 | ||
|
|
2827504df4 | ||
|
|
c2f9843291 | ||
|
|
d94ba35438 | ||
|
|
a6a1dc2881 | ||
|
|
c766c4a9f7 | ||
|
|
6547b13983 | ||
|
|
89c030d26c | ||
|
|
a01ea3fd63 | ||
|
|
634fc3e3e5 |
+12
@@ -0,0 +1,12 @@
|
|||||||
|
*.o
|
||||||
|
debian/Makefile
|
||||||
|
source/Makefile
|
||||||
|
source/bin/
|
||||||
|
source/bforce/expression.c
|
||||||
|
source/config.log
|
||||||
|
source/config.status
|
||||||
|
source/include/config.h
|
||||||
|
bforce.geany
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -58,3 +58,195 @@
|
|||||||
then sending/receiving. Recode tables are compartible with HPT. New
|
then sending/receiving. Recode tables are compartible with HPT. New
|
||||||
config keywords: "Recode_file_in", "Recode_file_out", "Recode_intro_in"
|
config keywords: "Recode_file_in", "Recode_file_out", "Recode_intro_in"
|
||||||
|
|
||||||
|
Konstantin Stepanenkov, 2:5030/1251
|
||||||
|
0.22.7.kst1
|
||||||
|
===========
|
||||||
|
|
||||||
|
* Attempt to fix warnings, when compiling with -Wall.
|
||||||
|
+ make update -- install only binaries.
|
||||||
|
* Better EMSI handling, when calling to cisco.
|
||||||
|
+ Correct ZMH support in daemon.
|
||||||
|
* Some fixes in contributed perl scripts.
|
||||||
|
|
||||||
|
0.22.7.kst2
|
||||||
|
===========
|
||||||
|
|
||||||
|
+ Added option --with-uucp-lockdir=... to configure.
|
||||||
|
* Using strncpy(3) instead of strcpy(3) if possible.
|
||||||
|
|
||||||
|
Added patches by Maxi Rovnich @ 2:5030/872:
|
||||||
|
+ Support for maximum 'no dialtone' count.
|
||||||
|
+ Support for download resyncing, while checking for free space.
|
||||||
|
+ Ignore all files, but *.pnt, *.req, *.?lo and *.?ut in BSO.
|
||||||
|
|
||||||
|
0.22.7.kst3
|
||||||
|
===========
|
||||||
|
|
||||||
|
* Compilation failed with --disable-hangup-watch-cd. Fixed.
|
||||||
|
+ Ability to write daemon pid in file.
|
||||||
|
* -f option had reverse meaning. Thanks to Eugene Korovin @ 2:5080/196.72
|
||||||
|
+ -q option terminates daemon process (only if pidfile is used).
|
||||||
|
|
||||||
|
0.22.7.kst4
|
||||||
|
===========
|
||||||
|
|
||||||
|
* Hydra was broken in kst2. Fixed.
|
||||||
|
+ Bidirectional session drops only if rxcps and txcps are less than
|
||||||
|
mincps at the same time.
|
||||||
|
|
||||||
|
0.22.7.kst5
|
||||||
|
===========
|
||||||
|
|
||||||
|
+ port tcpip patch by Serge N. Pokhodyaev @ 2:5020/1838
|
||||||
|
* lock fix, when outbound on not lockable filesystem.
|
||||||
|
Patch by Andrew Dolgov @ 2:5030/394.41
|
||||||
|
|
||||||
|
0.22.7.kst6
|
||||||
|
===========
|
||||||
|
|
||||||
|
* traffic wasn't shown if no files in boxes.
|
||||||
|
Patch by Alexander Shiyan @ 2:5030/39.2
|
||||||
|
* bfstat now correctly shows age of files.
|
||||||
|
Patch by Alexander Shiyan @ 2:5030/39.2
|
||||||
|
* logging 'undefined cmd' fixed.
|
||||||
|
Thanks to Pavel I.Osipov @ 2:5020/770.50
|
||||||
|
|
||||||
|
0.22.8.kst7
|
||||||
|
===========
|
||||||
|
|
||||||
|
Some changes taken from 0.22.8 by Alexander Belkin:
|
||||||
|
* some bugfixes
|
||||||
|
+ new environment variable $RC (session return code)
|
||||||
|
+ sending of EMSI_ACK every time after recving of EMSI_DAT
|
||||||
|
+ support for nodelist IBN flag
|
||||||
|
|
||||||
|
0.22.8.kst8
|
||||||
|
===========
|
||||||
|
|
||||||
|
* fixed bug with flags CM in override
|
||||||
|
* fixed bug with sending HUP to daemon
|
||||||
|
|
||||||
|
Andrey Slusar <anray@users.sourceforge.net>
|
||||||
|
Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com>
|
||||||
|
Sergey Babitch <vpooh@users.sourceforge.net>
|
||||||
|
|
||||||
|
0.22.8.ugenk1
|
||||||
|
=============
|
||||||
|
+ initial release, based on bforce 0.22.8.kst8
|
||||||
|
* fixed problem with worktime detecting
|
||||||
|
+ makefiles fixed (removed make update, now make install installs config files with extension .sample)
|
||||||
|
+ added --with-user and --with-group options to ``configure'' script.
|
||||||
|
+ installation directories by default are compliance with default fidogate installation
|
||||||
|
|
||||||
|
0.22.8.ugenk2
|
||||||
|
=============
|
||||||
|
* pathes by Andrey Slusar @ 2:467/126
|
||||||
|
(total 12: patch-bforce.c, patch-bfstat.c, patch-daemon.c, patch-expression.y,
|
||||||
|
patch-nlookup.c, patch-prot_binkp.c, patch-prot_emsi.c, patch-prot_yoohoo.c, patch-prot_zmrecv.c,
|
||||||
|
patch-prot_zmsend.c, patch-sess_call.c, patch-sess_stat.c)
|
||||||
|
+ added syslog support (see SYSLOG)
|
||||||
|
+ fixed nlookup (broken in ugenk1)
|
||||||
|
+ spec file now goes with bforce
|
||||||
|
|
||||||
|
0.22.8.ugenk3
|
||||||
|
=============
|
||||||
|
+ fixed working with syslog (not tested yet, any volonteers?)
|
||||||
|
* some bugfixes
|
||||||
|
|
||||||
|
0.22.8.ugenk4
|
||||||
|
=============
|
||||||
|
+ fixed problems with license (thnx to Jonathan Gonzales V. from gnu.org)
|
||||||
|
+ added nomail flag
|
||||||
|
- project moved to sourceforge.net (projectname - binkforce)
|
||||||
|
+ now --enable-syslog is by default! Read SYSLOG for details
|
||||||
|
+ nodelist mask detection (see sample config for details)
|
||||||
|
+ contrib/outman now supports bso (thnx to Andrew Leonov @ 2:4641/500.119)
|
||||||
|
|
||||||
|
0.22.8.ugenk5
|
||||||
|
=============
|
||||||
|
+ fixed ``got unexpected emsi sequence "EMSI_INQC816"''
|
||||||
|
+ added some features to INSTALL.ru
|
||||||
|
* added documentation about incoming sessions over ip/pstn by Igor Mitichev
|
||||||
|
|
||||||
|
0.22.8.ugenk6
|
||||||
|
=============
|
||||||
|
+ some changes in autoconf
|
||||||
|
* added Type to nlookup
|
||||||
|
* fixed 'Ñ' in FAQ
|
||||||
|
* added buggy-emsi option in configure. use it in case of problems with stupid mailers
|
||||||
|
* fixed hydra
|
||||||
|
|
||||||
|
0.22.9
|
||||||
|
======
|
||||||
|
+ Changed version for compliance with *BSD ports
|
||||||
|
+ Added possibility to run external program for each override and
|
||||||
|
hidden. See bforce.subst.sample for examples and
|
||||||
|
docs/readme.txt for details.
|
||||||
|
+ Implement binkp/1.1 (Multiple Batch Mode and Non-reliable Mode).
|
||||||
|
+ Turn on FREQ at binkp sessions.
|
||||||
|
|
||||||
|
fidoman (Sergey Dorofeev)
|
||||||
|
=== 2012-03 ===
|
||||||
|
|
||||||
|
$DEBUGLEVEL, $DEBUGFILE removed - please use configuration options
|
||||||
|
|
||||||
|
DNS zone support
|
||||||
|
|
||||||
|
=== 2012-02 ===
|
||||||
|
|
||||||
|
Netspool support
|
||||||
|
24554 protocol remake
|
||||||
|
|
||||||
|
=== 2011-12-25 ===
|
||||||
|
|
||||||
|
Cmdline processing code is partially rewritten.
|
||||||
|
New key -u for selection proto for IP session.
|
||||||
|
Added code to get node IP address from nodelist (INA flag).
|
||||||
|
Some maybe noisy messages in log added.
|
||||||
|
Some code rearrangements in session_call.
|
||||||
|
Added feature to try all available connection ways if not specified one
|
||||||
|
on calls from command line (IP methods then modem).
|
||||||
|
|
||||||
|
=== 2011-12-15 ===
|
||||||
|
|
||||||
|
Patch io_unix_tio.diff for OpenBSD systems running telnetted serial modem.
|
||||||
|
|
||||||
|
=== 2011-12-13 ===
|
||||||
|
|
||||||
|
Split inbound feature have added.
|
||||||
|
Received files from different links are placed in separate folders in inbound.
|
||||||
|
Use option "split_inbound" to enable this feature.
|
||||||
|
|
||||||
|
|
||||||
|
Alexander Skovpen <a.n.skovpen@gmail.com>
|
||||||
|
Max N. Boyarov <zotrix@users.noreply.github.com>
|
||||||
|
|
||||||
|
|
||||||
|
Alexey Khromov (zx@zxalexis.ru)
|
||||||
|
======
|
||||||
|
0.24.1
|
||||||
|
+ Added pre-init debugging (primarily of config readout) to stderr by -v
|
||||||
|
option. Vanished out errorful calls to "log" and "debug" before log and
|
||||||
|
debug files initialization.
|
||||||
|
+ Fixed build on 64-bit systems (amd64 and aarch64)
|
||||||
|
+ Initially added config options incpkt_flag and incbdl_flag to raise
|
||||||
|
up flag-driven tosser manipulation
|
||||||
|
|
||||||
|
0.24.2
|
||||||
|
+ Fixed environment variables while executing external programs
|
||||||
|
on handshake or session end
|
||||||
|
+ Fixed flags working on arcmail/netmail recieve
|
||||||
|
|
||||||
|
0.25
|
||||||
|
+ EMSI handshake logic reworked to comply with EMSI-II std (FTSC-0088)
|
||||||
|
+ New option: proto_order - dezired protocol order for outgoing calls
|
||||||
|
in EMSI session handshake
|
||||||
|
EMSI-II-compliance works as follows:
|
||||||
|
* if both (caller and callee) expose EII flag - selected proto
|
||||||
|
will be first in caller compat.options compatible with callee
|
||||||
|
* if caller is EMSI-I-compliant and does not show EII flad -
|
||||||
|
selection by callee internal order from compatible with caller
|
||||||
|
+ Changed ifcico protocol port hardcoded to num and not name from
|
||||||
|
/etc/services line (as of abscence of latter)
|
||||||
|
+ Config example reworked to include new options
|
||||||
|
+ New option: emsi_send_tz - to send TZUTC EMSI-handshake part.
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
=== 2012-03 ===
|
|
||||||
|
|
||||||
$DEBUGLEVEL, $DEBUGFILE removed - please use configuration options
|
|
||||||
|
|
||||||
DNS zone support
|
|
||||||
|
|
||||||
=== 2012-02 ===
|
|
||||||
|
|
||||||
Netspool support
|
|
||||||
24554 protocol remake
|
|
||||||
|
|
||||||
=== 2011-12-25 ===
|
|
||||||
|
|
||||||
Cmdline processing code is partially rewritten.
|
|
||||||
New key -u for selection proto for IP session.
|
|
||||||
Added code to get node IP address from nodelist (INA flag).
|
|
||||||
Some maybe noisy messages in log added.
|
|
||||||
Some code rearrangements in session_call.
|
|
||||||
Added feature to try all available connection ways if not specified one
|
|
||||||
on calls from command line (IP methods then modem).
|
|
||||||
|
|
||||||
=== 2011-12-15 ===
|
|
||||||
|
|
||||||
Patch io_unix_tio.diff for OpenBSD systems running telnetted serial modem.
|
|
||||||
|
|
||||||
=== 2011-12-13 ===
|
|
||||||
|
|
||||||
Split inbound feature have added.
|
|
||||||
Received files from different links are placed in separate folders in inbound.
|
|
||||||
Use option "split_inbound" to enable this feature.
|
|
||||||
-67
@@ -1,67 +0,0 @@
|
|||||||
0.22.7.kst1
|
|
||||||
===========
|
|
||||||
|
|
||||||
* Attempt to fix warnings, when compiling with -Wall.
|
|
||||||
+ make update -- install only binaries.
|
|
||||||
* Better EMSI handling, when calling to cisco.
|
|
||||||
+ Correct ZMH support in daemon.
|
|
||||||
* Some fixes in contributed perl scripts.
|
|
||||||
|
|
||||||
0.22.7.kst2
|
|
||||||
===========
|
|
||||||
|
|
||||||
+ Added option --with-uucp-lockdir=... to configure.
|
|
||||||
* Using strncpy(3) instead of strcpy(3) if possible.
|
|
||||||
|
|
||||||
Added patches by Maxi Rovnich @ 2:5030/872:
|
|
||||||
+ Support for maximum 'no dialtone' count.
|
|
||||||
+ Support for download resyncing, while checking for free space.
|
|
||||||
+ Ignore all files, but *.pnt, *.req, *.?lo and *.?ut in BSO.
|
|
||||||
|
|
||||||
0.22.7.kst3
|
|
||||||
===========
|
|
||||||
|
|
||||||
* Compilation failed with --disable-hangup-watch-cd. Fixed.
|
|
||||||
+ Ability to write daemon pid in file.
|
|
||||||
* -f option had reverse meaning. Thanks to Eugene Korovin @ 2:5080/196.72
|
|
||||||
+ -q option terminates daemon process (only if pidfile is used).
|
|
||||||
|
|
||||||
0.22.7.kst4
|
|
||||||
===========
|
|
||||||
|
|
||||||
* Hydra was broken in kst2. Fixed.
|
|
||||||
+ Bidirectional session drops only if rxcps and txcps are less than
|
|
||||||
mincps at the same time.
|
|
||||||
|
|
||||||
0.22.7.kst5
|
|
||||||
===========
|
|
||||||
|
|
||||||
+ port tcpip patch by Serge N. Pokhodyaev @ 2:5020/1838
|
|
||||||
* lock fix, when outbound on not lockable filesystem.
|
|
||||||
Patch by Andrew Dolgov @ 2:5030/394.41
|
|
||||||
|
|
||||||
0.22.7.kst6
|
|
||||||
===========
|
|
||||||
|
|
||||||
* traffic wasn't shown if no files in boxes.
|
|
||||||
Patch by Alexander Shiyan @ 2:5030/39.2
|
|
||||||
* bfstat now correctly shows age of files.
|
|
||||||
Patch by Alexander Shiyan @ 2:5030/39.2
|
|
||||||
* logging 'undefined cmd' fixed.
|
|
||||||
Thanks to Pavel I.Osipov @ 2:5020/770.50
|
|
||||||
|
|
||||||
0.22.8.kst7
|
|
||||||
===========
|
|
||||||
|
|
||||||
Some changes taken from 0.22.8 by Alexander Belkin:
|
|
||||||
* some bugfixes
|
|
||||||
+ new environment variable $RC (session return code)
|
|
||||||
+ sending of EMSI_ACK every time after recving of EMSI_DAT
|
|
||||||
+ support for nodelist IBN flag
|
|
||||||
|
|
||||||
0.22.8.kst8
|
|
||||||
===========
|
|
||||||
|
|
||||||
* fixed bug with flags CM in override
|
|
||||||
* fixed bug with sending HUP to daemon
|
|
||||||
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
0.22.8.ugenk1
|
|
||||||
=============
|
|
||||||
+ initial release, based on bforce 0.22.8.kst8
|
|
||||||
* fixed problem with worktime detecting
|
|
||||||
+ makefiles fixed (removed make update, now make install installs config files with extension .sample)
|
|
||||||
+ added --with-user and --with-group options to ``configure'' script.
|
|
||||||
+ installation directories by default are compliance with default fidogate installation
|
|
||||||
|
|
||||||
0.22.8.ugenk2
|
|
||||||
=============
|
|
||||||
* pathes by Andrey Slusar @ 2:467/126
|
|
||||||
(total 12: patch-bforce.c, patch-bfstat.c, patch-daemon.c, patch-expression.y,
|
|
||||||
patch-nlookup.c, patch-prot_binkp.c, patch-prot_emsi.c, patch-prot_yoohoo.c, patch-prot_zmrecv.c,
|
|
||||||
patch-prot_zmsend.c, patch-sess_call.c, patch-sess_stat.c)
|
|
||||||
+ added syslog support (see SYSLOG)
|
|
||||||
+ fixed nlookup (broken in ugenk1)
|
|
||||||
+ spec file now goes with bforce
|
|
||||||
|
|
||||||
0.22.8.ugenk3
|
|
||||||
=============
|
|
||||||
+ fixed working with syslog (not tested yet, any volonteers?)
|
|
||||||
* some bugfixes
|
|
||||||
|
|
||||||
0.22.8.ugenk4
|
|
||||||
=============
|
|
||||||
+ fixed problems with license (thnx to Jonathan Gonzales V. from gnu.org)
|
|
||||||
+ added nomail flag
|
|
||||||
- project moved to sourceforge.net (projectname - binkforce)
|
|
||||||
+ now --enable-syslog is by default! Read SYSLOG for details
|
|
||||||
+ nodelist mask detection (see sample config for details)
|
|
||||||
+ contrib/outman now supports bso (thnx to Andrew Leonov @ 2:4641/500.119)
|
|
||||||
|
|
||||||
0.22.8.ugenk5
|
|
||||||
=============
|
|
||||||
+ fixed ``got unexpected emsi sequence "EMSI_INQC816"''
|
|
||||||
+ added some features to INSTALL.ru
|
|
||||||
* added documentation about incoming sessions over ip/pstn by Igor Mitichev
|
|
||||||
|
|
||||||
0.22.8.ugenk6
|
|
||||||
=============
|
|
||||||
+ some changes in autoconf
|
|
||||||
* added Type to nlookup
|
|
||||||
* fixed 'Ñ' in FAQ
|
|
||||||
* added buggy-emsi option in configure. use it in case of problems with stupid mailers
|
|
||||||
* fixed hydra
|
|
||||||
|
|
||||||
0.22.9
|
|
||||||
======
|
|
||||||
+ Changed version for compliance with *BSD ports
|
|
||||||
+ Added possibility to run external program for each override and
|
|
||||||
hidden. See bforce.subst.sample for examples and
|
|
||||||
docs/readme.txt for details.
|
|
||||||
+ Implement binkp/1.1 (Multiple Batch Mode and Non-reliable Mode).
|
|
||||||
+ Turn on FREQ at binkp sessions.
|
|
||||||
@@ -43,6 +43,8 @@ Q:
|
|||||||
A: /All/
|
A: /All/
|
||||||
ugenkXX. Брать на http://sourceforge.net/projects/binkforce,
|
ugenkXX. Брать на http://sourceforge.net/projects/binkforce,
|
||||||
или с cvs там же.
|
или с cvs там же.
|
||||||
|
A: /AK/
|
||||||
|
Переехало оттуда в гит, но лучше искать в профильных эхах.
|
||||||
|
|
||||||
Q: Как подключать нодлисты с цифровыми расширениями? Маски в конфиге bforce не
|
Q: Как подключать нодлисты с цифровыми расширениями? Маски в конфиге bforce не
|
||||||
задаются.
|
задаются.
|
||||||
@@ -81,7 +83,7 @@ A: /KAS/
|
|||||||
/GM/
|
/GM/
|
||||||
Это мое и лежит оно тyт
|
Это мое и лежит оно тyт
|
||||||
http://btrieve.virtualave.net/files/bf0224-filebox.diff.rar
|
http://btrieve.virtualave.net/files/bf0224-filebox.diff.rar
|
||||||
в моем патче, в отличие от пpедыдyщего, не все подpд имеют тип
|
в моем патче, в отличие от пpедыдyщего, не все подpяд имеют тип
|
||||||
TYPE_FILEBOX.
|
TYPE_FILEBOX.
|
||||||
мыло - это TYPE_NETMAIL, эхи - TYPE_ARCMAIL и т.д.
|
мыло - это TYPE_NETMAIL, эхи - TYPE_ARCMAIL и т.д.
|
||||||
Это yдобно дл пpосмотpа статистики поинтy - что на него лежит.
|
Это yдобно дл пpосмотpа статистики поинтy - что на него лежит.
|
||||||
@@ -223,6 +225,7 @@ MR = Maxi Rovnich, 2:5030/872
|
|||||||
PVC = Peter V. Chernikoff, 2:5020/2091
|
PVC = Peter V. Chernikoff, 2:5020/2091
|
||||||
SNP = Serge N. Pokhodyaev, 2:5020/1838
|
SNP = Serge N. Pokhodyaev, 2:5020/1838
|
||||||
VS = Valery Shishkov, 2:5040/9
|
VS = Valery Shishkov, 2:5040/9
|
||||||
|
AK = Alexey Khromov, 2:5030/723
|
||||||
|
|
||||||
Исправления и добавления в виде пар вопрос/ответ будут с благодарностью приняты
|
Исправления и добавления в виде пар вопрос/ответ будут с благодарностью приняты
|
||||||
в netmail.
|
в netmail.
|
||||||
|
|||||||
+26
-7
@@ -1,10 +1,10 @@
|
|||||||
В этом файле описывается процесс установки и настройки
|
В этом файле описывается процесс установки и настройки
|
||||||
фидонет-совместимого мейлера bforce 0.22.8.ugenk1.
|
фидонет-совместимого мейлера bforce 0.xx.
|
||||||
|
|
||||||
В данном документе приняты следующие обозначения:
|
В данном документе приняты следующие обозначения:
|
||||||
|
|
||||||
<SRCDIR> - путь, куда вы распаковали тарболл с исходными
|
<SRCDIR> - путь, куда вы распаковали тарболл с исходными
|
||||||
текстами bforce 0.22.8.ugenk1 (далее bforce)
|
текстами bforce 0.xx (далее bforce)
|
||||||
Тарболл - файл с расширением tar.gz, или tar.bz2
|
Тарболл - файл с расширением tar.gz, или tar.bz2
|
||||||
|
|
||||||
|
|
||||||
@@ -24,14 +24,14 @@ gmake
|
|||||||
|
|
||||||
Распакуйте тарболл следующими командами:
|
Распакуйте тарболл следующими командами:
|
||||||
|
|
||||||
gzip -d bforce-0.22.8.ugenk1.tar.gz
|
gzip -d bforce-master.tar.gz
|
||||||
или
|
или
|
||||||
bzip2 -d bforce-0.22.8.ugenk1.tar.bz2
|
bzip2 -d bforce-master.tar.bz2
|
||||||
|
|
||||||
tar -xvf bforce-0.22.8.ugenk1.tar
|
tar -xvf bforce-master.tar
|
||||||
|
|
||||||
Перейдите в директорию bforce-0.22.8.ugenk1/source:
|
Перейдите в директорию bforce/source:
|
||||||
cd <SRCDIR>/bforce-0.22.8.ugenk1/source
|
cd <SRCDIR>/bforce/source
|
||||||
|
|
||||||
Для создания Makefile, который наиболее подходит к вашей
|
Для создания Makefile, который наиболее подходит к вашей
|
||||||
системе, наберите:
|
системе, наберите:
|
||||||
@@ -76,6 +76,11 @@ gmake install
|
|||||||
Настройка
|
Настройка
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
Рекомендуется установить системную переменную BFCONFIG,
|
||||||
|
указывающую на местоположение конфигурации bforce.
|
||||||
|
Проще всего через /etc/environment для общесистемной или
|
||||||
|
.profile для переменной пользователя.
|
||||||
|
|
||||||
Для нормальной работы вам нужно отредактировать конфигурационные файлы
|
Для нормальной работы вам нужно отредактировать конфигурационные файлы
|
||||||
bforce. По умолчанию они находятся в /usr/local/fido/etc и называются
|
bforce. По умолчанию они находятся в /usr/local/fido/etc и называются
|
||||||
bforce.conf - основной конфигурационный файл bforce
|
bforce.conf - основной конфигурационный файл bforce
|
||||||
@@ -125,6 +130,19 @@ cat `which mgetty` |strings |grep FIDO |wc -l
|
|||||||
|
|
||||||
где news - это пользователь, из-под которого у вас работает ftn-подсистема.
|
где news - это пользователь, из-под которого у вас работает ftn-подсистема.
|
||||||
|
|
||||||
|
Bforce при ИСХОДЯЩИХ звонках использует файлы блокировки порта модема,
|
||||||
|
при несовпадении каталога или невозможности создания файла
|
||||||
|
mgetty сбросит модем во время звонка.
|
||||||
|
Поэтому настоятельно рекомендуется проверить права на папку /var/lock
|
||||||
|
и то, на какой ФС она расположенв.
|
||||||
|
Современные системы имеют тенденцию к применению /var/lock как ссылки
|
||||||
|
на /run/lock, а ФС /run монтируется и создается на tmpfs при каждой
|
||||||
|
загрузке с помощью systemd-tempfiles.
|
||||||
|
Для изменения поведения необходимо создать файл в /etc/tempfiles.d/,
|
||||||
|
совпадающим (за исключением части имени -part) c именем файла в
|
||||||
|
/usr/lib/systemd/systemd-tempfiles.d.
|
||||||
|
Рабочий пример legacy-part.conf в папке contrib.
|
||||||
|
|
||||||
Совместная работа с inetd/xinetd
|
Совместная работа с inetd/xinetd
|
||||||
================================
|
================================
|
||||||
К сожалению (или к счастью), bforce не умеет самостоятельно принимать входящие
|
К сожалению (или к счастью), bforce не умеет самостоятельно принимать входящие
|
||||||
@@ -150,6 +168,7 @@ init.d/bforce - init-
|
|||||||
bfha - bforce history analyzer (bfha)
|
bfha - bforce history analyzer (bfha)
|
||||||
bfha/README - bfha README
|
bfha/README - bfha README
|
||||||
bfha/bfha.pl - собственно, bfha
|
bfha/bfha.pl - собственно, bfha
|
||||||
|
legacy-part.conf - файл для донастройки прав на /run/lock в systemd
|
||||||
u-srif - продвинутый freq-процессор
|
u-srif - продвинутый freq-процессор
|
||||||
u-srif/u-srif-index.py \ с поддержой отчетов,
|
u-srif/u-srif-index.py \ с поддержой отчетов,
|
||||||
u-srif/u-srif-lookup.py \ ограничений,
|
u-srif/u-srif-lookup.py \ ограничений,
|
||||||
|
|||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
BinkleyForce FTN mailer (Branch KST)
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
Bug Reports
|
|
||||||
-----------
|
|
||||||
|
|
||||||
E-Mail : kst@moecho.org
|
|
||||||
FidoNet : Konstantin Stepanenkov, 2:5030/1251
|
|
||||||
|
|
||||||
New Versions
|
|
||||||
------------
|
|
||||||
|
|
||||||
http://kst.spb.ru/bforce/
|
|
||||||
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
[](https://travis-ci.org/askovpen/binkleyforce)
|
|
||||||
|
|
||||||
BinkleyForce FTN mailer
|
BinkleyForce FTN mailer
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
@@ -15,18 +13,30 @@ any later version. See the COPYING file for further information.
|
|||||||
Known Bugs
|
Known Bugs
|
||||||
----------
|
----------
|
||||||
- BinkD use and expect local file time at BinkP sessions, but
|
- BinkD use and expect local file time at BinkP sessions, but
|
||||||
BinkleyForce allways use UTC time (?)
|
BinkleyForce always use UTC time (?)
|
||||||
|
|
||||||
Bug Reports
|
Bug Reports
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
E-Mail : adb@newmail.ru
|
E-Mail : zx@zxalexis.ru
|
||||||
FidoNet : Alexander Belkin, 2:5020/1398.11
|
FidoNet : Alexey Khromov, 2:5030/723
|
||||||
|
|
||||||
New Versions
|
New Versions
|
||||||
------------
|
------------
|
||||||
|
|
||||||
http://adb.newmail.ru
|
https://prj.zxalexis.ru/gitea/zx/bforce
|
||||||
|
|
||||||
|
Older Sources
|
||||||
|
-------------
|
||||||
|
https://github.com/zotrix/binkleyforce/
|
||||||
|
https://sourceforge.net/projects/binkforce/
|
||||||
|
|
||||||
Copyright (c) 1998-2000 Alexander Belkin, Moscow, Russia.
|
Copyright <br>
|
||||||
|
> (c) 1998-2000 Alexander Belkin, Moscow, Russia.<br>
|
||||||
|
> (c) 2004-2007 Evgeniy Kozhuhovskiy 2:450/256, 2:450/267<br>
|
||||||
|
> (c) 2005 Andrey Slusar<br>
|
||||||
|
> (c) 2006-2016 Max N. Boyarov<br>
|
||||||
|
> (c) 2007-2008 Sergey Babitch<br>
|
||||||
|
> (c) 2011-2014 Sergey Dorofeev<br>
|
||||||
|
> (c) 2014 Alexander Skovpen<br>
|
||||||
|
> (c) 2024 Alexey Khromov<br>
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
BinkleyForce FTN mailer (Branch ugenk)
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
Bug Reports
|
|
||||||
-----------
|
|
||||||
|
|
||||||
E-Mail : e.kozhuhovskiy@gmail.com
|
|
||||||
FidoNet : Evgeniy Kozhuhovskiy, 2:450/256, 2:450/267
|
|
||||||
|
|
||||||
New Versions
|
|
||||||
------------
|
|
||||||
|
|
||||||
http://ugenk.bas-net.by/
|
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# This file is part of systemd.
|
||||||
|
#
|
||||||
|
# systemd is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Lesser General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# See tmpfiles.d(5) for details
|
||||||
|
|
||||||
|
# These files are considered legacy and are unnecessary on legacy-free
|
||||||
|
# systems.
|
||||||
|
|
||||||
|
d /run/lock 0777 root lock -
|
||||||
|
L /var/lock - - - - ../run/lock
|
||||||
|
|
||||||
|
# /run/lock/subsys is used for serializing SysV service execution, and
|
||||||
|
# hence without use on SysV-less systems.
|
||||||
|
|
||||||
|
d /run/lock/subsys 0775 root lock -
|
||||||
+41
-4
@@ -63,6 +63,12 @@ address 20:26/100.0@easynet
|
|||||||
#
|
#
|
||||||
options NoDirZap NoJanus NoChat
|
options NoDirZap NoJanus NoChat
|
||||||
|
|
||||||
|
# Protocol order for outgoing EMSI calls
|
||||||
|
# Tolerant to Options (i.e. you can order all kind of protos
|
||||||
|
# as of TZA,KER,JAN and SLK are not supported at all
|
||||||
|
# Default: HYD,JAN,DZA,ZAP,ZMO,TZA,SLK,KER
|
||||||
|
proto_order HYD,ZMO,ZAP,DZA,JAN,TZA,KER,SLK
|
||||||
|
|
||||||
#
|
#
|
||||||
# Domain outbounds
|
# Domain outbounds
|
||||||
# Domain <domain_name> <outbound_dir> <zone>
|
# Domain <domain_name> <outbound_dir> <zone>
|
||||||
@@ -78,8 +84,8 @@ options NoDirZap NoJanus NoChat
|
|||||||
#log_file /var/log/bforce/bf-log
|
#log_file /var/log/bforce/bf-log
|
||||||
|
|
||||||
# Debugging information completness level. Debugging is disabled by
|
# Debugging information completness level. Debugging is disabled by
|
||||||
# default. Allowed debug levels: config, nodelist, outbound, info, hshake,
|
# default. Allowed debug levels: config, override, event, nodelist, outbound,
|
||||||
# ttyio, modem, prot, freq, daemon, full
|
# info, hshake, ttyio, modem, prot, freq, statem, daemon, 24554, free, full
|
||||||
|
|
||||||
#debug_file /var/log/bforce/bf-debug
|
#debug_file /var/log/bforce/bf-debug
|
||||||
#debug_level info hshake prot
|
#debug_level info hshake prot
|
||||||
@@ -91,6 +97,13 @@ options NoDirZap NoJanus NoChat
|
|||||||
#
|
#
|
||||||
nodial_flag /etc/nodial
|
nodial_flag /etc/nodial
|
||||||
|
|
||||||
|
#
|
||||||
|
# Incoming flags
|
||||||
|
# Netmail:
|
||||||
|
#incnet_flag /var/spool/fido/flags/mail
|
||||||
|
# Arcmail:
|
||||||
|
#incarc_flag /var/spool/fido/flags/echo
|
||||||
|
|
||||||
#
|
#
|
||||||
# Inbound directories
|
# Inbound directories
|
||||||
#
|
#
|
||||||
@@ -102,13 +115,13 @@ split_inbound yes
|
|||||||
#
|
#
|
||||||
# Path to your 4D outbound (use zone as extension)
|
# Path to your 4D outbound (use zone as extension)
|
||||||
#
|
#
|
||||||
#outbound_directory /var/spool/fido/bt/out
|
outbound_directory /var/spool/fido/bt/out
|
||||||
|
|
||||||
#
|
#
|
||||||
# Path to your AmigaDos style 4D outbound.
|
# Path to your AmigaDos style 4D outbound.
|
||||||
# (You can use all outbound styles at the same time)
|
# (You can use all outbound styles at the same time)
|
||||||
#
|
#
|
||||||
amiga_outbound_directory /var/spool/fido/bt/out
|
#amiga_outbound_directory /var/spool/fido/bt/out
|
||||||
|
|
||||||
#
|
#
|
||||||
# Directory with your nodelists (for nodelist without full path)
|
# Directory with your nodelists (for nodelist without full path)
|
||||||
@@ -246,6 +259,10 @@ mode_request 100660
|
|||||||
# '~' 1 second delay
|
# '~' 1 second delay
|
||||||
# '`' 1/4 second delay
|
# '`' 1/4 second delay
|
||||||
|
|
||||||
|
# Modem lock directory (/var/lock as in FHS-3.0
|
||||||
|
# if you have it on tmpfs by systemd - read INSTALL.ru)
|
||||||
|
# uucp_lock_directory /var/lock
|
||||||
|
|
||||||
#
|
#
|
||||||
# Yor modem devices names (will use first not locked one)
|
# Yor modem devices names (will use first not locked one)
|
||||||
# ModemDev <device>[<:lock_speed>]
|
# ModemDev <device>[<:lock_speed>]
|
||||||
@@ -335,6 +352,9 @@ max_speed 57600
|
|||||||
flags XW,V34B,IDC,LMD
|
flags XW,V34B,IDC,LMD
|
||||||
emsi_OH_time 22:00-07:30
|
emsi_OH_time 22:00-07:30
|
||||||
emsi_FR_time 22:30-05:30
|
emsi_FR_time 22:30-05:30
|
||||||
|
#emsi_send_tz no
|
||||||
|
#emsi_send_time no
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Our receiver buffer size [bytes]
|
# Our receiver buffer size [bytes]
|
||||||
@@ -435,6 +455,23 @@ skip_files_recv *.pif *.swp
|
|||||||
# setsid - run command in a new session
|
# setsid - run command in a new session
|
||||||
# useshell - run command by calling a shell (/bin/sh)
|
# useshell - run command by calling a shell (/bin/sh)
|
||||||
#
|
#
|
||||||
|
# Bforce will make environment for external programs
|
||||||
|
# which include these variables:
|
||||||
|
# $REM_ADDR_FTN - remote ftn address
|
||||||
|
# $REM_ADDR_INET - remote inet address
|
||||||
|
# $LOC_ADDR_FTN - local ftn address
|
||||||
|
# $LOC_ADDR_INET - local inet address
|
||||||
|
# $PASSWORD - session password
|
||||||
|
# $MAILER - remote mailer
|
||||||
|
# $LOCATION - remote location
|
||||||
|
# $SYSOP - remote SysOp name
|
||||||
|
# $SYSTEM_NAME - remote station name
|
||||||
|
# $PHONE - remote phone
|
||||||
|
# $FLAGS - remote flags
|
||||||
|
# $PROTECTED - password protected on both sides
|
||||||
|
# $LISTED - present in nodelist
|
||||||
|
# $INBOUND - current inbound path for this remote
|
||||||
|
#
|
||||||
#run_after_handshake [logout]/bin/echo "Hello, world!"
|
#run_after_handshake [logout]/bin/echo "Hello, world!"
|
||||||
#run_after_session [nowait,setsid]/usr/local/lib/ftp/run-in
|
#run_after_session [nowait,setsid]/usr/local/lib/ftp/run-in
|
||||||
#
|
#
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
0.23
|
0.25
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ clean:
|
|||||||
rm -f ./bin/core
|
rm -f ./bin/core
|
||||||
clean-am:
|
clean-am:
|
||||||
rm -f ./Makefile
|
rm -f ./Makefile
|
||||||
|
rm -f ../debian/Makefile
|
||||||
rm -f ./include/config.h
|
rm -f ./include/config.h
|
||||||
rm -f ./config.log
|
rm -f ./config.log
|
||||||
rm -f ./config.status
|
rm -f ./config.status
|
||||||
|
|||||||
+33
-5
@@ -23,6 +23,8 @@
|
|||||||
/* PID of our child process (if use fork) */
|
/* PID of our child process (if use fork) */
|
||||||
pid_t child_pid = 0;
|
pid_t child_pid = 0;
|
||||||
|
|
||||||
|
char * mainenv[EXEC_MAX_NUM_ENVS+1];
|
||||||
|
|
||||||
const char *BFERR[] = {
|
const char *BFERR[] = {
|
||||||
/* 00 */ "Successfull",
|
/* 00 */ "Successfull",
|
||||||
/* 01 */ "Fatal error occured",
|
/* 01 */ "Fatal error occured",
|
||||||
@@ -102,6 +104,7 @@ static void usage(void)
|
|||||||
" -S <connect_str> connect string (for slave mode only)\n"
|
" -S <connect_str> connect string (for slave mode only)\n"
|
||||||
" -p <port> override modem port (must be defined in config)\n"
|
" -p <port> override modem port (must be defined in config)\n"
|
||||||
" -u binkp|ifcico|telnet protocol to use over TCP/IP\n"
|
" -u binkp|ifcico|telnet protocol to use over TCP/IP\n"
|
||||||
|
" -v display early debug info on stderr\n"
|
||||||
" -h show this help message\n"
|
" -h show this help message\n"
|
||||||
"\n",
|
"\n",
|
||||||
conf_getconfname()
|
conf_getconfname()
|
||||||
@@ -252,12 +255,22 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
int ch = 0;
|
int ch = 0;
|
||||||
opts.runmode = MODE_UNDEFINED;
|
opts.runmode = MODE_UNDEFINED;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
mainenv[0] = NULL;
|
||||||
|
i=0;
|
||||||
|
while (envp[i]) {
|
||||||
|
mainenv[i] = malloc(strlen(envp[i])+2);
|
||||||
|
strcpy(mainenv[i], envp[i]);
|
||||||
|
mainenv[++i] = NULL;
|
||||||
|
DEB((D_FREE, "Program ENV: %s\n", mainenv[(i-1)]));
|
||||||
|
}
|
||||||
|
|
||||||
memset(&opts, '\0', sizeof(s_bforce_opts));
|
memset(&opts, '\0', sizeof(s_bforce_opts));
|
||||||
|
|
||||||
// parsing
|
// parsing
|
||||||
|
|
||||||
while( (ch=getopt(argc, argv, "hfI:p:n:l:a:u:oiC:S:dq")) != EOF )
|
while( (ch=getopt(argc, argv, "hfI:p:n:l:a:u:oivC:S:dq")) != (int)-1 )
|
||||||
{
|
{
|
||||||
switch( ch ) {
|
switch( ch ) {
|
||||||
case 'h':
|
case 'h':
|
||||||
@@ -308,6 +321,9 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
//if( opts.runmode != MODE_ANSWER || opts.inetd ) { usage(); exit(BFERR_FATALERROR); }
|
//if( opts.runmode != MODE_ANSWER || opts.inetd ) { usage(); exit(BFERR_FATALERROR); }
|
||||||
opts.inetd = 1;
|
opts.inetd = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'v':
|
||||||
|
opts.earlydbg = TRUE;
|
||||||
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
if( opts.confname || !optarg ) { usage(); exit(BFERR_FATALERROR); }
|
if( opts.confname || !optarg ) { usage(); exit(BFERR_FATALERROR); }
|
||||||
opts.confname = (char *)xstrcpy(optarg);
|
opts.confname = (char *)xstrcpy(optarg);
|
||||||
@@ -435,20 +451,21 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
|
|
||||||
/* Process primary config file */
|
/* Process primary config file */
|
||||||
if( opts.confname && *opts.confname )
|
if( opts.confname && *opts.confname )
|
||||||
rc = conf_readconf(opts.confname, 0);
|
rc = conf_readconf(opts.confname, 0, opts.earlydbg);
|
||||||
else
|
else
|
||||||
rc = conf_readconf(conf_getconfname(), 0);
|
rc = conf_readconf(conf_getconfname(), 0, opts.earlydbg);
|
||||||
|
|
||||||
if( rc ) gotoexit(BFERR_FATALERROR);
|
if( rc ) gotoexit(BFERR_FATALERROR);
|
||||||
|
|
||||||
/* Process additional config file, ignore errors */
|
/* Process additional config file, ignore errors */
|
||||||
if( opts.incname && *opts.incname )
|
if( opts.incname && *opts.incname )
|
||||||
(void)conf_readconf(opts.incname, 1);
|
if (conf_readconf(opts.incname, 1, opts.earlydbg))
|
||||||
|
gotoexit(BFERR_FATALERROR);
|
||||||
|
|
||||||
/* Reopen log file if it was defined in config */
|
/* Reopen log file if it was defined in config */
|
||||||
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
||||||
{
|
{
|
||||||
log("can't continue without logging");
|
DEB((D_CONFIG, "can't continue without logging"));
|
||||||
gotoexit(BFERR_FATALERROR);
|
gotoexit(BFERR_FATALERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,6 +476,7 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
switch( opts.runmode )
|
switch( opts.runmode )
|
||||||
{
|
{
|
||||||
case MODE_DAEMON:
|
case MODE_DAEMON:
|
||||||
|
DEB((D_STATEM, "Daemon mode"));
|
||||||
log("Daemon mode");
|
log("Daemon mode");
|
||||||
rc = bforce_daemon(&opts);
|
rc = bforce_daemon(&opts);
|
||||||
break;
|
break;
|
||||||
@@ -466,14 +484,17 @@ case MODE_CALL_DEFAULT:
|
|||||||
case MODE_CALL_IP:
|
case MODE_CALL_IP:
|
||||||
case MODE_CALL_MODEM:
|
case MODE_CALL_MODEM:
|
||||||
case MODE_CALL_STDIO:
|
case MODE_CALL_STDIO:
|
||||||
|
DEB((D_STATEM, "Outgoing call"));
|
||||||
log("Outgoing call");
|
log("Outgoing call");
|
||||||
rc = bforce_master(&opts);
|
rc = bforce_master(&opts);
|
||||||
break;
|
break;
|
||||||
case MODE_ANSWER:
|
case MODE_ANSWER:
|
||||||
|
DEB((D_STATEM, "Start answer"));
|
||||||
log("Start answer");
|
log("Start answer");
|
||||||
rc = bforce_slave(&opts);
|
rc = bforce_slave(&opts);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
DEB((D_STATEM, "Could not determine run mode"));
|
||||||
log("Could not determine run mode");
|
log("Could not determine run mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -482,6 +503,13 @@ exit:
|
|||||||
deinit_conf();
|
deinit_conf();
|
||||||
deinit_opts(&opts);
|
deinit_opts(&opts);
|
||||||
|
|
||||||
|
/* de-init sessenv */
|
||||||
|
i=0;
|
||||||
|
while(mainenv[i]) {
|
||||||
|
DEB((D_FREE, "De-init session ENV: %s\n", mainenv[(i)]));
|
||||||
|
free(mainenv[i++]);
|
||||||
|
}
|
||||||
|
|
||||||
/* Shutdown logging services */
|
/* Shutdown logging services */
|
||||||
if( log_isopened() ) log_close();
|
if( log_isopened() ) log_close();
|
||||||
DEB((D_FREE, "good exit"));
|
DEB((D_FREE, "good exit"));
|
||||||
|
|||||||
@@ -67,8 +67,9 @@ void deinit_cval_entry(s_cval_entry *dest, bforce_config_keyword type)
|
|||||||
deinit_translate(&dest->d.translate);
|
deinit_translate(&dest->d.translate);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DEB((D_CONFIG, "deinit_cval_entry: type %d doesn't use dynamic memory",
|
//DEB((D_CONFIG, "deinit_cval_entry: type %d doesn't use dynamic memory",
|
||||||
type));
|
// type));
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
|
|||||||
CONF_KEY(emsi_FR_time, CT_STRING),
|
CONF_KEY(emsi_FR_time, CT_STRING),
|
||||||
CONF_KEY(emsi_OH_time, CT_STRING),
|
CONF_KEY(emsi_OH_time, CT_STRING),
|
||||||
CONF_KEY(emsi_slave_sends_nak, CT_BOOLEAN),
|
CONF_KEY(emsi_slave_sends_nak, CT_BOOLEAN),
|
||||||
|
CONF_KEY(emsi_send_tz, CT_BOOLEAN),
|
||||||
|
CONF_KEY(emsi_send_time, CT_BOOLEAN),
|
||||||
CONF_KEY(filebox, CT_FILEBOX),
|
CONF_KEY(filebox, CT_FILEBOX),
|
||||||
CONF_KEY(filebox_directory, CT_PATH),
|
CONF_KEY(filebox_directory, CT_PATH),
|
||||||
CONF_KEY(flags, CT_STRING),
|
CONF_KEY(flags, CT_STRING),
|
||||||
@@ -96,6 +98,8 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
|
|||||||
CONF_KEY(freq_limit_time, CT_NUMBER),
|
CONF_KEY(freq_limit_time, CT_NUMBER),
|
||||||
CONF_KEY(freq_min_speed, CT_NUMBER),
|
CONF_KEY(freq_min_speed, CT_NUMBER),
|
||||||
CONF_KEY(freq_srif_command, CT_STRING),
|
CONF_KEY(freq_srif_command, CT_STRING),
|
||||||
|
CONF_KEY(incnet_flag, CT_STRING),
|
||||||
|
CONF_KEY(incarc_flag, CT_STRING),
|
||||||
CONF_KEY(hide_our_aka, CT_ADDRESS),
|
CONF_KEY(hide_our_aka, CT_ADDRESS),
|
||||||
CONF_KEY(history_file, CT_STRING),
|
CONF_KEY(history_file, CT_STRING),
|
||||||
CONF_KEY(hydra_options, CT_OPTIONS),
|
CONF_KEY(hydra_options, CT_OPTIONS),
|
||||||
@@ -142,6 +146,7 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
|
|||||||
CONF_KEY(password, CT_PASSWORD),
|
CONF_KEY(password, CT_PASSWORD),
|
||||||
CONF_KEY(phone, CT_STRING),
|
CONF_KEY(phone, CT_STRING),
|
||||||
CONF_KEY(phone_translate, CT_TRANSLATE),
|
CONF_KEY(phone_translate, CT_TRANSLATE),
|
||||||
|
CONF_KEY(proto_order, CT_STRING),
|
||||||
CONF_KEY(recode_file_in, CT_STRING),
|
CONF_KEY(recode_file_in, CT_STRING),
|
||||||
CONF_KEY(recode_file_out, CT_STRING),
|
CONF_KEY(recode_file_out, CT_STRING),
|
||||||
CONF_KEY(recode_intro_in, CT_STRING),
|
CONF_KEY(recode_intro_in, CT_STRING),
|
||||||
|
|||||||
+67
-113
@@ -129,9 +129,11 @@ static void conf_parsestr(char *str, char **key, char **expr, char **value)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int conf_readconf(const char *confname, int inclevel)
|
int conf_readconf(const char *confname, int inclevel, bool earlydbg)
|
||||||
{
|
{
|
||||||
// printf("%s %d\n", confname, inclevel);
|
if (earlydbg)
|
||||||
|
fprintf(stderr,"BF-DEBUG: Parsing config file: %s %d\n", confname, inclevel);
|
||||||
|
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
char tmp[BF_MAXCFGLINE + 1];
|
char tmp[BF_MAXCFGLINE + 1];
|
||||||
int rc, maxrc = 0;
|
int rc, maxrc = 0;
|
||||||
@@ -156,7 +158,8 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
{
|
{
|
||||||
if( i != (int)bforce_config[i].real_key )
|
if( i != (int)bforce_config[i].real_key )
|
||||||
{
|
{
|
||||||
log("invalid config table: found %d instead of %d",
|
if (earlydbg)
|
||||||
|
fprintf(stderr,"BF-DEBUG: invalid config table: found %d instead of %d\n",
|
||||||
bforce_config[i].real_key, i);
|
bforce_config[i].real_key, i);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -165,11 +168,12 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
|
|
||||||
if( (fp = file_open(confname,"r")) == NULL )
|
if( (fp = file_open(confname,"r")) == NULL )
|
||||||
{
|
{
|
||||||
logerr("can't open config file \"%s\"", confname);
|
if (earlydbg)
|
||||||
return(PROC_RC_IGNORE);
|
fprintf(stderr,"BF-DEBUG: can't open config file \"%s\"\n", confname);
|
||||||
|
return(PROC_RC_ABORT);
|
||||||
}
|
}
|
||||||
|
if (earlydbg)
|
||||||
DEB((D_CONFIG, "readconfig: start reading config \"%s\"", confname));
|
fprintf(stderr,"BF-DEBUG: start reading config \"%s\"\n", confname);
|
||||||
|
|
||||||
while( fgets(tmp, sizeof(tmp), fp) )
|
while( fgets(tmp, sizeof(tmp), fp) )
|
||||||
{
|
{
|
||||||
@@ -180,7 +184,9 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
{
|
{
|
||||||
if( isifexpr )
|
if( isifexpr )
|
||||||
{
|
{
|
||||||
log("warning: automatically close expression at empty line %d", line);
|
if (earlydbg)
|
||||||
|
fprintf(stderr,"BF-DEBUG: warning: automatically close expression at empty line %d\n", line);
|
||||||
|
|
||||||
if( ifexpr ) { free(ifexpr); ifexpr = NULL; }
|
if( ifexpr ) { free(ifexpr); ifexpr = NULL; }
|
||||||
isifexpr = FALSE;
|
isifexpr = FALSE;
|
||||||
}
|
}
|
||||||
@@ -188,7 +194,10 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
if( !isappend )
|
if( !isappend )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
log("warning: appending empty or comment line %d", line);
|
if (earlydbg)
|
||||||
|
fprintf(stderr,"BF-DEBUG: warning: appending empty or comment line %d\n", line);
|
||||||
|
|
||||||
|
|
||||||
isappend = FALSE;
|
isappend = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,9 +239,10 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
p_value = NULL;
|
p_value = NULL;
|
||||||
|
|
||||||
conf_parsestr(fullstr ? fullstr : tmp, &p_key, &p_expr, &p_value);
|
conf_parsestr(fullstr ? fullstr : tmp, &p_key, &p_expr, &p_value);
|
||||||
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: conf_readconf: [%d] key \"%s\" expr \"%s\" value \"%s\"\n",
|
||||||
|
line, p_key, p_expr, p_value);
|
||||||
|
|
||||||
DEB((D_CONFIG, "conf_readconf: [%d] key \"%s\" expr \"%s\" value \"%s\"",
|
|
||||||
line, p_key, p_expr, p_value));
|
|
||||||
|
|
||||||
if( p_value )
|
if( p_value )
|
||||||
{
|
{
|
||||||
@@ -256,19 +266,24 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
{
|
{
|
||||||
if( value == NULL || expr )
|
if( value == NULL || expr )
|
||||||
{
|
{
|
||||||
log("incorrect usage of `%s' directive", p_key);
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: incorrect usage of `%s' directive\n", p_key);
|
||||||
|
|
||||||
rc = PROC_RC_IGNORE;
|
rc = PROC_RC_IGNORE;
|
||||||
}
|
}
|
||||||
else if( inclevel < MAXINCLUDELEVEL )
|
else if( inclevel < MAXINCLUDELEVEL )
|
||||||
{
|
{
|
||||||
DEB((D_CONFIG, "conf_readconf: process inlude file \"%s\"", value));
|
if (earlydbg)
|
||||||
rc = conf_readconf(value, inclevel + 1);
|
fprintf(stderr, "BF-DEBUG: conf_readconf: process inlude file \"%s\"\n", value);
|
||||||
|
|
||||||
|
rc = conf_readconf(value, inclevel + 1, earlydbg);
|
||||||
if( rc ) rc = PROC_RC_IGNORE;
|
if( rc ) rc = PROC_RC_IGNORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEB((D_CONFIG, "conf_readconf: too deep include"));
|
if (earlydbg)
|
||||||
log("including level too deep");
|
fprintf(stderr, "BF-DEBUG: conf_readconf: too deep include\n");
|
||||||
|
|
||||||
rc = PROC_RC_IGNORE;
|
rc = PROC_RC_IGNORE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -276,7 +291,9 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
{
|
{
|
||||||
if( value || isifexpr )
|
if( value || isifexpr )
|
||||||
{
|
{
|
||||||
log("incorrect usage of `%s' directive", p_key);
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: incorrect usage of `%s' directive\n", p_key);
|
||||||
|
|
||||||
rc = PROC_RC_ABORT;
|
rc = PROC_RC_ABORT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -292,7 +309,9 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
{
|
{
|
||||||
if( value || expr || !isifexpr )
|
if( value || expr || !isifexpr )
|
||||||
{
|
{
|
||||||
log("incorrect usage of `%s' directive", p_key);
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: incorrect usage of `%s' directive\n", p_key);
|
||||||
|
|
||||||
rc = PROC_RC_IGNORE;
|
rc = PROC_RC_IGNORE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -301,69 +320,12 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
isifexpr = FALSE;
|
isifexpr = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* else if( strcasecmp(p_key+1, "logfile") == 0 )
|
|
||||||
{
|
|
||||||
if( value == NULL || expr )
|
|
||||||
{
|
|
||||||
log("incorrect usage of `%s' directive", p_key);
|
|
||||||
rc = PROC_RC_IGNORE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( log_reopen(value, NULL, NULL) )
|
|
||||||
{
|
|
||||||
log("can't continue without logging");
|
|
||||||
rc = PROC_RC_ABORT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( strcasecmp(p_key+1, "debugfile") == 0 )
|
|
||||||
{
|
|
||||||
if( value == NULL || expr )
|
|
||||||
{
|
|
||||||
log("incorrect usage of `%s' directive", p_key);
|
|
||||||
rc = PROC_RC_IGNORE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#ifdef DEBUG
|
|
||||||
{
|
|
||||||
if( debug_isopened() ) debug_close();
|
|
||||||
debug_setfilename(value);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
|
||||||
log("incorrect directive `%s': no debug code", p_key);
|
|
||||||
rc = PROC_RC_IGNORE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if( strcasecmp(p_key+1, "debuglevel") == 0 )
|
|
||||||
{
|
|
||||||
if( value == NULL || expr )
|
|
||||||
{
|
|
||||||
rc = PROC_RC_IGNORE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#ifdef DEBUG
|
|
||||||
{
|
|
||||||
unsigned long newlevel = 0L;
|
|
||||||
|
|
||||||
if( debug_parsestring(value, &newlevel) )
|
|
||||||
{
|
|
||||||
rc = PROC_RC_WARN;
|
|
||||||
}
|
|
||||||
debug_setlevel(newlevel, 1);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
|
||||||
log("incorrect directive `%s': no debug code", p_key);
|
|
||||||
rc = PROC_RC_IGNORE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}*/
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log("unknown directive `%s'", p_key);
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: unknown directive `%s'\n", p_key);
|
||||||
|
|
||||||
rc = PROC_RC_IGNORE;
|
rc = PROC_RC_IGNORE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,7 +333,9 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
{
|
{
|
||||||
if( isifexpr && expr )
|
if( isifexpr && expr )
|
||||||
{
|
{
|
||||||
log("can't use expressions inside $ifexpr block");
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: can't use expressions inside $ifexpr block\n");
|
||||||
|
|
||||||
rc = PROC_RC_IGNORE;
|
rc = PROC_RC_IGNORE;
|
||||||
}
|
}
|
||||||
else if( isifexpr )
|
else if( isifexpr )
|
||||||
@@ -385,7 +349,9 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log("incorrect config string");
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: incorrect config string %s\n", fullstr);
|
||||||
|
|
||||||
rc = PROC_RC_IGNORE;
|
rc = PROC_RC_IGNORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,13 +366,19 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
case PROC_RC_OK:
|
case PROC_RC_OK:
|
||||||
break;
|
break;
|
||||||
case PROC_RC_WARN:
|
case PROC_RC_WARN:
|
||||||
log("warning in config \"%s\" line %d", confname, line);
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: warning in config \"%s\" line %d\n", confname, line);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case PROC_RC_IGNORE:
|
case PROC_RC_IGNORE:
|
||||||
log("ignore line %d in config \"%s\"", line, confname);
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: ignore line %d in config \"%s\"\n", line, confname);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case PROC_RC_ABORT:
|
case PROC_RC_ABORT:
|
||||||
log("fatal error in config \"%s\" in line %d", confname, line);
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: fatal error in config \"%s\" in line %d\n", confname, line);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT_MSG();
|
ASSERT_MSG();
|
||||||
@@ -418,54 +390,36 @@ int conf_readconf(const char *confname, int inclevel)
|
|||||||
file_close(fp);
|
file_close(fp);
|
||||||
|
|
||||||
if( isifexpr )
|
if( isifexpr )
|
||||||
{ maxrc = 1; log("unterminated directive `#ifexp'"); }
|
{
|
||||||
|
maxrc = 1;
|
||||||
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: unterminated directive `#ifexp'\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if( fullstr )
|
if( fullstr )
|
||||||
free(fullstr);
|
free(fullstr);
|
||||||
if( ifexpr )
|
if( ifexpr )
|
||||||
free(ifexpr);
|
free(ifexpr);
|
||||||
|
|
||||||
DEB((D_CONFIG, "readconfig: exit with maxrc = %d", maxrc));
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: readconfig: exit with maxrc = %d\n", maxrc);
|
||||||
|
|
||||||
|
|
||||||
/* update subsystems */
|
/* update subsystems */
|
||||||
if (inclevel==0) { // end of main config
|
if (inclevel==0) { // end of main config
|
||||||
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
||||||
{
|
{
|
||||||
log("can't continue without logging");
|
if (earlydbg)
|
||||||
|
fprintf(stderr, "BF-DEBUG: can't continue without logging\n");
|
||||||
|
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
debug_configure();
|
debug_configure();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return maxrc;
|
return maxrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
/*void debug_override(void)
|
|
||||||
{
|
|
||||||
s_cval_entry *ptrl;
|
|
||||||
char abuf[BF_MAXADDRSTR+1];
|
|
||||||
|
|
||||||
DEB((D_CONFIG, "debug_override: BEGIN"));
|
|
||||||
|
|
||||||
for( ptrl = bforce_config[cf_override].data; ptrl; ptrl = ptrl->next )
|
|
||||||
{
|
|
||||||
DEB((D_CONFIG, "log_overridelist: address %s",
|
|
||||||
ftn_addrstr(abuf, ptrl->d.override.addr)));
|
|
||||||
DEB((D_CONFIG, "log_overridelist: \tIpaddr = \"%s\"",
|
|
||||||
ptrl->d.override.sIpaddr));
|
|
||||||
DEB((D_CONFIG, "log_overridelist: \tPhone = \"%s\"",
|
|
||||||
ptrl->d.override.sPhone));
|
|
||||||
DEB((D_CONFIG, "log_overridelist: \tWorktime = \"%s\"",
|
|
||||||
timevec_string(abuf, &ptrl->d.override.worktime, sizeof(abuf))));
|
|
||||||
DEB((D_CONFIG, "log_overridelist: \tFlags = \"%s\"",
|
|
||||||
ptrl->d.override.sFlags));
|
|
||||||
}
|
|
||||||
|
|
||||||
DEB((D_CONFIG, "debug_override: END"));
|
|
||||||
}*/
|
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
|
|||||||
+22
-6
@@ -755,6 +755,7 @@ int daemon_pidfile(int cmd)
|
|||||||
pid_t hispid, mypid = getpid();
|
pid_t hispid, mypid = getpid();
|
||||||
FILE *pf;
|
FILE *pf;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
int res;
|
||||||
|
|
||||||
if( !pidfile )
|
if( !pidfile )
|
||||||
return 0;
|
return 0;
|
||||||
@@ -768,7 +769,12 @@ int daemon_pidfile(int cmd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fscanf(pf, "%d", &hispid);
|
res = fscanf(pf, "%d", &hispid);
|
||||||
|
if (res != 1) {
|
||||||
|
log("daemon pidfile: not readable");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
fclose(pf);
|
fclose(pf);
|
||||||
|
|
||||||
if( hispid ) {
|
if( hispid ) {
|
||||||
@@ -807,7 +813,12 @@ int daemon_pidfile(int cmd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fscanf(pf, "%d", &hispid);
|
res = fscanf(pf, "%d", &hispid);
|
||||||
|
if (res != 1) {
|
||||||
|
log("daemon pidfile: not readable");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
fclose(pf);
|
fclose(pf);
|
||||||
|
|
||||||
if( !hispid || (hispid == mypid) ) {
|
if( !hispid || (hispid == mypid) ) {
|
||||||
@@ -831,7 +842,12 @@ int daemon_pidfile(int cmd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fscanf(pf, "%d", &hispid);
|
res = fscanf(pf, "%d", &hispid);
|
||||||
|
if (res != 1) {
|
||||||
|
log("daemon pidfile: not readable");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
fclose(pf);
|
fclose(pf);
|
||||||
unlink(pidfile);
|
unlink(pidfile);
|
||||||
|
|
||||||
@@ -938,15 +954,15 @@ int daemon_run(const char *confname, const char *incname, bool quit)
|
|||||||
|
|
||||||
/* Read primary config file */
|
/* Read primary config file */
|
||||||
if( confname && *confname )
|
if( confname && *confname )
|
||||||
rc = conf_readconf(confname, 0);
|
rc = conf_readconf(confname, 0, false);
|
||||||
else
|
else
|
||||||
rc = conf_readconf(conf_getconfname(), 0);
|
rc = conf_readconf(conf_getconfname(), 0, false);
|
||||||
|
|
||||||
if( rc )
|
if( rc )
|
||||||
return(BFERR_FATALERROR);
|
return(BFERR_FATALERROR);
|
||||||
|
|
||||||
/* Read additional config file (manual include) */
|
/* Read additional config file (manual include) */
|
||||||
if( incname && *incname && conf_readconf(incname, 1) )
|
if( incname && *incname && conf_readconf(incname, 1, false) )
|
||||||
log("cannot read additional config (ignore)");
|
log("cannot read additional config (ignore)");
|
||||||
|
|
||||||
dmstate = DM_Start;
|
dmstate = DM_Start;
|
||||||
|
|||||||
+911
-783
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,7 @@
|
|||||||
%token LOGOP
|
%token LOGOP
|
||||||
|
|
||||||
%expect 2
|
%expect 2
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "confread.h"
|
#include "confread.h"
|
||||||
|
|||||||
@@ -123,8 +123,8 @@ int tcpip_connect(const char *hostname, e_tcpmode tcpmode)
|
|||||||
port = "binkp";
|
port = "binkp";
|
||||||
else if( tcpmode == TCPMODE_TELNET )
|
else if( tcpmode == TCPMODE_TELNET )
|
||||||
port = "telnet";
|
port = "telnet";
|
||||||
else /* Default service name is "fido" */
|
else /* Can not rely on /etc/services - it is not well-known port */
|
||||||
port = "fido";
|
port = "60179";
|
||||||
|
|
||||||
if( ISDEC(port) )
|
if( ISDEC(port) )
|
||||||
server.sin_port = htons(atoi(port));
|
server.sin_port = htons(atoi(port));
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ static char *lock_getname(const char *lockdir, const s_modemport *modemport)
|
|||||||
|
|
||||||
ASSERT(modemport != NULL);
|
ASSERT(modemport != NULL);
|
||||||
|
|
||||||
if( lockdir && *lockdir )
|
if( *lockdir )
|
||||||
lckname = (char *)xstrcpy(lockdir);
|
lckname = (char *)xstrcpy(lockdir);
|
||||||
else
|
else
|
||||||
lckname = (char *)xstrcpy(BFORCE_LOCK_DIR);
|
lckname = (char *)xstrcpy(BFORCE_LOCK_DIR);
|
||||||
@@ -314,7 +314,7 @@ int port_lock(const char *lockdir, const s_modemport *modemport)
|
|||||||
char *lckname;
|
char *lckname;
|
||||||
char *tmpname, *p_tmpname;
|
char *tmpname, *p_tmpname;
|
||||||
|
|
||||||
if( lockdir && *lockdir )
|
if( *lockdir )
|
||||||
tmpname = xstrcpy(lockdir);
|
tmpname = xstrcpy(lockdir);
|
||||||
else
|
else
|
||||||
tmpname = xstrcpy(BFORCE_LOCK_DIR);
|
tmpname = xstrcpy(BFORCE_LOCK_DIR);
|
||||||
|
|||||||
@@ -283,6 +283,8 @@ int logerr(const char *s, ...)
|
|||||||
|
|
||||||
#ifdef USE_SYSLOG
|
#ifdef USE_SYSLOG
|
||||||
|
|
||||||
|
bool slog_active = FALSE;
|
||||||
|
|
||||||
const char *log_getfilename(int whatfor)
|
const char *log_getfilename(int whatfor)
|
||||||
{
|
{
|
||||||
const char *p = "/dev/null";
|
const char *p = "/dev/null";
|
||||||
@@ -291,21 +293,26 @@ const char *log_getfilename(int whatfor)
|
|||||||
|
|
||||||
bool log_isopened(void)
|
bool log_isopened(void)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return slog_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
int log_open(const char *logname, const char *ext, const char *tty)
|
int log_open(const char *logname, const char *ext, const char *tty)
|
||||||
{
|
{
|
||||||
char *p = "bforce ";
|
char *p = "bforce ";
|
||||||
|
p = xstrcat(p, BF_VERSION);
|
||||||
int fac = conf_number(cf_syslog_facility);
|
int fac = conf_number(cf_syslog_facility);
|
||||||
if( tty && *tty )
|
if( tty && *tty )
|
||||||
strncpy(p, tty, sizeof(p));
|
strncpy(p, tty, sizeof(p));
|
||||||
openlog(p, LOG_PID, fac);
|
openlog(p, LOG_PID, fac);
|
||||||
|
slog_active = TRUE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int log_reopen(const char *logname, const char *ext, const char *tty)
|
int log_reopen(const char *logname, const char *ext, const char *tty)
|
||||||
{
|
{
|
||||||
|
if ( !slog_active ) {
|
||||||
|
return (log_reopen(logname, ext, tty));
|
||||||
|
} else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,9 +73,18 @@ int exec_options_parse(char *str)
|
|||||||
|
|
||||||
void exec_options_init(s_exec_options *eopt)
|
void exec_options_init(s_exec_options *eopt)
|
||||||
{
|
{
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
memset(eopt, '\0', sizeof(s_exec_options));
|
memset(eopt, '\0', sizeof(s_exec_options));
|
||||||
eopt->umask = EXEC_DEFAULT_UMASK;
|
eopt->umask = EXEC_DEFAULT_UMASK;
|
||||||
eopt->envp[0] = NULL;
|
eopt->envp[0] = NULL;
|
||||||
|
|
||||||
|
while(mainenv[i]) {
|
||||||
|
DEB((D_FREE,"EXEC: Added ENV variable: %s\n", mainenv[i]));
|
||||||
|
eopt->envp[i] = xmalloc(strlen(mainenv[i]) + 2);
|
||||||
|
strcpy(eopt->envp[i],mainenv[i]);
|
||||||
|
eopt->envp[++i] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void exec_options_deinit(s_exec_options *eopt)
|
void exec_options_deinit(s_exec_options *eopt)
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ int binkp_getforsend(s_binkp_state *bstate, char *buf, int *block_type, unsigned
|
|||||||
int binkp_doreceiveblock(s_binkp_state *bstate, char *buf, int block_type, unsigned short block_length);
|
int binkp_doreceiveblock(s_binkp_state *bstate, char *buf, int block_type, unsigned short block_length);
|
||||||
void binkp_process_NUL(s_binkp_sysinfo *remote_data, char *buffer);
|
void binkp_process_NUL(s_binkp_sysinfo *remote_data, char *buffer);
|
||||||
void binkp_process_ADR(char *buffer);
|
void binkp_process_ADR(char *buffer);
|
||||||
|
int binkp_auth_incoming(s_binkp_sysinfo *remote_data);
|
||||||
|
|
||||||
|
|
||||||
int binkp_loop(s_binkp_state *bstate) {
|
int binkp_loop(s_binkp_state *bstate) {
|
||||||
unsigned char readbuf[BINKP_HEADER+BINKP_MAXBLOCK+1];
|
unsigned char readbuf[BINKP_HEADER+BINKP_MAXBLOCK+1];
|
||||||
@@ -115,12 +117,13 @@ int binkp_loop(s_binkp_state *bstate) {
|
|||||||
|
|
||||||
// session criterium handshake criterium
|
// session criterium handshake criterium
|
||||||
while (!bstate->complete || bstate->waiting_got) {
|
while (!bstate->complete || bstate->waiting_got) {
|
||||||
DEB((D_24554, "loop s: %d r: %d p: %d sp: %d", bstate->batchsendcomplete, bstate->batchreceivecomplete,
|
DEB((D_24554, ">>> BinkP loop sendcpl: %d recvcpl: %d phase: %d subphase: %d", bstate->batchsendcomplete, bstate->batchreceivecomplete,
|
||||||
bstate->phase, bstate->subphase));
|
bstate->phase, bstate->subphase));
|
||||||
if (bstate->continuesend) {
|
if (bstate->continuesend) {
|
||||||
no_more_to_send = false;
|
no_more_to_send = false;
|
||||||
bstate->continuesend = false;
|
bstate->continuesend = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=-1)) {
|
if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=-1)) {
|
||||||
m = binkp_getforsend(bstate, writebuf+BINKP_HEADER, &block_type, &block_length);
|
m = binkp_getforsend(bstate, writebuf+BINKP_HEADER, &block_type, &block_length);
|
||||||
if(m==1 || m==3) {
|
if(m==1 || m==3) {
|
||||||
@@ -265,6 +268,7 @@ int binkp_loop(s_binkp_state *bstate) {
|
|||||||
have_to_write -= n;
|
have_to_write -= n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DEB((D_24554,"+++ BinkP Loop ended with rc=%d", bstate->rc));
|
||||||
return bstate->rc;
|
return bstate->rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +341,7 @@ int binkp_getforsend(s_binkp_state *bstate, char *buf, int *block_type, unsigned
|
|||||||
int my_sf, wr_pos;
|
int my_sf, wr_pos;
|
||||||
int n; // read file
|
int n; // read file
|
||||||
if (bstate->extracmd[0]!=-1) {
|
if (bstate->extracmd[0]!=-1) {
|
||||||
DEB((D_24554, "send command from receiver %d %s", bstate->extracmd[0], bstate->extracmd+1));
|
DEB((D_24554, "Send cmd to remote %d %s", bstate->extracmd[0], bstate->extracmd+1));
|
||||||
buf[0] = bstate->extracmd[0];
|
buf[0] = bstate->extracmd[0];
|
||||||
strcpy(buf+1, bstate->extracmd+1);
|
strcpy(buf+1, bstate->extracmd+1);
|
||||||
*block_type = BINKP_BLK_CMD;
|
*block_type = BINKP_BLK_CMD;
|
||||||
@@ -480,7 +484,7 @@ case 3: // send password on outgoing or pw confirmation on incoming
|
|||||||
buf[0] = BPMSG_PWD;
|
buf[0] = BPMSG_PWD;
|
||||||
*block_type = BINKP_BLK_CMD;
|
*block_type = BINKP_BLK_CMD;
|
||||||
|
|
||||||
if( bstate->local_data->passwd == '\0' ) {
|
if( bstate->local_data->passwd[0] == '\0' ) {
|
||||||
*block_length = 1 + sprintf(buf+1, "-");
|
*block_length = 1 + sprintf(buf+1, "-");
|
||||||
}
|
}
|
||||||
else if( bstate->remote_data->options & BINKP_OPT_MD5 ) {
|
else if( bstate->remote_data->options & BINKP_OPT_MD5 ) {
|
||||||
@@ -623,7 +627,7 @@ case 4:
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
DEB((D_24554, "nothing to send"));
|
DEB((D_24554, "BinkP_GetForSend: nothing to send"));
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
|
|
||||||
@@ -802,7 +806,7 @@ case 0:
|
|||||||
bstate->frs = frs_data;
|
bstate->frs = frs_data;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
DEB((D_24554, "making M_GET to skip downloaded part"));
|
DEB((D_24554, "making M_GET to skip downloaded part, file: %s, size %ld, time %ld, mode 0",recvfi.fn,recvfi.sz, recvfi.tm ));
|
||||||
bstate->extracmd[0] = BPMSG_GET;
|
bstate->extracmd[0] = BPMSG_GET;
|
||||||
sprintf(bstate->extracmd+1, "%s %ld %ld %ld",
|
sprintf(bstate->extracmd+1, "%s %ld %ld %ld",
|
||||||
bstate->pi->recv->net_name, (long)bstate->pi->recv->bytes_total,
|
bstate->pi->recv->net_name, (long)bstate->pi->recv->bytes_total,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ int binkp_parsfinfo(const char *str, s_bpfinfo *fi, bool with_offset)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
DEB((D_24554, "info to parse: %s", str));
|
DEB((D_24554, "info to parse: %s", str));
|
||||||
r = sscanf(str, with_offset? "%s %d %d %d": "%s %d %d", &fi->fn, &fi->sz, &fi->tm, &fi->offs);
|
r = sscanf(str, with_offset? "%s %ld %ld %ld": "%s %ld %ld", &fi->fn, &fi->sz, &fi->tm, &fi->offs);
|
||||||
chkslash = fi->fn;
|
chkslash = fi->fn;
|
||||||
while (1) {
|
while (1) {
|
||||||
chkslash = strchr(chkslash, '/');
|
chkslash = strchr(chkslash, '/');
|
||||||
|
|||||||
@@ -860,6 +860,8 @@ int p_rx_fopen(s_protinfo *pi, char *fn, size_t sz, time_t tm, mode_t mode)
|
|||||||
size_t minfree = 0;
|
size_t minfree = 0;
|
||||||
size_t needed_bytes_total = 0;
|
size_t needed_bytes_total = 0;
|
||||||
|
|
||||||
|
DEB((D_FREE, "P_RX_FOPEN: File: %s, Size: %ld", fn, sz));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check. May be we are receiving this file allready
|
* Check. May be we are receiving this file allready
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -598,6 +598,8 @@ void emsi_set_sysinfo(s_emsi *emsi, s_emsi *remote_emsi, int hrc,
|
|||||||
s_cval_entry *addr_ptr;
|
s_cval_entry *addr_ptr;
|
||||||
s_cval_entry *hide_ptr;
|
s_cval_entry *hide_ptr;
|
||||||
s_faddr *primary = NULL;
|
s_faddr *primary = NULL;
|
||||||
|
char xdt[EMSI_MAXXDATETIME+1];
|
||||||
|
time_t xtm;
|
||||||
|
|
||||||
const long options = conf_options(cf_options);
|
const long options = conf_options(cf_options);
|
||||||
const long speed = conf_number(cf_max_speed);
|
const long speed = conf_number(cf_max_speed);
|
||||||
@@ -737,6 +739,10 @@ void emsi_set_sysinfo(s_emsi *emsi, s_emsi *remote_emsi, int hrc,
|
|||||||
{ emsi->compcodes.JAN = 1; }
|
{ emsi->compcodes.JAN = 1; }
|
||||||
if( (options & OPTIONS_NO_HYDRA) != OPTIONS_NO_HYDRA )
|
if( (options & OPTIONS_NO_HYDRA) != OPTIONS_NO_HYDRA )
|
||||||
{ emsi->compcodes.HYD = 1; }
|
{ emsi->compcodes.HYD = 1; }
|
||||||
|
DEB((D_HSHAKE,"Generated compcodes for caller: NCP:%x.ZMO:%x.ZAP:%x.DZA:%x.JAN:%x.HYD:%x.KER:%x.SLK:%x.TZA:%x",
|
||||||
|
emsi->compcodes.NCP, emsi->compcodes.ZMO, emsi->compcodes.ZAP,
|
||||||
|
emsi->compcodes.DZA, emsi->compcodes.JAN, emsi->compcodes.HYD,
|
||||||
|
emsi->compcodes.KER, emsi->compcodes.SLK, emsi->compcodes.TZA));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -813,6 +819,22 @@ void emsi_set_sysinfo(s_emsi *emsi, s_emsi *remote_emsi, int hrc,
|
|||||||
strnxcpy(emsi->flags, p_flags ? p_flags : "MO", sizeof(emsi->flags));
|
strnxcpy(emsi->flags, p_flags ? p_flags : "MO", sizeof(emsi->flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------- */
|
||||||
|
/* Data for {TZUTC} and {XDATETIME} field */
|
||||||
|
/* ----------------------------------------------------------------- */
|
||||||
|
|
||||||
|
if ( conf_boolean(cf_emsi_send_tz) ) {
|
||||||
|
emsi->have_tzutc = 1;
|
||||||
|
emsi->tzutc = (int)(time_gmtoffset());
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( conf_boolean(cf_emsi_send_time) ) {
|
||||||
|
emsi->have_xdatetime = 1;
|
||||||
|
|
||||||
|
strnxcpy(xdt,time_string_format(xdt, EMSI_MAXXDATETIME, "%d.%m.%Y %H:%M:%S %z", xtm),EMSI_MAXXDATETIME);
|
||||||
|
strnxcpy(emsi->xdatetime, xdt, sizeof(emsi->xdatetime));
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------- */
|
/* ----------------------------------------------------------------- */
|
||||||
/* Data for {OHFR} field */
|
/* Data for {OHFR} field */
|
||||||
/* ----------------------------------------------------------------- */
|
/* ----------------------------------------------------------------- */
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ int emsi_incoming(s_handshake_protocol *THIS)
|
|||||||
int rc = HRC_OK;
|
int rc = HRC_OK;
|
||||||
s_emsi *remote_emsi = NULL;
|
s_emsi *remote_emsi = NULL;
|
||||||
s_emsi *local_emsi = NULL;
|
s_emsi *local_emsi = NULL;
|
||||||
|
char *p = NULL;
|
||||||
|
|
||||||
ASSERT(THIS);
|
ASSERT(THIS);
|
||||||
ASSERT(THIS->remote_data);
|
ASSERT(THIS->remote_data);
|
||||||
@@ -198,7 +199,34 @@ int emsi_incoming(s_handshake_protocol *THIS)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Set protocol that we will use
|
* Set protocol that we will use
|
||||||
|
* EMSI-II compatible as of v0.25
|
||||||
*/
|
*/
|
||||||
|
if ( remote_emsi->compcodes.EII ) {
|
||||||
|
/* EMSI-II relies on protocol order sent by CALLER
|
||||||
|
* we must agree on first matching protocol
|
||||||
|
*/
|
||||||
|
p = xstrcpy( remote_emsi->proto_order );
|
||||||
|
THIS->protocol = PROT_NOPROT;
|
||||||
|
for ( p = strtok( p, "," ); p ; p=strtok( NULL, "," ) ) {
|
||||||
|
if ( !strcmp(p, "ZMO") && !(options & OPTIONS_NO_ZMODEM)) {
|
||||||
|
if ( THIS->protocol == PROT_NOPROT ) THIS->protocol = PROT_ZMODEM;
|
||||||
|
}
|
||||||
|
if ( !strcmp(p, "HYD") && !(options & OPTIONS_NO_HYDRA)) {
|
||||||
|
if ( THIS->protocol == PROT_NOPROT ) THIS->protocol = PROT_HYDRA;
|
||||||
|
}
|
||||||
|
if ( !strcmp(p, "ZAP") && !(options & OPTIONS_NO_ZEDZAP)) {
|
||||||
|
if ( THIS->protocol == PROT_NOPROT ) THIS->protocol = PROT_ZEDZAP;
|
||||||
|
}
|
||||||
|
if ( !strcmp(p, "DZA") && !(options & OPTIONS_NO_DIRZAP)) {
|
||||||
|
if ( THIS->protocol == PROT_NOPROT ) THIS->protocol = PROT_DIRZAP;
|
||||||
|
}
|
||||||
|
/* if ( !strcmp(p, "JAN") && !(options & OPTIONS_NO_JANUS)) {
|
||||||
|
if ( THIS->protocol == PROT_NOPROT ) THIS->protocol = PROT_JANUS;
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
/* EMSI-I relies on our self order, not the CALLER's */
|
||||||
if( remote_emsi->compcodes.HYD && !(options & OPTIONS_NO_HYDRA) )
|
if( remote_emsi->compcodes.HYD && !(options & OPTIONS_NO_HYDRA) )
|
||||||
THIS->protocol = PROT_HYDRA;
|
THIS->protocol = PROT_HYDRA;
|
||||||
else if( remote_emsi->compcodes.ZAP && !(options & OPTIONS_NO_ZEDZAP) )
|
else if( remote_emsi->compcodes.ZAP && !(options & OPTIONS_NO_ZEDZAP) )
|
||||||
@@ -208,8 +236,9 @@ int emsi_incoming(s_handshake_protocol *THIS)
|
|||||||
else /* NCP */
|
else /* NCP */
|
||||||
{
|
{
|
||||||
THIS->protocol = PROT_NOPROT;
|
THIS->protocol = PROT_NOPROT;
|
||||||
rc = HRC_NO_PROTOS;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if ( THIS->protocol == PROT_NOPROT ) rc = HRC_NO_PROTOS;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check EMSI flags and set corresponding local HOLD flags
|
* Check EMSI flags and set corresponding local HOLD flags
|
||||||
|
|||||||
+159
-11
@@ -103,6 +103,10 @@ char *emsi_createdat(s_emsi *emsi)
|
|||||||
char *tmp = NULL;
|
char *tmp = NULL;
|
||||||
char buf[100];
|
char buf[100];
|
||||||
char abuf[BF_MAXADDRSTR+1];
|
char abuf[BF_MAXADDRSTR+1];
|
||||||
|
char *p_order = NULL;
|
||||||
|
char *ord = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tmp = (char *)xstrcpy("**EMSI_DAT0000");
|
tmp = (char *)xstrcpy("**EMSI_DAT0000");
|
||||||
|
|
||||||
@@ -179,14 +183,79 @@ char *emsi_createdat(s_emsi *emsi)
|
|||||||
tmp = add_char(tmp, '}');
|
tmp = add_char(tmp, '}');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compatibility_codes */
|
/* compatibility_codes (EMSI behavior as FTS-0088) */
|
||||||
tmp = add_char(tmp, '{');
|
tmp = add_char(tmp, '{');
|
||||||
if( emsi->compcodes.NCP ) tmp = add_str(tmp, "NCP,");
|
|
||||||
if( emsi->compcodes.ZMO ) tmp = add_str(tmp, "ZMO,");
|
p_order = conf_string(cf_proto_order);
|
||||||
if( emsi->compcodes.ZAP ) tmp = add_str(tmp, "ZAP,");
|
|
||||||
if( emsi->compcodes.DZA ) tmp = add_str(tmp, "DZA,");
|
if ( !p_order ) {
|
||||||
if( emsi->compcodes.JAN ) tmp = add_str(tmp, "JAN,");
|
|
||||||
if( emsi->compcodes.HYD ) tmp = add_str(tmp, "HYD,");
|
if( emsi->compcodes.HYD ) tmp = add_str(tmp, "HYD,");
|
||||||
|
if( emsi->compcodes.JAN ) tmp = add_str(tmp, "JAN,");
|
||||||
|
if( emsi->compcodes.DZA ) tmp = add_str(tmp, "DZA,");
|
||||||
|
if( emsi->compcodes.ZAP ) tmp = add_str(tmp, "ZAP,");
|
||||||
|
if( emsi->compcodes.ZMO ) tmp = add_str(tmp, "ZMO,");
|
||||||
|
if( emsi->compcodes.TZA ) tmp = add_str(tmp, "TZA,");
|
||||||
|
if( emsi->compcodes.SLK ) tmp = add_str(tmp, "SLK,");
|
||||||
|
if( emsi->compcodes.KER ) tmp = add_str(tmp, "KER,");
|
||||||
|
if( emsi->compcodes.NCP ) tmp = add_str(tmp, "NCP,");
|
||||||
|
} else {
|
||||||
|
ord = xmalloc(4);
|
||||||
|
DEB((D_HSHAKE,"Protocol order found: %s", p_order));
|
||||||
|
ord = strncpy(ord, p_order,3);
|
||||||
|
ord[3] = '\0';
|
||||||
|
DEB((D_HSHAKE,"Protocol order chunk: %s", ord));
|
||||||
|
if ( ord == NULL )
|
||||||
|
DEB((D_HSHAKE,"EMSI create order error"));
|
||||||
|
if ( !strcmp(ord,"HYD") )
|
||||||
|
if ( emsi->compcodes.HYD) tmp = add_str(tmp, "HYD,");
|
||||||
|
if ( !strcmp(ord,"JAN") )
|
||||||
|
if ( emsi->compcodes.JAN) tmp = add_str(tmp, "JAN,");
|
||||||
|
if ( !strcmp(ord,"DZA") )
|
||||||
|
if ( emsi->compcodes.DZA) tmp = add_str(tmp, "DZA,");
|
||||||
|
if ( !strcmp(ord,"ZAP") )
|
||||||
|
if ( emsi->compcodes.ZAP) tmp = add_str(tmp, "ZAP,");
|
||||||
|
if ( !strcmp(ord,"ZMO") )
|
||||||
|
if ( emsi->compcodes.ZMO) tmp = add_str(tmp, "ZMO,");
|
||||||
|
if ( !strcmp(ord,"TZA") )
|
||||||
|
if ( emsi->compcodes.TZA) tmp = add_str(tmp, "TZA,");
|
||||||
|
if ( !strcmp(ord,"SLK") )
|
||||||
|
if ( emsi->compcodes.SLK) tmp = add_str(tmp, "SLK,");
|
||||||
|
if ( !strcmp(ord,"KER") )
|
||||||
|
if ( emsi->compcodes.KER) tmp = add_str(tmp, "KER,");
|
||||||
|
if ( !strcmp(ord,"NCP") )
|
||||||
|
if ( emsi->compcodes.NCP) tmp = add_str(tmp, "NCP,");
|
||||||
|
p_order = strchr(p_order, ',');
|
||||||
|
if ( p_order ) p_order = p_order+1; /* skip ',' */
|
||||||
|
while ( p_order ) {
|
||||||
|
ord = strncpy(ord, p_order,3);
|
||||||
|
ord[3] = '\0';
|
||||||
|
DEB((D_HSHAKE,"Protocol order chunk: %s", ord));
|
||||||
|
if ( ord == NULL )
|
||||||
|
DEB((D_HSHAKE,"EMSI create order error"));
|
||||||
|
if ( !strcmp(ord,"HYD") )
|
||||||
|
if ( emsi->compcodes.HYD) tmp = add_str(tmp, "HYD,");
|
||||||
|
if ( !strcmp(ord,"JAN") )
|
||||||
|
if ( emsi->compcodes.JAN) tmp = add_str(tmp, "JAN,");
|
||||||
|
if ( !strcmp(ord,"DZA") )
|
||||||
|
if ( emsi->compcodes.DZA) tmp = add_str(tmp, "DZA,");
|
||||||
|
if ( !strcmp(ord,"ZAP") )
|
||||||
|
if ( emsi->compcodes.ZAP) tmp = add_str(tmp, "ZAP,");
|
||||||
|
if ( !strcmp(ord,"ZMO") )
|
||||||
|
if ( emsi->compcodes.ZMO) tmp = add_str(tmp, "ZMO,");
|
||||||
|
if ( !strcmp(ord,"TZA") )
|
||||||
|
if ( emsi->compcodes.TZA) tmp = add_str(tmp, "TZA,");
|
||||||
|
if ( !strcmp(ord,"SLK") )
|
||||||
|
if ( emsi->compcodes.SLK) tmp = add_str(tmp, "SLK,");
|
||||||
|
if ( !strcmp(ord,"KER") )
|
||||||
|
if ( emsi->compcodes.KER) tmp = add_str(tmp, "KER,");
|
||||||
|
if ( !strcmp(ord,"NCP") )
|
||||||
|
if ( emsi->compcodes.NCP) tmp = add_str(tmp, "NCP,");
|
||||||
|
p_order = strchr(p_order, ',');
|
||||||
|
if ( p_order ) p_order = p_order+1; /* skip ',' */
|
||||||
|
}
|
||||||
|
free(ord);
|
||||||
|
}
|
||||||
|
|
||||||
if( emsi->compcodes.FRQ ) tmp = add_str(tmp, "FRQ,");
|
if( emsi->compcodes.FRQ ) tmp = add_str(tmp, "FRQ,");
|
||||||
if( emsi->compcodes.NRQ ) tmp = add_str(tmp, "NRQ,");
|
if( emsi->compcodes.NRQ ) tmp = add_str(tmp, "NRQ,");
|
||||||
if( emsi->compcodes.ARC ) tmp = add_str(tmp, "ARC,");
|
if( emsi->compcodes.ARC ) tmp = add_str(tmp, "ARC,");
|
||||||
@@ -325,10 +394,15 @@ char *emsi_createdat(s_emsi *emsi)
|
|||||||
|
|
||||||
tmp = add_char(tmp, '{');
|
tmp = add_char(tmp, '{');
|
||||||
tmp = add_char(tmp, '[');
|
tmp = add_char(tmp, '[');
|
||||||
sprintf(buf, "+%04d", emsi->tzutc);
|
/* BUGGY */
|
||||||
tmp = add_str(tmp, buf);
|
// sprintf(buf, "+%04d", emsi->tzutc);
|
||||||
|
ord = xmalloc(6);
|
||||||
|
ord = xstrcpy(time_string_gmtoffset(ord));
|
||||||
|
ord[5] = '\0';
|
||||||
|
tmp = add_str(tmp, ord);
|
||||||
tmp = add_char(tmp, ']');
|
tmp = add_char(tmp, ']');
|
||||||
tmp = add_char(tmp, '}');
|
tmp = add_char(tmp, '}');
|
||||||
|
free(ord);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* {XDATE} indentifier.. What's the fucking invention :-/
|
/* {XDATE} indentifier.. What's the fucking invention :-/
|
||||||
@@ -450,6 +524,8 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *tmp, *p, *q, *n;
|
char *tmp, *p, *q, *n;
|
||||||
|
unsigned int tzh, tzm,tzn ;
|
||||||
|
char *tzc, *otmp;
|
||||||
|
|
||||||
while( (tmp=get_field(&emsi_dat, '{', '}')) != NULL )
|
while( (tmp=get_field(&emsi_dat, '{', '}')) != NULL )
|
||||||
{
|
{
|
||||||
@@ -525,13 +601,64 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi)
|
|||||||
/* compatibility codes */
|
/* compatibility codes */
|
||||||
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
|
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
|
||||||
DEB((D_HSHAKE, "parse_emsidat: compatibility codes: %s", p));
|
DEB((D_HSHAKE, "parse_emsidat: compatibility codes: %s", p));
|
||||||
|
emsi->proto_order[0] = '\0';
|
||||||
|
|
||||||
for( p = strtok(p, ","); p; p=strtok(NULL, ",") )
|
for( p = strtok(p, ","); p; p=strtok(NULL, ",") )
|
||||||
{
|
{
|
||||||
if( !strcmp(p, "ZMO") ) emsi->compcodes.ZMO = 1;
|
/* if( !strcmp(p, "ZMO") ) emsi->compcodes.ZMO = 1;
|
||||||
else if( !strcmp(p, "ZAP") ) emsi->compcodes.ZAP = 1;
|
else if( !strcmp(p, "ZAP") ) emsi->compcodes.ZAP = 1;
|
||||||
else if( !strcmp(p, "DZA") ) emsi->compcodes.DZA = 1;
|
else if( !strcmp(p, "DZA") ) emsi->compcodes.DZA = 1;
|
||||||
else if( !strcmp(p, "JAN") ) emsi->compcodes.JAN = 1;
|
else if( !strcmp(p, "JAN") ) emsi->compcodes.JAN = 1;
|
||||||
else if( !strcmp(p, "HYD") ) emsi->compcodes.HYD = 1;
|
else if( !strcmp(p, "HYD") ) emsi->compcodes.HYD = 1;
|
||||||
|
*/
|
||||||
|
if ( !strcmp(p, "ZMO") ) {
|
||||||
|
emsi->compcodes.ZMO = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"ZMO,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
|
else if ( !strcmp(p, "ZAP") ) {
|
||||||
|
emsi->compcodes.ZAP = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"ZAP,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
|
else if ( !strcmp(p, "DZA") ) {
|
||||||
|
emsi->compcodes.DZA = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"DZA,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
|
else if ( !strcmp(p, "JAN") ) {
|
||||||
|
emsi->compcodes.JAN = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"JAN,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
|
else if ( !strcmp(p, "HYD") ) {
|
||||||
|
emsi->compcodes.HYD = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"HYD,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
|
else if ( !strcmp(p, "KER") ) {
|
||||||
|
emsi->compcodes.KER = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"KER,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
|
else if ( !strcmp(p, "TZA") ) {
|
||||||
|
emsi->compcodes.TZA = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"TZA,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
|
else if ( !strcmp(p, "SLK") ) {
|
||||||
|
emsi->compcodes.SLK = 1;
|
||||||
|
otmp = strcat(emsi->proto_order,"SLK,");
|
||||||
|
strcpy(emsi->proto_order, otmp);
|
||||||
|
DEB((D_HSHAKE,"Parse_emsidat: ordered proto added: %s", otmp));
|
||||||
|
}
|
||||||
else if( !strcmp(p, "NCP") ) emsi->compcodes.NCP = 1;
|
else if( !strcmp(p, "NCP") ) emsi->compcodes.NCP = 1;
|
||||||
else if( !strcmp(p, "NRQ") ) emsi->compcodes.NRQ = 1;
|
else if( !strcmp(p, "NRQ") ) emsi->compcodes.NRQ = 1;
|
||||||
else if( !strcmp(p, "ARC") ) emsi->compcodes.ARC = 1;
|
else if( !strcmp(p, "ARC") ) emsi->compcodes.ARC = 1;
|
||||||
@@ -542,6 +669,9 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi)
|
|||||||
else if( !strcmp(p, "BBS") ) emsi->compcodes.BBS = 1;
|
else if( !strcmp(p, "BBS") ) emsi->compcodes.BBS = 1;
|
||||||
else if( !strcmp(p, "HFR") ) emsi->compcodes.HFR = 1;
|
else if( !strcmp(p, "HFR") ) emsi->compcodes.HFR = 1;
|
||||||
}
|
}
|
||||||
|
/* Delete last comma from order list */
|
||||||
|
emsi->proto_order[strlen(emsi->proto_order)-1] = '\0';
|
||||||
|
DEB((D_HSHAKE,"Ordered compcodes: %s",emsi->proto_order));
|
||||||
|
|
||||||
/* mailer information */
|
/* mailer information */
|
||||||
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
|
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
|
||||||
@@ -646,13 +776,31 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi)
|
|||||||
}
|
}
|
||||||
else if( strcmp(tmp, "TZUTC") == 0 )
|
else if( strcmp(tmp, "TZUTC") == 0 )
|
||||||
{
|
{
|
||||||
emsi->have_tzutc = 1;
|
|
||||||
|
|
||||||
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
|
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
|
||||||
if( (p=get_field(&p, '[', ']')) == NULL ) return(1);
|
if( (p=get_field(&p, '[', ']')) == NULL ) return(1);
|
||||||
|
/* Parse EMSI TZUTC in fmt (+|-)HHMM */
|
||||||
|
if( *p ) {
|
||||||
|
tzc = malloc(2);
|
||||||
|
DEB((D_HSHAKE, "Got TZUTC=%s for parsing", p));
|
||||||
|
tzn = sscanf( p, "%1c%02u%02u", tzc, &tzh, &tzm);
|
||||||
|
tzc[1] = '\0';
|
||||||
|
if ( tzn == 3) {
|
||||||
|
DEB((D_HSHAKE, "Got TZC=%s , H=%u, M=%u", tzc, tzh,tzm));
|
||||||
|
emsi->have_tzutc = 1;
|
||||||
|
if ( strcmp(tzc, "-") == 0 ) {
|
||||||
|
emsi->tzutc = -(tzh*60 + tzm);
|
||||||
|
} else {
|
||||||
|
emsi->tzutc = tzh*60 + tzm;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DEB((D_HSHAKE,"TZUTC value not parsed!"));
|
||||||
|
}
|
||||||
|
free(tzc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
DEB((D_HSHAKE, "Step - no known EMSI-part - got %s", tmp));
|
||||||
strnxcat(emsi->addons, "{", sizeof(emsi->addons));
|
strnxcat(emsi->addons, "{", sizeof(emsi->addons));
|
||||||
strnxcat(emsi->addons, tmp, sizeof(emsi->addons));
|
strnxcat(emsi->addons, tmp, sizeof(emsi->addons));
|
||||||
strnxcat(emsi->addons, "}", sizeof(emsi->addons));
|
strnxcat(emsi->addons, "}", sizeof(emsi->addons));
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ int answ_system(e_session type, char *connstr, int inetd)
|
|||||||
|
|
||||||
if( inetd )
|
if( inetd )
|
||||||
{
|
{
|
||||||
|
log("Answering TCPIP call...");
|
||||||
if( connstr && *connstr )
|
if( connstr && *connstr )
|
||||||
state.connstr = (char*)xstrcpy(connstr);
|
state.connstr = (char*)xstrcpy(connstr);
|
||||||
else if( getpeername(0, (struct sockaddr*)&client, &clientlen) == -1 )
|
else if( getpeername(0, (struct sockaddr*)&client, &clientlen) == -1 )
|
||||||
@@ -116,9 +117,10 @@ int answ_system(e_session type, char *connstr, int inetd)
|
|||||||
port_carrier(0, TRUE);
|
port_carrier(0, TRUE);
|
||||||
|
|
||||||
rc = session();
|
rc = session();
|
||||||
|
log("Session ended up, rc=%d, inetd=%d", rc, inetd);
|
||||||
if( (inetd != 0) && (state.inet = FALSE) )
|
if( ( !inetd ) )
|
||||||
{
|
{
|
||||||
|
log("Deactivating modem port");
|
||||||
port_deinit(0, &oldtio);
|
port_deinit(0, &oldtio);
|
||||||
port_close();
|
port_close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -311,6 +311,7 @@ int session_set_inbound(void)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *p_inb;
|
char *p_inb;
|
||||||
|
int res;
|
||||||
|
|
||||||
p_inb = conf_string(cf_inbound_directory);
|
p_inb = conf_string(cf_inbound_directory);
|
||||||
if( !p_inb ) {
|
if( !p_inb ) {
|
||||||
@@ -342,7 +343,11 @@ int session_set_inbound(void)
|
|||||||
log("inbound: %s", buf);
|
log("inbound: %s", buf);
|
||||||
state.inbound = (char*)xstrcpy(buf);
|
state.inbound = (char*)xstrcpy(buf);
|
||||||
snprintf( buf, PATH_MAX+30, "/bin/mkdir -p -m 700 %s", state.inbound ); /* 30 additional chars allowed */
|
snprintf( buf, PATH_MAX+30, "/bin/mkdir -p -m 700 %s", state.inbound ); /* 30 additional chars allowed */
|
||||||
system( buf );
|
res = system( buf );
|
||||||
|
if (res != 0) {
|
||||||
|
log("Inbound create error: %d", res);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -695,6 +700,7 @@ int session(void)
|
|||||||
s_traffic traff_send;
|
s_traffic traff_send;
|
||||||
s_traffic traff_recv;
|
s_traffic traff_recv;
|
||||||
char *p;
|
char *p;
|
||||||
|
int fd = -1;
|
||||||
|
|
||||||
memset(&traff_send, '\0', sizeof(s_traffic));
|
memset(&traff_send, '\0', sizeof(s_traffic));
|
||||||
memset(&traff_recv, '\0', sizeof(s_traffic));
|
memset(&traff_recv, '\0', sizeof(s_traffic));
|
||||||
@@ -890,6 +896,38 @@ int session(void)
|
|||||||
*/
|
*/
|
||||||
p_log_txrxstat(&pi);
|
p_log_txrxstat(&pi);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Raise flags if session incoming traffic was not empty
|
||||||
|
*/
|
||||||
|
if ( (p = conf_string(cf_incnet_flag)) )
|
||||||
|
if (state.traff_recv.netmail_size > 0) {
|
||||||
|
DEB((D_EVENT, "Incoming netmail > 0, raising flag"));
|
||||||
|
log("Raising flag for netmail in %s", p);
|
||||||
|
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP );
|
||||||
|
if (fd == -1) {
|
||||||
|
DEB((D_EVENT, "Error raising netmail flag"));
|
||||||
|
log("Error creating flag for netmail in %s", p);
|
||||||
|
} else {
|
||||||
|
/* all ok - closing file */
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (p = conf_string(cf_incarc_flag)) )
|
||||||
|
if (state.traff_recv.arcmail_size > 0) {
|
||||||
|
DEB((D_EVENT, "Incoming arcmail > 0, raising flag"));
|
||||||
|
log("Raising flag for arcmail in %s", p);
|
||||||
|
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
|
||||||
|
if (fd == -1) {
|
||||||
|
DEB((D_EVENT, "Error raising arcmail flag"));
|
||||||
|
log("Error creating flag for arcmail in %s", p);
|
||||||
|
} else {
|
||||||
|
/* all ok - closing file */
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save session traffic before deiniting
|
* Save session traffic before deiniting
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -70,12 +70,14 @@ static char *session_stat_get_stsfile(s_faddr *addr, int linenum)
|
|||||||
|
|
||||||
static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
||||||
{
|
{
|
||||||
|
int res;
|
||||||
|
|
||||||
if( fseek(fp, 0, SEEK_SET) == -1 )
|
if( fseek(fp, 0, SEEK_SET) == -1 )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
memset(stat, '\0', sizeof(s_sess_stat));
|
memset(stat, '\0', sizeof(s_sess_stat));
|
||||||
|
|
||||||
fscanf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
|
res = fscanf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
|
||||||
(unsigned int *) &stat->tries,
|
(unsigned int *) &stat->tries,
|
||||||
(unsigned int *) &stat->tries_noconn,
|
(unsigned int *) &stat->tries_noconn,
|
||||||
(unsigned int *) &stat->tries_noansw,
|
(unsigned int *) &stat->tries_noansw,
|
||||||
@@ -86,7 +88,10 @@ static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
|||||||
(unsigned long *) &stat->hold_freqs,
|
(unsigned long *) &stat->hold_freqs,
|
||||||
(unsigned long *) &stat->last_success_out,
|
(unsigned long *) &stat->last_success_out,
|
||||||
(unsigned long *) &stat->last_success_in);
|
(unsigned long *) &stat->last_success_in);
|
||||||
|
if (res == 0) {
|
||||||
|
log("Read STS unsuccessfull...");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
/* Set last successfull session time */
|
/* Set last successfull session time */
|
||||||
stat->last_success = MAX(stat->last_success_out, stat->last_success_in);
|
stat->last_success = MAX(stat->last_success_out, stat->last_success_in);
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ char *file_name_makesafe(char *filename)
|
|||||||
char *file_getname(char *filename)
|
char *file_getname(char *filename)
|
||||||
{
|
{
|
||||||
char *p = strrchr(filename, '/');
|
char *p = strrchr(filename, '/');
|
||||||
|
DEB((D_FREE, "File_getname: %s", (p ? p + 1 : filename) ));
|
||||||
return p ? p + 1 : filename;
|
return p ? p + 1 : filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,18 +173,18 @@ long time_gmtoffset(void)
|
|||||||
time_t tt = time(NULL);
|
time_t tt = time(NULL);
|
||||||
struct tm local = *localtime(&tt);
|
struct tm local = *localtime(&tt);
|
||||||
struct tm gmt = *gmtime(&tt);
|
struct tm gmt = *gmtime(&tt);
|
||||||
long tz = gmt.tm_yday - local.tm_yday;
|
long tz = local.tm_yday - gmt.tm_yday;
|
||||||
|
|
||||||
if( tz > 1 )
|
if( tz > 1 )
|
||||||
tz = -24;
|
|
||||||
else if( tz < -1 )
|
|
||||||
tz = 24;
|
tz = 24;
|
||||||
|
else if( tz < -1 )
|
||||||
|
tz = -24;
|
||||||
else
|
else
|
||||||
tz *= 24;
|
tz *= 24;
|
||||||
|
|
||||||
tz += gmt.tm_hour - local.tm_hour;
|
tz += local.tm_hour - gmt.tm_hour;
|
||||||
tz *= 60;
|
tz *= 60;
|
||||||
tz += gmt.tm_min - local.tm_min;
|
tz += local.tm_min - gmt.tm_min;
|
||||||
|
|
||||||
return tz;
|
return tz;
|
||||||
}
|
}
|
||||||
@@ -202,10 +202,11 @@ char *time_string_gmtoffset(char *buffer)
|
|||||||
{
|
{
|
||||||
long tz = time_gmtoffset();
|
long tz = time_gmtoffset();
|
||||||
char sign = (tz > 0)?'+':'-';
|
char sign = (tz > 0)?'+':'-';
|
||||||
int hour = tz/60;
|
tz = abs(tz);
|
||||||
int mint = tz%60;
|
unsigned int hour = tz/60;
|
||||||
|
unsigned int mint = tz%60;
|
||||||
|
|
||||||
sprintf(buffer, "%c%02d%02d", sign, hour, mint);
|
sprintf(buffer, "%c%02u%02u", sign, hour, mint);
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ int main(int argc, char *argv[])
|
|||||||
(void)setlocale(LC_ALL, "");
|
(void)setlocale(LC_ALL, "");
|
||||||
/* Set our name (for logging only) */
|
/* Set our name (for logging only) */
|
||||||
|
|
||||||
while( (c = getopt(argc, argv, "hf")) != EOF )
|
while( (c = getopt(argc, argv, "hf")) != (char)-1 )
|
||||||
{
|
{
|
||||||
switch( c ) {
|
switch( c ) {
|
||||||
case 'f':
|
case 'f':
|
||||||
@@ -204,11 +204,12 @@ int main(int argc, char *argv[])
|
|||||||
exit(0);
|
exit(0);
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
exit(1);
|
exit(5);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( conf_readconf(conf_getconfname(), 0) )
|
}
|
||||||
|
|
||||||
|
if( conf_readconf(conf_getconfname(), 0, false) )
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -216,7 +217,7 @@ int main(int argc, char *argv[])
|
|||||||
if( log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
if( log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
||||||
{
|
{
|
||||||
log("can't continue without logging");
|
log("can't continue without logging");
|
||||||
exit(1);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ignore some terminating signals */
|
/* Ignore some terminating signals */
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
bfstat_opts_default(&opts);
|
bfstat_opts_default(&opts);
|
||||||
|
|
||||||
while( (c = getopt(argc, argv, "acfhn:prst")) != EOF )
|
while( (c = getopt(argc, argv, "acfhn:prst")) != (char)-1 )
|
||||||
{
|
{
|
||||||
switch( c ) {
|
switch( c ) {
|
||||||
case 'h':
|
case 'h':
|
||||||
@@ -301,7 +301,7 @@ int main(int argc, char *argv[])
|
|||||||
/* Initialise current locale */
|
/* Initialise current locale */
|
||||||
(void)setlocale(LC_ALL, "");
|
(void)setlocale(LC_ALL, "");
|
||||||
|
|
||||||
if( conf_readconf(conf_getconfname(), 0) )
|
if( conf_readconf(conf_getconfname(), 0, false) )
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
memset(&ocb, '\0', sizeof(s_outbound_callback_data));
|
memset(&ocb, '\0', sizeof(s_outbound_callback_data));
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
|
|||||||
/* Initialise current locale */
|
/* Initialise current locale */
|
||||||
(void)setlocale(LC_ALL, "");
|
(void)setlocale(LC_ALL, "");
|
||||||
|
|
||||||
while( (ch=getopt(argc, argv, "hrm")) != EOF )
|
while( (ch=getopt(argc, argv, "hrm")) != (char)-1 )
|
||||||
{
|
{
|
||||||
switch( ch ) {
|
switch( ch ) {
|
||||||
case 'h':
|
case 'h':
|
||||||
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
|
|||||||
exit(BFERR_FATALERROR);
|
exit(BFERR_FATALERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( conf_readconf(conf_getconfname(), 0) )
|
if( conf_readconf(conf_getconfname(), 0, false) )
|
||||||
exit(BFERR_FATALERROR);
|
exit(BFERR_FATALERROR);
|
||||||
|
|
||||||
if( rawstring )
|
if( rawstring )
|
||||||
|
|||||||
Vendored
+4
-4
@@ -580,10 +580,10 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='bforce'
|
PACKAGE_NAME='bforce'
|
||||||
PACKAGE_TARNAME='bforce'
|
PACKAGE_TARNAME='bforce'
|
||||||
PACKAGE_VERSION='0.24'
|
PACKAGE_VERSION='0.24.1'
|
||||||
PACKAGE_STRING='bforce 0.24'
|
PACKAGE_STRING='bforce 0.24.1'
|
||||||
PACKAGE_BUGREPORT='sergey@fidoman.ru'
|
PACKAGE_BUGREPORT='zx@zxalexis.ru'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL='https://prj.zxalexis.ru/gitea/zx/bforce.git'
|
||||||
|
|
||||||
ac_default_prefix=/usr/local/fido
|
ac_default_prefix=/usr/local/fido
|
||||||
# Factoring default headers for most tests.
|
# Factoring default headers for most tests.
|
||||||
|
|||||||
+2
-2
@@ -3,7 +3,7 @@ dnl
|
|||||||
dnl $Id$
|
dnl $Id$
|
||||||
dnl
|
dnl
|
||||||
#AC_INIT(bforce/bforce.c)
|
#AC_INIT(bforce/bforce.c)
|
||||||
AC_INIT([bforce],[0.24],[sergey@fidoman.ru])
|
AC_INIT([bforce],[0.24.1],[zx@zxalexis.ru])
|
||||||
AC_CONFIG_HEADER(include/config.h)
|
AC_CONFIG_HEADER(include/config.h)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
dnl # Minimum Autoconf version required.
|
dnl # Minimum Autoconf version required.
|
||||||
@@ -143,4 +143,4 @@ AC_CHECK_FUNCS(rename statfs statvfs setproctitle)
|
|||||||
AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],[AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt])])
|
AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],[AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt])])
|
||||||
AC_SUBST([CLOCK_LIB])
|
AC_SUBST([CLOCK_LIB])
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile)
|
||||||
AC_OUTPUT(../debian/Makefile)
|
dnl AC_OUTPUT(../debian/Makefile)
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ typedef struct {
|
|||||||
bool daemon; /* Run as daemon? */
|
bool daemon; /* Run as daemon? */
|
||||||
bool quit; /* Quit from daemon */
|
bool quit; /* Quit from daemon */
|
||||||
bool usestdio; /* Session on stdin and stdout */
|
bool usestdio; /* Session on stdin and stdout */
|
||||||
|
bool earlydbg; /* Early debug on stderr */
|
||||||
int inetd; /* Called from inetd? */
|
int inetd; /* Called from inetd? */
|
||||||
int force; /* Force call? */
|
int force; /* Force call? */
|
||||||
int hiddline; /* Hidden line number (0,1..) */
|
int hiddline; /* Hidden line number (0,1..) */
|
||||||
@@ -180,6 +181,8 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
extern const char *BFERR[];
|
extern const char *BFERR[];
|
||||||
|
|
||||||
|
extern char * mainenv[];
|
||||||
|
|
||||||
int daemon_run(const char *confname, const char *incname, bool quit);
|
int daemon_run(const char *confname, const char *incname, bool quit);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -179,6 +179,8 @@ typedef enum {
|
|||||||
cf_emsi_FR_time,
|
cf_emsi_FR_time,
|
||||||
cf_emsi_OH_time,
|
cf_emsi_OH_time,
|
||||||
cf_emsi_slave_sends_nak,
|
cf_emsi_slave_sends_nak,
|
||||||
|
cf_emsi_send_tz,
|
||||||
|
cf_emsi_send_time,
|
||||||
cf_filebox,
|
cf_filebox,
|
||||||
cf_filebox_directory,
|
cf_filebox_directory,
|
||||||
cf_flags,
|
cf_flags,
|
||||||
@@ -191,6 +193,8 @@ typedef enum {
|
|||||||
cf_freq_limit_time,
|
cf_freq_limit_time,
|
||||||
cf_freq_min_speed,
|
cf_freq_min_speed,
|
||||||
cf_freq_srif_command,
|
cf_freq_srif_command,
|
||||||
|
cf_incnet_flag,
|
||||||
|
cf_incarc_flag,
|
||||||
cf_hide_our_aka,
|
cf_hide_our_aka,
|
||||||
cf_history_file,
|
cf_history_file,
|
||||||
cf_hydra_options,
|
cf_hydra_options,
|
||||||
@@ -237,6 +241,7 @@ typedef enum {
|
|||||||
cf_password,
|
cf_password,
|
||||||
cf_phone,
|
cf_phone,
|
||||||
cf_phone_translate,
|
cf_phone_translate,
|
||||||
|
cf_proto_order,
|
||||||
cf_recode_file_in,
|
cf_recode_file_in,
|
||||||
cf_recode_file_out,
|
cf_recode_file_out,
|
||||||
cf_recode_intro_in,
|
cf_recode_intro_in,
|
||||||
@@ -347,7 +352,7 @@ void deinit_translate(s_translate *dest);
|
|||||||
const char *conf_getconfname(void);
|
const char *conf_getconfname(void);
|
||||||
int conf_postreadcheck(void);
|
int conf_postreadcheck(void);
|
||||||
int conf_readpasswdlist(s_falist **pwdlist, char *fname);
|
int conf_readpasswdlist(s_falist **pwdlist, char *fname);
|
||||||
int conf_readconf(const char *confname, int inclevel);
|
int conf_readconf(const char *confname, int inclevel, bool earlydbg);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void log_overridelist(s_override *subst);
|
void log_overridelist(s_override *subst);
|
||||||
void log_options(s_options *opt);
|
void log_options(s_options *opt);
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
#define EXEC_OPT_LOGOUT 0x04
|
#define EXEC_OPT_LOGOUT 0x04
|
||||||
#define EXEC_OPT_USESHELL 0x08
|
#define EXEC_OPT_USESHELL 0x08
|
||||||
|
|
||||||
#define EXEC_MAX_NUM_ENVS 40
|
#define EXEC_MAX_NUM_ENVS 4095
|
||||||
#define EXEC_MAX_NUM_ARGS 20
|
#define EXEC_MAX_NUM_ARGS 20
|
||||||
#define EXEC_DEFAULT_UMASK ~(S_IRUSR|S_IWUSR);
|
#define EXEC_DEFAULT_UMASK ~(S_IRUSR|S_IWUSR);
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,10 @@ struct compcodes
|
|||||||
ZAP:1, /* ZedZap (Zmodem variant) */
|
ZAP:1, /* ZedZap (Zmodem variant) */
|
||||||
DZA:1, /* DirectZAP (Zmodem variant) */
|
DZA:1, /* DirectZAP (Zmodem variant) */
|
||||||
JAN:1, /* Janus */
|
JAN:1, /* Janus */
|
||||||
HYD:1; /* Hydra */
|
HYD:1, /* Hydra */
|
||||||
|
KER:1, /* Kermit, not supported */
|
||||||
|
SLK:1, /* SEALink, not supported */
|
||||||
|
TZA:1; /* TrapDoor DirectZAP, not supported */
|
||||||
|
|
||||||
UINT16 FRQ:1, /* The system will accept and process FREQs */
|
UINT16 FRQ:1, /* The system will accept and process FREQs */
|
||||||
NRQ:1, /* No file requests accepted by this system */
|
NRQ:1, /* No file requests accepted by this system */
|
||||||
@@ -148,6 +151,7 @@ struct emsi
|
|||||||
char passwd[EMSI_MAXPASSWD+1];
|
char passwd[EMSI_MAXPASSWD+1];
|
||||||
s_linkcodes linkcodes; /* XXn linkcodes contained in eaddr */
|
s_linkcodes linkcodes; /* XXn linkcodes contained in eaddr */
|
||||||
s_compcodes compcodes;
|
s_compcodes compcodes;
|
||||||
|
char proto_order[EMSI_MAXADDONS+1];
|
||||||
char m_pid[EMSI_MAXMPID+1];
|
char m_pid[EMSI_MAXMPID+1];
|
||||||
char m_name[EMSI_MAXMNAME+1];
|
char m_name[EMSI_MAXMNAME+1];
|
||||||
char m_ver[EMSI_MAXMVER+1];
|
char m_ver[EMSI_MAXMVER+1];
|
||||||
|
|||||||
Reference in New Issue
Block a user