39 Commits
Author SHA1 Message Date
zx de81a82f43 Version 0.25. EMSI-II compliant, TZUTC fixed, protocol order for outgoing 2024-05-28 20:49:18 +03:00
zx 6ebf2fc7a3 EMSI handshake FTSC-0088 compliant, protocol_order, EMSI TZUTC 2024-05-27 23:30:25 +03:00
zx 2c58629de4 Session answering fix 2024-05-22 20:55:49 +03:00
zx 721fa8fdf1 Update to 0.24.2 2024-05-20 23:52:02 +03:00
zx fdbeb83ab6 Fixed PSTN answer phone reset, version up 2024-05-20 21:39:50 +03:00
zx deafdc34c7 .gitignore added 2024-05-18 23:57:25 +03:00
zx 7879eb0cdc Env, binkp 64bit, syslog (openlog) fixes 2024-05-18 23:56:03 +03:00
zx bcf0d456ee Revert all except warning fixes 2024-05-14 23:45:29 +03:00
zx 39dd885dd0 fx README 2024-05-14 22:33:51 +03:00
zx 8b10d9f48a fx README 2024-05-14 22:33:05 +03:00
zx 27b4c624b3 env init probe 2024-05-14 21:30:43 +03:00
zx c2e418676b minor fix README.md 2024-05-14 18:45:35 +03:00
zx 0b2630f624 . 2024-05-14 00:52:05 +03:00
zx 097b39faa7 Minor fixes of Wunused_var, environment copy on subprocess creation 2024-05-14 00:00:37 +03:00
zx 30e860885f Fixed build on FreeBSD - autotools investigation req for proper bison/byacc switch 2024-05-13 10:24:37 +03:00
zx 132a6641f4 Flags renamed to incnet_flag and incarc_flag, fixed typos, READMEs and CHANGES files 2024-05-12 18:47:07 +03:00
zx f80d94413f Hide bison posix warning 2024-05-11 21:32:15 +03:00
zx ae156c4689 initial cfg change for flags incpkt_flag and incbdl_flag 2024-05-11 21:05:54 +03:00
zx 2827504df4 minor code style fixes 2024-05-11 19:47:40 +03:00
zx c2f9843291 Earlydbg as new -v option for main prog 2024-05-11 19:28:03 +03:00
zx d94ba35438 Minor fixes in prot_binkp 2024-05-11 15:40:23 +03:00
zx a6a1dc2881 Debug info before opening log and debug files - fixes4 2024-05-11 15:32:39 +03:00
zx c766c4a9f7 Debug info before opening log and debug files - fixes3 2024-05-11 15:15:24 +03:00
zx 6547b13983 Debug info before opening log and debug files - fixes2 2024-05-11 15:12:11 +03:00
zx 89c030d26c Debug info before opening log and debug files - fixes1 2024-05-11 15:06:11 +03:00
zx a01ea3fd63 Debug info before opening log and debug files 2024-05-11 14:45:25 +03:00
zx 634fc3e3e5 Fixed build on 64bit systems (type mismatch in comparison) 2024-05-05 21:47:06 +03:00
Max N. Boyarov ad1776c805 Disable inetd check after options parse
Mode was checked lated so move check to possibly correct place
 and disable it
2016-11-02 21:53:36 +03:00
Max N. Boyarov 59e7a8ddaf set correct options oreder for mkdir call 2014-06-25 23:08:02 +03:00
Max N. Boyarov 9325df9e52 Merge pull request #3 from fidoman/master
crypt support
2014-06-11 09:25:52 +03:00
Sergey Dorofeev 413bea3d2e Merge pull request #3 from askovpen/master
librt fix
2014-06-10 23:41:34 +04:00
Alexander Skovpen 52228a87bf librt fix 2014-06-10 23:32:04 +04:00
Alexander Skovpen 19866b8def librt fix 2014-06-10 23:27:06 +04:00
Alexander Skovpen 4a8d737bdf readme rename 2014-06-10 23:15:14 +04:00
Alexander Skovpen 91906fca27 travis add 2014-06-10 23:12:43 +04:00
Sergey Dorofeev a31eee639f Merge pull request #2 from askovpen/master
small crypt fix :-))
2014-06-10 22:38:12 +04:00
Alexander Skovpen a27bb47b57 small crypt fix :-)) 2014-06-10 22:35:28 +04:00
Sergey Dorofeev d9cde2accc Merge pull request #1 from askovpen/master
crypt support
2014-06-10 22:26:58 +04:00
Max N. Boyarov 9383985bf9 Merge pull request #2 from fidoman/master
обновления
2012-03-13 13:24:17 -07:00
51 changed files with 2796 additions and 1822 deletions
+12
View File
@@ -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
+5
View File
@@ -0,0 +1,5 @@
language: c
compiler:
- gcc
# Change this to your needs
script: cd source && ./configure && make
+192
View File
@@ -58,3 +58,195 @@
then sending/receiving. Recode tables are compartible with HPT. New
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.
-30
View File
@@ -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
View File
@@ -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
-54
View File
@@ -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.
+5 -2
View File
@@ -43,7 +43,9 @@ Q:
A: /All/
ugenkXX. Брать на http://sourceforge.net/projects/binkforce,
или с cvs там же.
A: /AK/
Переехало оттуда в гит, но лучше искать в профильных эхах.
Q: Как подключать нодлисты с цифровыми расширениями? Маски в конфиге bforce не
задаются.
A: /MR/
@@ -81,7 +83,7 @@ A: /KAS/
/GM/
Это мое и лежит оно тyт
http://btrieve.virtualave.net/files/bf0224-filebox.diff.rar
в моем патче, в отличие от пpедыдyщего, не все подpд имеют тип
в моем патче, в отличие от пpедыдyщего, не все подpяд имеют тип
TYPE_FILEBOX.
мыло - это TYPE_NETMAIL, эхи - TYPE_ARCMAIL и т.д.
Это yдобно дл пpосмотpа статистики поинтy - что на него лежит.
@@ -223,6 +225,7 @@ MR = Maxi Rovnich, 2:5030/872
PVC = Peter V. Chernikoff, 2:5020/2091
SNP = Serge N. Pokhodyaev, 2:5020/1838
VS = Valery Shishkov, 2:5040/9
AK = Alexey Khromov, 2:5030/723
Исправления и добавления в виде пар вопрос/ответ будут с благодарностью приняты
в netmail.
+26 -7
View File
@@ -1,10 +1,10 @@
В этом файле описывается процесс установки и настройки
фидонет-совместимого мейлера bforce 0.22.8.ugenk1.
фидонет-совместимого мейлера bforce 0.xx.
В данном документе приняты следующие обозначения:
<SRCDIR> - путь, куда вы распаковали тарболл с исходными
текстами bforce 0.22.8.ugenk1 (далее bforce)
текстами bforce 0.xx (далее bforce)
Тарболл - файл с расширением 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:
cd <SRCDIR>/bforce-0.22.8.ugenk1/source
Перейдите в директорию bforce/source:
cd <SRCDIR>/bforce/source
Для создания Makefile, который наиболее подходит к вашей
системе, наберите:
@@ -76,6 +76,11 @@ gmake install
Настройка
=========
Рекомендуется установить системную переменную BFCONFIG,
указывающую на местоположение конфигурации bforce.
Проще всего через /etc/environment для общесистемной или
.profile для переменной пользователя.
Для нормальной работы вам нужно отредактировать конфигурационные файлы
bforce. По умолчанию они находятся в /usr/local/fido/etc и называются
bforce.conf - основной конфигурационный файл bforce
@@ -125,6 +130,19 @@ cat `which mgetty` |strings |grep FIDO |wc -l
где 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
================================
К сожалению (или к счастью), bforce не умеет самостоятельно принимать входящие
@@ -150,6 +168,7 @@ init.d/bforce - init-
bfha - bforce history analyzer (bfha)
bfha/README - bfha README
bfha/bfha.pl - собственно, bfha
legacy-part.conf - файл для донастройки прав на /run/lock в systemd
u-srif - продвинутый freq-процессор
u-srif/u-srif-index.py \ с поддержой отчетов,
u-srif/u-srif-lookup.py \ ограничений,
-32
View File
@@ -1,32 +0,0 @@
$Id$:
BinkleyForce FTN mailer
-----------------------
BinkleyForce is a simple ifcico like FTN mailer. It can works via
TCP/IP as well as on modem links. Look sample configs for more
information.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version. See the COPYING file for further information.
Known Bugs
----------
- BinkD use and expect local file time at BinkP sessions, but
BinkleyForce allways use UTC time (?)
Bug Reports
-----------
E-Mail : adb@newmail.ru
FidoNet : Alexander Belkin, 2:5020/1398.11
New Versions
------------
http://adb.newmail.ru
Copyright (c) 1998-2000 Alexander Belkin, Moscow, Russia.
-14
View File
@@ -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/
+42
View File
@@ -0,0 +1,42 @@
BinkleyForce FTN mailer
-----------------------
BinkleyForce is a simple ifcico like FTN mailer. It can works via
TCP/IP as well as on modem links. Look sample configs for more
information.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version. See the COPYING file for further information.
Known Bugs
----------
- BinkD use and expect local file time at BinkP sessions, but
BinkleyForce always use UTC time (?)
Bug Reports
-----------
E-Mail : zx@zxalexis.ru
FidoNet : Alexey Khromov, 2:5030/723
New Versions
------------
https://prj.zxalexis.ru/gitea/zx/bforce
Older Sources
-------------
https://github.com/zotrix/binkleyforce/
https://sourceforge.net/projects/binkforce/
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>
-14
View File
@@ -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/
+19
View File
@@ -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
View File
@@ -63,6 +63,12 @@ address 20:26/100.0@easynet
#
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 <domain_name> <outbound_dir> <zone>
@@ -78,8 +84,8 @@ options NoDirZap NoJanus NoChat
#log_file /var/log/bforce/bf-log
# Debugging information completness level. Debugging is disabled by
# default. Allowed debug levels: config, nodelist, outbound, info, hshake,
# ttyio, modem, prot, freq, daemon, full
# default. Allowed debug levels: config, override, event, nodelist, outbound,
# info, hshake, ttyio, modem, prot, freq, statem, daemon, 24554, free, full
#debug_file /var/log/bforce/bf-debug
#debug_level info hshake prot
@@ -91,6 +97,13 @@ options NoDirZap NoJanus NoChat
#
nodial_flag /etc/nodial
#
# Incoming flags
# Netmail:
#incnet_flag /var/spool/fido/flags/mail
# Arcmail:
#incarc_flag /var/spool/fido/flags/echo
#
# Inbound directories
#
@@ -102,13 +115,13 @@ split_inbound yes
#
# 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.
# (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)
@@ -246,6 +259,10 @@ mode_request 100660
# '~' 1 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)
# ModemDev <device>[<:lock_speed>]
@@ -335,6 +352,9 @@ max_speed 57600
flags XW,V34B,IDC,LMD
emsi_OH_time 22:00-07:30
emsi_FR_time 22:30-05:30
#emsi_send_tz no
#emsi_send_time no
#
# Our receiver buffer size [bytes]
@@ -435,6 +455,23 @@ skip_files_recv *.pif *.swp
# setsid - run command in a new session
# 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_session [nowait,setsid]/usr/local/lib/ftp/run-in
#
+1 -1
View File
@@ -1 +1 @@
0.23
0.25
+2 -1
View File
@@ -12,7 +12,7 @@ exec_prefix=@exec_prefix@
CC = @CC@
INCLUDES = -I./include
CFLAGS = @CFLAGS@ -fno-builtin
LIBS = @LIBS@
LIBS = @LIBS@ @CLOCK_LIB@
YACC = @YACC@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -146,6 +146,7 @@ clean:
rm -f ./bin/core
clean-am:
rm -f ./Makefile
rm -f ../debian/Makefile
rm -f ./include/config.h
rm -f ./config.log
rm -f ./config.status
+42 -10
View File
@@ -23,6 +23,8 @@
/* PID of our child process (if use fork) */
pid_t child_pid = 0;
char * mainenv[EXEC_MAX_NUM_ENVS+1];
const char *BFERR[] = {
/* 00 */ "Successfull",
/* 01 */ "Fatal error occured",
@@ -102,6 +104,7 @@ static void usage(void)
" -S <connect_str> connect string (for slave mode only)\n"
" -p <port> override modem port (must be defined in config)\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"
"\n",
conf_getconfname()
@@ -252,12 +255,22 @@ int main(int argc, char *argv[], char *envp[])
int rc = 0;
int ch = 0;
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));
// 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 ) {
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); }
opts.inetd = 1;
break;
case 'v':
opts.earlydbg = TRUE;
break;
case 'C':
if( opts.confname || !optarg ) { usage(); exit(BFERR_FATALERROR); }
opts.confname = (char *)xstrcpy(optarg);
@@ -334,11 +350,6 @@ int main(int argc, char *argv[], char *envp[])
}
}
if( opts.inetd && opts.runmode != MODE_ANSWER && opts.runmode != MODE_CALL_STDIO )
{
usage();
exit(BFERR_FATALERROR);
}
/* Expression checker use it, so init first */
init_state(&state);
@@ -423,6 +434,15 @@ int main(int argc, char *argv[], char *envp[])
}
}
/*
if( opts.inetd && opts.runmode != MODE_ANSWER && opts.runmode != MODE_CALL_STDIO )
{
usage();
exit(BFERR_FATALERROR);
}
*/
/* if( (rc = log_open(BFORCE_LOGFILE, NULL, NULL)) ) //compiled in
{
log("can't continue without logging");
@@ -431,20 +451,21 @@ int main(int argc, char *argv[], char *envp[])
/* Process primary config file */
if( opts.confname && *opts.confname )
rc = conf_readconf(opts.confname, 0);
rc = conf_readconf(opts.confname, 0, opts.earlydbg);
else
rc = conf_readconf(conf_getconfname(), 0);
rc = conf_readconf(conf_getconfname(), 0, opts.earlydbg);
if( rc ) gotoexit(BFERR_FATALERROR);
/* Process additional config file, ignore errors */
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 */
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);
}
@@ -455,6 +476,7 @@ int main(int argc, char *argv[], char *envp[])
switch( opts.runmode )
{
case MODE_DAEMON:
DEB((D_STATEM, "Daemon mode"));
log("Daemon mode");
rc = bforce_daemon(&opts);
break;
@@ -462,14 +484,17 @@ case MODE_CALL_DEFAULT:
case MODE_CALL_IP:
case MODE_CALL_MODEM:
case MODE_CALL_STDIO:
DEB((D_STATEM, "Outgoing call"));
log("Outgoing call");
rc = bforce_master(&opts);
break;
case MODE_ANSWER:
DEB((D_STATEM, "Start answer"));
log("Start answer");
rc = bforce_slave(&opts);
break;
default:
DEB((D_STATEM, "Could not determine run mode"));
log("Could not determine run mode");
}
@@ -478,6 +503,13 @@ exit:
deinit_conf();
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 */
if( log_isopened() ) log_close();
DEB((D_FREE, "good exit"));
+3 -2
View File
@@ -67,8 +67,9 @@ void deinit_cval_entry(s_cval_entry *dest, bforce_config_keyword type)
deinit_translate(&dest->d.translate);
break;
default:
DEB((D_CONFIG, "deinit_cval_entry: type %d doesn't use dynamic memory",
type));
//DEB((D_CONFIG, "deinit_cval_entry: type %d doesn't use dynamic memory",
// type));
;
}
}
+5
View File
@@ -84,6 +84,8 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
CONF_KEY(emsi_FR_time, CT_STRING),
CONF_KEY(emsi_OH_time, CT_STRING),
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_directory, CT_PATH),
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_min_speed, CT_NUMBER),
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(history_file, CT_STRING),
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(phone, CT_STRING),
CONF_KEY(phone_translate, CT_TRANSLATE),
CONF_KEY(proto_order, CT_STRING),
CONF_KEY(recode_file_in, CT_STRING),
CONF_KEY(recode_file_out, CT_STRING),
CONF_KEY(recode_intro_in, CT_STRING),
+69 -115
View File
@@ -129,9 +129,11 @@ static void conf_parsestr(char *str, char **key, char **expr, char **value)
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;
char tmp[BF_MAXCFGLINE + 1];
int rc, maxrc = 0;
@@ -156,7 +158,8 @@ int conf_readconf(const char *confname, int inclevel)
{
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);
return -1;
}
@@ -165,12 +168,13 @@ int conf_readconf(const char *confname, int inclevel)
if( (fp = file_open(confname,"r")) == NULL )
{
logerr("can't open config file \"%s\"", confname);
return(PROC_RC_IGNORE);
if (earlydbg)
fprintf(stderr,"BF-DEBUG: can't open config file \"%s\"\n", confname);
return(PROC_RC_ABORT);
}
DEB((D_CONFIG, "readconfig: start reading config \"%s\"", confname));
if (earlydbg)
fprintf(stderr,"BF-DEBUG: start reading config \"%s\"\n", confname);
while( fgets(tmp, sizeof(tmp), fp) )
{
++line;
@@ -180,15 +184,20 @@ int conf_readconf(const char *confname, int inclevel)
{
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; }
isifexpr = FALSE;
}
if( !isappend )
continue;
if (earlydbg)
fprintf(stderr,"BF-DEBUG: warning: appending empty or comment line %d\n", line);
log("warning: appending empty or comment line %d", line);
isappend = FALSE;
}
@@ -230,9 +239,10 @@ int conf_readconf(const char *confname, int inclevel)
p_value = NULL;
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 )
{
@@ -256,19 +266,24 @@ int conf_readconf(const char *confname, int inclevel)
{
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;
}
else if( inclevel < MAXINCLUDELEVEL )
{
DEB((D_CONFIG, "conf_readconf: process inlude file \"%s\"", value));
rc = conf_readconf(value, inclevel + 1);
if (earlydbg)
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;
}
else
{
DEB((D_CONFIG, "conf_readconf: too deep include"));
log("including level too deep");
if (earlydbg)
fprintf(stderr, "BF-DEBUG: conf_readconf: too deep include\n");
rc = PROC_RC_IGNORE;
}
}
@@ -276,7 +291,9 @@ int conf_readconf(const char *confname, int inclevel)
{
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;
}
else
@@ -292,7 +309,9 @@ int conf_readconf(const char *confname, int inclevel)
{
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;
}
else
@@ -301,69 +320,12 @@ int conf_readconf(const char *confname, int inclevel)
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
{
log("unknown directive `%s'", p_key);
if (earlydbg)
fprintf(stderr, "BF-DEBUG: unknown directive `%s'\n", p_key);
rc = PROC_RC_IGNORE;
}
}
@@ -371,7 +333,9 @@ int conf_readconf(const char *confname, int inclevel)
{
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;
}
else if( isifexpr )
@@ -385,7 +349,9 @@ int conf_readconf(const char *confname, int inclevel)
}
else
{
log("incorrect config string");
if (earlydbg)
fprintf(stderr, "BF-DEBUG: incorrect config string %s\n", fullstr);
rc = PROC_RC_IGNORE;
}
@@ -400,13 +366,19 @@ int conf_readconf(const char *confname, int inclevel)
case PROC_RC_OK:
break;
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;
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;
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;
default:
ASSERT_MSG();
@@ -418,54 +390,36 @@ int conf_readconf(const char *confname, int inclevel)
file_close(fp);
if( isifexpr )
{ maxrc = 1; log("unterminated directive `#ifexp'"); }
{
maxrc = 1;
if (earlydbg)
fprintf(stderr, "BF-DEBUG: unterminated directive `#ifexp'\n");
}
if( fullstr )
free(fullstr);
if( 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 */
if (inclevel==0) { // end of main config
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);
}
#ifdef DEBUG
debug_configure();
#endif
}
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
View File
@@ -755,6 +755,7 @@ int daemon_pidfile(int cmd)
pid_t hispid, mypid = getpid();
FILE *pf;
struct stat sb;
int res;
if( !pidfile )
return 0;
@@ -768,7 +769,12 @@ int daemon_pidfile(int cmd)
return -1;
}
fscanf(pf, "%d", &hispid);
res = fscanf(pf, "%d", &hispid);
if (res != 1) {
log("daemon pidfile: not readable");
return -1;
}
fclose(pf);
if( hispid ) {
@@ -807,7 +813,12 @@ int daemon_pidfile(int cmd)
return -1;
}
fscanf(pf, "%d", &hispid);
res = fscanf(pf, "%d", &hispid);
if (res != 1) {
log("daemon pidfile: not readable");
return -1;
}
fclose(pf);
if( !hispid || (hispid == mypid) ) {
@@ -831,7 +842,12 @@ int daemon_pidfile(int cmd)
return -1;
}
fscanf(pf, "%d", &hispid);
res = fscanf(pf, "%d", &hispid);
if (res != 1) {
log("daemon pidfile: not readable");
return -1;
}
fclose(pf);
unlink(pidfile);
@@ -938,15 +954,15 @@ int daemon_run(const char *confname, const char *incname, bool quit)
/* Read primary config file */
if( confname && *confname )
rc = conf_readconf(confname, 0);
rc = conf_readconf(confname, 0, false);
else
rc = conf_readconf(conf_getconfname(), 0);
rc = conf_readconf(conf_getconfname(), 0, false);
if( rc )
return(BFERR_FATALERROR);
/* 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)");
dmstate = DM_Start;
File diff suppressed because it is too large Load Diff
+1
View File
@@ -45,6 +45,7 @@
%token LOGOP
%expect 2
%{
#include "includes.h"
#include "confread.h"
+2 -2
View File
@@ -123,8 +123,8 @@ int tcpip_connect(const char *hostname, e_tcpmode tcpmode)
port = "binkp";
else if( tcpmode == TCPMODE_TELNET )
port = "telnet";
else /* Default service name is "fido" */
port = "fido";
else /* Can not rely on /etc/services - it is not well-known port */
port = "60179";
if( ISDEC(port) )
server.sin_port = htons(atoi(port));
+2 -2
View File
@@ -77,7 +77,7 @@ static char *lock_getname(const char *lockdir, const s_modemport *modemport)
ASSERT(modemport != NULL);
if( lockdir && *lockdir )
if( *lockdir )
lckname = (char *)xstrcpy(lockdir);
else
lckname = (char *)xstrcpy(BFORCE_LOCK_DIR);
@@ -314,7 +314,7 @@ int port_lock(const char *lockdir, const s_modemport *modemport)
char *lckname;
char *tmpname, *p_tmpname;
if( lockdir && *lockdir )
if( *lockdir )
tmpname = xstrcpy(lockdir);
else
tmpname = xstrcpy(BFORCE_LOCK_DIR);
+10 -3
View File
@@ -283,6 +283,8 @@ int logerr(const char *s, ...)
#ifdef USE_SYSLOG
bool slog_active = FALSE;
const char *log_getfilename(int whatfor)
{
const char *p = "/dev/null";
@@ -291,22 +293,27 @@ const char *log_getfilename(int whatfor)
bool log_isopened(void)
{
return TRUE;
return slog_active;
}
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);
if( tty && *tty )
strncpy(p, tty, sizeof(p));
openlog(p, LOG_PID, fac);
slog_active = TRUE;
return 0;
}
int log_reopen(const char *logname, const char *ext, const char *tty)
{
return 0;
if ( !slog_active ) {
return (log_reopen(logname, ext, tty));
} else
return 0;
}
int log_close(void)
+9
View File
@@ -73,9 +73,18 @@ int exec_options_parse(char *str)
void exec_options_init(s_exec_options *eopt)
{
int i = 0;
memset(eopt, '\0', sizeof(s_exec_options));
eopt->umask = EXEC_DEFAULT_UMASK;
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)
+11 -7
View File
@@ -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);
void binkp_process_NUL(s_binkp_sysinfo *remote_data, char *buffer);
void binkp_process_ADR(char *buffer);
int binkp_auth_incoming(s_binkp_sysinfo *remote_data);
int binkp_loop(s_binkp_state *bstate) {
unsigned char readbuf[BINKP_HEADER+BINKP_MAXBLOCK+1];
@@ -104,7 +106,7 @@ int binkp_loop(s_binkp_state *bstate) {
bool no_more_to_send = false;
bool no_more_read = false;
bool canread, canwrite;
int timeout = conf_number(cf_binkp_timeout);
if( timeout==0 )
timeout = 60;
@@ -115,12 +117,13 @@ int binkp_loop(s_binkp_state *bstate) {
// session criterium handshake criterium
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));
if (bstate->continuesend) {
no_more_to_send = false;
bstate->continuesend = false;
}
if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=-1)) {
m = binkp_getforsend(bstate, writebuf+BINKP_HEADER, &block_type, &block_length);
if(m==1 || m==3) {
@@ -265,6 +268,7 @@ int binkp_loop(s_binkp_state *bstate) {
have_to_write -= n;
}
}
DEB((D_24554,"+++ BinkP Loop ended with rc=%d", 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 n; // read file
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];
strcpy(buf+1, bstate->extracmd+1);
*block_type = BINKP_BLK_CMD;
@@ -480,7 +484,7 @@ case 3: // send password on outgoing or pw confirmation on incoming
buf[0] = BPMSG_PWD;
*block_type = BINKP_BLK_CMD;
if( bstate->local_data->passwd == '\0' ) {
if( bstate->local_data->passwd[0] == '\0' ) {
*block_length = 1 + sprintf(buf+1, "-");
}
else if( bstate->remote_data->options & BINKP_OPT_MD5 ) {
@@ -623,7 +627,7 @@ case 4:
return 1;
case 5:
DEB((D_24554, "nothing to send"));
DEB((D_24554, "BinkP_GetForSend: nothing to send"));
return 2;
@@ -681,7 +685,7 @@ case BPMSG_ADR: /* List of addresses */
DEB((D_24554, "sending options"));
bstate->extracmd[0] = BPMSG_NUL;
bstate->extraislast = false;
sprintf(bstate->extracmd+1,"OPT MB");
sprintf(bstate->extracmd+1,"OPT MB CRYPT");
s_override ovr;
for(i = 0; i < state.n_remoteaddr; i++) {
ovr.sFlags = "";
@@ -802,7 +806,7 @@ case 0:
bstate->frs = frs_data;
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;
sprintf(bstate->extracmd+1, "%s %ld %ld %ld",
bstate->pi->recv->net_name, (long)bstate->pi->recv->bytes_total,
+1 -1
View File
@@ -45,7 +45,7 @@ int binkp_parsfinfo(const char *str, s_bpfinfo *fi, bool with_offset)
return -1;
}
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;
while (1) {
chkslash = strchr(chkslash, '/');
+2
View File
@@ -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 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
*/
+22
View File
@@ -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 *hide_ptr;
s_faddr *primary = NULL;
char xdt[EMSI_MAXXDATETIME+1];
time_t xtm;
const long options = conf_options(cf_options);
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; }
if( (options & OPTIONS_NO_HYDRA) != OPTIONS_NO_HYDRA )
{ 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
{
@@ -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));
}
/* ----------------------------------------------------------------- */
/* 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 */
/* ----------------------------------------------------------------- */
+38 -9
View File
@@ -134,6 +134,7 @@ int emsi_incoming(s_handshake_protocol *THIS)
int rc = HRC_OK;
s_emsi *remote_emsi = NULL;
s_emsi *local_emsi = NULL;
char *p = NULL;
ASSERT(THIS);
ASSERT(THIS->remote_data);
@@ -198,18 +199,46 @@ int emsi_incoming(s_handshake_protocol *THIS)
/*
* Set protocol that we will use
* EMSI-II compatible as of v0.25
*/
if( remote_emsi->compcodes.HYD && !(options & OPTIONS_NO_HYDRA) )
THIS->protocol = PROT_HYDRA;
else if( remote_emsi->compcodes.ZAP && !(options & OPTIONS_NO_ZEDZAP) )
THIS->protocol = PROT_ZEDZAP;
else if( remote_emsi->compcodes.ZMO && !(options & OPTIONS_NO_ZMODEM) )
THIS->protocol = PROT_ZMODEM;
else /* NCP */
{
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;
rc = HRC_NO_PROTOS;
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) )
THIS->protocol = PROT_HYDRA;
else if( remote_emsi->compcodes.ZAP && !(options & OPTIONS_NO_ZEDZAP) )
THIS->protocol = PROT_ZEDZAP;
else if( remote_emsi->compcodes.ZMO && !(options & OPTIONS_NO_ZMODEM) )
THIS->protocol = PROT_ZMODEM;
else /* NCP */
{
THIS->protocol = PROT_NOPROT;
}
}
if ( THIS->protocol == PROT_NOPROT ) rc = HRC_NO_PROTOS;
/*
* Check EMSI flags and set corresponding local HOLD flags
+161 -13
View File
@@ -103,6 +103,10 @@ char *emsi_createdat(s_emsi *emsi)
char *tmp = NULL;
char buf[100];
char abuf[BF_MAXADDRSTR+1];
char *p_order = NULL;
char *ord = NULL;
tmp = (char *)xstrcpy("**EMSI_DAT0000");
@@ -179,14 +183,79 @@ char *emsi_createdat(s_emsi *emsi)
tmp = add_char(tmp, '}');
}
/* compatibility_codes */
/* compatibility_codes (EMSI behavior as FTS-0088) */
tmp = add_char(tmp, '{');
if( emsi->compcodes.NCP ) tmp = add_str(tmp, "NCP,");
if( emsi->compcodes.ZMO ) tmp = add_str(tmp, "ZMO,");
if( emsi->compcodes.ZAP ) tmp = add_str(tmp, "ZAP,");
if( emsi->compcodes.DZA ) tmp = add_str(tmp, "DZA,");
if( emsi->compcodes.JAN ) tmp = add_str(tmp, "JAN,");
if( emsi->compcodes.HYD ) tmp = add_str(tmp, "HYD,");
p_order = conf_string(cf_proto_order);
if ( !p_order ) {
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.NRQ ) tmp = add_str(tmp, "NRQ,");
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, '[');
sprintf(buf, "+%04d", emsi->tzutc);
tmp = add_str(tmp, buf);
/* BUGGY */
// 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, '}');
free(ord);
}
/* {XDATE} indentifier.. What's the fucking invention :-/
@@ -450,6 +524,8 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi)
{
int i;
char *tmp, *p, *q, *n;
unsigned int tzh, tzm,tzn ;
char *tzc, *otmp;
while( (tmp=get_field(&emsi_dat, '{', '}')) != NULL )
{
@@ -525,13 +601,64 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi)
/* compatibility codes */
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
DEB((D_HSHAKE, "parse_emsidat: compatibility codes: %s", p));
emsi->proto_order[0] = '\0';
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, "DZA") ) emsi->compcodes.DZA = 1;
else if( !strcmp(p, "JAN") ) emsi->compcodes.JAN = 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, "NRQ") ) emsi->compcodes.NRQ = 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, "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 */
if( (p=get_field(&emsi_dat, '{', '}')) == NULL ) return(1);
@@ -645,14 +775,32 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi)
if( *p ) strnxcpy(emsi->xdatetime, p, sizeof(emsi->xdatetime));
}
else if( strcmp(tmp, "TZUTC") == 0 )
{
emsi->have_tzutc = 1;
{
if( (p=get_field(&emsi_dat, '{', '}')) == 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
{
DEB((D_HSHAKE, "Step - no known EMSI-part - got %s", tmp));
strnxcat(emsi->addons, "{", sizeof(emsi->addons));
strnxcat(emsi->addons, tmp, sizeof(emsi->addons));
strnxcat(emsi->addons, "}", sizeof(emsi->addons));
+4 -2
View File
@@ -71,6 +71,7 @@ int answ_system(e_session type, char *connstr, int inetd)
if( inetd )
{
log("Answering TCPIP call...");
if( connstr && *connstr )
state.connstr = (char*)xstrcpy(connstr);
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);
rc = session();
if( (inetd != 0) && (state.inet = FALSE) )
log("Session ended up, rc=%d, inetd=%d", rc, inetd);
if( ( !inetd ) )
{
log("Deactivating modem port");
port_deinit(0, &oldtio);
port_close();
}
+40 -2
View File
@@ -311,6 +311,7 @@ int session_set_inbound(void)
{
struct stat st;
char *p_inb;
int res;
p_inb = conf_string(cf_inbound_directory);
if( !p_inb ) {
@@ -341,8 +342,12 @@ int session_set_inbound(void)
} */
log("inbound: %s", buf);
state.inbound = (char*)xstrcpy(buf);
snprintf( buf, PATH_MAX+30, "/bin/mkdir -p %s -m 700", state.inbound ); /* 30 additional chars allowed */
system( buf );
snprintf( buf, PATH_MAX+30, "/bin/mkdir -p -m 700 %s", state.inbound ); /* 30 additional chars allowed */
res = system( buf );
if (res != 0) {
log("Inbound create error: %d", res);
return -1;
}
}
else
{
@@ -695,6 +700,7 @@ int session(void)
s_traffic traff_send;
s_traffic traff_recv;
char *p;
int fd = -1;
memset(&traff_send, '\0', sizeof(s_traffic));
memset(&traff_recv, '\0', sizeof(s_traffic));
@@ -890,6 +896,38 @@ int session(void)
*/
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
*/
+7 -2
View File
@@ -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)
{
int res;
if( fseek(fp, 0, SEEK_SET) == -1 )
return -1;
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_noconn,
(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->last_success_out,
(unsigned long *) &stat->last_success_in);
if (res == 0) {
log("Read STS unsuccessfull...");
return -1;
}
/* Set last successfull session time */
stat->last_success = MAX(stat->last_success_out, stat->last_success_in);
+1
View File
@@ -145,6 +145,7 @@ char *file_name_makesafe(char *filename)
char *file_getname(char *filename)
{
char *p = strrchr(filename, '/');
DEB((D_FREE, "File_getname: %s", (p ? p + 1 : filename) ));
return p ? p + 1 : filename;
}
+9 -8
View File
@@ -173,18 +173,18 @@ long time_gmtoffset(void)
time_t tt = time(NULL);
struct tm local = *localtime(&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 )
tz = -24;
else if( tz < -1 )
tz = 24;
else if( tz < -1 )
tz = -24;
else
tz *= 24;
tz += gmt.tm_hour - local.tm_hour;
tz += local.tm_hour - gmt.tm_hour;
tz *= 60;
tz += gmt.tm_min - local.tm_min;
tz += local.tm_min - gmt.tm_min;
return tz;
}
@@ -202,10 +202,11 @@ char *time_string_gmtoffset(char *buffer)
{
long tz = time_gmtoffset();
char sign = (tz > 0)?'+':'-';
int hour = tz/60;
int mint = tz%60;
tz = abs(tz);
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;
}
+5 -4
View File
@@ -193,7 +193,7 @@ int main(int argc, char *argv[])
(void)setlocale(LC_ALL, "");
/* Set our name (for logging only) */
while( (c = getopt(argc, argv, "hf")) != EOF )
while( (c = getopt(argc, argv, "hf")) != (char)-1 )
{
switch( c ) {
case 'f':
@@ -204,11 +204,12 @@ int main(int argc, char *argv[])
exit(0);
default:
usage();
exit(1);
exit(5);
}
}
if( conf_readconf(conf_getconfname(), 0) )
if( conf_readconf(conf_getconfname(), 0, false) )
{
exit(1);
}
@@ -216,7 +217,7 @@ int main(int argc, char *argv[])
if( log_open(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
{
log("can't continue without logging");
exit(1);
exit(2);
}
/* Ignore some terminating signals */
+2 -2
View File
@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
bfstat_opts_default(&opts);
while( (c = getopt(argc, argv, "acfhn:prst")) != EOF )
while( (c = getopt(argc, argv, "acfhn:prst")) != (char)-1 )
{
switch( c ) {
case 'h':
@@ -301,7 +301,7 @@ int main(int argc, char *argv[])
/* Initialise current locale */
(void)setlocale(LC_ALL, "");
if( conf_readconf(conf_getconfname(), 0) )
if( conf_readconf(conf_getconfname(), 0, false) )
exit(1);
memset(&ocb, '\0', sizeof(s_outbound_callback_data));
+2 -2
View File
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
/* Initialise current locale */
(void)setlocale(LC_ALL, "");
while( (ch=getopt(argc, argv, "hrm")) != EOF )
while( (ch=getopt(argc, argv, "hrm")) != (char)-1 )
{
switch( ch ) {
case 'h':
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
exit(BFERR_FATALERROR);
}
if( conf_readconf(conf_getconfname(), 0) )
if( conf_readconf(conf_getconfname(), 0, false) )
exit(BFERR_FATALERROR);
if( rawstring )
+145 -83
View File
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2011-05-11'
timestamp='2013-11-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2011-05-11'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm:riscos:*:*|arm:RISCOS:*:*)
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -792,21 +809,26 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -852,15 +874,22 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -872,56 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -940,54 +967,74 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
or1k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
eval $set_cc_for_build
X86_64_ABI=
# If there is a compiler, see if it is configured for 32-bit objects.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_X32 >/dev/null
then
X86_64_ABI=x32
fi
fi
echo x86_64-unknown-linux-gnu${X86_64_ABI}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1191,6 +1238,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1217,19 +1267,31 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1246,7 +1308,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1315,11 +1377,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
+117 -66
View File
@@ -1,38 +1,31 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2011-03-23'
timestamp='2013-10-01'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted GNU ChangeLog entry.
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -75,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -125,13 +116,17 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -154,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze)
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -223,6 +218,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
@@ -247,20 +248,28 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx | dvp \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -278,20 +287,21 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
| or32 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| rx \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
@@ -300,7 +310,7 @@ case $basic_machine in
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -315,8 +325,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -329,7 +338,10 @@ case $basic_machine in
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
@@ -352,25 +364,31 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -388,19 +406,20 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| romp-* | rs6000-* | rx-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@@ -408,10 +427,11 @@ case $basic_machine in
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -711,7 +731,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -769,11 +788,15 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32)
basic_machine=i386-pc
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -787,6 +810,24 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
mipsEE* | ee | ps2)
basic_machine=mips64r5900el-scei
case $os in
-linux*)
;;
*)
os=-elf
;;
esac
;;
iop)
basic_machine=mipsel-scei
os=-irx
;;
dvp)
basic_machine=dvp-scei
os=-elf
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -808,10 +849,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -992,7 +1041,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1120,13 +1173,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tile*)
basic_machine=tile-unknown
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@@ -1324,25 +1372,25 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
@@ -1470,9 +1518,6 @@ case $os in
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
@@ -1521,6 +1566,12 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
@@ -1548,9 +1599,6 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
@@ -1564,6 +1612,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or1k-*)
os=-elf
;;
or32-*)
os=-coff
;;
+183 -136
View File
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for bforce 0.24.
# Generated by GNU Autoconf 2.69 for bforce 0.24.
#
# Report bugs to <sergey@fidoman.ru>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
as_fn_exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1"
test x\$exitcode = x0 || exit 1
test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -214,21 +238,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
export CONFIG_SHELL
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
if test x$as_have_required = xno; then :
@@ -331,6 +359,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -452,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -486,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -507,28 +547,8 @@ else
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -560,10 +580,10 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bforce'
PACKAGE_TARNAME='bforce'
PACKAGE_VERSION='0.24'
PACKAGE_STRING='bforce 0.24'
PACKAGE_BUGREPORT='sergey@fidoman.ru'
PACKAGE_URL=''
PACKAGE_VERSION='0.24.1'
PACKAGE_STRING='bforce 0.24.1'
PACKAGE_BUGREPORT='zx@zxalexis.ru'
PACKAGE_URL='https://prj.zxalexis.ru/gitea/zx/bforce.git'
ac_default_prefix=/usr/local/fido
# Factoring default headers for most tests.
@@ -604,6 +624,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
CLOCK_LIB
EGREP
GREP
CPP
@@ -1156,8 +1177,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1418,9 +1437,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bforce configure 0.24
generated by GNU Autoconf 2.68
generated by GNU Autoconf 2.69
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1496,7 +1515,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1841,7 +1860,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by bforce $as_me 0.24, which was
generated by GNU Autoconf 2.68. Invocation command line was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2552,7 +2571,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2599,7 +2618,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2639,7 +2658,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2692,7 +2711,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2733,7 +2752,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2791,7 +2810,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2835,7 +2854,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3281,8 +3300,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3404,7 +3422,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3774,7 +3792,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3840,7 +3858,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4109,11 +4127,11 @@ else
int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
/* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
const charset cs;
const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
@@ -4130,8 +4148,9 @@ main ()
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
{ /* SCO 3.2v4 cc rejects this sort of thing. */
char tx;
char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
@@ -4147,10 +4166,10 @@ main ()
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
{ /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
struct s { int j; const int *ap[3]; } bx;
struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
@@ -4440,6 +4459,58 @@ _ACEOF
fi
done
for ac_func in clock_gettime
do :
ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
if test "x$ac_cv_func_clock_gettime" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_CLOCK_GETTIME 1
_ACEOF
CLOCK_LIB=
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
if ${ac_cv_lib_rt_clock_gettime+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char clock_gettime ();
int
main ()
{
return clock_gettime ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_rt_clock_gettime=yes
else
ac_cv_lib_rt_clock_gettime=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
CLOCK_LIB=-lrt
fi
fi
done
ac_config_files="$ac_config_files Makefile"
@@ -4850,16 +4921,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -4919,28 +4990,16 @@ else
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4962,7 +5021,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by bforce $as_me 0.24, which was
generated by GNU Autoconf 2.68. Invocation command line was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5024,10 +5083,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
bforce config.status 0.24
configured by $0, generated by GNU Autoconf 2.68,
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5116,7 +5175,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -6142,16 +6201,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -p'.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -p'
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -6211,28 +6270,16 @@ else
as_mkdir_p=false
fi
if test -x / >/dev/null 2>&1; then
as_test_x='test -x'
else
if ls -dL / >/dev/null 2>&1; then
as_ls_L_option=L
else
as_ls_L_option=
fi
as_test_x='
eval sh -c '\''
if test -d "$1"; then
test -d "$1/.";
else
case $1 in #(
-*)set "./$1";;
esac;
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
fi
as_executable_p=$as_test_x
# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -6254,7 +6301,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by bforce $as_me 0.24, which was
generated by GNU Autoconf 2.68. Invocation command line was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6316,10 +6363,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
bforce config.status 0.24
configured by $0, generated by GNU Autoconf 2.68,
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Copyright (C) 2010 Free Software Foundation, Inc.
Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -6408,7 +6455,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
+4 -3
View File
@@ -3,7 +3,7 @@ dnl
dnl $Id$
dnl
#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_CANONICAL_SYSTEM
dnl # Minimum Autoconf version required.
@@ -140,6 +140,7 @@ AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(mkdir mktime select socket strspn strcasecmp mkstemp)
AC_CHECK_FUNCS(rename statfs statvfs setproctitle)
AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],[AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt])])
AC_SUBST([CLOCK_LIB])
AC_OUTPUT(Makefile)
AC_OUTPUT(../debian/Makefile)
dnl AC_OUTPUT(../debian/Makefile)
+3
View File
@@ -151,6 +151,7 @@ typedef struct {
bool daemon; /* Run as daemon? */
bool quit; /* Quit from daemon */
bool usestdio; /* Session on stdin and stdout */
bool earlydbg; /* Early debug on stderr */
int inetd; /* Called from inetd? */
int force; /* Force call? */
int hiddline; /* Hidden line number (0,1..) */
@@ -180,6 +181,8 @@ typedef struct {
*/
extern const char *BFERR[];
extern char * mainenv[];
int daemon_run(const char *confname, const char *incname, bool quit);
#endif
+6 -1
View File
@@ -179,6 +179,8 @@ typedef enum {
cf_emsi_FR_time,
cf_emsi_OH_time,
cf_emsi_slave_sends_nak,
cf_emsi_send_tz,
cf_emsi_send_time,
cf_filebox,
cf_filebox_directory,
cf_flags,
@@ -191,6 +193,8 @@ typedef enum {
cf_freq_limit_time,
cf_freq_min_speed,
cf_freq_srif_command,
cf_incnet_flag,
cf_incarc_flag,
cf_hide_our_aka,
cf_history_file,
cf_hydra_options,
@@ -237,6 +241,7 @@ typedef enum {
cf_password,
cf_phone,
cf_phone_translate,
cf_proto_order,
cf_recode_file_in,
cf_recode_file_out,
cf_recode_intro_in,
@@ -347,7 +352,7 @@ void deinit_translate(s_translate *dest);
const char *conf_getconfname(void);
int conf_postreadcheck(void);
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
void log_overridelist(s_override *subst);
void log_options(s_options *opt);
+18 -18
View File
@@ -33,28 +33,28 @@ enum { LOG_FILE_DAEMON, LOG_FILE_SESSION, LOG_FILE_DEBUG, LOG_FILE_HISTORY };
#ifdef DEBUG
# define D_CONFIG 0x0000001L
# define D_OVERRIDE 0x0000002L
# define D_EVENT 0x0000004L
# define D_NODELIST 0x0000008L
# define D_OUTBOUND 0x0000010L
# define D_INFO 0x0000020L
# define D_HSHAKE 0x0000040L
# define D_TTYIO 0x0000080L
# define D_MODEM 0x0000100L
# define D_PROT 0x0000200L
# define D_FREQ 0x0000400L
# define D_STATEM 0x0000800L
# define D_DAEMON 0x0001000L
# define D_24554 0x0002000L
# define D_FREE 0x0004000L
# define D_FULL 0xfffffffL
#define D_CONFIG 0x0000001L
#define D_OVERRIDE 0x0000002L
#define D_EVENT 0x0000004L
#define D_NODELIST 0x0000008L
#define D_OUTBOUND 0x0000010L
#define D_INFO 0x0000020L
#define D_HSHAKE 0x0000040L
#define D_TTYIO 0x0000080L
#define D_MODEM 0x0000100L
#define D_PROT 0x0000200L
#define D_FREQ 0x0000400L
#define D_STATEM 0x0000800L
#define D_DAEMON 0x0001000L
#define D_24554 0x0002000L
#define D_FREE 0x0004000L
#define D_FULL 0xfffffffL
#endif
#ifdef DEBUG
# define DEB(what) debug what
#define DEB(what) debug what
#else
# define DEB(what)
#define DEB(what)
#endif
const char *log_getfilename(int whatfor);
+1 -1
View File
@@ -19,7 +19,7 @@
#define EXEC_OPT_LOGOUT 0x04
#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_DEFAULT_UMASK ~(S_IRUSR|S_IWUSR);
+5 -1
View File
@@ -116,7 +116,10 @@ struct compcodes
ZAP:1, /* ZedZap (Zmodem variant) */
DZA:1, /* DirectZAP (Zmodem variant) */
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 */
NRQ:1, /* No file requests accepted by this system */
@@ -148,6 +151,7 @@ struct emsi
char passwd[EMSI_MAXPASSWD+1];
s_linkcodes linkcodes; /* XXn linkcodes contained in eaddr */
s_compcodes compcodes;
char proto_order[EMSI_MAXADDONS+1];
char m_pid[EMSI_MAXMPID+1];
char m_name[EMSI_MAXMNAME+1];
char m_ver[EMSI_MAXMVER+1];
+477 -201
View File
@@ -1,251 +1,527 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright 1991 by the Massachusetts Institute of Technology
# Copyright (C) 1994 X Consortium
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
true
doit_exec=$doit
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
posix_mkdir=
pathcomp=''
# Desired mode of installed file.
mode=0755
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
src=
dst=
dir_arg=
dst_arg=
pathcomp="${pathcomp}/"
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# If we're going to rename the final executable, determine the name now.
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
mkdir_mode=
fi
# don't allow the sed command to completely eliminate the filename
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
true
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
# Make a temp file name in the proper directory.
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
dsttmp=$dstdir/#inst.$$#
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Move or copy the file name to the temp name
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
$doit $instcmd $src $dsttmp &&
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap "rm -f ${dsttmp}" 0 &&
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
# Now rename the file to the real destination.
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
fi &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: