Upgrade CVS to 0.33.18 current
This commit is contained in:
parent
2ff822f657
commit
e90745a139
2
AUTHORS
2
AUTHORS
@ -20,7 +20,7 @@ Jan van de Werken
|
||||
Sean Rima
|
||||
Juergen Heisel
|
||||
Jim Hansen
|
||||
Ken Bowley kbowley@users.sourceforge.net, 1:114/485@fidonet
|
||||
Ken Bowley
|
||||
Redy Rodriguez 2:283/613.6
|
||||
Johannes Lundberg 2:206/149@fidonet, <jojo@chaosdev.org>
|
||||
Vincent Danen
|
||||
|
83
ChangeLog
83
ChangeLog
@ -4060,3 +4060,86 @@ v0.33.17 21-May-2001
|
||||
Replaced the internet menu and txtfiles with versions that work
|
||||
with the current menu structure.
|
||||
|
||||
|
||||
v0.33.18 27-Jul-2001
|
||||
|
||||
Upgrade:
|
||||
In your Mail Transport Agent (if you use it) replace the line
|
||||
"mbmail -r <nexthop> (recipients)" to mbmail "(recipients)".
|
||||
In postfix this is in the master.cf file.
|
||||
|
||||
SETUP.sh:
|
||||
Doesn't create .huslogin anymore for user bbs.
|
||||
Script does now work on FreeBSD.
|
||||
|
||||
common.a:
|
||||
Corrected some defines in parsedate.c to include/exclude the
|
||||
right code.
|
||||
Changed the rawio to termios style instead of termio.
|
||||
Added ufs filesystem as normal filesystem to the diskfree
|
||||
function.
|
||||
|
||||
mbftpd:
|
||||
Removed the subdirectory for this not finished program. It may
|
||||
or may not return later.
|
||||
|
||||
mbfido:
|
||||
Filefind replies had a wrong ^aREPLY kludge.
|
||||
Rewrote a lot of code so that similar functions are only once
|
||||
present. This will make bughunting and maintaining much easier.
|
||||
Scanned netmail from point addresses created with GoldED are
|
||||
now always checked for missing FMPT, TOPT and INTL kludges and
|
||||
they are inserted when missing.
|
||||
The checkdupe switch also work in uucp mode (mbnews).
|
||||
The code for mbmail is now merged into mbfido. A symlink from
|
||||
mbmail to mbfido is created to let mbfido run in mail mode.
|
||||
The syntax to call mbmail is changed.
|
||||
|
||||
mbmail:
|
||||
Obsolete, the functions are now in mbfido.
|
||||
|
||||
mbtask:
|
||||
Removed all references to the Memwatch debugger, mbtask is oke
|
||||
but the debugger fills up the harddisk (very fast).
|
||||
Does now respond again to external semafore's mailout, mailin
|
||||
and scanout in the semafore directory.
|
||||
Removes stale socket file if found.
|
||||
|
||||
mbpasswd:
|
||||
Added CLOSE_SESSIONS and ENV_ROOTPATH to getdef to prevent new
|
||||
user error messages on some distributions.
|
||||
Ported to work on FreeBSD.
|
||||
|
||||
mbindex:
|
||||
Patched by Ken Bowley to prevent a crash when the 300 baud
|
||||
field is the last item on the nodelist line.
|
||||
|
||||
mbmon:
|
||||
Changed the rawio to termios style instead of termio.
|
||||
Shows the OS name in the info screen.
|
||||
|
||||
mbsetup:
|
||||
Shows the OS name in the info screen.
|
||||
Creates default tty records with tty names for the right
|
||||
OS (I hope).
|
||||
|
||||
mbcico:
|
||||
Renamed sendfile function in zmsend.c to sendzfile to prevent a
|
||||
conflict with an excisting library call on FreeBSD.
|
||||
|
||||
mball:
|
||||
Removed some compiler warnings on some systems.
|
||||
|
||||
mbsebbs:
|
||||
Removed some compiler warnings on some systems.
|
||||
|
||||
mbuseradd:
|
||||
Ported to work on FreeBSD.
|
||||
|
||||
mbpasswd:
|
||||
Ported to work on FreeBSD.
|
||||
|
||||
htmldoc:
|
||||
Upgraded the FTSC documents to the current state.
|
||||
|
||||
|
||||
|
@ -1,21 +1,22 @@
|
||||
-= MBSE BBS System v@VERSION@ for Linux =-
|
||||
-= MBSE BBS System v@VERSION@ for Unix =-
|
||||
MBSE BBS is a full Fidonet capable ANSI bbs
|
||||
package including a mailer (ifcico clone),
|
||||
tosser, ticfile processor, filefind and other
|
||||
utilities.
|
||||
package including a mailer, tosser, ticfile
|
||||
processor, filefind and other utilities.
|
||||
The bbs supports full configurable ANSI
|
||||
menus, multiple languages, IEMSI, standard
|
||||
file transfer protocols, native Linux doors
|
||||
and BlueWave and QWK offline readers.
|
||||
file transfer protocols, native Linux doors,
|
||||
DOS doors using dosemu and BlueWave and QWK
|
||||
offline readers.
|
||||
The mailer supports FTS-0001, YooHoo/2U2,
|
||||
EMSI protocols over modem, TCP/IP IFC and
|
||||
Binkd protocol. Zedzap, Zmodem, Telink and
|
||||
Binkp protocols. Zedzap, Zmodem, Telink and
|
||||
Hydra file transfer protocols. Full FTN mail
|
||||
support, including automatic routing for hub
|
||||
and host systems.
|
||||
Internal mail format is JAM (c) messagebase.
|
||||
Full tic file support, including extended
|
||||
tic files. Costsharing will be added later.
|
||||
tic files.
|
||||
OS: Linux and FreeBSD (untested).
|
||||
Originating sites 2:280/2802@fidonet and
|
||||
http://mbse.sourceforge.net/
|
||||
Copyright by Michiel Broek.
|
||||
|
98
Makefile.am
98
Makefile.am
@ -9,22 +9,88 @@ SUBDIRS = @SUBDIRS@
|
||||
|
||||
install-exec-local:
|
||||
@./checkbasic
|
||||
@if [ "$(shell whoami)" != "root" ] ; then \
|
||||
@if [ "`id -un`" != "root" ] ; then \
|
||||
echo; echo " Must be root to install!"; echo; exit 3; \
|
||||
fi
|
||||
$(mkinstalldirs) $(prefix)/{bin,etc,etc/maptabs,doc,fdb,home,log,magic,sema,var,tmp}
|
||||
$(mkinstalldirs) $(prefix)/{dutch,dutch/txtfiles,dutch/menus,dutch/macro}
|
||||
$(mkinstalldirs) $(prefix)/{english,english/txtfiles,english/menus,english/macro}
|
||||
$(mkinstalldirs) $(prefix)/{italian,italian/txtfiles,italian/menus,italian/macro}
|
||||
$(mkinstalldirs) $(prefix)/{spanish,spanish/txtfiles,spanish/menus,spanish/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{bin,etc,etc/maptabs,doc,fdb,home,log,magic,sema,var,tmp}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{dutch,dutch/txtfiles,dutch/menus,dutch/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{english,english/txtfiles,english/menus,english/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{italian,italian/txtfiles,italian/menus,italian/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{spanish,spanish/txtfiles,spanish/menus,spanish/macro}
|
||||
chmod 777 $(prefix)/{sema,tmp}
|
||||
$(mkinstalldirs) /var/spool/mbse
|
||||
$(mkinstalldirs) /var/spool/mbse/{nodelist,unknown,inbound,outbound,badtic,ticqueue,ftp,mail}
|
||||
chown -R @OWNER@.@GROUP@ /var/spool/mbse
|
||||
chmod -R 755 /var/spool/mbse
|
||||
@if [ ! -d $(prefix)/bin ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/bin ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/bin ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/etc ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/etc ; \
|
||||
$(mkinstalldirs) $(prefix)/etc/maptabs ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/etc ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/etc/maptabs ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/doc ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/doc ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/doc ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/fdb ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/fdb ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/fdb ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/log ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/log ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/log ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/magic ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/magic ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/magic ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/sema ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/sema ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/sema ; \
|
||||
chmod 0777 $(prefix)/sema ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/var ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/var ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/var ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/tmp ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/tmp ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/tmp ; \
|
||||
chmod 0777 $(prefix)/tmp ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/dutch ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/dutch ; \
|
||||
$(mkinstalldirs) $(prefix)/dutch/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/dutch/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/dutch/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/dutch ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/english ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/english ; \
|
||||
$(mkinstalldirs) $(prefix)/english/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/english/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/english/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/english ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/italian ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/italian ; \
|
||||
$(mkinstalldirs) $(prefix)/italian/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/italian/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/italian/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/italian ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/spanish ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/spanish ; \
|
||||
$(mkinstalldirs) $(prefix)/spanish/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/spanish/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/spanish/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/spanish ; \
|
||||
fi
|
||||
@if [ ! -d /var/spool/mbse ] ; then \
|
||||
$(mkinstalldirs) /var/spool/mbse ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/nodelist ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/unknown ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/inbound ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/outbound ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/badtic ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/ticqueue ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/ftp ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/mail ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ /var/spool/mbse ; \
|
||||
chmod -R 0755 /var/spool/mbse ; \
|
||||
fi
|
||||
|
||||
|
109
Makefile.in
109
Makefile.in
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,7 +71,6 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign dist-zip no-installinfo no-installman
|
||||
EXTRA_DIST = COPYING DEBUG CRON.sh FILE_ID.DIZ.in README README.GoldED SETUP.sh TODO UPGRADE files.css checkbasic
|
||||
@ -94,9 +94,9 @@ GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -272,6 +272,11 @@ distdir: $(DISTFILES)
|
||||
-rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
@ -371,24 +376,90 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
install-exec-local:
|
||||
@./checkbasic
|
||||
@if [ "$(shell whoami)" != "root" ] ; then \
|
||||
@if [ "`id -un`" != "root" ] ; then \
|
||||
echo; echo " Must be root to install!"; echo; exit 3; \
|
||||
fi
|
||||
$(mkinstalldirs) $(prefix)/{bin,etc,etc/maptabs,doc,fdb,home,log,magic,sema,var,tmp}
|
||||
$(mkinstalldirs) $(prefix)/{dutch,dutch/txtfiles,dutch/menus,dutch/macro}
|
||||
$(mkinstalldirs) $(prefix)/{english,english/txtfiles,english/menus,english/macro}
|
||||
$(mkinstalldirs) $(prefix)/{italian,italian/txtfiles,italian/menus,italian/macro}
|
||||
$(mkinstalldirs) $(prefix)/{spanish,spanish/txtfiles,spanish/menus,spanish/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{bin,etc,etc/maptabs,doc,fdb,home,log,magic,sema,var,tmp}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{dutch,dutch/txtfiles,dutch/menus,dutch/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{english,english/txtfiles,english/menus,english/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{italian,italian/txtfiles,italian/menus,italian/macro}
|
||||
chown @OWNER@.@GROUP@ $(prefix)/{spanish,spanish/txtfiles,spanish/menus,spanish/macro}
|
||||
chmod 777 $(prefix)/{sema,tmp}
|
||||
$(mkinstalldirs) /var/spool/mbse
|
||||
$(mkinstalldirs) /var/spool/mbse/{nodelist,unknown,inbound,outbound,badtic,ticqueue,ftp,mail}
|
||||
chown -R @OWNER@.@GROUP@ /var/spool/mbse
|
||||
chmod -R 755 /var/spool/mbse
|
||||
@if [ ! -d $(prefix)/bin ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/bin ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/bin ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/etc ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/etc ; \
|
||||
$(mkinstalldirs) $(prefix)/etc/maptabs ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/etc ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/etc/maptabs ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/doc ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/doc ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/doc ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/fdb ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/fdb ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/fdb ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/log ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/log ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/log ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/magic ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/magic ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/magic ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/sema ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/sema ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/sema ; \
|
||||
chmod 0777 $(prefix)/sema ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/var ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/var ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/var ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/tmp ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/tmp ; \
|
||||
${CHOWN} @OWNER@.@GROUP@ $(prefix)/tmp ; \
|
||||
chmod 0777 $(prefix)/tmp ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/dutch ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/dutch ; \
|
||||
$(mkinstalldirs) $(prefix)/dutch/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/dutch/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/dutch/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/dutch ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/english ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/english ; \
|
||||
$(mkinstalldirs) $(prefix)/english/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/english/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/english/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/english ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/italian ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/italian ; \
|
||||
$(mkinstalldirs) $(prefix)/italian/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/italian/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/italian/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/italian ; \
|
||||
fi
|
||||
@if [ ! -d $(prefix)/spanish ] ; then \
|
||||
$(mkinstalldirs) $(prefix)/spanish ; \
|
||||
$(mkinstalldirs) $(prefix)/spanish/txtfiles ; \
|
||||
$(mkinstalldirs) $(prefix)/spanish/menus ; \
|
||||
$(mkinstalldirs) $(prefix)/spanish/macro ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ $(prefix)/spanish ; \
|
||||
fi
|
||||
@if [ ! -d /var/spool/mbse ] ; then \
|
||||
$(mkinstalldirs) /var/spool/mbse ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/nodelist ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/unknown ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/inbound ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/outbound ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/badtic ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/ticqueue ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/ftp ; \
|
||||
$(mkinstalldirs) /var/spool/mbse/mail ; \
|
||||
${CHOWN} -R @OWNER@.@GROUP@ /var/spool/mbse ; \
|
||||
chmod -R 0755 /var/spool/mbse ; \
|
||||
fi
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
25
README
25
README
@ -1,25 +1,16 @@
|
||||
MBSE BBS Packages.
|
||||
|
||||
This needs changes.
|
||||
|
||||
Distribution naming scheme:
|
||||
|
||||
mbd0_30a.tgz
|
||||
^^^^ ^^^
|
||||
||| ||
|
||||
||| |+---- Alpha, Beta, Gamma or none for stable version.
|
||||
||| +----- Minor version number (2 digits).
|
||||
||+-------- Major version number.
|
||||
|+--------- Package type, see next section.
|
||||
+---------- Always mb (2 alpha characters).
|
||||
mbsebbs-0.33.18.tar.gz
|
||||
| | | |
|
||||
| | | +-------- minor patchlevel
|
||||
| | +----------- minor version
|
||||
| +------------- major version
|
||||
+------------------- package name
|
||||
|
||||
Package types:
|
||||
|
||||
b - The complete MBSE BBS package, including mailer and utilities.
|
||||
i - Internet <> Fidonet gateway software.
|
||||
p - Pointlist processing software.
|
||||
For fidonet distribution, the tar archive and FILE_ID.DIZ are
|
||||
zipped together in a file like mbb03318.zip
|
||||
|
||||
|
||||
Note that for distribution via Fidonet Technology networks the naming scheme
|
||||
is restricted to dos 8.3 conventions, while longer names would be nicer.
|
||||
|
||||
|
140
SETUP.sh
140
SETUP.sh
@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Basic setup script for MBSE BBS
|
||||
#
|
||||
# (C) Michiel Broek, v0.17 26-May-2001
|
||||
# (C) Michiel Broek, v0.18 05-Aug-2001
|
||||
#
|
||||
# Customisation section, change the next variables to your need.
|
||||
# However, all docs refer to the setup below.
|
||||
@ -13,6 +13,7 @@ MHOME=/opt/mbse
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:
|
||||
DISTNAME=
|
||||
DISTVERS=
|
||||
OSTYPE=`uname -s`
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -42,15 +43,32 @@ read junk
|
||||
log "+" "MBSE BBS $0 started by `whoami`"
|
||||
log "+" "Current directory is `pwd`"
|
||||
|
||||
# Check the OS type, only Linux for now.
|
||||
#
|
||||
if [ "$OSTYPE" != "Linux" ] && [ "$OSTYPE" != "FreeBSD" ]; then
|
||||
|
||||
cat << EOF
|
||||
|
||||
Your are trying to install MBSE BBS on a $OSTYPE system, however
|
||||
at this time only Linux or FreeBSD is supported.
|
||||
|
||||
EOF
|
||||
log "!" "Aborted, OS is $OSTYPE"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# First do various tests to see which Linux distribution this is.
|
||||
#
|
||||
if [ -f /etc/slackware-version ]; then
|
||||
if [ "$OSTYPE" = "Linux" ]; then
|
||||
PW=
|
||||
if [ -f /etc/slackware-version ]; then
|
||||
# Slackware 7.0 and later
|
||||
DISTNAME="Slackware"
|
||||
DISTVERS=`cat /etc/slackware-version`
|
||||
else
|
||||
DISTVERS=${DISTVERS:0:3}
|
||||
else
|
||||
if [ -f /etc/debian_version ]; then
|
||||
# Debian, at least since version 2.2
|
||||
DISTNAME="Debian"
|
||||
@ -80,10 +98,18 @@ else
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi # Linux
|
||||
if [ "$OSTYPE" = "FreeBSD" ]; then
|
||||
DISTNAME="FreeBSD"
|
||||
DISTVERS=`uname -r`
|
||||
DISTVERS=${DISTVERS:0:3}
|
||||
PW="pw "
|
||||
fi
|
||||
|
||||
|
||||
log "+" "Detected \"${DISTNAME}\" version \"${DISTVERS}\""
|
||||
log "+" "Detected \"${OSTYPE}\" (${HOSTTYPE}) \"${DISTNAME}\" version \"${DISTVERS}\""
|
||||
|
||||
|
||||
# Basic checks.
|
||||
if [ `whoami` != "root" ]; then
|
||||
@ -129,19 +155,44 @@ if [ -f /etc/passwd.lock ]; then
|
||||
fi
|
||||
clear
|
||||
|
||||
if [ -d /opt ]; then
|
||||
if [ "$OSTYPE" = "Linux" ]; then
|
||||
if [ -d /opt ]; then
|
||||
log "+" "Directory /opt already present"
|
||||
else
|
||||
else
|
||||
mkdir /opt
|
||||
log "+" "[$?] Directory /opt created"
|
||||
echo "Directory /opt created."
|
||||
log "+" "Directory /opt created"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$OSTYPE" = "FreeBSD" ]; then
|
||||
#
|
||||
# FreeBSD uses /usr/local for extra packages and doesn't use /opt
|
||||
# Also using /opt means that we are in the root partition which
|
||||
# by default is very small. We put everything in /usr/local/opt
|
||||
# and create symlinks to it.
|
||||
#
|
||||
if [ -d /opt ]; then
|
||||
log "+" "Directory /opt already present"
|
||||
else
|
||||
if [ -d /usr/local/opt ]; then
|
||||
log "+" "Directory /usr/local/opt already present"
|
||||
else
|
||||
mkdir -p /usr/local/opt
|
||||
log "+" "[$?] Directory /usr/local/opt created"
|
||||
echo "Directory /usr/local/opt created."
|
||||
fi
|
||||
ln -s /usr/local/opt /opt
|
||||
log "+" "[$?] Link /opt to /usr/local/opt created"
|
||||
echo "Link /opt to /usr/local/opt created."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
cat << EOF
|
||||
Basic checks done.
|
||||
|
||||
The detected Linux distribution is $DISTNAME $DISTVERS
|
||||
The detected $OSTYPE distribution is $DISTNAME $DISTVERS
|
||||
|
||||
Everything looks allright to start the installation now.
|
||||
Next the script will install a new group 'bbs' and two new
|
||||
@ -164,7 +215,6 @@ echo -n " press Enter to start the installation "
|
||||
read junk
|
||||
clear
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# The real work starts here
|
||||
@ -173,10 +223,15 @@ log "+" "Starting installation"
|
||||
echo "Installing MBSE BBS for the first time..."
|
||||
echo ""
|
||||
echo -n "Adding group 'bbs'"
|
||||
groupadd bbs
|
||||
$PW groupadd bbs
|
||||
log "+" "[$?] Added group bbs"
|
||||
echo -n ", user 'mbse'"
|
||||
useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G uucp -m -s /bin/bash mbse
|
||||
if [ "$OSTYPE" = "Linux" ]; then
|
||||
useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G uucp -m -s /bin/bash mbse
|
||||
fi
|
||||
if [ "$OSTYPE" = "FreeBSD" ]; then
|
||||
pw useradd mbse -c "MBSE BBS Admin" -d $MHOME -g bbs -G dialer -m -s /usr/local/bin/bash
|
||||
fi
|
||||
log "+" "[$?] Added user mbse"
|
||||
chmod 770 $MHOME
|
||||
log "+" "[$?] chmod 770 $MHOME"
|
||||
@ -207,34 +262,41 @@ echo "Now set the login password for user 'mbse'"
|
||||
passwd mbse
|
||||
log "+" "[$?] Password is set for user mbse"
|
||||
|
||||
|
||||
echo -n "Adding user 'bbs'"
|
||||
mkdir $MHOME/home
|
||||
log "+" "[$?] Created directory $MHOME/home"
|
||||
if [ ! -d $MHOME/home ]; then
|
||||
mkdir $MHOME/home
|
||||
log "+" "[$?] Created directory $MHOME/home"
|
||||
fi
|
||||
chown mbse.bbs $MHOME/home
|
||||
log "+" "[$?] chown mbse.bbs $MHOME/home
|
||||
log "+" "[$?] chown mbse.bbs $MHOME/home"
|
||||
chmod 775 $MHOME/home
|
||||
log "+" "[$?] chmod 775 $MHOME/home
|
||||
useradd -c "MBSE BBS Login" -d $MHOME/home/bbs -g bbs -s $MHOME/bin/mbsebbs bbs
|
||||
log "+" "[$?] Added user bbs"
|
||||
log "+" "[$?] chmod 775 $MHOME/home"
|
||||
if [ "$OSTYPE" = "Linux" ]; then
|
||||
useradd -c "MBSE BBS Login" -d $MHOME/home/bbs -g bbs -s $MHOME/bin/mbsebbs bbs
|
||||
log "+" "[$?] Added user bbs"
|
||||
fi
|
||||
if [ "$OSTYPE" = "FreeBSD" ]; then
|
||||
pw useradd bbs -c "MBSE BBS Login" -d $MHOME/home/bbs -g bbs -s $MHOME/bin/mbsebbs
|
||||
log "+" "[$?] Added user bbs"
|
||||
fi
|
||||
# Some systems (RedHat and Mandrake) insist on creating a users homedir.
|
||||
# These are full of garbage we don't need. Kill it first.
|
||||
if [ -d $MHOME/home/bbs ]; then
|
||||
rm -Rf $MHOME/home/bbs
|
||||
log "+" "[$?] Removed $MHOME/home/bbs"
|
||||
fi
|
||||
mkdir $MHOME/home/bbs
|
||||
mkdir -m 0770 $MHOME/home/bbs
|
||||
log "+" "[$?] mkdir $MHOME/home/bbs"
|
||||
chmod 770 $MHOME/home/bbs
|
||||
log "+" "[$?] chmod 770 $MHOME/home/bbs"
|
||||
chown mbse.bbs $MHOME/home/bbs
|
||||
log "+" "[$?] chown mbse.bbs $MHOME/home/bbs"
|
||||
touch $MHOME/home/bbs/.hushlogin
|
||||
log "+" "[$?] touch $MHOME/home/bbs/.hushlogin"
|
||||
|
||||
|
||||
echo ", removing password:"
|
||||
echo -n "$$" >/etc/passwd.lock
|
||||
if [ -f /etc/shadow ]; then
|
||||
log "+" "Shadow password system"
|
||||
if [ "$OSTYPE" = "Linux" ]; then
|
||||
echo -n "$$" >/etc/passwd.lock
|
||||
if [ -f /etc/shadow ]; then
|
||||
log "+" "Standard shadow password system"
|
||||
# Not all systems are the same...
|
||||
if [ "`grep bbs:\!\!: /etc/shadow`" != "" ]; then
|
||||
sed /bbs:\!\!:/s/bbs:\!\!:/bbs::/ /etc/shadow >/etc/shadow.bbs
|
||||
@ -256,7 +318,7 @@ if [ -f /etc/shadow ]; then
|
||||
log "+" "[$?] Default style owner of /etc/shadow (0600 root.root)"
|
||||
fi
|
||||
echo " File /etc/shadow.mbse is your backup of /etc/shadow"
|
||||
else
|
||||
else
|
||||
log "+" "Not a shadow password system"
|
||||
if [ "`grep bbs:\!\!: /etc/passwd`" != "" ]; then
|
||||
sed /bbs:\!\!:/s/bbs:\!\!:/bbs::/ /etc/passwd >/etc/passwd.bbs
|
||||
@ -271,10 +333,19 @@ else
|
||||
chmod 644 /etc/passwd
|
||||
log "+" "[$?] Changed owner of /etc/passwd"
|
||||
echo " File /etc/passwd.mbse is your backup of /etc/passwd"
|
||||
fi
|
||||
rm /etc/passwd.lock
|
||||
fi
|
||||
if [ "$OSTYPE" = "FreeBSD" ]; then
|
||||
#
|
||||
# FreeBSD has a util to remove a password
|
||||
#
|
||||
chpass -p "" bbs
|
||||
log "+" "[$?] Removed password of user bbs"
|
||||
fi
|
||||
rm /etc/passwd.lock
|
||||
echo ""
|
||||
|
||||
|
||||
if [ "`grep binkp /etc/services`" = "" ]; then
|
||||
BINKD=TRUE
|
||||
else
|
||||
@ -358,8 +429,15 @@ cat << EOF
|
||||
or /etc/shadow, the backup copies have the extension '.mbse'.
|
||||
Then issue (as root of course) the following commands:
|
||||
|
||||
userdel bbs
|
||||
userdel -r mbse
|
||||
groupdel bbs
|
||||
EOF
|
||||
if [ "$OSTYPE" = "Linux" ]; then
|
||||
echo " userdel bbs"
|
||||
echo " userdel -r mbse"
|
||||
echo " groupdel bbs"
|
||||
fi
|
||||
if [ "$OSTYPE" = "FreeBSD" ]; then
|
||||
echo " pw userdel bbs -r"
|
||||
echo " pw userdel mbse -r"
|
||||
echo " pw groupdel bbs"
|
||||
fi
|
||||
|
||||
|
14
TODO
14
TODO
@ -1,4 +1,4 @@
|
||||
MBSE BBS V0.33.17 TODO list.
|
||||
MBSE BBS V0.33.18 TODO list.
|
||||
----------------------------
|
||||
|
||||
These are a list of things that must be implemented one way or
|
||||
@ -42,9 +42,13 @@ mbsebbs:
|
||||
N: Deleting a line in the FS editor with the BS key gives a SEGFAULT.
|
||||
|
||||
mbfido:
|
||||
U: postnetmail doesn't set msgid and reply for storenet.
|
||||
|
||||
U: Code cleanup and make a structure in this program. Remove duplicate
|
||||
or similar functions.
|
||||
|
||||
N: Received files not in an archive are not scanned for virusses.
|
||||
|
||||
N: Remove memory leak during toss. (It's ok for less 5000 messages for
|
||||
each run).
|
||||
|
||||
@ -56,6 +60,14 @@ mbfido:
|
||||
To: address in the message, the gate doesn't see that and uses the
|
||||
name to "All".
|
||||
|
||||
U: GoldED netmail from points, FMPT kludge is missing.
|
||||
|
||||
U: GoldED messages to internet becomes null.
|
||||
|
||||
U: E-mail for points get status normal in the outbound.
|
||||
|
||||
N: Wish: internet addresses in the From: field.
|
||||
|
||||
mbcico:
|
||||
L: Implement modem connect response translation for ISDN lines, i.e.
|
||||
make the CAUSE responses human readable. see McMail for this
|
||||
|
@ -12,10 +12,8 @@
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* If you have gettimeofday function */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
#undef HAVE_DECLARED_TIMEZONE
|
||||
#undef HAVE_TM_GMTOFF
|
||||
#undef HAVE_TM_ZONE
|
||||
|
||||
/* If you don't have pid_t */
|
||||
#undef DONT_HAVE_PID_T
|
||||
@ -56,11 +54,6 @@
|
||||
#undef AUTH_METHODS
|
||||
#undef CKDEFS
|
||||
#undef DOUBLESIZE
|
||||
#undef HAVE_A64L
|
||||
#undef HAVE_FCHMOD
|
||||
#undef HAVE_FCHOWN
|
||||
#undef HAVE_FSYNC
|
||||
#undef HAVE_LCKPWDF
|
||||
#undef HAVE_LIBCRACK
|
||||
#undef HAVE_LIBCRACK_HIST
|
||||
#undef KEEP_NIS_AT_END
|
||||
|
63
config.h.in
63
config.h.in
@ -37,6 +37,9 @@
|
||||
/* Define if you have the vprintf function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef mode_t
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
#undef off_t
|
||||
|
||||
@ -52,6 +55,9 @@
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
#undef STAT_MACROS_BROKEN
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
@ -67,18 +73,9 @@
|
||||
/* Define vfork as fork if vfork does not work. */
|
||||
#undef vfork
|
||||
|
||||
/* Define if lex declares yytext as a char * by default, not a char[]. */
|
||||
#undef YYTEXT_POINTER
|
||||
|
||||
/* Memory debugging */
|
||||
#undef MEMWATCH
|
||||
|
||||
/* If you have gettimeofday function */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
#undef HAVE_DECLARED_TIMEZONE
|
||||
#undef HAVE_TM_GMTOFF
|
||||
#undef HAVE_TM_ZONE
|
||||
|
||||
/* If you don't have pid_t */
|
||||
#undef DONT_HAVE_PID_T
|
||||
|
||||
@ -102,6 +99,20 @@
|
||||
#undef SHADOW_PASSWORD
|
||||
#undef SO_OOBINLINE
|
||||
|
||||
/* mbuseradd */
|
||||
#undef AGING
|
||||
#undef ATT_AGE
|
||||
#undef ATT_COMMENTS
|
||||
#undef AUTH_METHODS
|
||||
#undef CKDEFS
|
||||
#undef DOUBLESIZE
|
||||
#undef HAVE_LIBCRACK
|
||||
#undef HAVE_LIBCRACK_HIST
|
||||
#undef KEEP_NIS_AT_END
|
||||
#undef MD5_CRYPT
|
||||
#undef PAM
|
||||
#undef SW_CRYPT
|
||||
|
||||
/* Define if you have the a64l function. */
|
||||
#undef HAVE_A64L
|
||||
|
||||
@ -114,6 +125,9 @@
|
||||
/* Define if you have the fchown function. */
|
||||
#undef HAVE_FCHOWN
|
||||
|
||||
/* Define if you have the fdatasync function. */
|
||||
#undef HAVE_FDATASYNC
|
||||
|
||||
/* Define if you have the fsync function. */
|
||||
#undef HAVE_FSYNC
|
||||
|
||||
@ -144,6 +158,9 @@
|
||||
/* Define if you have the putenv function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define if you have the putpwent function. */
|
||||
#undef HAVE_PUTPWENT
|
||||
|
||||
/* Define if you have the re_comp function. */
|
||||
#undef HAVE_RE_COMP
|
||||
|
||||
@ -198,6 +215,9 @@
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define if you have the <gshadow.h> header file. */
|
||||
#undef HAVE_GSHADOW_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
@ -207,6 +227,12 @@
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define if you have the <regex.h> header file. */
|
||||
#undef HAVE_REGEX_H
|
||||
|
||||
/* Define if you have the <shadow.h> header file. */
|
||||
#undef HAVE_SHADOW_H
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
@ -219,18 +245,33 @@
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define if you have the <sys/resource.h> header file. */
|
||||
#undef HAVE_SYS_RESOURCE_H
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define if you have the <sys/vfs.h> header file. */
|
||||
#undef HAVE_SYS_VFS_H
|
||||
|
||||
/* Define if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
||||
|
||||
/* Define if you have the <ulimit.h> header file. */
|
||||
#undef HAVE_ULIMIT_H
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the <usersec.h> header file. */
|
||||
#undef HAVE_USERSEC_H
|
||||
|
||||
/* Define if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
34
configure.in
34
configure.in
@ -1,12 +1,12 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(lib/libs.h)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
SUBDIRS=". lib mbcico mbfido mbftpd mbmon mbsebbs mbtask mbsetup fbutil import lang examples html script"
|
||||
SUBDIRS=". lib mbcico mbfido mbmon mbsebbs mbtask mbsetup fbutil import lang examples html script"
|
||||
AC_SUBST(SUBDIRS)
|
||||
|
||||
dnl General settings for MBSE BBS
|
||||
MBSE_PACKAGE=mbsebbs
|
||||
MBSE_VERSION=0.33.17
|
||||
MBSE_VERSION=0.33.18
|
||||
AC_SUBST(PACKAGE, $MBSE_PACKAGE)
|
||||
AC_SUBST(VERSION, $MBSE_VERSION)
|
||||
AM_INIT_AUTOMAKE($MBSE_PACKAGE, $MBSE_VERSION)
|
||||
@ -25,8 +25,7 @@ AC_CHECK_PROG(AWK, awk, awk)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_YACC
|
||||
AM_PROG_LEX
|
||||
AC_PATH_PROG(CHOWN, chown, chown, /bin:/sbin:/usr/bin:/usr/sbin:)
|
||||
CFLAGS="$CFLAGS -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -pipe"
|
||||
|
||||
dnl Additional commandline switches
|
||||
@ -49,6 +48,23 @@ AC_DEFINE_UNQUOTED(RESTAMP_OLD_POSTINGS, 21)
|
||||
AC_DEFINE(RESTAMP_FUTURE_POSTINGS)
|
||||
|
||||
dnl Checks for libraries.
|
||||
AC_CHECK_LIB(compat,re_comp,result=yes,result=no)
|
||||
if test "$result" = "yes"; then
|
||||
LIBS="$LIBS -lcompat"
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for pw_age in struct passwd, ac_cv_struct_passwd_pw_age, AC_TRY_COMPILE([#include <pwd.h>],
|
||||
[ struct passwd pw; pw.pw_age = ""; ], ac_cv_struct_passwd_pw_age=yes, ac_cv_struct_passwd_pw_age=no))
|
||||
if test "$ac_cv_struct_passwd_pw_age" = "yes"; then
|
||||
AC_DEFINE(ATT_AGE)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for pw_comment in struct passwd, ac_cv_struct_passwd_pw_comment, AC_TRY_COMPILE([#include <pwd.h>],
|
||||
[ struct passwd pw; pw.pw_comment = ""; ], ac_cv_struct_passwd_pw_comment=yes, ac_cv_struct_passwd_pw_comment=no))
|
||||
if test "$ac_cv_struct_passwd_pw_comment" = "yes"; then
|
||||
AC_DEFINE(ATT_COMMENT)
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(shadow,setspent,result=yes,result=no)
|
||||
if test "$result" = "yes"; then
|
||||
LIBS="$LIBS -lshadow"
|
||||
@ -70,6 +86,7 @@ else
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$SHADOW_PASSWORD" = "1"; then
|
||||
if test "$ac_cv_func_fgetspent" != "yes"; then
|
||||
AC_CHECK_LIB(shadow,fgetspent,result=yes,result=no)
|
||||
@ -81,6 +98,7 @@ if test "$SHADOW_PASSWORD" = "1"; then
|
||||
fi
|
||||
AC_DEFINE(SHADOW_PASSWORD)
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(crypt,crypt,result=yes,result=no)
|
||||
if test "$result" = "yes"; then
|
||||
LIBS="$LIBS -lcrypt"
|
||||
@ -91,7 +109,8 @@ dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(fcntl.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h termio.h unistd.h netinet/in.h)
|
||||
AC_CHECK_HEADERS(fcntl.h malloc.h sys/file.h sys/ioctl.h sys/time.h termios.h syslog.h sys/vfs.h unistd.h netinet/in.h regex.h)
|
||||
AC_CHECK_HEADERS(sys/resource.h usersec.h utime.h ulimit.h gshadow.h shadow.h)
|
||||
AC_STRUCT_TIMEZONE
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
@ -99,13 +118,15 @@ AC_C_CONST
|
||||
AC_TYPE_UID_T
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_STRUCT_ST_BLKSIZE
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(c64i a64l fchmod fchown fsync lckpwdf strcasestr mkstemp)
|
||||
AC_CHECK_FUNCS(c64i a64l fchmod fchown fdatasync fsync lckpwdf strcasestr mkstemp putpwent)
|
||||
AC_FUNC_FNMATCH
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MEMCMP
|
||||
@ -143,7 +164,6 @@ AC_OUTPUT(
|
||||
mbcico/Makefile
|
||||
mbfido/Makefile
|
||||
mbfido/paths.h
|
||||
mbftpd/Makefile
|
||||
mbmon/Makefile
|
||||
mbsebbs/Makefile
|
||||
mbtask/Makefile
|
||||
|
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,7 +71,6 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
SUBDIRS = .
|
||||
|
||||
@ -88,9 +88,9 @@ GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -189,6 +189,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = examples
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu examples/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
|
@ -3,11 +3,12 @@
|
||||
|
||||
SUBDIRS = .
|
||||
|
||||
EXTRA_DIST = basic.html date.html dist.html manual.css \
|
||||
H_BASE = basic.html date.html dist.html manual.css \
|
||||
flow.html postfix.html gwnews.html index.htm ups.html \
|
||||
install.html intergate.html intro.html invoking.html \
|
||||
known_bugs.html mgetty.html routing.html nodelist.html \
|
||||
ftsc/fsc-0039.html ftsc/fsc-0056.html ftsc/fsc-0087.html \
|
||||
known_bugs.html mgetty.html routing.html nodelist.html
|
||||
|
||||
H_FTSC = ftsc/fsc-0039.html ftsc/fsc-0056.html ftsc/fsc-0087.html \
|
||||
ftsc/fsp-1003.html ftsc/fsp-1009.html ftsc/fts-0007.html \
|
||||
ftsc/fsc-0046.html ftsc/fsc-0057.html ftsc/fsc-0091.html \
|
||||
ftsc/fsp-1004.html ftsc/fta-1005.html ftsc/fts-0008.html \
|
||||
@ -16,12 +17,13 @@ ftsc/fsp-1005.html ftsc/fts-0001.html ftsc/fts-0009.html \
|
||||
ftsc/fsc-0049.html ftsc/fsc-0062.html ftsc/fsc-0093.html \
|
||||
ftsc/fsp-1006.html ftsc/fts-0004.html ftsc/index.htm \
|
||||
ftsc/fsc-0050.html ftsc/fsc-0070.html ftsc/fsp-1001.html \
|
||||
ftsc/fsp-1007.html ftsc/fts-0005.html ftsc/fsc-0053.html \
|
||||
ftsc/fsp-1007.html ftsc/fts-5000.html ftsc/fsc-0053.html \
|
||||
ftsc/fsc-0072.html ftsc/fsp-1002.html ftsc/fsp-1008.html \
|
||||
ftsc/fts-0006.html ftsc/fsc-0035.html ftsc/fsp-1010.html \
|
||||
ftsc/fsp-1011.html ftsc/ftscprod.html ftsc/fsc-0088.html \
|
||||
ftsc/fts-4001.html \
|
||||
images/b_arrow.gif images/magic.gif images/nodes1.gif \
|
||||
ftsc/fts-4001.html ftsc/fts-5001.html
|
||||
|
||||
H_IMAGES = images/b_arrow.gif images/magic.gif images/nodes1.gif \
|
||||
images/connec.gif images/mbsetup0.gif images/nodes2.gif \
|
||||
images/domains.gif images/mbsetup1.6.S.gif images/nodes3.gif \
|
||||
images/e_menu.gif images/mbsetup1.6.gif images/nodes4.gif \
|
||||
@ -36,17 +38,21 @@ images/go_to.gif images/nodelist3.gif images/tty2.gif \
|
||||
images/hatch.gif images/nodelist4.gif images/tty3.gif \
|
||||
images/language.gif images/nodelist5.gif images/uarrow.gif \
|
||||
images/larrow.gif images/nodes.gif images/users.gif \
|
||||
images/mbse.jpg images/taskmgr.gif \
|
||||
license/copying.html license/hydracom.html license/index.htm \
|
||||
license/jam.html \
|
||||
menus/control.html menus/index.htm menus/menu100.html \
|
||||
images/mbse.jpg images/taskmgr.gif
|
||||
|
||||
H_LICENSE = license/copying.html license/hydracom.html license/index.htm \
|
||||
license/jam.html
|
||||
|
||||
H_MENUS = menus/control.html menus/index.htm menus/menu100.html \
|
||||
menus/menu300.html menus/menu500.html \
|
||||
menus/menu0.html menus/menu200.html menus/menu400.html \
|
||||
misc/dropfile.html misc/fileid.html misc/index.htm \
|
||||
menus/menu0.html menus/menu200.html menus/menu400.html
|
||||
|
||||
H_MISC = misc/dropfile.html misc/fileid.html misc/index.htm \
|
||||
misc/jam.html misc/semafore.html misc/filefind.html \
|
||||
misc/ftpserver.html misc/ipmailer.html misc/outbound.html \
|
||||
misc/usleep.html \
|
||||
programs/import.html programs/mbchat.html \
|
||||
misc/usleep.html
|
||||
|
||||
H_PROGS = programs/import.html programs/mbchat.html \
|
||||
programs/mbfido.html programs/mbmon.html \
|
||||
programs/mbtoberep.html \
|
||||
programs/index.htm programs/mbcico.html \
|
||||
@ -58,8 +64,9 @@ programs/mbsetup.html programs/mbuseradd.html \
|
||||
programs/mball.html programs/mbfbgen.html \
|
||||
programs/mblang.html programs/mbsebbs.html \
|
||||
programs/mbstat.html programs/mbpasswd.html \
|
||||
programs/mbtask.html programs/mbmail.html \
|
||||
setup/archiver.html setup/index.htm setup/bbs.html \
|
||||
programs/mbtask.html programs/mbmail.html
|
||||
|
||||
H_SETUP = setup/archiver.html setup/index.htm setup/bbs.html \
|
||||
setup/bbslist.html setup/language.html setup/oneliner.html \
|
||||
setup/emareas.html setup/magic.html setup/mail.html \
|
||||
setup/protocol.html setup/emgroup.html setup/safe.html \
|
||||
@ -72,13 +79,34 @@ setup/ttyinfo.html setup/global.html setup/users.html \
|
||||
setup/hatch.html setup/virscan.html setup/services.html \
|
||||
setup/domains.html setup/taskmgr.html
|
||||
|
||||
EXTRA_DIST = $(H_BASE) $(H_FTSC) $(H_IMAGES) $(H_LICENSE) $(H_MENUS) $(H_MISC) $(H_PROGS) $(H_SETUP)
|
||||
|
||||
|
||||
install-exec-local:
|
||||
rm -Rf $(prefix)/html
|
||||
$(mkinstalldirs) $(prefix)/html
|
||||
@echo "Installing html documentation in $(prefix)/html"
|
||||
@cp -Pr $(EXTRA_DIST) $(prefix)/html
|
||||
chown -R @OWNER@.@GROUP@ $(prefix)/html
|
||||
chmod -R 0644 $(prefix)/html/*.htm*
|
||||
chmod -R 0644 $(prefix)/html/images/*.gif
|
||||
@rm -Rf $(prefix)/html
|
||||
@$(mkinstalldirs) $(prefix)/html
|
||||
@$(mkinstalldirs) $(prefix)/html/ftsc
|
||||
@$(mkinstalldirs) $(prefix)/html/images
|
||||
@$(mkinstalldirs) $(prefix)/html/license
|
||||
@$(mkinstalldirs) $(prefix)/html/menus
|
||||
@$(mkinstalldirs) $(prefix)/html/misc
|
||||
@$(mkinstalldirs) $(prefix)/html/programs
|
||||
@$(mkinstalldirs) $(prefix)/html/setup
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/ftsc
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/images
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/license
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/menus
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/misc
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/programs
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/setup
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_BASE) $(prefix)/html
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_FTSC) $(prefix)/html/ftsc
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_IMAGES) $(prefix)/html/images
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_LICENSE) $(prefix)/html/license
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_MENUS) $(prefix)/html/menus
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_MISC) $(prefix)/html/misc
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_PROGS) $(prefix)/html/programs
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_SETUP) $(prefix)/html/setup
|
||||
|
||||
|
@ -61,6 +61,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -72,12 +73,34 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
SUBDIRS = .
|
||||
|
||||
EXTRA_DIST = basic.html date.html dist.html manual.css flow.html postfix.html gwnews.html index.htm ups.html install.html intergate.html intro.html invoking.html known_bugs.html mgetty.html routing.html nodelist.html ftsc/fsc-0039.html ftsc/fsc-0056.html ftsc/fsc-0087.html ftsc/fsp-1003.html ftsc/fsp-1009.html ftsc/fts-0007.html ftsc/fsc-0046.html ftsc/fsc-0057.html ftsc/fsc-0091.html ftsc/fsp-1004.html ftsc/fta-1005.html ftsc/fts-0008.html ftsc/fsc-0048.html ftsc/fsc-0059.html ftsc/fsc-0092.html ftsc/fsp-1005.html ftsc/fts-0001.html ftsc/fts-0009.html ftsc/fsc-0049.html ftsc/fsc-0062.html ftsc/fsc-0093.html ftsc/fsp-1006.html ftsc/fts-0004.html ftsc/index.htm ftsc/fsc-0050.html ftsc/fsc-0070.html ftsc/fsp-1001.html ftsc/fsp-1007.html ftsc/fts-0005.html ftsc/fsc-0053.html ftsc/fsc-0072.html ftsc/fsp-1002.html ftsc/fsp-1008.html ftsc/fts-0006.html ftsc/fsc-0035.html ftsc/fsp-1010.html ftsc/fsp-1011.html ftsc/ftscprod.html ftsc/fsc-0088.html ftsc/fts-4001.html images/b_arrow.gif images/magic.gif images/nodes1.gif images/connec.gif images/mbsetup0.gif images/nodes2.gif images/domains.gif images/mbsetup1.6.S.gif images/nodes3.gif images/e_menu.gif images/mbsetup1.6.gif images/nodes4.gif images/emareas.gif images/mbsetup2.gif images/nodes5.gif images/emgroup.gif images/modems0.gif images/oneliner.gif images/fdb.gif images/newfiles.gif images/protocol.gif images/fegroup.gif images/newgroups.gif images/rarrow.gif images/fileecho.gif images/nodelist.gif images/security.gif images/filefind.gif images/nodelist1.gif images/tty.gif images/files.gif images/nodelist2.gif images/tty1.gif images/go_to.gif images/nodelist3.gif images/tty2.gif images/hatch.gif images/nodelist4.gif images/tty3.gif images/language.gif images/nodelist5.gif images/uarrow.gif images/larrow.gif images/nodes.gif images/users.gif images/mbse.jpg images/taskmgr.gif license/copying.html license/hydracom.html license/index.htm license/jam.html menus/control.html menus/index.htm menus/menu100.html menus/menu300.html menus/menu500.html menus/menu0.html menus/menu200.html menus/menu400.html misc/dropfile.html misc/fileid.html misc/index.htm misc/jam.html misc/semafore.html misc/filefind.html misc/ftpserver.html misc/ipmailer.html misc/outbound.html misc/usleep.html programs/import.html programs/mbchat.html programs/mbfido.html programs/mbmon.html programs/mbtoberep.html programs/index.htm programs/mbcico.html programs/mbfile.html programs/mbmsg.html programs/mbseq.html programs/mbuser.html programs/mbaff.html programs/mbdiff.html programs/mbindex.html programs/mbout.html programs/mbsetup.html programs/mbuseradd.html programs/mball.html programs/mbfbgen.html programs/mblang.html programs/mbsebbs.html programs/mbstat.html programs/mbpasswd.html programs/mbtask.html programs/mbmail.html setup/archiver.html setup/index.htm setup/bbs.html setup/bbslist.html setup/language.html setup/oneliner.html setup/emareas.html setup/magic.html setup/mail.html setup/protocol.html setup/emgroup.html setup/safe.html setup/fdb.html setup/security.html setup/sitedoc.html setup/fegroup.html setup/modems.html setup/softinfo.html setup/fidonet.html setup/tic.html setup/timebank.html setup/fileecho.html setup/newfiles.html setup/filefind.html setup/newgroups.html setup/files.html setup/nodes.html setup/ttyinfo.html setup/global.html setup/users.html setup/hatch.html setup/virscan.html setup/services.html setup/domains.html setup/taskmgr.html
|
||||
H_BASE = basic.html date.html dist.html manual.css flow.html postfix.html gwnews.html index.htm ups.html install.html intergate.html intro.html invoking.html known_bugs.html mgetty.html routing.html nodelist.html
|
||||
|
||||
|
||||
H_FTSC = ftsc/fsc-0039.html ftsc/fsc-0056.html ftsc/fsc-0087.html ftsc/fsp-1003.html ftsc/fsp-1009.html ftsc/fts-0007.html ftsc/fsc-0046.html ftsc/fsc-0057.html ftsc/fsc-0091.html ftsc/fsp-1004.html ftsc/fta-1005.html ftsc/fts-0008.html ftsc/fsc-0048.html ftsc/fsc-0059.html ftsc/fsc-0092.html ftsc/fsp-1005.html ftsc/fts-0001.html ftsc/fts-0009.html ftsc/fsc-0049.html ftsc/fsc-0062.html ftsc/fsc-0093.html ftsc/fsp-1006.html ftsc/fts-0004.html ftsc/index.htm ftsc/fsc-0050.html ftsc/fsc-0070.html ftsc/fsp-1001.html ftsc/fsp-1007.html ftsc/fts-5000.html ftsc/fsc-0053.html ftsc/fsc-0072.html ftsc/fsp-1002.html ftsc/fsp-1008.html ftsc/fts-0006.html ftsc/fsc-0035.html ftsc/fsp-1010.html ftsc/fsp-1011.html ftsc/ftscprod.html ftsc/fsc-0088.html ftsc/fts-4001.html ftsc/fts-5001.html
|
||||
|
||||
|
||||
H_IMAGES = images/b_arrow.gif images/magic.gif images/nodes1.gif images/connec.gif images/mbsetup0.gif images/nodes2.gif images/domains.gif images/mbsetup1.6.S.gif images/nodes3.gif images/e_menu.gif images/mbsetup1.6.gif images/nodes4.gif images/emareas.gif images/mbsetup2.gif images/nodes5.gif images/emgroup.gif images/modems0.gif images/oneliner.gif images/fdb.gif images/newfiles.gif images/protocol.gif images/fegroup.gif images/newgroups.gif images/rarrow.gif images/fileecho.gif images/nodelist.gif images/security.gif images/filefind.gif images/nodelist1.gif images/tty.gif images/files.gif images/nodelist2.gif images/tty1.gif images/go_to.gif images/nodelist3.gif images/tty2.gif images/hatch.gif images/nodelist4.gif images/tty3.gif images/language.gif images/nodelist5.gif images/uarrow.gif images/larrow.gif images/nodes.gif images/users.gif images/mbse.jpg images/taskmgr.gif
|
||||
|
||||
|
||||
H_LICENSE = license/copying.html license/hydracom.html license/index.htm license/jam.html
|
||||
|
||||
|
||||
H_MENUS = menus/control.html menus/index.htm menus/menu100.html menus/menu300.html menus/menu500.html menus/menu0.html menus/menu200.html menus/menu400.html
|
||||
|
||||
|
||||
H_MISC = misc/dropfile.html misc/fileid.html misc/index.htm misc/jam.html misc/semafore.html misc/filefind.html misc/ftpserver.html misc/ipmailer.html misc/outbound.html misc/usleep.html
|
||||
|
||||
|
||||
H_PROGS = programs/import.html programs/mbchat.html programs/mbfido.html programs/mbmon.html programs/mbtoberep.html programs/index.htm programs/mbcico.html programs/mbfile.html programs/mbmsg.html programs/mbseq.html programs/mbuser.html programs/mbaff.html programs/mbdiff.html programs/mbindex.html programs/mbout.html programs/mbsetup.html programs/mbuseradd.html programs/mball.html programs/mbfbgen.html programs/mblang.html programs/mbsebbs.html programs/mbstat.html programs/mbpasswd.html programs/mbtask.html programs/mbmail.html
|
||||
|
||||
|
||||
H_SETUP = setup/archiver.html setup/index.htm setup/bbs.html setup/bbslist.html setup/language.html setup/oneliner.html setup/emareas.html setup/magic.html setup/mail.html setup/protocol.html setup/emgroup.html setup/safe.html setup/fdb.html setup/security.html setup/sitedoc.html setup/fegroup.html setup/modems.html setup/softinfo.html setup/fidonet.html setup/tic.html setup/timebank.html setup/fileecho.html setup/newfiles.html setup/filefind.html setup/newgroups.html setup/files.html setup/nodes.html setup/ttyinfo.html setup/global.html setup/users.html setup/hatch.html setup/virscan.html setup/services.html setup/domains.html setup/taskmgr.html
|
||||
|
||||
|
||||
EXTRA_DIST = $(H_BASE) $(H_FTSC) $(H_IMAGES) $(H_LICENSE) $(H_MENUS) $(H_MISC) $(H_PROGS) $(H_SETUP)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@ -91,9 +114,9 @@ GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps html/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu html/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -192,6 +215,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = html
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu html/Makefile
|
||||
$(mkinstalldirs) $(distdir)/ftsc $(distdir)/images $(distdir)/license \
|
||||
$(distdir)/menus $(distdir)/misc $(distdir)/programs \
|
||||
$(distdir)/setup
|
||||
@ -286,13 +314,32 @@ mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
install-exec-local:
|
||||
rm -Rf $(prefix)/html
|
||||
$(mkinstalldirs) $(prefix)/html
|
||||
@echo "Installing html documentation in $(prefix)/html"
|
||||
@cp -Pr $(EXTRA_DIST) $(prefix)/html
|
||||
chown -R @OWNER@.@GROUP@ $(prefix)/html
|
||||
chmod -R 0644 $(prefix)/html/*.htm*
|
||||
chmod -R 0644 $(prefix)/html/images/*.gif
|
||||
@rm -Rf $(prefix)/html
|
||||
@$(mkinstalldirs) $(prefix)/html
|
||||
@$(mkinstalldirs) $(prefix)/html/ftsc
|
||||
@$(mkinstalldirs) $(prefix)/html/images
|
||||
@$(mkinstalldirs) $(prefix)/html/license
|
||||
@$(mkinstalldirs) $(prefix)/html/menus
|
||||
@$(mkinstalldirs) $(prefix)/html/misc
|
||||
@$(mkinstalldirs) $(prefix)/html/programs
|
||||
@$(mkinstalldirs) $(prefix)/html/setup
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/ftsc
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/images
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/license
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/menus
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/misc
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/programs
|
||||
@$(CHOWN) @OWNER@.@GROUP@ $(prefix)/html/setup
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_BASE) $(prefix)/html
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_FTSC) $(prefix)/html/ftsc
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_IMAGES) $(prefix)/html/images
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_LICENSE) $(prefix)/html/license
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_MENUS) $(prefix)/html/menus
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_MISC) $(prefix)/html/misc
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_PROGS) $(prefix)/html/programs
|
||||
@$(INSTALL) -o mbse -g bbs -m 0444 $(H_SETUP) $(prefix)/html/setup
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -11,7 +11,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<h5>Last update 27-May-2001</h5>
|
||||
<h5>Last update 07-Aug-2001</h5>
|
||||
<P> <P>
|
||||
|
||||
<h1>MBSE BBS Basic Installation</h1>
|
||||
@ -27,13 +27,13 @@ environment. If you don't do this, things will fail.
|
||||
MBSE BBS is default installed in <b>/opt/mbse</b>. The spoolfiles (in and
|
||||
outbound, message bases) go into <b>/var/spool/mbse</b>. In the <b>/opt/mbse</b>
|
||||
path are several subdirectories, <b>bin</b> for the binaries, <b>etc</b> for the
|
||||
configuration and some scripts, <b>english</b> and <b>dutch</b> for the language
|
||||
configuration and some scripts, <b>english, spanish, italian</b> and <b>dutch</b> for the language
|
||||
files and menus, <b>home</b> for the users homedirectories, <b>log</b> for the
|
||||
logfiles, <b>magic</b> for the filerequest magicnames, <b>fdb</b> for the files
|
||||
database, <b>var</b> for some statistic files and <b>tmp</b> as temp directory.
|
||||
<p>
|
||||
Don't use UMSDOS or SAMBA filesystems for the bbs, stick by the standard Linux
|
||||
filesystems (ext2). If you intent to make your bbs also accessible
|
||||
filesystems (ext2 or reiserfs). If you intent to make your bbs also accessible
|
||||
by FTP and WWW you must create the directory structure under the ftp user
|
||||
behind the pub directory. Read <a href="misc/ftpserver.html">the
|
||||
ftp server</a> doc for details. If you don't follow these guidlines, you
|
||||
@ -63,8 +63,10 @@ tar xfvz /path/to/the/mbsebbs-0.33.nn.tar.gz
|
||||
To start the script type:
|
||||
<pre>
|
||||
cd mbsebbs-0.33.nn
|
||||
sh ./SETUP.sh
|
||||
bash ./SETUP.sh
|
||||
</pre>
|
||||
Yes, use <b>bash</b> as shell here. On some systems root doesn't use bash
|
||||
as login shell, calling the script with bash forces the use of bash.
|
||||
The script does the following:
|
||||
<ol>
|
||||
<li>Create the group <strong>bbs</strong>
|
||||
@ -80,6 +82,7 @@ easy to guess of course. The script will then continue again:
|
||||
<li>The user <strong>bbs</strong> is added.
|
||||
<li>The password will be removed from user <strong>bbs</strong> This action
|
||||
will make changes in /etc/shadow (if you have that) otherwise in /etc/passwd.
|
||||
On FreeBSD it uses other tools to modify the master database.
|
||||
<li>If they don't exist in the file /etc/services the services fido, tfido
|
||||
and binkp will be added.
|
||||
<li>If they don't exist in the file /etc/inetd.conf the internet protocols
|
||||
@ -94,6 +97,11 @@ The last screen of the script is about sanity checks. Perform those checks!
|
||||
If something is wrong, now is the time to fix it. Don't panic and remember
|
||||
the backups of the system files that are changed are in /etc with the
|
||||
extension <strong>.mbse</strong> i.e: those were the original files.
|
||||
If everythings is allright, then remove the directory /tmp/mbsebbs-0.33.nn:
|
||||
<pre>
|
||||
cd /tmp
|
||||
rm -Rf mbsebbs-0.33.nn
|
||||
</pre>
|
||||
<p> <p>
|
||||
|
||||
<h3>Step 4: Install the basic packages.</h3>
|
||||
@ -103,9 +111,7 @@ archives:
|
||||
<pre>
|
||||
tar xfvz /path/to/mbsebbs-0.33.nn.tar.gz
|
||||
</pre>
|
||||
You now have the subdirectory with sources in the right place. Indeed, if you
|
||||
have a new installation, you also have unpacked the archive somewere else
|
||||
to run the installation script. That one can be removed.
|
||||
You now have the subdirectory with sources in the right place.
|
||||
Next build the binaries and install them using the folowing commands:
|
||||
<pre>
|
||||
cd ~/mbsebbs-0.33.nn
|
||||
@ -119,7 +125,7 @@ exit
|
||||
The last part of the installation procedure shows you the location of the bbs
|
||||
startup script that is added to your system. Because this is your first
|
||||
time installation, example menus, textfiles and some databases are installed.
|
||||
If they already excist on your systems (when you do an upgrade) they
|
||||
If they already exist on your systems (when you do an upgrade) they
|
||||
will not be installed again.
|
||||
<p>
|
||||
Now you must start the <b>mbtask</b> daemon by hand by typing <b>/opt/mbse/bin/mbtask</b>.
|
||||
|
@ -87,7 +87,7 @@ root. You might consider installing SSH on your system for remote maintenance.
|
||||
Installing a PPP server on your system is beyound the scope of this project.
|
||||
However if you did install it, users can login your bbs with their favourite
|
||||
browser and use your bbs. Note that the necessary tools to automatic create
|
||||
newsgroups don't excist at this time. With the proper setup you can automatic
|
||||
newsgroups don't exist at this time. With the proper setup you can automatic
|
||||
create and maintain html pages for the file areas.
|
||||
<P> <P>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<h5>Last update 08-Jun-2001</h5>
|
||||
<h5>Last update 11-Aug-2001</h5>
|
||||
<P> <P>
|
||||
|
||||
<h1>Fidonet Technical Standards</h1>
|
||||
@ -82,12 +82,14 @@ Michiel Broek.
|
||||
<li>FTS-0002 Obsoleted by FTS-0005
|
||||
<li>FTS-0003 Obsoleted by FTS-0006
|
||||
<li><a href="fts-0004.html">FTS-0004 Echomail specification, B.Hartman</a>
|
||||
<li><a href="fts-0005.html">FTS-0005 The distribution nodelist, B.Baker, R.Moore, D.Nugent</a>
|
||||
<li>FTS-0005 Obsoleted by FTS-5000
|
||||
<li><a href="fts-0006.html">FTS-0006 YOOHOO and YOOHOO/2U2, V.Perriello</a>
|
||||
<li><a href="fts-0007.html">FTS-0007 SEAlink protocol extension, P.Becker</a>
|
||||
<li><a href="fts-0008.html">FTS-0008 Bark file-request protocol extension, P.Becker</a>
|
||||
<li><a href="fts-0009.html">FTS-0009 Message identification and reply linkage, J.Nutt</a>
|
||||
<li><a href="fts-4001.html">FTS-4001 Addressing Control Paragraphs, Goran Eriksson</a>
|
||||
<li><a href="fts-5000.html">FTS-5000 The distribution nodelist, David Hallford</a>
|
||||
<li><a href="fts-5001.html">FTS-5001 Nodelist flags and user flags, David Hallford</a>
|
||||
</ul>
|
||||
|
||||
<HR>
|
||||
|
@ -12,10 +12,10 @@
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<center><img SRC="images/mbse.jpg" BORDER=0></center>
|
||||
<h1>MBSE BBS System Guide v0.33.17</h1>
|
||||
<h1>MBSE BBS System Guide v0.33.18</h1>
|
||||
<HR>
|
||||
|
||||
<h5>Last update 07-Jul-2001</h5><BR><P>
|
||||
<h5>Last update 27-Jul-2001</h5><BR><P>
|
||||
|
||||
|
||||
<h3><a NAME="top"></a>Introduction</h3>
|
||||
|
@ -56,7 +56,7 @@ name of that area and echomail received in that area will automatic be
|
||||
posted to that newsgroup. The command <b>mbfido news</b> will check all
|
||||
configured newsgroups for new newsarticles. If you set it up for the first
|
||||
time you need to run <strong>mbfido news -learn</strong> to fill the dupes
|
||||
database for news with all the already excisting news articles. If you skip
|
||||
database for news with all the already existing news articles. If you skip
|
||||
that, you may get a lot of old articles that will be gated. Just run that
|
||||
command once after you have set this up. Later when you receive fresh articles
|
||||
the command <strong>mbfido news</strong> will only gate new arrived articles.
|
||||
|
@ -11,7 +11,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<h5>Last update 22-jul-2001</h5>
|
||||
<h5>Last update 27-jul-2001</h5>
|
||||
<P> <P>
|
||||
|
||||
<H1>Semafore files with MBSE BBS.</H1>
|
||||
@ -19,7 +19,7 @@
|
||||
The directory $MBSE_ROOT/sema is the hardcoded semafore directory where all
|
||||
semafore's must be created, tested and removed. When the system is booting,
|
||||
the init script will erase all semafore's just before the BBS is started.
|
||||
This description is valid from MBSE BBS v0.33.17 and newer.
|
||||
This description is valid from MBSE BBS v0.33.18 and newer.
|
||||
|
||||
<PRE>
|
||||
zmh Purpose: to mark the state of Zone Mail Hour.
|
||||
@ -40,6 +40,18 @@ newnews Purpose: Signal that there are new articles on the news server.
|
||||
Checked by mbtask to start news processing.
|
||||
Removed by mbtask as soon as it is detected.
|
||||
|
||||
mailout Purpose: Signal that there is mail posted in the message base.
|
||||
Checked by mbtask to start scan the message base.
|
||||
Removed by mbtask as soon as it is detected.
|
||||
|
||||
mailin Purpose: Signal that there is new mail in the inbound.
|
||||
Checked by mbtask to start the tosser.
|
||||
Removed by mbtask as soon as it is detected.
|
||||
|
||||
scanout Purpose: Signal that the outbound must be rescanned.
|
||||
Checked by mbtask to check the outbound.
|
||||
Removed by mbtask as soon as it is detected.
|
||||
|
||||
mbtask.last Purpose: A timestamp created and touched by "mbtask" every
|
||||
minute so you can check it is running.
|
||||
</PRE>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<BLOCKQUOTE>
|
||||
<h5>Last update 21-Jun-2001</h5>
|
||||
<h5>Last update 25-Aug-2001</h5>
|
||||
<P> <P>
|
||||
|
||||
<H1 ALIGN="CENTER">MBSE BBS - Internet Gateway - Postfix setup.</H1>
|
||||
@ -97,7 +97,7 @@ uucp unix - n n - - pipe
|
||||
ifmail unix - n n - 1 pipe
|
||||
flags=F user=fido argv=/usr/local/bin/ifmail -r $nexthop ($recipient)
|
||||
mbmail unix - n n - 1 pipe
|
||||
flags=F user=mbse argv=/opt/mbse/bin/mbmail -r $nexthop ($recipient)
|
||||
flags=F user=mbse argv=/opt/mbse/bin/mbmail ($recipient)
|
||||
bsmtp unix - n n - - pipe
|
||||
flags=F. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
|
||||
</pre>
|
||||
|
@ -119,7 +119,7 @@ the temporary file is removed.
|
||||
|
||||
<H3>Alias file.</H3>
|
||||
<P>
|
||||
If the file /opt/mbse/etc/aliases excists, mbfido will try to fetch ftn-style
|
||||
If the file /opt/mbse/etc/aliases exists, mbfido will try to fetch ftn-style
|
||||
aliases from there.
|
||||
If "from" address of a message from FidoNet matches <b>right</b> side
|
||||
of some entry in alias file, then the Reply-To: header is created
|
||||
@ -217,7 +217,7 @@ day is adviced to catch any missed messages.
|
||||
Scan the newsserver for news articles, and update the news dupes database only.
|
||||
Use this switch if you start using mbfido to gate news articles for the first time.
|
||||
Articles will not be gated with this switch, mbfido will just learn which articles
|
||||
already excist. Normally you only need to use this switch once.
|
||||
already exist. Normally you only need to use this switch once.
|
||||
<P>
|
||||
<code><strong>mbfido</strong> [command] -nodupe</code>
|
||||
Disable checking for duplicate's. Normally you should not use this switch.
|
||||
|
@ -29,7 +29,7 @@ is present on all Linux systems. To use <b>passwd</b> to change the password of
|
||||
another user is only allowed by <b>root</b>. The mbpasswd program overcomes this limitation.
|
||||
The wrapper <b>mbpasswd</b> is run from the bbs by user <b>mbse</b> when an ordinary
|
||||
user is logged in the bbs. The program is called when a new user logs in the bbs or
|
||||
when an excisting user changes his password. His password under Unix is then always the same as his
|
||||
when an existing user changes his password. His password under Unix is then always the same as his
|
||||
password in the bbs program. This is necessary for the user to be able to get
|
||||
his email using the pop3 protocol.<P>
|
||||
You never need to run <strong>mbpasswd</strong> by hand, in fact it is protected so that only
|
||||
|
@ -54,7 +54,7 @@ But before any program is started a number of things are checked:
|
||||
<LI>The UPS semafore <b>upsalarm</b> will be checked. This means that the system is running on
|
||||
battery power and no new jobs are started.
|
||||
<LI>The UPS semafore <b>upsdown</b> will be checked. This is the fatal one, if
|
||||
this one excists <b>mbtask</b> will try to stop all current running jobs.
|
||||
this one exists <b>mbtask</b> will try to stop all current running jobs.
|
||||
If there are no jobs left running then <b>mbtask</b> will stop itself.
|
||||
The upsdown semafore means that the system
|
||||
will shutdown and power off, that's why it's fatal and there is no way back.<br>
|
||||
@ -86,7 +86,7 @@ The checks and actions are:
|
||||
<tr><td>mailout</td><td>Fast</td><td>mbfido</td><td>Max. 1 mbfido task</td><td>mbfido scan web -quiet</td></tr>
|
||||
<tr><td>mailin</td><td>Fast</td><td>mbfido</td><td>Max. 1 mbfido task</td><td>mbfido tic toss web -quiet</td></tr>
|
||||
<tr><td>newnews</td><td>Fast</td><td>mbfido</td><td>Max. 1 mbfido task</td><td>mbfido news web -quiet</td></tr>
|
||||
<tr><td>mbindex</td><td>Fast</td><td>mbindex</td><td>No other tasks</td><td>mbindex -quiet and if excist: goldnode</td></tr>
|
||||
<tr><td>mbindex</td><td>Fast</td><td>mbindex</td><td>No other tasks</td><td>mbindex -quiet and if exist: goldnode</td></tr>
|
||||
<tr><td>msglink</td><td>Fast</td><td>mbfido</td><td>No other tasks</td><td>mbmsg link -quiet</td></tr>
|
||||
<tr><td>reqindex</td><td>Fast</td><td>mbfile</td><td>No other tasks</td><td>mbfile index -quiet</td></tr>
|
||||
<tr><td>scanout</td><td>Slow</td><td>call</td><td>Only 1 call task</td><td>mbcico -r1</td></tr>
|
||||
|
@ -29,7 +29,7 @@ and incoming netmail will be converted to email and send to <strong>listserv</st
|
||||
at your host.<br>
|
||||
If you should want to run some votemanager on your system you can
|
||||
do that by creating a service <b>votemgr</b> with the type set to <b>email</b>.
|
||||
You also need to setup a valid unix user <b>votemgr</b> so that there will be an excisting
|
||||
You also need to setup a valid unix user <b>votemgr</b> so that there will be an existing
|
||||
mailbox. Then with some external scripts you can process all received messages.
|
||||
<P> <P>
|
||||
|
||||
|
@ -34,7 +34,7 @@ they are:
|
||||
not logged out, they will be disconnected anyway.
|
||||
</ol>
|
||||
I know not all UPS software can do this but most UPS software is open source so you can change it to create
|
||||
these semafore's. It is not a problem that UPS semafore's still excist if the systems boots, the MBSE BBS
|
||||
these semafore's. It is not a problem that UPS semafore's still exist if the systems boots, the MBSE BBS
|
||||
startup scripts will remove them before the bbs is started.
|
||||
<P> <P>
|
||||
|
||||
|
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,7 +71,6 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
SUBDIRS = .
|
||||
LIBS =
|
||||
@ -123,9 +123,9 @@ all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps lang/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu lang/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -139,9 +139,6 @@ distclean-noinstPROGRAMS:
|
||||
|
||||
maintainer-clean-noinstPROGRAMS:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
@ -252,6 +249,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = lang
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu lang/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
|
179
lib/Makefile.in
179
lib/Makefile.in
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,7 +71,6 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
SUBDIRS = .
|
||||
|
||||
@ -138,6 +138,20 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/attach.P .deps/batchrd.P .deps/charconv.P \
|
||||
.deps/charconv_hz.P .deps/charconv_jp.P .deps/charconv_utf.P \
|
||||
.deps/charset.P .deps/clcomm.P .deps/client.P .deps/crc.P .deps/dbcfg.P \
|
||||
.deps/dbdupe.P .deps/dbftn.P .deps/dbmsgs.P .deps/dbnode.P \
|
||||
.deps/dbtic.P .deps/dbuser.P .deps/dostran.P .deps/execute.P \
|
||||
.deps/expipe.P .deps/faddr.P .deps/falists.P .deps/ftn.P .deps/ftnmsg.P \
|
||||
.deps/ftscprod.P .deps/getheader.P .deps/gmtoffset.P .deps/hdr.P \
|
||||
.deps/jammsg.P .deps/mbfile.P .deps/memwatch.P .deps/mime.P .deps/msg.P \
|
||||
.deps/msgflags.P .deps/msgtext.P .deps/nntp.P .deps/nodelist.P \
|
||||
.deps/nodelock.P .deps/noderecord.P .deps/packet.P .deps/parsedate.P \
|
||||
.deps/pktname.P .deps/pop3.P .deps/rawio.P .deps/rfcaddr.P \
|
||||
.deps/rfcdate.P .deps/rfcmsg.P .deps/semafore.P .deps/signame.P \
|
||||
.deps/smtp.P .deps/strcasestr.P .deps/strutil.P .deps/term.P \
|
||||
.deps/unpacker.P
|
||||
SOURCES = $(libclcomm_a_SOURCES) $(libcommon_a_SOURCES) $(libdbase_a_SOURCES) $(libmsgbase_a_SOURCES) $(libmbinet_a_SOURCES) $(libmemwatch_a_SOURCES)
|
||||
OBJECTS = $(libclcomm_a_OBJECTS) $(libcommon_a_OBJECTS) $(libdbase_a_OBJECTS) $(libmsgbase_a_OBJECTS) $(libmbinet_a_OBJECTS) $(libmemwatch_a_OBJECTS)
|
||||
|
||||
@ -145,9 +159,9 @@ all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps lib/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -161,9 +175,6 @@ distclean-noinstLIBRARIES:
|
||||
|
||||
maintainer-clean-noinstLIBRARIES:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
@ -304,6 +315,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = lib
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu lib/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
@ -324,101 +340,38 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
attach.o: attach.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h common.h
|
||||
batchrd.o: batchrd.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
common.h
|
||||
charconv.o: charconv.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
common.h clcomm.h
|
||||
charconv_hz.o: charconv_hz.c libs.h ../config.h memwatch.h structs.h \
|
||||
common.h clcomm.h
|
||||
charconv_jp.o: charconv_jp.c libs.h ../config.h memwatch.h structs.h \
|
||||
common.h
|
||||
charconv_utf.o: charconv_utf.c libs.h ../config.h memwatch.h structs.h \
|
||||
common.h
|
||||
charset.o: charset.c libs.h ../config.h memwatch.h structs.h common.h \
|
||||
clcomm.h
|
||||
clcomm.o: clcomm.c libs.h ../config.h memwatch.h clcomm.h
|
||||
client.o: client.c libs.h ../config.h memwatch.h clcomm.h
|
||||
crc.o: crc.c libs.h ../config.h memwatch.h clcomm.h
|
||||
dbcfg.o: dbcfg.c libs.h ../config.h memwatch.h mbse.h structs.h \
|
||||
records.h dbcfg.h
|
||||
dbdupe.o: dbdupe.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
dbdupe.h
|
||||
dbftn.o: dbftn.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
dbcfg.h dbftn.h
|
||||
dbmsgs.o: dbmsgs.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h dbcfg.h dbmsgs.h
|
||||
dbnode.o: dbnode.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h dbcfg.h dbnode.h
|
||||
dbtic.o: dbtic.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h dbcfg.h dbtic.h
|
||||
dbuser.o: dbuser.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
dbcfg.h dbuser.h
|
||||
dostran.o: dostran.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
common.h
|
||||
execute.o: execute.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
common.h
|
||||
expipe.o: expipe.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h common.h
|
||||
faddr.o: faddr.c libs.h ../config.h memwatch.h structs.h common.h
|
||||
falists.o: falists.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
common.h
|
||||
ftn.o: ftn.c libs.h ../config.h memwatch.h structs.h records.h clcomm.h \
|
||||
dbftn.h common.h
|
||||
ftnmsg.o: ftnmsg.c libs.h ../config.h memwatch.h structs.h common.h \
|
||||
clcomm.h
|
||||
ftscprod.o: ftscprod.c libs.h ../config.h memwatch.h structs.h common.h
|
||||
getheader.o: getheader.c libs.h ../config.h memwatch.h structs.h \
|
||||
records.h clcomm.h common.h
|
||||
gmtoffset.o: gmtoffset.c libs.h ../config.h memwatch.h structs.h \
|
||||
common.h
|
||||
hdr.o: hdr.c libs.h ../config.h memwatch.h structs.h common.h
|
||||
jammsg.o: jammsg.c libs.h ../config.h memwatch.h clcomm.h msgtext.h \
|
||||
msg.h jam.h jamsys.h jammsg.h
|
||||
mbfile.o: mbfile.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
common.h
|
||||
memwatch.o: memwatch.c ../config.h libs.h memwatch.h memwatch.h
|
||||
mime.o: mime.c libs.h ../config.h memwatch.h structs.h clcomm.h common.h
|
||||
msg.o: msg.c libs.h ../config.h memwatch.h msgtext.h msg.h jammsg.h
|
||||
msgflags.o: msgflags.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
common.h
|
||||
msgtext.o: msgtext.c libs.h ../config.h memwatch.h msgtext.h msg.h
|
||||
nntp.o: nntp.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h mbinet.h
|
||||
nodelist.o: nodelist.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h common.h
|
||||
nodelock.o: nodelock.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
common.h
|
||||
noderecord.o: noderecord.c libs.h ../config.h memwatch.h structs.h \
|
||||
records.h dbnode.h common.h
|
||||
packet.o: packet.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h common.h dbnode.h
|
||||
parsedate.o: parsedate.c libs.h ../config.h memwatch.h structs.h \
|
||||
common.h
|
||||
pktname.o: pktname.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h common.h
|
||||
pop3.o: pop3.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h mbinet.h
|
||||
rawio.o: rawio.c libs.h ../config.h memwatch.h structs.h common.h
|
||||
rfcaddr.o: rfcaddr.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h common.h
|
||||
rfcdate.o: rfcdate.c libs.h ../config.h memwatch.h structs.h common.h \
|
||||
clcomm.h
|
||||
rfcmsg.o: rfcmsg.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
common.h clcomm.h
|
||||
semafore.o: semafore.c libs.h ../config.h memwatch.h structs.h clcomm.h \
|
||||
common.h
|
||||
signame.o: signame.c libs.h ../config.h memwatch.h clcomm.h
|
||||
smtp.o: smtp.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h mbinet.h
|
||||
strcasestr.o: strcasestr.c libs.h ../config.h memwatch.h
|
||||
strutil.o: strutil.c libs.h ../config.h memwatch.h structs.h common.h
|
||||
term.o: term.c libs.h ../config.h memwatch.h structs.h ansi.h records.h \
|
||||
common.h
|
||||
unpacker.o: unpacker.c libs.h ../config.h memwatch.h structs.h records.h \
|
||||
clcomm.h common.h
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
@ -457,23 +410,25 @@ distclean-generic:
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-noinstLIBRARIES distclean-compile \
|
||||
distclean-tags distclean-generic clean-am
|
||||
distclean-tags distclean-depend distclean-generic \
|
||||
clean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
@ -488,12 +443,14 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
ftscprod.c: ftscprod.???
|
||||
|
@ -352,7 +352,7 @@ extern char SigName[32][16];
|
||||
|
||||
|
||||
int ttyfd; /* Filedescriptor for raw mode */
|
||||
struct termio tbuf, tbufsav; /* Structure for raw mode */
|
||||
struct termios tbufs, tbufsavs; /* Structure for raw mode */
|
||||
|
||||
|
||||
|
||||
@ -399,7 +399,7 @@ fidoaddr str2aka(char *addr);
|
||||
* From falists.c
|
||||
*/
|
||||
void tidy_falist(fa_list **);
|
||||
void fill_list(fa_list **,char *,fa_list **, int);
|
||||
void fill_list(fa_list **,char *,fa_list **);
|
||||
void fill_path(fa_list **,char *);
|
||||
void sort_list(fa_list **);
|
||||
void uniq_list(fa_list **);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: falists.c
|
||||
* Purpose ...............: SEEN-BY and PATH lists
|
||||
* Last modification date : 25-Mar-2001
|
||||
* Last modification date : 31-Jul-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -76,7 +76,7 @@ int in_list(faddr *addr, fa_list **fap, int fourd)
|
||||
|
||||
|
||||
|
||||
void fill_list(fa_list **fap, char *str, fa_list **omit, int force)
|
||||
void fill_list(fa_list **fap, char *str, fa_list **omit)
|
||||
{
|
||||
fa_list *tmp;
|
||||
faddr *ta;
|
||||
@ -109,7 +109,6 @@ void fill_list(fa_list **fap, char *str, fa_list **omit, int force)
|
||||
tmp = (fa_list *)malloc(sizeof(fa_list));
|
||||
tmp->next = *fap;
|
||||
tmp->addr = ta;
|
||||
tmp->force = force;
|
||||
*fap = tmp;
|
||||
}
|
||||
}
|
||||
|
30
lib/jammsg.c
30
lib/jammsg.c
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: jammsg.c
|
||||
* Purpose ...............: JAM message base functions
|
||||
* Last modification date : 23-Jun-2001
|
||||
* Last modification date : 03-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
*
|
||||
@ -363,8 +363,6 @@ unsigned long JAM_Highest(void)
|
||||
|
||||
int JAM_Lock(unsigned long ulTimeout)
|
||||
{
|
||||
// char *File;
|
||||
// int fd = -1, Tries = 0;
|
||||
int Tries = 0;
|
||||
struct flock fl;
|
||||
|
||||
@ -383,23 +381,6 @@ int JAM_Lock(unsigned long ulTimeout)
|
||||
usleep(250000);
|
||||
Syslog('m', "JAM messagebase lock attempt %d", Tries);
|
||||
}
|
||||
|
||||
// File = calloc(PATH_MAX, sizeof(char));
|
||||
// sprintf(File, "%s%s", BaseName, ".LCK");
|
||||
|
||||
// while ((fd = creat(File, 0)) == -1 && errno == EACCES) {
|
||||
// if (++Tries >= ulTimeout) {
|
||||
// free(File);
|
||||
// return FALSE;
|
||||
// }
|
||||
// sleep(1);
|
||||
// }
|
||||
// free(File);
|
||||
|
||||
// if (fd == -1)
|
||||
// return FALSE;
|
||||
|
||||
// close(fd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1301,15 +1282,6 @@ void JAM_UnLock(void)
|
||||
if (fcntl(fdHdr, F_SETLK, &fl)) {
|
||||
WriteError("$Can't unlock JAM message base");
|
||||
}
|
||||
|
||||
// char *File;
|
||||
|
||||
// File = calloc(PATH_MAX, sizeof(char));
|
||||
// sprintf(File, "%s%s", BaseName, ".LCK");
|
||||
|
||||
// if (unlink(File) == -1)
|
||||
// WriteError("jammsg: unlock error");
|
||||
// free(File);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: libs.h
|
||||
* Purpose ...............: Libraries include list
|
||||
* Last modification date : 23-May-2001
|
||||
* Last modification date : 05-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -55,7 +55,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <termio.h>
|
||||
#include <termios.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <dirent.h>
|
||||
@ -63,9 +63,13 @@
|
||||
#include <stdarg.h>
|
||||
#include <pwd.h>
|
||||
#include <netdb.h>
|
||||
#ifdef SHADOW_PASSWORD
|
||||
#include <shadow.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef HAVE_SYS_VFS_H
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/utsname.h>
|
||||
|
14
lib/mbfile.c
14
lib/mbfile.c
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfile
|
||||
* Purpose ...............: Basic File I/O
|
||||
* Last modification date : 05-Jul-2001
|
||||
* Last modification date : 12-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -255,14 +255,22 @@ int mkdirs(char *name)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Check free diskspace on most filesystems. Exclude check on floppyies,
|
||||
* CD's and /boot partition. The amount of needed space is given in MBytes.
|
||||
* Currently only Linux is supported.
|
||||
*/
|
||||
int diskfree(int needed)
|
||||
{
|
||||
#ifdef __linux__
|
||||
char *mtab, *dev, *fs, *type;
|
||||
FILE *fp;
|
||||
struct statfs sfs;
|
||||
int RetVal = TRUE;
|
||||
unsigned long temp;
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
if (! needed)
|
||||
return TRUE;
|
||||
|
||||
@ -283,6 +291,7 @@ int diskfree(int needed)
|
||||
*/
|
||||
if (strncmp((char *)"/dev/fd", dev, 7) && strncmp((char *)"/boot", fs, 5) &&
|
||||
(!strncmp((char *)"ext2", type, 4) || !strncmp((char *)"reiserfs", type, 8) ||
|
||||
!strncmp((char *)"ufs", type, 3) ||
|
||||
!strncmp((char *)"vfat", type, 4) || !strncmp((char *)"msdos", type, 5))) {
|
||||
if (statfs(fs, &sfs) == 0) {
|
||||
temp = (unsigned long)(sfs.f_bsize / 512L);
|
||||
@ -299,6 +308,9 @@ int diskfree(int needed)
|
||||
free(mtab);
|
||||
|
||||
return RetVal;
|
||||
#else /* ifdef __linux__ */
|
||||
return TRUE; /* Assume enough */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1414,10 +1414,10 @@ int GetTimeInfo(TIMEINFO *Now)
|
||||
#if defined(HAVE_GETTIMEOFDAY)
|
||||
struct timeval tv;
|
||||
#endif /* defined(HAVE_GETTIMEOFDAY) */
|
||||
#if !defined(HAVE_TM_GMTOFF)
|
||||
#if !defined(HAVE_TM_ZONE)
|
||||
struct tm local;
|
||||
struct tm gmt;
|
||||
#endif /* !defined(HAVE_TM_GMTOFF) */
|
||||
#endif /* !defined(HAVE_TM_ZONE) */
|
||||
|
||||
/* Get the basic time. */
|
||||
#if defined(HAVE_GETTIMEOFDAY)
|
||||
@ -1436,7 +1436,7 @@ int GetTimeInfo(TIMEINFO *Now)
|
||||
if ((tm = localtime(&Now->time)) == NULL)
|
||||
return -1;
|
||||
secondsUntilNextHour = 60 * (60 - tm->tm_min) - tm->tm_sec;
|
||||
#if !defined(HAVE_TM_GMTOFF)
|
||||
#if !defined(HAVE_TM_ZONE)
|
||||
/* To get the timezone, compare localtime with GMT. */
|
||||
local = *tm;
|
||||
if ((tm = gmtime(&Now->time)) == NULL)
|
||||
@ -1458,7 +1458,7 @@ int GetTimeInfo(TIMEINFO *Now)
|
||||
LastTzone += gmt.tm_min - local.tm_min;
|
||||
#else
|
||||
LastTzone = (0 - tm->tm_gmtoff) / 60;
|
||||
#endif /* defined(HAVE_TM_GMTOFF) */
|
||||
#endif /* defined(HAVE_TM_ZONE) */
|
||||
NextHour = Now->time + secondsUntilNextHour;
|
||||
}
|
||||
Now->tzone = LastTzone;
|
||||
@ -1739,7 +1739,7 @@ time_t parsedate(char *p, TIMEINFO *now)
|
||||
yyYear = tm->tm_year + 1900;
|
||||
yyMonth = tm->tm_mon + 1;
|
||||
yyDay = tm->tm_mday;
|
||||
#ifdef HAVE_TM_GMTOFF
|
||||
#ifdef HAVE_TM_ZONE
|
||||
yyTimezone = tm->tm_gmtoff/60;
|
||||
#else
|
||||
yyTimezone = timezone/60;
|
||||
|
69
lib/rawio.c
69
lib/rawio.c
@ -2,10 +2,10 @@
|
||||
*
|
||||
* File ..................: rawio.c
|
||||
* Purpose ...............: Raw I/O routines.
|
||||
* Last modification date : 18-Dec-1999
|
||||
* Last modification date : 07-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-1999
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -42,26 +42,39 @@ int rawset = FALSE;
|
||||
*/
|
||||
void Setraw()
|
||||
{
|
||||
if (ioctl(ttyfd, TCGETA, &tbuf) == -1) {
|
||||
perror("TCGETA Failed");
|
||||
exit(1); /* ERROR - could not set get tty ioctl */
|
||||
int rc;
|
||||
|
||||
// if (ioctl(ttyfd, TCGETA, &tbuf) == -1) {
|
||||
// perror("TCGETA Failed");
|
||||
// exit(1); /* ERROR - could not set get tty ioctl */
|
||||
// }
|
||||
if ((rc = tcgetattr(ttyfd, &tbufs))) {
|
||||
perror("");
|
||||
printf("$tcgetattr(0, save) return %d\n", rc);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
tbufsav = tbuf;
|
||||
tbuf.c_iflag &= ~(INLCR | ICRNL | IUCLC | ISTRIP | IXON );
|
||||
tbufsavs = tbufs;
|
||||
tbufs.c_iflag &= ~(INLCR | ICRNL | ISTRIP | IXON ); /* IUCLC removed for FreeBSD */
|
||||
/*
|
||||
* Map CRNL modes strip control characters and flow control
|
||||
*/
|
||||
tbuf.c_oflag &= ~OPOST; /* Don't do ouput character translation */
|
||||
tbuf.c_lflag &= ~(ICANON | ECHO); /* No canonical input and no echo */
|
||||
tbuf.c_cc[VMIN] = 1; /* Receive 1 character at a time */
|
||||
tbuf.c_cc[VTIME] = 0; /* No time limit per character */
|
||||
tbufs.c_oflag &= ~OPOST; /* Don't do ouput character translation */
|
||||
tbufs.c_lflag &= ~(ICANON | ECHO); /* No canonical input and no echo */
|
||||
tbufs.c_cc[VMIN] = 1; /* Receive 1 character at a time */
|
||||
tbufs.c_cc[VTIME] = 0; /* No time limit per character */
|
||||
|
||||
if (ioctl(ttyfd, TCSETAF, &tbuf) == -1) {
|
||||
perror("TCSETAF failed");
|
||||
exit(1); /* ERROR - could not set tty ioctl */
|
||||
if ((rc = tcsetattr(ttyfd, TCSADRAIN, &tbufs))) {
|
||||
perror("");
|
||||
printf("$tcsetattr(%d, TCSADRAIN, raw) return %d\n", ttyfd, rc);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// if (ioctl(ttyfd, TCSETAF, &tbuf) == -1) {
|
||||
// perror("TCSETAF failed");
|
||||
// exit(1); /* ERROR - could not set tty ioctl */
|
||||
// }
|
||||
|
||||
rawset = TRUE;
|
||||
}
|
||||
|
||||
@ -72,13 +85,20 @@ void Setraw()
|
||||
*/
|
||||
void Unsetraw()
|
||||
{
|
||||
int rc;
|
||||
|
||||
/*
|
||||
* Only unset the mode if it is set to raw mode
|
||||
*/
|
||||
if (rawset == TRUE) {
|
||||
if (ioctl(ttyfd, TCSETAF, &tbufsav) == -1) {
|
||||
perror("TCSETAF Normal Failed");
|
||||
exit(1); /* ERROR - could not save original tty ioctl */
|
||||
// if (ioctl(ttyfd, TCSETAF, &tbufsav) == -1) {
|
||||
// perror("TCSETAF Normal Failed");
|
||||
// exit(1); /* ERROR - could not save original tty ioctl */
|
||||
// }
|
||||
if ((rc = tcsetattr(ttyfd, TCSAFLUSH, &tbufsavs))) {
|
||||
perror("");
|
||||
printf("$tcsetattr(%d, TCSAFLUSH, save) return %d\n", ttyfd, rc);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
rawset = FALSE;
|
||||
@ -114,14 +134,17 @@ unsigned char Getone()
|
||||
*/
|
||||
int Speed(void)
|
||||
{
|
||||
int mspeed;
|
||||
struct termio ttyhold;
|
||||
// int mspeed;
|
||||
// struct termio ttyhold;
|
||||
speed_t mspeed;
|
||||
|
||||
static int baud[16] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400};
|
||||
// static int baud[16] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400};
|
||||
|
||||
ioctl(0, TCGETA, &ttyhold);
|
||||
mspeed = baud[ttyhold.c_cflag & 017];
|
||||
ioctl(0, TCSETAF, &ttyhold);
|
||||
// ioctl(0, TCGETA, &ttyhold);
|
||||
// mspeed = baud[ttyhold.c_cflag & 017];
|
||||
// ioctl(0, TCSETAF, &ttyhold);
|
||||
|
||||
mspeed = cfgetospeed(&tbufs);
|
||||
|
||||
return(mspeed);
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a \
|
||||
../lib/libmsgbase.a ../lib/libdbase.a
|
||||
|
||||
install-exec-local:
|
||||
$(mkinstalldirs) $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 4751 mbcico $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbout $(bindir)
|
||||
|
||||
|
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,7 +71,6 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
EXTRA_DIST = README
|
||||
SUBDIRS = .
|
||||
@ -121,6 +121,17 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/answer.P .deps/atoul.P .deps/binkp.P .deps/call.P \
|
||||
.deps/callall.P .deps/callstat.P .deps/chat.P .deps/dial.P \
|
||||
.deps/dietifna.P .deps/emsi.P .deps/emsidat.P .deps/filelist.P \
|
||||
.deps/filetime.P .deps/ftsc.P .deps/hydra.P .deps/lutil.P \
|
||||
.deps/m7recv.P .deps/m7send.P .deps/mbcico.P .deps/mbout.P \
|
||||
.deps/nlinfo.P .deps/openfile.P .deps/openport.P .deps/opentcp.P \
|
||||
.deps/outstat.P .deps/portsel.P .deps/rdoptions.P .deps/recvbark.P \
|
||||
.deps/respfreq.P .deps/scanout.P .deps/sendbark.P .deps/session.P \
|
||||
.deps/tcp.P .deps/tcpproto.P .deps/ttyio.P .deps/ulock.P .deps/wazoo.P \
|
||||
.deps/xmrecv.P .deps/xmsend.P .deps/yoohoo.P .deps/zmmisc.P \
|
||||
.deps/zmrecv.P .deps/zmrle.P .deps/zmsend.P
|
||||
SOURCES = $(mbcico_SOURCES) $(mbout_SOURCES)
|
||||
OBJECTS = $(mbcico_OBJECTS) $(mbout_OBJECTS)
|
||||
|
||||
@ -128,9 +139,9 @@ all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mbcico/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu mbcico/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -144,9 +155,6 @@ distclean-noinstPROGRAMS:
|
||||
|
||||
maintainer-clean-noinstPROGRAMS:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
@ -265,6 +273,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = mbcico
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu mbcico/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
@ -285,170 +298,38 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
answer.o: answer.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h lutil.h \
|
||||
session.h config.h answer.h openport.h portsel.h dial.h \
|
||||
rdoptions.h mbcico.h
|
||||
atoul.o: atoul.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h atoul.h
|
||||
binkp.o: binkp.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/dbnode.h ../lib/clcomm.h ttyio.h \
|
||||
session.h statetbl.h config.h emsi.h openfile.h respfreq.h \
|
||||
filelist.h opentcp.h rdoptions.h lutil.h binkp.h
|
||||
call.o: call.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h ../lib/dbnode.h session.h callstat.h call.h \
|
||||
config.h dial.h lutil.h portsel.h openport.h opentcp.h \
|
||||
rdoptions.h
|
||||
callall.o: callall.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
config.h ../lib/clcomm.h scanout.h lutil.h callstat.h callall.h
|
||||
callstat.o: callstat.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/clcomm.h ../lib/common.h callstat.h
|
||||
chat.o: chat.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h config.h portsel.h chat.h ttyio.h
|
||||
dial.o: dial.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h ../lib/dbnode.h portsel.h config.h chat.h \
|
||||
ttyio.h session.h dial.h
|
||||
dietifna.o: dietifna.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ttyio.h session.h emsi.h dietifna.h respfreq.h \
|
||||
filelist.h xmrecv.h xmsend.h
|
||||
emsi.o: emsi.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/dbnode.h ../lib/clcomm.h ttyio.h session.h statetbl.h \
|
||||
config.h emsi.h emsidat.h hydra.h rdoptions.h tcp.h wazoo.h
|
||||
emsidat.o: emsidat.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h emsi.h \
|
||||
session.h lutil.h config.h emsidat.h filetime.h
|
||||
filelist.o: filelist.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/clcomm.h ../lib/common.h config.h session.h filelist.h
|
||||
filetime.o: filetime.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h filetime.h
|
||||
ftsc.o: ftsc.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h session.h ttyio.h statetbl.h config.h ftsc.h \
|
||||
rdoptions.h recvbark.h filelist.h sendbark.h respfreq.h \
|
||||
xmrecv.h xmsend.h
|
||||
hydra.o: hydra.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h session.h filelist.h filetime.h ttyio.h \
|
||||
statetbl.h config.h emsi.h openfile.h lutil.h respfreq.h \
|
||||
mbcico.h hydra.h
|
||||
lutil.o: lutil.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h lutil.h
|
||||
m7recv.o: m7recv.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h statetbl.h ttyio.h m7recv.h
|
||||
m7send.o: m7send.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h statetbl.h ttyio.h m7send.h
|
||||
mbcico.o: mbcico.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbnode.h \
|
||||
../lib/dbftn.h config.h answer.h portsel.h call.h callall.h \
|
||||
lutil.h mbcico.h session.h
|
||||
mbout.o: mbout.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbnode.h \
|
||||
../lib/dbftn.h outstat.h nlinfo.h
|
||||
nlinfo.o: nlinfo.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h nlinfo.h
|
||||
openfile.o: openfile.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/clcomm.h \
|
||||
../lib/common.h config.h lutil.h openfile.h
|
||||
openport.o: openport.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ulock.h ttyio.h openport.h
|
||||
opentcp.o: opentcp.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h session.h \
|
||||
ttyio.h openport.h opentcp.h
|
||||
outstat.o: outstat.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbnode.h \
|
||||
../lib/dbftn.h scanout.h callstat.h outstat.h
|
||||
portsel.o: portsel.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h portsel.h
|
||||
rdoptions.o: rdoptions.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h portsel.h \
|
||||
session.h config.h
|
||||
recvbark.o: recvbark.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ttyio.h session.h statetbl.h recvbark.h \
|
||||
respfreq.h filelist.h
|
||||
respfreq.o: respfreq.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h session.h lutil.h config.h \
|
||||
atoul.h respfreq.h filelist.h
|
||||
scanout.o: scanout.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbftn.h config.h \
|
||||
scanout.h lutil.h
|
||||
sendbark.o: sendbark.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ttyio.h session.h statetbl.h sendbark.h \
|
||||
xmrecv.h
|
||||
session.o: session.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ttyio.h statetbl.h emsi.h \
|
||||
ftsc.h session.h yoohoo.h mbcico.h binkp.h callstat.h
|
||||
tcp.o: tcp.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/structs.h ../lib/common.h ../lib/clcomm.h ttyio.h \
|
||||
session.h statetbl.h config.h emsi.h respfreq.h filelist.h \
|
||||
tcpproto.h tcp.h
|
||||
tcpproto.o: tcpproto.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ttyio.h session.h config.h emsi.h lutil.h \
|
||||
openfile.h filelist.h tcpproto.h
|
||||
ttyio.o: ttyio.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ttyio.h lutil.h
|
||||
ulock.o: ulock.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/clcomm.h
|
||||
wazoo.o: wazoo.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ttyio.h session.h statetbl.h config.h emsi.h \
|
||||
respfreq.h filelist.h wazoo.h zmodem.h
|
||||
xmrecv.o: xmrecv.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h session.h ttyio.h statetbl.h config.h lutil.h \
|
||||
openfile.h m7recv.h xmrecv.h filetime.h
|
||||
xmsend.o: xmsend.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h session.h ttyio.h statetbl.h xmsend.h m7send.h \
|
||||
filelist.h filetime.h
|
||||
yoohoo.o: yoohoo.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/clcomm.h ../lib/common.h ../lib/dbnode.h statetbl.h \
|
||||
ttyio.h session.h config.h emsi.h hydra.h rdoptions.h wazoo.h \
|
||||
dietifna.h yoohoo.h
|
||||
zmmisc.o: zmmisc.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ttyio.h session.h zmodem.h
|
||||
zmrecv.o: zmrecv.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/clcomm.h \
|
||||
../lib/common.h lutil.h ttyio.h session.h zmodem.h config.h \
|
||||
emsi.h openfile.h openport.h
|
||||
zmrle.o: zmrle.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/clcomm.h \
|
||||
../lib/common.h ttyio.h session.h zmodem.h
|
||||
zmsend.o: zmsend.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ttyio.h session.h zmodem.h lutil.h emsi.h \
|
||||
filelist.h
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
@ -486,23 +367,24 @@ distclean-generic:
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-generic clean-am
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
@ -517,17 +399,17 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck \
|
||||
install-exec-local install-exec-am install-exec install-data-am \
|
||||
install-data install-am install uninstall-am uninstall all-redirect \
|
||||
all-am all installdirs-am installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-local install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
install-exec-local:
|
||||
$(mkinstalldirs) $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 4751 mbcico $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbout $(bindir)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ....................: mbcico/binkp.c
|
||||
* Purpose .................: Fidonet binkd protocol
|
||||
* Last modification date ..: 07-Jul-2001
|
||||
* Last modification date ..: 07-Aug-2001
|
||||
* Binkp protocol copyright : Dima Maloff.
|
||||
*
|
||||
*****************************************************************************
|
||||
@ -823,7 +823,8 @@ int binkp_batch(file_list *to_send)
|
||||
char *rname, *lname;
|
||||
long rsize, roffs, lsize;
|
||||
time_t rtime, ltime;
|
||||
long rxbytes, written;
|
||||
off_t rxbytes;
|
||||
long written;
|
||||
binkp_list *bll = NULL, *tmp, *cursend = NULL;
|
||||
file_list *tsl;
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
*
|
||||
* File ..................: mbcico/callstat.c
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 13-Aug-2000
|
||||
* Last modification date : 05-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -73,7 +73,7 @@ void putstatus(faddr *addr, int incr, int sts)
|
||||
fwrite(cst, sizeof(callstat), 1, fp);
|
||||
fclose(fp);
|
||||
if (cst->tryno >= 30)
|
||||
WriteError("Node %s is marked undialble.", ascfnode(addr, 0x1f));
|
||||
WriteError("Node %s is marked undialable.", ascfnode(addr, 0x1f));
|
||||
} else {
|
||||
WriteError("$Cannot create status file for node %s", ascfnode(addr,0x1f));
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
*
|
||||
* File ..................: mbcico/filelist.c
|
||||
* Purpose ...............: fidonet mailer
|
||||
* Last modification date : 23-Dec-2000
|
||||
* Last modification date : 07-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -463,7 +463,13 @@ void execute_disposition(file_list *fl)
|
||||
WriteError("$Error writing '~' to .flo at %lu", (unsigned long)fl->floff);
|
||||
}
|
||||
fflush(fl->flofp);
|
||||
#ifdef HAVE_FDATASYNC
|
||||
fdatasync(fileno(fl->flofp));
|
||||
#else
|
||||
#ifdef HAVE_FSYNC
|
||||
fsync(fileno(fl->flofp));
|
||||
#endif
|
||||
#endif
|
||||
} else
|
||||
WriteError("$error seeking in .flo to %lu", (unsigned long)fl->floff);
|
||||
}
|
||||
|
@ -2,11 +2,11 @@
|
||||
*
|
||||
* File ..................: mbcico/hydra.c
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 30-Dec-2000
|
||||
* Last modification date : 07-Aug-2001
|
||||
* Remark ................: See below for more copyright details and credits.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -530,7 +530,8 @@ int hydra_batch(int role, file_list *to_send)
|
||||
char *inbuf, *outbuf;
|
||||
int rxlen, txlen; /* length of receive/transmit buffer */
|
||||
long txwindow, rxwindow; /* window sizes */
|
||||
long txpos, rxpos; /* file positions */
|
||||
long txpos;
|
||||
off_t rxpos; /* file positions */
|
||||
long stxpos, srxpos;
|
||||
long longnum;
|
||||
int hdxlink = FALSE;
|
||||
@ -865,7 +866,7 @@ int hydra_batch(int role, file_list *to_send)
|
||||
if (to_send) {
|
||||
txlen = sprintf(txbuf, "%08lx%08lx%08lx%08lx%08lx",
|
||||
mtime2sl(txstat.st_mtime+(txstat.st_mtime%2)),
|
||||
txstat.st_size, 0UL, 0UL, 0UL);
|
||||
(long)(txstat.st_size), 0UL, 0UL, 0UL);
|
||||
|
||||
/*
|
||||
* convert file name to DOS-format
|
||||
|
@ -2,10 +2,10 @@
|
||||
*
|
||||
* File ..................: mbcico/openport.c
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 23-Dec-2000
|
||||
* Last modification date : 07-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -115,12 +115,6 @@ int openport(char *port, int speed)
|
||||
fflush(stderr);
|
||||
close(2);
|
||||
}
|
||||
|
||||
// if (setpgrp() < 0) {
|
||||
// WriteError("$openport: setpgrp failed");
|
||||
// ulock(pname);
|
||||
// return 1;
|
||||
// }
|
||||
}
|
||||
tty_status = 0;
|
||||
hanged_up = 0;
|
||||
@ -282,14 +276,15 @@ void sendbrk(void)
|
||||
}
|
||||
|
||||
|
||||
static struct termios savetios;
|
||||
static struct termios tios;
|
||||
|
||||
|
||||
char *bstr(speed_t);
|
||||
char *bstr(speed_t sp)
|
||||
{
|
||||
#ifdef CBAUD
|
||||
switch(sp & CBAUD) {
|
||||
#else
|
||||
switch(sp) {
|
||||
#endif
|
||||
case 0: return (char *)"0";
|
||||
#if defined(B50)
|
||||
case B50: return (char *)"50";
|
||||
@ -387,6 +382,9 @@ char *bstr(speed_t sp)
|
||||
|
||||
|
||||
|
||||
static struct termios savetios;
|
||||
static struct termios tios;
|
||||
|
||||
|
||||
int tty_raw(int speed)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbcico/respfreq.c
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 07-Feb-2001
|
||||
* Last modification date : 08-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -269,6 +269,7 @@ file_list *respfreq(char *nm, char *pw, char *dt)
|
||||
Area = 0L;
|
||||
free(p);
|
||||
|
||||
Syslog('f', "Start search ...");
|
||||
while (!no_more && (fread(&idx, sizeof(idx), 1, fi) == 1)) {
|
||||
if (re_exec(idx.Name) || re_exec(idx.LName)) {
|
||||
Syslog('f', "Index found %s area %d record %d", idx.LName, idx.AreaNum, idx.Record);
|
||||
|
@ -2,10 +2,10 @@
|
||||
*
|
||||
* File ..................: mbcico/tcpproto.c
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 24-Dec-2000
|
||||
* Last modification date : 07-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -55,9 +55,10 @@ static FILE *in;
|
||||
static char txbuf[2048];
|
||||
static char rxbuf[2048];
|
||||
static int rx_type;
|
||||
static long startime,endtime,rxbytes,sbytes;
|
||||
static long startime,endtime,sbytes;
|
||||
static off_t rxbytes;
|
||||
|
||||
static int sendfile(char *,char *);
|
||||
static int sendtfile(char *,char *);
|
||||
static int finsend(void);
|
||||
static int receivefile(char *,time_t,off_t);
|
||||
static int resync(off_t);
|
||||
@ -85,7 +86,7 @@ int tcpsndfiles(file_list *lst)
|
||||
|
||||
for (tmpf = lst; tmpf && (maxrc == 0); tmpf = tmpf->next) {
|
||||
if (tmpf->remote) {
|
||||
rc = sendfile(tmpf->local,tmpf->remote);
|
||||
rc = sendtfile(tmpf->local,tmpf->remote);
|
||||
rc = abs(rc);
|
||||
if (rc > maxrc)
|
||||
maxrc=rc;
|
||||
@ -158,7 +159,7 @@ next:
|
||||
|
||||
|
||||
|
||||
static int sendfile(char *ln, char *rn)
|
||||
static int sendtfile(char *ln, char *rn)
|
||||
{
|
||||
int rc=0;
|
||||
struct stat st;
|
||||
|
@ -2,10 +2,10 @@
|
||||
*
|
||||
* File ..................: mbcico/zmrecv.c
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 27-Nov-2000
|
||||
* Last modification date : 10-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -514,7 +514,7 @@ int procheader(char *Name)
|
||||
strcpy(ctt,date(Modtime));
|
||||
Syslog('+', "Zmodem: \"%s\" %ld bytes, %s mode %o", Name, Bytesleft, ctt, Filemode);
|
||||
|
||||
fout = openfile(Name,Modtime,Bytesleft,&rxbytes,resync);
|
||||
fout = openfile(Name,Modtime,Bytesleft,&(long)(rxbytes),resync);
|
||||
(void)time(&startime);
|
||||
sbytes = rxbytes;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbcico/zmsend.c
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 07-Feb-2001
|
||||
* Last modification date : 07-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -41,7 +41,7 @@
|
||||
#include "filelist.h"
|
||||
|
||||
static int initsend(void);
|
||||
static int sendfile(char*,char*);
|
||||
static int sendzfile(char*,char*);
|
||||
static int finsend(void);
|
||||
|
||||
static int getzrxinit(void);
|
||||
@ -102,7 +102,7 @@ int zmsndfiles(file_list *lst)
|
||||
|
||||
for (tmpf = lst; tmpf && (maxrc < 2); tmpf = tmpf->next) {
|
||||
if (tmpf->remote) {
|
||||
rc = sendfile(tmpf->local, tmpf->remote);
|
||||
rc = sendzfile(tmpf->local, tmpf->remote);
|
||||
rc = abs(rc);
|
||||
if (rc > maxrc)
|
||||
maxrc = rc;
|
||||
@ -171,7 +171,7 @@ static int finsend(void)
|
||||
|
||||
|
||||
|
||||
static int sendfile(char *ln, char *rn)
|
||||
static int sendzfile(char *ln, char *rn)
|
||||
{
|
||||
int rc=0;
|
||||
struct stat st;
|
||||
|
@ -4,29 +4,22 @@ SUBDIRS = .
|
||||
|
||||
EXTRA_DIST = maptabs.tgz paths.h.in README
|
||||
|
||||
noinst_PROGRAMS = mbfido mbmail mbseq mbaff mbindex mbdiff mbfile mbmsg
|
||||
noinst_PROGRAMS = mbfido mbseq mbaff mbindex mbdiff mbfile mbmsg
|
||||
|
||||
mbfido_SOURCES = flock.c tosspkt.c mbfido.c hatch.c maketags.c \
|
||||
importmsg.c echoout.c tracker.c makestat.c scannews.c lhash.c \
|
||||
tracker.c makestat.c scannews.c lhash.c \
|
||||
pack.c ulock.c tic.c ptic.c utic.c mover.c hash.c mkftnhdr.c \
|
||||
addbbs.c magic.c fsort.c toberep.c mkrfcmsg.c atoul.c ping.c \
|
||||
cookie.c forward.c sendmail.c scan.c addpkt.c importnet.c \
|
||||
areamgr.c filemgr.c notify.c mgrutil.c rollover.c bwrite.c \
|
||||
rnews.c newspost.c aliasdb.c postemail.c postnetmail.c backalias.c \
|
||||
addbbs.c magic.c fsort.c toberep.c ftn2rfc.c atoul.c ping.c \
|
||||
cookie.c forward.c sendmail.c scan.c addpkt.c storenet.c storeecho.c \
|
||||
areamgr.c filemgr.c notify.c mgrutil.c rollover.c bwrite.c rfc2ftn.c \
|
||||
rnews.c newspost.c aliasdb.c postemail.c postnetmail.c postecho.c backalias.c \
|
||||
flock.h tosspkt.h mbfido.h hatch.h maketags.h \
|
||||
importmsg.h echoout.h tracker.h makestat.h scannews.h lhash.h \
|
||||
tracker.h makestat.h scannews.h lhash.h \
|
||||
pack.h ulock.h tic.h ptic.h utic.h mover.h hash.h mkftnhdr.h \
|
||||
addbbs.h magic.h fsort.h toberep.h mkrfcmsg.h atoul.h ping.h \
|
||||
cookie.h forward.h sendmail.h scan.h addpkt.h importnet.h \
|
||||
areamgr.h filemgr.h notify.h mgrutil.h rollover.h bwrite.h \
|
||||
rnews.h newspost.h aliasdb.h postemail.h postnetmail.h backalias.h
|
||||
|
||||
mbmail_SOURCES = message.c hash.c lhash.c atoul.c \
|
||||
bread.c bwrite.c flock.c mkftnhdr.c mbmail.c tracker.c \
|
||||
viadate.c importnet.c aliasdb.c \
|
||||
message.h hash.h lhash.h atoul.h \
|
||||
bread.h bwrite.h flock.h mkftnhdr.h mbmail.h tracker.h \
|
||||
viadate.h importnet.h aliasdb.h
|
||||
addbbs.h magic.h fsort.h toberep.h ftn2rfc.h atoul.h ping.h \
|
||||
cookie.h forward.h sendmail.h scan.h addpkt.h storenet.h storeecho.h \
|
||||
areamgr.h filemgr.h notify.h mgrutil.h rollover.h bwrite.h rfc2ftn.h \
|
||||
rnews.h newspost.h aliasdb.h postemail.h postnetmail.h postecho.h backalias.h
|
||||
|
||||
mbseq_SOURCES = mbseq.c mbseq.h
|
||||
|
||||
@ -42,7 +35,6 @@ mbfile_SOURCES = mbfile.c mbfile.h
|
||||
mbmsg_SOURCES = post.c mbmsg.c post.h mbmsg.h
|
||||
|
||||
mbfido_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a ../lib/libmbinet.a
|
||||
mbmail_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
||||
mbseq_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||
mbaff_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
||||
mbindex_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||
@ -52,14 +44,15 @@ mbmsg_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../li
|
||||
|
||||
install-exec-local:
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 4751 mbfido $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 4751 mbmail $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbseq $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbaff $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbindex $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbdiff $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbfile $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbmsg $(bindir)
|
||||
rm -f $(bindir)/mbmail
|
||||
ln -s $(bindir)/mbfido $(bindir)/mbmail
|
||||
rm -f $(bindir)/mbnews
|
||||
ln -s $(bindir)/mbfido $(bindir)/mbnews
|
||||
(cd ${exec_prefix}; tar xfz @PACKAGE@-@VERSION@/mbfido/maptabs.tgz; chown mbse.bbs etc/maptabs/*)
|
||||
(cd ${exec_prefix}; tar xfz @PACKAGE@-@VERSION@/mbfido/maptabs.tgz; $(CHOWN) @OWNER@.@GROUP@ etc/maptabs/*)
|
||||
|
||||
|
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,18 +71,14 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
SUBDIRS = .
|
||||
|
||||
EXTRA_DIST = maptabs.tgz paths.h.in README
|
||||
|
||||
noinst_PROGRAMS = mbfido mbmail mbseq mbaff mbindex mbdiff mbfile mbmsg
|
||||
noinst_PROGRAMS = mbfido mbseq mbaff mbindex mbdiff mbfile mbmsg
|
||||
|
||||
mbfido_SOURCES = flock.c tosspkt.c mbfido.c hatch.c maketags.c importmsg.c echoout.c tracker.c makestat.c scannews.c lhash.c pack.c ulock.c tic.c ptic.c utic.c mover.c hash.c mkftnhdr.c addbbs.c magic.c fsort.c toberep.c mkrfcmsg.c atoul.c ping.c cookie.c forward.c sendmail.c scan.c addpkt.c importnet.c areamgr.c filemgr.c notify.c mgrutil.c rollover.c bwrite.c rnews.c newspost.c aliasdb.c postemail.c postnetmail.c backalias.c flock.h tosspkt.h mbfido.h hatch.h maketags.h importmsg.h echoout.h tracker.h makestat.h scannews.h lhash.h pack.h ulock.h tic.h ptic.h utic.h mover.h hash.h mkftnhdr.h addbbs.h magic.h fsort.h toberep.h mkrfcmsg.h atoul.h ping.h cookie.h forward.h sendmail.h scan.h addpkt.h importnet.h areamgr.h filemgr.h notify.h mgrutil.h rollover.h bwrite.h rnews.h newspost.h aliasdb.h postemail.h postnetmail.h backalias.h
|
||||
|
||||
|
||||
mbmail_SOURCES = message.c hash.c lhash.c atoul.c bread.c bwrite.c flock.c mkftnhdr.c mbmail.c tracker.c viadate.c importnet.c aliasdb.c message.h hash.h lhash.h atoul.h bread.h bwrite.h flock.h mkftnhdr.h mbmail.h tracker.h viadate.h importnet.h aliasdb.h
|
||||
mbfido_SOURCES = flock.c tosspkt.c mbfido.c hatch.c maketags.c tracker.c makestat.c scannews.c lhash.c pack.c ulock.c tic.c ptic.c utic.c mover.c hash.c mkftnhdr.c addbbs.c magic.c fsort.c toberep.c ftn2rfc.c atoul.c ping.c cookie.c forward.c sendmail.c scan.c addpkt.c storenet.c storeecho.c areamgr.c filemgr.c notify.c mgrutil.c rollover.c bwrite.c rfc2ftn.c rnews.c newspost.c aliasdb.c postemail.c postnetmail.c postecho.c backalias.c flock.h tosspkt.h mbfido.h hatch.h maketags.h tracker.h makestat.h scannews.h lhash.h pack.h ulock.h tic.h ptic.h utic.h mover.h hash.h mkftnhdr.h addbbs.h magic.h fsort.h toberep.h ftn2rfc.h atoul.h ping.h cookie.h forward.h sendmail.h scan.h addpkt.h storenet.h storeecho.h areamgr.h filemgr.h notify.h mgrutil.h rollover.h bwrite.h rfc2ftn.h rnews.h newspost.h aliasdb.h postemail.h postnetmail.h postecho.h backalias.h
|
||||
|
||||
|
||||
mbseq_SOURCES = mbseq.c mbseq.h
|
||||
@ -98,7 +95,6 @@ mbfile_SOURCES = mbfile.c mbfile.h
|
||||
mbmsg_SOURCES = post.c mbmsg.c post.h mbmsg.h
|
||||
|
||||
mbfido_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a ../lib/libmbinet.a
|
||||
mbmail_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
||||
mbseq_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||
mbaff_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
||||
mbindex_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||
@ -116,21 +112,16 @@ CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
mbfido_OBJECTS = flock.o tosspkt.o mbfido.o hatch.o maketags.o \
|
||||
importmsg.o echoout.o tracker.o makestat.o scannews.o lhash.o pack.o \
|
||||
ulock.o tic.o ptic.o utic.o mover.o hash.o mkftnhdr.o addbbs.o magic.o \
|
||||
fsort.o toberep.o mkrfcmsg.o atoul.o ping.o cookie.o forward.o \
|
||||
sendmail.o scan.o addpkt.o importnet.o areamgr.o filemgr.o notify.o \
|
||||
mgrutil.o rollover.o bwrite.o rnews.o newspost.o aliasdb.o postemail.o \
|
||||
postnetmail.o backalias.o
|
||||
tracker.o makestat.o scannews.o lhash.o pack.o ulock.o tic.o ptic.o \
|
||||
utic.o mover.o hash.o mkftnhdr.o addbbs.o magic.o fsort.o toberep.o \
|
||||
ftn2rfc.o atoul.o ping.o cookie.o forward.o sendmail.o scan.o addpkt.o \
|
||||
storenet.o storeecho.o areamgr.o filemgr.o notify.o mgrutil.o \
|
||||
rollover.o bwrite.o rfc2ftn.o rnews.o newspost.o aliasdb.o postemail.o \
|
||||
postnetmail.o postecho.o backalias.o
|
||||
mbfido_DEPENDENCIES = ../lib/libmemwatch.a ../lib/libclcomm.a \
|
||||
../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a \
|
||||
../lib/libmbinet.a
|
||||
mbfido_LDFLAGS =
|
||||
mbmail_OBJECTS = message.o hash.o lhash.o atoul.o bread.o bwrite.o \
|
||||
flock.o mkftnhdr.o mbmail.o tracker.o viadate.o importnet.o aliasdb.o
|
||||
mbmail_DEPENDENCIES = ../lib/libmemwatch.a ../lib/libclcomm.a \
|
||||
../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
||||
mbmail_LDFLAGS =
|
||||
mbseq_OBJECTS = mbseq.o
|
||||
mbseq_DEPENDENCIES = ../lib/libmemwatch.a ../lib/libclcomm.a \
|
||||
../lib/libcommon.a ../lib/libdbase.a
|
||||
@ -167,16 +158,31 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(mbfido_SOURCES) $(mbmail_SOURCES) $(mbseq_SOURCES) $(mbaff_SOURCES) $(mbindex_SOURCES) $(mbdiff_SOURCES) $(mbfile_SOURCES) $(mbmsg_SOURCES)
|
||||
OBJECTS = $(mbfido_OBJECTS) $(mbmail_OBJECTS) $(mbseq_OBJECTS) $(mbaff_OBJECTS) $(mbindex_OBJECTS) $(mbdiff_OBJECTS) $(mbfile_OBJECTS) $(mbmsg_OBJECTS)
|
||||
DEP_FILES = .deps/addbbs.P .deps/addpkt.P .deps/aliasdb.P \
|
||||
.deps/announce.P .deps/areamgr.P .deps/atoul.P .deps/backalias.P \
|
||||
.deps/bwrite.P .deps/cookie.P .deps/fflist.P .deps/filefind.P \
|
||||
.deps/filemgr.P .deps/flock.P .deps/forward.P .deps/fsort.P \
|
||||
.deps/ftn2rfc.P .deps/grlist.P .deps/hash.P .deps/hatch.P .deps/lhash.P \
|
||||
.deps/magic.P .deps/makestat.P .deps/maketags.P .deps/mbaff.P \
|
||||
.deps/mbdiff.P .deps/mbfido.P .deps/mbfile.P .deps/mbindex.P \
|
||||
.deps/mbmsg.P .deps/mbseq.P .deps/mgrutil.P .deps/mkftnhdr.P \
|
||||
.deps/mover.P .deps/msgutil.P .deps/newspost.P .deps/notify.P \
|
||||
.deps/pack.P .deps/ping.P .deps/post.P .deps/postecho.P \
|
||||
.deps/postemail.P .deps/postnetmail.P .deps/ptic.P .deps/rfc2ftn.P \
|
||||
.deps/rnews.P .deps/rollover.P .deps/scan.P .deps/scannews.P \
|
||||
.deps/sendmail.P .deps/storeecho.P .deps/storenet.P .deps/tic.P \
|
||||
.deps/toberep.P .deps/tosspkt.P .deps/tracker.P .deps/ulock.P \
|
||||
.deps/utic.P
|
||||
SOURCES = $(mbfido_SOURCES) $(mbseq_SOURCES) $(mbaff_SOURCES) $(mbindex_SOURCES) $(mbdiff_SOURCES) $(mbfile_SOURCES) $(mbmsg_SOURCES)
|
||||
OBJECTS = $(mbfido_OBJECTS) $(mbseq_OBJECTS) $(mbaff_OBJECTS) $(mbindex_OBJECTS) $(mbdiff_OBJECTS) $(mbfile_OBJECTS) $(mbmsg_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mbfido/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu mbfido/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -192,9 +198,6 @@ distclean-noinstPROGRAMS:
|
||||
|
||||
maintainer-clean-noinstPROGRAMS:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
@ -215,10 +218,6 @@ mbfido: $(mbfido_OBJECTS) $(mbfido_DEPENDENCIES)
|
||||
@rm -f mbfido
|
||||
$(LINK) $(mbfido_LDFLAGS) $(mbfido_OBJECTS) $(mbfido_LDADD) $(LIBS)
|
||||
|
||||
mbmail: $(mbmail_OBJECTS) $(mbmail_DEPENDENCIES)
|
||||
@rm -f mbmail
|
||||
$(LINK) $(mbmail_LDFLAGS) $(mbmail_OBJECTS) $(mbmail_LDADD) $(LIBS)
|
||||
|
||||
mbseq: $(mbseq_OBJECTS) $(mbseq_DEPENDENCIES)
|
||||
@rm -f mbseq
|
||||
$(LINK) $(mbseq_LDFLAGS) $(mbseq_OBJECTS) $(mbseq_LDADD) $(LIBS)
|
||||
@ -337,6 +336,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = mbfido
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu mbfido/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
@ -357,232 +361,38 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
addbbs.o: addbbs.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h tic.h fsort.h addbbs.h
|
||||
addpkt.o: addpkt.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/clcomm.h ../lib/common.h ../lib/dbnode.h ../lib/dbmsgs.h \
|
||||
pack.h addpkt.h
|
||||
aliasdb.o: aliasdb.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h aliasdb.h
|
||||
announce.o: announce.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h \
|
||||
../lib/msgtext.h grlist.h msgutil.h announce.h
|
||||
areamgr.o: areamgr.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h \
|
||||
../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h \
|
||||
../lib/dbuser.h ../lib/dbftn.h sendmail.h mgrutil.h scan.h \
|
||||
areamgr.h
|
||||
atoul.o: atoul.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h atoul.h
|
||||
backalias.o: backalias.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ../lib/dbcfg.h backalias.h
|
||||
bread.o: bread.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h bread.h
|
||||
bwrite.o: bwrite.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h bwrite.h
|
||||
cookie.o: cookie.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h cookie.h
|
||||
echoout.o: echoout.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h ../lib/dbnode.h ../lib/dbmsgs.h addpkt.h \
|
||||
echoout.h
|
||||
fflist.o: fflist.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/clcomm.h ../lib/msg.h fflist.h
|
||||
filefind.o: filefind.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h \
|
||||
../lib/msgtext.h fflist.h filefind.h msgutil.h
|
||||
filemgr.o: filemgr.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h \
|
||||
../lib/dbcfg.h ../lib/dbnode.h ../lib/dbtic.h ../lib/dbdupe.h \
|
||||
../lib/dbuser.h ../lib/dbftn.h sendmail.h mgrutil.h filemgr.h
|
||||
flock.o: flock.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/clcomm.h flock.h
|
||||
forward.o: forward.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbtic.h \
|
||||
tic.h cookie.h sendmail.h rollover.h forward.h
|
||||
fsort.o: fsort.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/clcomm.h fsort.h
|
||||
grlist.o: grlist.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/clcomm.h grlist.h
|
||||
hash.o: hash.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h hash.h lhash.h
|
||||
hatch.o: hatch.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbtic.h utic.h \
|
||||
rollover.h hatch.h
|
||||
importmsg.o: importmsg.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h \
|
||||
../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h \
|
||||
../lib/dbuser.h ../lib/dbftn.h echoout.h mkrfcmsg.h importmsg.h \
|
||||
postnetmail.h rollover.h
|
||||
importnet.o: importnet.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h \
|
||||
../lib/dbmsgs.h ../lib/dbuser.h rollover.h importnet.h
|
||||
lhash.o: lhash.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/clcomm.h lhash.h
|
||||
magic.o: magic.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbtic.h tic.h utic.h \
|
||||
magic.h
|
||||
makestat.o: makestat.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h makestat.h
|
||||
maketags.o: maketags.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h maketags.h
|
||||
mbaff.o: mbaff.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h \
|
||||
announce.h filefind.h mbaff.h
|
||||
mbdiff.o: mbdiff.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbdiff.h
|
||||
mbfido.o: mbfido.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h \
|
||||
../lib/dbdupe.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h \
|
||||
../lib/dbuser.h ../lib/dbftn.h ../lib/dbtic.h ../lib/msg.h \
|
||||
flock.h tosspkt.h pack.h ulock.h tic.h fsort.h scan.h mbfido.h \
|
||||
tracker.h notify.h rollover.h hatch.h scannews.h maketags.h \
|
||||
makestat.h newspost.h rnews.h backalias.h
|
||||
mbfile.o: mbfile.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfile.h
|
||||
mbindex.o: mbindex.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbftn.h \
|
||||
mbindex.h
|
||||
mbmail.o: mbmail.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbftn.h ../lib/dbcfg.h \
|
||||
../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbuser.h hash.h \
|
||||
mkftnhdr.h message.h
|
||||
mbmsg.o: mbmsg.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/dbcfg.h \
|
||||
post.h mbmsg.h
|
||||
mbseq.o: mbseq.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbseq.h
|
||||
message.o: message.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbuser.h \
|
||||
bread.h bwrite.h hash.h mkftnhdr.h tracker.h viadate.h \
|
||||
importnet.h
|
||||
mgrutil.o: mgrutil.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h sendmail.h \
|
||||
mgrutil.h
|
||||
mkftnhdr.o: mkftnhdr.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h atoul.h hash.h \
|
||||
aliasdb.h mkftnhdr.h
|
||||
mkrfcmsg.o: mkrfcmsg.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/dbftn.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/common.h \
|
||||
../lib/clcomm.h rollover.h aliasdb.h postemail.h backalias.h \
|
||||
mkrfcmsg.h
|
||||
mover.o: mover.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h tic.h mover.h
|
||||
msgutil.o: msgutil.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h \
|
||||
../lib/msgtext.h msgutil.h
|
||||
newspost.o: newspost.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/mbinet.h newspost.h
|
||||
notify.o: notify.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h \
|
||||
../lib/dbnode.h filemgr.h areamgr.h sendmail.h notify.h
|
||||
pack.o: pack.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/dbftn.h ../lib/clcomm.h ../lib/dbnode.h \
|
||||
pack.h
|
||||
ping.o: ping.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h \
|
||||
../lib/dbcfg.h ../lib/dbnode.h ../lib/dbtic.h ../lib/dbdupe.h \
|
||||
../lib/dbuser.h ../lib/dbftn.h sendmail.h mgrutil.h \
|
||||
postnetmail.h ping.h
|
||||
post.o: post.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h \
|
||||
../lib/msgtext.h post.h
|
||||
postemail.o: postemail.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/dbuser.h ../lib/common.h ../lib/clcomm.h ../lib/mbinet.h \
|
||||
postemail.h
|
||||
postnetmail.o: postnetmail.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/dbcfg.h ../lib/dbuser.h ../lib/dbnode.h ../lib/dbftn.h \
|
||||
../lib/common.h ../lib/clcomm.h tracker.h addpkt.h importnet.h \
|
||||
mkrfcmsg.h areamgr.h filemgr.h ping.h postemail.h
|
||||
ptic.o: ptic.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/dbtic.h ../lib/clcomm.h ../lib/dbnode.h \
|
||||
../lib/dbdupe.h ulock.h mover.h toberep.h tic.h utic.h addbbs.h \
|
||||
magic.h forward.h rollover.h ptic.h
|
||||
rnews.o: rnews.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/mbinet.h ../lib/dbdupe.h \
|
||||
../lib/dbnode.h ../lib/dbmsgs.h ../lib/msg.h ../lib/msgtext.h \
|
||||
pack.h scannews.h mbfido.h rnews.h
|
||||
rollover.o: rollover.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h rollover.h
|
||||
scan.o: scan.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/msg.h ../lib/clcomm.h ../lib/msgtext.h \
|
||||
../lib/dbnode.h ../lib/dbmsgs.h addpkt.h pack.h tracker.h \
|
||||
mkrfcmsg.h postemail.h scan.h
|
||||
scannews.o: scannews.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/mbinet.h ../lib/dbdupe.h \
|
||||
../lib/dbnode.h ../lib/dbmsgs.h ../lib/msg.h ../lib/msgtext.h \
|
||||
mkftnhdr.h hash.h echoout.h rollover.h pack.h scannews.h
|
||||
sendmail.o: sendmail.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/dbnode.h ../lib/clcomm.h ../lib/dbmsgs.h \
|
||||
addpkt.h rollover.h sendmail.h
|
||||
tic.o: tic.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/dbftn.h ../lib/clcomm.h ulock.h ptic.h \
|
||||
fsort.h pack.h tic.h
|
||||
toberep.o: toberep.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h tic.h toberep.h
|
||||
tosspkt.o: tosspkt.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h importmsg.h \
|
||||
tosspkt.h
|
||||
tracker.o: tracker.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbnode.h ../lib/dbftn.h \
|
||||
tracker.h
|
||||
ulock.o: ulock.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h flock.h ulock.h
|
||||
utic.o: utic.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h tic.h mover.h utic.h
|
||||
viadate.o: viadate.c ../lib/libs.h ../lib/../config.h paths.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
viadate.h
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
@ -620,23 +430,24 @@ distclean-generic:
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-generic clean-am
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
@ -651,27 +462,29 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck \
|
||||
install-exec-local install-exec-am install-exec install-data-am \
|
||||
install-data install-am install uninstall-am uninstall all-redirect \
|
||||
all-am all installdirs-am installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-local install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
install-exec-local:
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 4751 mbfido $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 4751 mbmail $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbseq $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbaff $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbindex $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbdiff $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbfile $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbmsg $(bindir)
|
||||
rm -f $(bindir)/mbmail
|
||||
ln -s $(bindir)/mbfido $(bindir)/mbmail
|
||||
rm -f $(bindir)/mbnews
|
||||
ln -s $(bindir)/mbfido $(bindir)/mbnews
|
||||
(cd ${exec_prefix}; tar xfz @PACKAGE@-@VERSION@/mbfido/maptabs.tgz; chown mbse.bbs etc/maptabs/*)
|
||||
(cd ${exec_prefix}; tar xfz @PACKAGE@-@VERSION@/mbfido/maptabs.tgz; $(CHOWN) @OWNER@.@GROUP@ etc/maptabs/*)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -13,4 +13,9 @@
|
||||
| |--> mkrfcmsg --> postemail
|
||||
+---------------+
|
||||
|
||||
+---------------+
|
||||
FTN | |--> Outbound
|
||||
------->| postecho |--> MsgBase
|
||||
| |--> mkrfcmsg --> spool --> newspost
|
||||
+---------------+
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/addpkt.c
|
||||
* Purpose ...............: Add mail to .pkt
|
||||
* Last modification date : 02-Jun-2001
|
||||
* Last modification date : 31-Jul-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -198,8 +198,10 @@ int AddMsgHdr(FILE *fp, faddr *f, faddr *t, int flags, int cost, time_t date, ch
|
||||
|
||||
if ((tname == NULL) || (strlen(tname) > 36) ||
|
||||
(fname == NULL) || (strlen(fname) > 36) ||
|
||||
(subj == NULL) || (strlen(subj) > 72))
|
||||
(subj == NULL) || (strlen(subj) > 72)) {
|
||||
WriteError("AddMsgHdr() error in To name, From name or Subject field");
|
||||
return 1;
|
||||
}
|
||||
|
||||
buffer[0x00] = 2;
|
||||
buffer[0x01] = 0;
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/areamgr.c
|
||||
* Purpose ...............: AreaMgr
|
||||
* Last modification date : 11-Mar-2001
|
||||
* Last modification date : 31-Jul-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -67,8 +67,6 @@ extern int echo_imp; /* Echomail imported */
|
||||
extern int echo_out; /* Echomail forwarded */
|
||||
extern int echo_bad; /* Bad echomail */
|
||||
extern int echo_dupe; /* Dupe echomail */
|
||||
extern char *subj; /* Message subject */
|
||||
extern char *msgid; /* Original message id */
|
||||
|
||||
int areamgr = 0; /* Nr of AreaMgr messages */
|
||||
int a_help = FALSE;
|
||||
@ -81,14 +79,14 @@ unsigned long a_msgs = 0;
|
||||
|
||||
|
||||
|
||||
void A_Help(faddr *);
|
||||
void A_Help(faddr *t)
|
||||
void A_Help(faddr *, char *);
|
||||
void A_Help(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
Syslog('+', "AreaMgr: Help");
|
||||
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr help", msgid)) != NULL) {
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr help", replyid)) != NULL) {
|
||||
fprintf(fp, "Address all requests to '%s' (without quotes)\r", (char *)"Areamgr");
|
||||
fprintf(fp, "Youre AreaMgr password goes on the subject line.\r\r");
|
||||
|
||||
@ -136,8 +134,8 @@ void A_Help(faddr *t)
|
||||
|
||||
|
||||
|
||||
void A_Query(faddr *);
|
||||
void A_Query(faddr *t)
|
||||
void A_Query(faddr *, char *);
|
||||
void A_Query(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *qp, *gp, *mp;
|
||||
char *temp, *Group;
|
||||
@ -149,7 +147,7 @@ void A_Query(faddr *t)
|
||||
Syslog('+', "AreaMgr: Query");
|
||||
f = bestaka_s(t);
|
||||
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your query request", msgid)) != NULL) {
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your query request", replyid)) != NULL) {
|
||||
|
||||
temp = calloc(128, sizeof(char));
|
||||
|
||||
@ -243,7 +241,7 @@ void A_Query(faddr *t)
|
||||
|
||||
|
||||
|
||||
void A_List(faddr *t, int Notify)
|
||||
void A_List(faddr *t, char *replyid, int Notify)
|
||||
{
|
||||
FILE *qp, *gp, *mp;
|
||||
char *temp, *Group;
|
||||
@ -258,7 +256,7 @@ void A_List(faddr *t, int Notify)
|
||||
Syslog('+', "AreaMgr: List");
|
||||
f = bestaka_s(t);
|
||||
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr List", msgid)) != NULL) {
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr List", replyid)) != NULL) {
|
||||
|
||||
WriteMailGroups(qp, f);
|
||||
temp = calloc(128, sizeof(char));
|
||||
@ -350,7 +348,7 @@ void A_List(faddr *t, int Notify)
|
||||
|
||||
|
||||
|
||||
void A_Flow(faddr *t, int Notify)
|
||||
void A_Flow(faddr *t, char *replyid, int Notify)
|
||||
{
|
||||
FILE *qp, *gp, *mp;
|
||||
char *temp, *Group;
|
||||
@ -377,7 +375,7 @@ void A_Flow(faddr *t, int Notify)
|
||||
Syslog('+', "AreaMgr: Flow report");
|
||||
f = bestaka_s(t);
|
||||
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr Flow report", msgid)) != NULL) {
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr Flow report", replyid)) != NULL) {
|
||||
|
||||
temp = calloc(128, sizeof(char));
|
||||
|
||||
@ -464,8 +462,8 @@ void A_Flow(faddr *t, int Notify)
|
||||
|
||||
|
||||
|
||||
void A_Status(faddr *);
|
||||
void A_Status(faddr *t)
|
||||
void A_Status(faddr *, char *);
|
||||
void A_Status(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *fp;
|
||||
int i;
|
||||
@ -476,7 +474,7 @@ void A_Status(faddr *t)
|
||||
else
|
||||
i = Miy - 1;
|
||||
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr status", msgid)) != NULL) {
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"AreaMgr status", replyid)) != NULL) {
|
||||
|
||||
fprintf(fp, "Here is your (echo)mail status:\r\r");
|
||||
|
||||
@ -504,8 +502,8 @@ void A_Status(faddr *t)
|
||||
|
||||
|
||||
|
||||
void A_Unlinked(faddr *);
|
||||
void A_Unlinked(faddr *t)
|
||||
void A_Unlinked(faddr *, char *);
|
||||
void A_Unlinked(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *qp, *gp, *mp;
|
||||
char *temp, *Group;
|
||||
@ -517,7 +515,7 @@ void A_Unlinked(faddr *t)
|
||||
Syslog('+', "AreaMgr: Unlinked");
|
||||
f = bestaka_s(t);
|
||||
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your unlinked request", msgid)) != NULL) {
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your unlinked request", replyid)) != NULL) {
|
||||
|
||||
WriteMailGroups(qp, f);
|
||||
temp = calloc(128, sizeof(char));
|
||||
@ -944,7 +942,7 @@ void A_Msgs(char *Buf, int skip)
|
||||
|
||||
|
||||
|
||||
int AreaMgr(faddr *f, faddr *t, time_t mdate, int flags, FILE *fp)
|
||||
int AreaMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int flags, FILE *fp)
|
||||
{
|
||||
int i, rc = 0, spaces;
|
||||
char *Buf;
|
||||
@ -1057,7 +1055,7 @@ int AreaMgr(faddr *f, faddr *t, time_t mdate, int flags, FILE *fp)
|
||||
* create a response netmail about what we did.
|
||||
*/
|
||||
if (ftell(tmp)) {
|
||||
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your AreaMgr request", msgid)) != NULL) {
|
||||
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", (char *)"Your AreaMgr request", replyid)) != NULL) {
|
||||
|
||||
fprintf(np, " Dear %s\r\r", nodes.Sysop);
|
||||
fprintf(np, "Here is the result of your AreaMgr request:\r\r");
|
||||
@ -1081,22 +1079,22 @@ int AreaMgr(faddr *f, faddr *t, time_t mdate, int flags, FILE *fp)
|
||||
fclose(tmp);
|
||||
|
||||
if (a_stat)
|
||||
A_Status(f);
|
||||
A_Status(f, replyid);
|
||||
|
||||
if (a_query)
|
||||
A_Query(f);
|
||||
A_Query(f, replyid);
|
||||
|
||||
if (a_list)
|
||||
A_List(f, FALSE);
|
||||
A_List(f, replyid, FALSE);
|
||||
|
||||
if (a_flow)
|
||||
A_Flow(f, FALSE);
|
||||
A_Flow(f, replyid, FALSE);
|
||||
|
||||
if (a_unlnk)
|
||||
A_Unlinked(f);
|
||||
A_Unlinked(f, replyid);
|
||||
|
||||
if (a_help)
|
||||
A_Help(f);
|
||||
A_Help(f, replyid);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define _AREAMGR_H
|
||||
|
||||
|
||||
void A_Status(faddr *);
|
||||
void A_List(faddr *, int);
|
||||
void A_Flow(faddr *, int);
|
||||
int AreaMgr(faddr *, faddr *, time_t, int, FILE *);
|
||||
void A_Status(faddr *, char *);
|
||||
void A_List(faddr *, char *, int);
|
||||
void A_Flow(faddr *, char *, int);
|
||||
int AreaMgr(faddr *, faddr *, char *, char *, time_t, int, FILE *);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -2,10 +2,10 @@
|
||||
*
|
||||
* File ..................: mbaff/filefind.c
|
||||
* Purpose ...............: Announce new files and FileFind
|
||||
* Last modification date : 25-Aug-2000
|
||||
* Last modification date : 10-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -192,7 +192,7 @@ int StartReply(ff_list *ffl)
|
||||
* Start message text including kludges
|
||||
*/
|
||||
Msg_Id(scanmgr.Aka);
|
||||
sprintf(temp, "\001REPLYID: %s", ffl->msgid);
|
||||
sprintf(temp, "\001REPLY: %s", ffl->msgid);
|
||||
MsgText_Add2(temp);
|
||||
Msg.ReplyCRC = upd_crc32(temp, crc, strlen(temp));
|
||||
Msg_Pid();
|
||||
@ -408,7 +408,8 @@ void ScanFiles(ff_list *tmp)
|
||||
if (!strcmp(rft->filename, file.Name))
|
||||
break;
|
||||
fclose(pFile);
|
||||
sprintf(temp, "%-12s %5lu Kb. %s", tu(file.Name), file.Size / 1024, To_Low(file.Desc[0],scanmgr.HiAscii));
|
||||
sprintf(temp, "%-12s %5lu Kb. %s", tu(file.Name), (long)(file.Size / 1024),
|
||||
To_Low(file.Desc[0],scanmgr.HiAscii));
|
||||
MsgText_Add2(temp);
|
||||
|
||||
/*
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/filemgr.c
|
||||
* Purpose ...............: FileMgr
|
||||
* Last modification date : 11-Mar-2001
|
||||
* Last modification date : 31-Jul-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -66,8 +66,6 @@ extern int echo_imp; /* Echomail imported */
|
||||
extern int echo_out; /* Echomail forwarded */
|
||||
extern int echo_bad; /* Bad fileecho */
|
||||
extern int echo_dupe; /* Dupe fileecho */
|
||||
extern char *subj; /* Message subject */
|
||||
extern char *msgid; /* Original message id */
|
||||
|
||||
int filemgr = 0; /* Nr of FileMgr messages */
|
||||
int f_help = FALSE;
|
||||
@ -78,14 +76,14 @@ int f_unlnk = FALSE;
|
||||
|
||||
|
||||
|
||||
void F_Help(faddr *);
|
||||
void F_Help(faddr *t)
|
||||
void F_Help(faddr *, char *);
|
||||
void F_Help(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
Syslog('+', "FileMgr: Help");
|
||||
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"FileMgr help", msgid)) != NULL) {
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"FileMgr help", replyid)) != NULL) {
|
||||
fprintf(fp, "Address all requests to '%s' (without quotes)\r", (char *)"Filemgr");
|
||||
fprintf(fp, "Youre FileMgr password goes on the subject line.\r\r");
|
||||
|
||||
@ -134,8 +132,8 @@ void F_Help(faddr *t)
|
||||
|
||||
|
||||
|
||||
void F_Query(faddr *);
|
||||
void F_Query(faddr *t)
|
||||
void F_Query(faddr *, char *);
|
||||
void F_Query(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *qp, *gp, *fp;
|
||||
char *temp, *Group;
|
||||
@ -147,7 +145,7 @@ void F_Query(faddr *t)
|
||||
Syslog('+', "FileMgr: Query");
|
||||
f = bestaka_s(t);
|
||||
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your query request", msgid)) != NULL) {
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your query request", replyid)) != NULL) {
|
||||
|
||||
temp = calloc(128, sizeof(char));
|
||||
|
||||
@ -237,7 +235,7 @@ void F_Query(faddr *t)
|
||||
|
||||
|
||||
|
||||
void F_List(faddr *t, int Notify)
|
||||
void F_List(faddr *t, char *replyid, int Notify)
|
||||
{
|
||||
FILE *qp, *gp, *fp;
|
||||
char *temp, *Group;
|
||||
@ -252,7 +250,7 @@ void F_List(faddr *t, int Notify)
|
||||
Syslog('+', "FileMgr: List");
|
||||
f = bestaka_s(t);
|
||||
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"FileMgr List", msgid)) != NULL) {
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"FileMgr List", replyid)) != NULL) {
|
||||
|
||||
WriteFileGroups(qp, f);
|
||||
temp = calloc(128, sizeof(char));
|
||||
@ -340,8 +338,8 @@ void F_List(faddr *t, int Notify)
|
||||
|
||||
|
||||
|
||||
void F_Status(faddr *);
|
||||
void F_Status(faddr *t)
|
||||
void F_Status(faddr *, char *);
|
||||
void F_Status(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *fp;
|
||||
int i;
|
||||
@ -352,7 +350,7 @@ void F_Status(faddr *t)
|
||||
else
|
||||
i = Miy - 1;
|
||||
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"FileMgr Status", msgid)) != NULL) {
|
||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"FileMgr Status", replyid)) != NULL) {
|
||||
|
||||
fprintf(fp, "Here is your fileecho status:\r\r");
|
||||
|
||||
@ -389,8 +387,8 @@ void F_Status(faddr *t)
|
||||
|
||||
|
||||
|
||||
void F_Unlinked(faddr *);
|
||||
void F_Unlinked(faddr *t)
|
||||
void F_Unlinked(faddr *, char *);
|
||||
void F_Unlinked(faddr *t, char *replyid)
|
||||
{
|
||||
FILE *qp, *gp, *fp;
|
||||
char *temp, *Group;
|
||||
@ -402,7 +400,7 @@ void F_Unlinked(faddr *t)
|
||||
Syslog('+', "FileMgr: Unlinked");
|
||||
f = bestaka_s(t);
|
||||
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your unlinked request", msgid)) != NULL) {
|
||||
if ((qp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your unlinked request", replyid)) != NULL) {
|
||||
|
||||
temp = calloc(128, sizeof(char));
|
||||
|
||||
@ -823,7 +821,7 @@ void F_Tick(faddr *t, char *Buf, FILE *tmp)
|
||||
|
||||
|
||||
|
||||
int FileMgr(faddr *f, faddr *t, time_t mdate, int flags, FILE *fp)
|
||||
int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int flags, FILE *fp)
|
||||
{
|
||||
int i, rc = 0, spaces;
|
||||
char *Buf;
|
||||
@ -930,7 +928,7 @@ int FileMgr(faddr *f, faddr *t, time_t mdate, int flags, FILE *fp)
|
||||
}
|
||||
|
||||
if (ftell(tmp)) {
|
||||
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your FileMgr request", msgid)) != NULL) {
|
||||
if ((np = SendMgrMail(f, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", (char *)"Your FileMgr request", replyid)) != NULL) {
|
||||
|
||||
fprintf(np, " Dear %s\r\r", nodes.Sysop);
|
||||
fprintf(np, "Here is the result of your FileMgr request:\r\r");
|
||||
@ -954,19 +952,19 @@ int FileMgr(faddr *f, faddr *t, time_t mdate, int flags, FILE *fp)
|
||||
fclose(tmp);
|
||||
|
||||
if (f_stat)
|
||||
F_Status(f);
|
||||
F_Status(f, replyid);
|
||||
|
||||
if (f_query)
|
||||
F_Query(f);
|
||||
F_Query(f, replyid);
|
||||
|
||||
if (f_list)
|
||||
F_List(f, FALSE);
|
||||
F_List(f, replyid, FALSE);
|
||||
|
||||
if (f_unlnk)
|
||||
F_Unlinked(f);
|
||||
F_Unlinked(f, replyid);
|
||||
|
||||
if (f_help)
|
||||
F_Help(f);
|
||||
F_Help(f, replyid);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define _FILEMGR_H
|
||||
|
||||
|
||||
void F_Status(faddr *);
|
||||
void F_List(faddr *, int);
|
||||
int FileMgr(faddr *, faddr *, time_t, int, FILE *);
|
||||
void F_Status(faddr *, char *);
|
||||
void F_List(faddr *, char *, int);
|
||||
int FileMgr(faddr *, faddr *, char *, char *, time_t, int, FILE *);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/forward.c
|
||||
* Purpose ...............: File forward to a node
|
||||
* Last modification date : 11-Mar-2001
|
||||
* Last modification date : 10-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -133,7 +133,7 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
||||
fprintf(net, "File : %s\r", TIC.TicIn.OrgName);
|
||||
fprintf(net, "Description : %s\r", TIC.TicIn.Desc);
|
||||
fprintf(net, "Area : %s %s\r", TIC.TicIn.Area, TIC.TicIn.AreaDesc);
|
||||
fprintf(net, "Size : %ld\r", TIC.FileSize);
|
||||
fprintf(net, "Size : %ld\r", (long)(TIC.FileSize));
|
||||
fprintf(net, "CRC : %s\r", TIC.TicIn.Crc);
|
||||
fprintf(net, "Origin : %s\r", TIC.TicIn.Origin);
|
||||
if (strlen(TIC.TicIn.Magic))
|
||||
|
106
mbfido/mbfido.c
106
mbfido/mbfido.c
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/mbfido.c
|
||||
* Purpose ...............: Process Fidonet style mail and files.
|
||||
* Last modification date : 10-Jul-2001
|
||||
* Last modification date : 14-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -61,6 +61,7 @@
|
||||
#include "newspost.h"
|
||||
#include "rnews.h"
|
||||
#include "backalias.h"
|
||||
#include "rfc2ftn.h"
|
||||
|
||||
|
||||
#define UNPACK_FACTOR 300
|
||||
@ -77,6 +78,7 @@ int do_stat = FALSE; /* Create statistic HTML pages */
|
||||
int do_test = FALSE; /* Test routing */
|
||||
int do_news = FALSE; /* Process NNTP news */
|
||||
int do_uucp = FALSE; /* Process UUCP newsbatch */
|
||||
int do_mail = FALSE; /* Process MTA email message */
|
||||
int do_unsec = FALSE; /* Unsecure tossing */
|
||||
int do_learn = FALSE; /* News articles learnmode */
|
||||
int check_crc = TRUE; /* Check .tic crc values */
|
||||
@ -115,6 +117,7 @@ void Help(void)
|
||||
colour(9, 0);
|
||||
printf(" Commands are:\n\n");
|
||||
colour(3, 0);
|
||||
printf(" m mail <recipient> ... MTA Mail mode\n");
|
||||
printf(" ne news Scan for new news\n");
|
||||
printf(" no notify <nodes> Send notify messages\n");
|
||||
printf(" r roll Rollover statistic counters\n");
|
||||
@ -246,9 +249,13 @@ void die(int onsig)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i, Loop;
|
||||
char *p, *cmd, Options[81];
|
||||
char *p, *cmd, *temp, Options[81];
|
||||
struct passwd *pw;
|
||||
struct tm *t;
|
||||
fa_list **envrecip, *envrecip_start = NULL;
|
||||
faddr *taddr;
|
||||
int envrecip_count = 0;
|
||||
FILE *ofp;
|
||||
|
||||
#ifdef MEMWATCH
|
||||
mwInit();
|
||||
@ -256,9 +263,11 @@ int main(int argc, char **argv)
|
||||
|
||||
/*
|
||||
* The next trick is to supply a fake environment variable
|
||||
* MBSE_ROOT in case we are started from UUCP.
|
||||
* MBSE_ROOT in case we are started from UUCP or the MTA.
|
||||
* this will setup the variable so InitConfig() will work.
|
||||
* The /etc/passwd must point to the correct homedirectory.
|
||||
* Some programs can't set uid to mbse, so mbfido is installed
|
||||
* setuid mbse.
|
||||
*/
|
||||
if (getenv("MBSE_ROOT") == NULL) {
|
||||
pw = getpwuid(getuid());
|
||||
@ -310,7 +319,11 @@ int main(int argc, char **argv)
|
||||
p++;
|
||||
else
|
||||
p = argv[0];
|
||||
if (!strcmp(p, "mbnews")) {
|
||||
if (!strcmp(p, "mbmail")) {
|
||||
do_quiet = TRUE;
|
||||
do_mail = TRUE;
|
||||
cmd = xstrcpy((char *)"Cmd: mbmail");
|
||||
} else if (!strcmp(p, "mbnews")) {
|
||||
do_quiet = TRUE;
|
||||
do_uucp = TRUE;
|
||||
cmd = xstrcpy((char *)"Cmd: mbnews");
|
||||
@ -320,9 +333,10 @@ int main(int argc, char **argv)
|
||||
cmd = xstrcpy((char *)"Cmd: mbfido");
|
||||
}
|
||||
|
||||
envrecip = &envrecip_start;
|
||||
for (i = 1; i < argc; i++) {
|
||||
cmd = xstrcat(cmd, (char *)" ");
|
||||
cmd = xstrcat(cmd, tl(argv[i]));
|
||||
cmd = xstrcat(cmd, argv[i]);
|
||||
|
||||
if (strncmp(tl(argv[i]), "ne", 2) == 0)
|
||||
do_news = TRUE;
|
||||
@ -338,36 +352,52 @@ int main(int argc, char **argv)
|
||||
}
|
||||
if (strncmp(tl(argv[i]), "r", 1) == 0)
|
||||
do_roll = TRUE;
|
||||
if (strncmp(tl(argv[i]), "s", 1) == 0)
|
||||
else if (strncmp(tl(argv[i]), "s", 1) == 0)
|
||||
do_scan = TRUE;
|
||||
if (strncmp(tl(argv[i]), "ta", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "ta", 2) == 0)
|
||||
do_tags = TRUE;
|
||||
if (strncmp(tl(argv[i]), "ti", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "ti", 2) == 0)
|
||||
do_tic = TRUE;
|
||||
if (strncmp(tl(argv[i]), "te", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "te", 2) == 0)
|
||||
do_test = TRUE;
|
||||
if (strncmp(tl(argv[i]), "to", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "to", 2) == 0)
|
||||
do_toss = TRUE;
|
||||
if (strncmp(tl(argv[i]), "u", 1) == 0)
|
||||
else if (strncmp(tl(argv[i]), "u", 1) == 0)
|
||||
do_uucp = TRUE;
|
||||
if (strncmp(tl(argv[i]), "w", 1) == 0)
|
||||
else if (strncmp(tl(argv[i]), "m", 1) == 0)
|
||||
do_mail = TRUE;
|
||||
else if (strncmp(tl(argv[i]), "w", 1) == 0)
|
||||
do_stat = TRUE;
|
||||
if (strncmp(tl(argv[i]), "-a", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-a", 2) == 0)
|
||||
autocrea = TRUE;
|
||||
if (strncmp(tl(argv[i]), "-f", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-f", 2) == 0)
|
||||
do_full = TRUE;
|
||||
if (strncmp(tl(argv[i]), "-l", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-l", 2) == 0)
|
||||
do_learn = TRUE;
|
||||
if (strncmp(tl(argv[i]), "-noc", 4) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-noc", 4) == 0)
|
||||
check_crc = FALSE;
|
||||
if (strncmp(tl(argv[i]), "-nod", 4) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-nod", 4) == 0)
|
||||
check_dupe = FALSE;
|
||||
if (strncmp(tl(argv[i]), "-q", 2) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-q", 2) == 0)
|
||||
do_quiet = TRUE;
|
||||
if (strncmp(tl(argv[i]), "-unp", 4) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-unp", 4) == 0)
|
||||
do_unprot = TRUE;
|
||||
if (strncmp(tl(argv[i]), "-uns", 4) == 0)
|
||||
else if (strncmp(tl(argv[i]), "-uns", 4) == 0)
|
||||
do_unsec = TRUE;
|
||||
else if (do_mail) {
|
||||
/*
|
||||
* Possible recipient address(es).
|
||||
*/
|
||||
if ((taddr = parsefaddr(argv[i]))) {
|
||||
(*envrecip) = (fa_list*)malloc(sizeof(fa_list));
|
||||
(*envrecip)->next = NULL;
|
||||
(*envrecip)->addr = taddr;
|
||||
envrecip = &((*envrecip)->next);
|
||||
envrecip_count++;
|
||||
} else {
|
||||
cmd = strcat(cmd, (char *)" <- unparsable recipient! ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ProgName();
|
||||
@ -384,9 +414,10 @@ int main(int argc, char **argv)
|
||||
die(101);
|
||||
|
||||
if (lockunpack())
|
||||
die(0);
|
||||
die(101);
|
||||
if (initnl())
|
||||
die(101);
|
||||
if (!do_mail && !do_uucp)
|
||||
Rollover();
|
||||
if (!do_quiet)
|
||||
printf("\n");
|
||||
@ -396,10 +427,36 @@ int main(int argc, char **argv)
|
||||
*/
|
||||
cmd = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(cmd, "%s/etc/aliases", getenv("MBSE_ROOT"));
|
||||
if ((do_news || do_scan || do_toss) && file_exist(cmd, R_OK) == 0)
|
||||
if ((do_news || do_scan || do_toss || do_mail) && file_exist(cmd, R_OK) == 0)
|
||||
readalias(cmd);
|
||||
free(cmd);
|
||||
|
||||
if (do_mail) {
|
||||
if (!envrecip_count) {
|
||||
WriteError("No valid receipients specified, aborting");
|
||||
die(105);
|
||||
}
|
||||
|
||||
umask(066);
|
||||
if ((ofp = tmpfile()) == NULL) {
|
||||
WriteError("$Can't open tmpfile for RFC message");
|
||||
die(104);
|
||||
}
|
||||
temp = calloc(10240, sizeof(char));
|
||||
while (fgets(temp, 10240, stdin))
|
||||
fprintf(ofp, temp);
|
||||
free(temp);
|
||||
|
||||
for (envrecip = &envrecip_start; *envrecip; envrecip = &((*envrecip)->next)) {
|
||||
Syslog('+', "Message to: %s", ascfnode((*envrecip)->addr, 0x7f));
|
||||
rfc2ftn(ofp, (*envrecip)->addr);
|
||||
}
|
||||
|
||||
fclose(ofp);
|
||||
packmail();
|
||||
die(0);
|
||||
}
|
||||
|
||||
if (do_notify)
|
||||
if (Notify(Options))
|
||||
packmail();
|
||||
@ -410,8 +467,6 @@ int main(int argc, char **argv)
|
||||
* Hatch new files and process .tic files
|
||||
* until nothing left to do.
|
||||
*/
|
||||
if (!diskfree(CFG.freespace))
|
||||
die(101);
|
||||
Loop = TRUE;
|
||||
do {
|
||||
Hatch();
|
||||
@ -446,7 +501,7 @@ int main(int argc, char **argv)
|
||||
if (do_stat)
|
||||
MakeStat();
|
||||
if (do_uucp)
|
||||
NewsUUCP(FALSE);
|
||||
NewsUUCP();
|
||||
die(0);
|
||||
return 0;
|
||||
}
|
||||
@ -625,7 +680,6 @@ int TossPkts(void)
|
||||
}
|
||||
|
||||
free(inbound);
|
||||
if (diskfree(CFG.freespace))
|
||||
packmail();
|
||||
return maxrc;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbindex.c
|
||||
* Purpose ...............: Nodelist Compiler
|
||||
* Last modification date : 25-May-2001
|
||||
* Last modification date : 08-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -628,6 +628,7 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n
|
||||
*q++ = '\0';
|
||||
}
|
||||
if ((strlen(p) == 3) && (!strcmp(p, "300"))) {
|
||||
if (q != NULL) {
|
||||
if ((strstr(q, (char *)"X75")) ||
|
||||
(strstr(q, (char *)"V110L")) ||
|
||||
(strstr(q, (char *)"V110H")) ||
|
||||
@ -643,6 +644,7 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n
|
||||
(strstr(q, (char *)"IP")))
|
||||
ndx.pflag |= NL_TCPIP;
|
||||
}
|
||||
}
|
||||
|
||||
Syslog('S',"put: %u:%u/%u.%u reg %u upl %u/%u typ %u flg %02X as (%u,%lu)",
|
||||
ndx.zone,ndx.net,ndx.node,
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbmail/message.c
|
||||
* Purpose ...............: MBSE BBS Mail Gate
|
||||
* Last modification date : 02-May-2001
|
||||
* Last modification date : 27-Jul-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -54,7 +54,7 @@
|
||||
#include "mkftnhdr.h"
|
||||
#include "tracker.h"
|
||||
#include "viadate.h"
|
||||
#include "importnet.h"
|
||||
#include "storenet.h"
|
||||
|
||||
|
||||
#define MAXHDRSIZE 2048
|
||||
@ -458,7 +458,7 @@ int putmessage(rfcmsg *msg, ftnmsg *fmsg, FILE *fp, faddr *route, char flavor,fa
|
||||
if (TrackMail(Dest, &Route) == R_LOCAL) {
|
||||
/*
|
||||
* Mail for our local system. Instead of adding the message to a .pkt create
|
||||
* a temporary file which later will be send via the importnet function.
|
||||
* a temporary file which later will be send via the storenet function.
|
||||
*/
|
||||
postlocal = TRUE;
|
||||
pkt = tmpfile();
|
||||
@ -856,9 +856,9 @@ int putmessage(rfcmsg *msg, ftnmsg *fmsg, FILE *fp, faddr *route, char flavor,fa
|
||||
fmsg->to->name = xstrcpy(CFG.sysop_name);
|
||||
}
|
||||
if (SearchUser(fmsg->to->name)) {
|
||||
Syslog('m', "importnet(%s, %s, %s, %04x)", ascfnode(fmsg->from,0x7f),
|
||||
Syslog('m', "storenet(%s, %s, %s, %04x)", ascfnode(fmsg->from,0x7f),
|
||||
ascfnode(fmsg->to,0x7f), ftndate(fmsg->date), fmsg->flags);
|
||||
if (importnet(fmsg->from, fmsg->to, fmsg->date, fmsg->flags, pkt))
|
||||
if (storenet(fmsg->from, fmsg->to, fmsg->date, fmsg->flags, fmsg->subj, fmsg->msgid_a, fmsg->reply_a, pkt))
|
||||
return 2;
|
||||
} else {
|
||||
WriteError("Unknown bbs user");
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbmail/mkftnhdr.c
|
||||
* Purpose ...............: MBSE BBS Mail Gate
|
||||
* Last modification date : 25-Mar-2001
|
||||
* Last modification date : 14-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -206,7 +206,7 @@ int ftnmsgid(char *msgid, char **s, unsigned long *n, char *areaname)
|
||||
|
||||
|
||||
|
||||
ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode)
|
||||
ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *recipient)
|
||||
{
|
||||
char *freename = NULL, *rfcfrom = NULL, *p, *q, *l, *r;
|
||||
char *fbuf = NULL;
|
||||
@ -228,8 +228,10 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode)
|
||||
p = xstrcpy(hdr((char *)"X-Fidonet-Comment-To",msg));
|
||||
if (p == NULL)
|
||||
p = xstrcpy(hdr((char *)"X-Apparently-To",msg));
|
||||
if (p == NULL)
|
||||
p = xstrcpy(hdr((char *)"To", msg)); /* 14-Aug-2001 MB */
|
||||
if (p) {
|
||||
Syslog('N', "getting `to' address from: \"%s\"",p);
|
||||
Syslog('n', "getting `to' address from: \"%s\"",p);
|
||||
if ((tmsg->to = parsefaddr(p)) == NULL)
|
||||
tmsg->to = parsefaddr((char *)"All@p0.f0.n0.z0");
|
||||
if ((l = strrchr(p,'<')) && (r = strchr(p,'>')) && (l < r)) {
|
||||
@ -271,10 +273,55 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode)
|
||||
tmsg->to->name=xstrcpy(l);
|
||||
}
|
||||
free(p);
|
||||
} else
|
||||
tmsg->to = parsefaddr((char *)"All@p0.f0.n0.z0");
|
||||
Syslog('n', "TO: %s",ascinode(tmsg->to,0x7f));
|
||||
/*
|
||||
* It will become echomail, the destination FTN address must
|
||||
* be our address. 14-Aug-2001 MB.
|
||||
*/
|
||||
tmsg->to->zone = msgs.Aka.zone;
|
||||
tmsg->to->net = msgs.Aka.net;
|
||||
tmsg->to->node = msgs.Aka.node;
|
||||
tmsg->to->point = msgs.Aka.point;
|
||||
tmsg->to->domain = xstrcpy(msgs.Aka.domain);
|
||||
} else {
|
||||
Syslog('n', "Filling default To: address");
|
||||
tmsg->to = (faddr*)malloc(sizeof(faddr));
|
||||
tmsg->to->name = xstrcpy((char *)"All");
|
||||
tmsg->to->zone = msgs.Aka.zone;
|
||||
tmsg->to->net = msgs.Aka.net;
|
||||
tmsg->to->node = msgs.Aka.node;
|
||||
tmsg->to->point = msgs.Aka.point;
|
||||
tmsg->to->domain = xstrcpy(msgs.Aka.domain);
|
||||
}
|
||||
Syslog('n', "TO: %s",ascfnode(tmsg->to,0xff));
|
||||
} else {
|
||||
if (recipient) {
|
||||
/*
|
||||
* In mbmail mode the recipient is valid and must be used
|
||||
* as the destination address. The To: field is probably
|
||||
* an RFC address an cannot be used to route the message.
|
||||
*/
|
||||
tmsg->to = (faddr *)malloc(sizeof(faddr));
|
||||
tmsg->to->point = recipient->point;
|
||||
tmsg->to->node = recipient->node;
|
||||
tmsg->to->net = recipient->net;
|
||||
tmsg->to->zone = recipient->zone;
|
||||
tmsg->to->name = xstrcpy(recipient->name);
|
||||
if (tmsg->to->name && (strlen(tmsg->to->name) > MAXNAME))
|
||||
tmsg->to->name[MAXNAME]='\0';
|
||||
tmsg->to->domain = xstrcpy(recipient->domain);
|
||||
Syslog('m', "Recipient TO: %s", ascfnode(tmsg->to,0xff));
|
||||
} else {
|
||||
p = xstrcpy(hdr((char *)"To",msg));
|
||||
if (p == NULL)
|
||||
p = xstrcpy(hdr((char *)"X-Apparently-To",msg));
|
||||
if (p) {
|
||||
if ((tmsg->to = parsefaddr(p)) == NULL)
|
||||
WriteError("Unparsable destination address");
|
||||
else
|
||||
Syslog('m', "RFC parsed TO: %s",ascfnode(tmsg->to,0xff));
|
||||
}
|
||||
}
|
||||
} /* else (newsmode) */
|
||||
|
||||
p = fbuf = xstrcpy(hdr((char *)"Reply-To", msg));
|
||||
if (fbuf == NULL)
|
||||
@ -376,9 +423,12 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode)
|
||||
|
||||
Syslog('m', "From address was%s distinguished as ftn", tmsg->from ? "" : " not");
|
||||
|
||||
/* FIXME: received email from an Unix mailer comes here as well, only the From address is set.
|
||||
The msgs.Aka next is not valid. */
|
||||
if ((tmsg->from == NULL) && ((bestaka = bestaka_s(fido2faddr(msgs.Aka))))) {
|
||||
if (newsmode)
|
||||
bestaka = bestaka_s(fido2faddr(msgs.Aka));
|
||||
else
|
||||
bestaka = bestaka_s(tmsg->to);
|
||||
|
||||
if ((tmsg->from == NULL) && (bestaka)) {
|
||||
if (CFG.dontregate) {
|
||||
p = xstrcpy(hdr((char *)"X-FTN-Sender",msg));
|
||||
if (p == NULL) {
|
||||
@ -522,7 +572,10 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode)
|
||||
Syslog('m', "DATE: %s, MSGID: %s %lx, REPLY: %s %lx",
|
||||
ftndate(tmsg->date), MBSE_SS(tmsg->msgid_a),tmsg->msgid_n, MBSE_SS(tmsg->reply_a),tmsg->reply_n);
|
||||
|
||||
if ((p = hdr((char *)"Organization",msg))) {
|
||||
p = hdr((char *)"Organization",msg);
|
||||
if (p == NULL)
|
||||
p = hdr((char *)"Organisation",msg);
|
||||
if (p) {
|
||||
while (isspace(*p))
|
||||
p++;
|
||||
tmsg->origin = xstrcpy(hdrconv(p, incode, outcode));
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
int ftnmsgid(char *,char **,unsigned long *,char *);
|
||||
ftnmsg *mkftnhdr(rfcmsg *, int, int, int);
|
||||
ftnmsg *mkftnhdr(rfcmsg *, int, int, int, faddr *);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -140,12 +140,12 @@ int Notify(char *Options)
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
F_Status(fido2faddr(nodes.Aka[i]));
|
||||
A_Status(fido2faddr(nodes.Aka[i]));
|
||||
F_Status(fido2faddr(nodes.Aka[i]), NULL);
|
||||
A_Status(fido2faddr(nodes.Aka[i]), NULL);
|
||||
}
|
||||
F_List(fido2faddr(nodes.Aka[i]), TRUE);
|
||||
A_List(fido2faddr(nodes.Aka[i]), TRUE);
|
||||
A_Flow(fido2faddr(nodes.Aka[i]), TRUE);
|
||||
F_List(fido2faddr(nodes.Aka[i]), NULL, TRUE);
|
||||
A_List(fido2faddr(nodes.Aka[i]), NULL, TRUE);
|
||||
A_Flow(fido2faddr(nodes.Aka[i]), NULL, TRUE);
|
||||
notify++;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: tosser/pack.c
|
||||
* Purpose ...............: Pack mail
|
||||
* Last modification date : 11-Mar-2001
|
||||
* Last modification date : 05-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -370,6 +370,9 @@ void packmail()
|
||||
struct dirent *de;
|
||||
DIR *dp;
|
||||
|
||||
if (!diskfree(CFG.freespace))
|
||||
return;
|
||||
|
||||
IsDoing("Packing mail");
|
||||
if (!do_quiet) {
|
||||
colour(9, 0);
|
||||
|
@ -62,7 +62,6 @@ extern int do_quiet;
|
||||
extern int net_in; /* Netmails received */
|
||||
extern int net_out; /* Netmails forwarded */
|
||||
extern int net_bad; /* Bad netmails (tracking errors */
|
||||
extern char *subj; /* Message subject */
|
||||
extern char *msgid; /* Original message id */
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/postnetmail.c
|
||||
* Purpose ...............: Post Netmail message from temp file
|
||||
* Last modification date : 21-Jun-2001
|
||||
* Last modification date : 03-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -40,8 +40,8 @@
|
||||
#include "../lib/clcomm.h"
|
||||
#include "tracker.h"
|
||||
#include "addpkt.h"
|
||||
#include "importnet.h"
|
||||
#include "mkrfcmsg.h"
|
||||
#include "storenet.h"
|
||||
#include "ftn2rfc.h"
|
||||
#include "areamgr.h"
|
||||
#include "filemgr.h"
|
||||
#include "ping.h"
|
||||
@ -64,15 +64,16 @@ extern int most_debug; /* Headvy debugging flag */
|
||||
* Post netmail message for temp file. The tempfile is an FTN style message.
|
||||
*
|
||||
* 0 - All seems well.
|
||||
* 1 - Something went wrong.
|
||||
* 1 - Can't access messagebase.
|
||||
* 2 - Can't find netmail board.
|
||||
*
|
||||
*/
|
||||
int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t mdate, int flags, int DoPing)
|
||||
{
|
||||
char *p, *reply = NULL;
|
||||
char name[36], *buf;
|
||||
char *p, *msgid = NULL, *reply = NULL;
|
||||
char name[36], *buf, *l, *r, *q;
|
||||
char System[36], ext[4];
|
||||
int result = 1, email = FALSE;
|
||||
int result = 1, email = FALSE, fmpt = 0, topt = 0;
|
||||
faddr *ta, *ra;
|
||||
fidoaddr na, route, Orig;
|
||||
FILE *sfp, *net;
|
||||
@ -84,6 +85,124 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
Syslog('m', "Post netmail subj: %s", MBSE_SS(subject));
|
||||
net_in++;
|
||||
|
||||
/*
|
||||
* Extract MSGID and REPLY kludges from this netmail.
|
||||
*/
|
||||
buf = calloc(2048, sizeof(char));
|
||||
rewind(fp);
|
||||
while ((fgets(buf, 2048, fp)) != NULL) {
|
||||
Striplf(buf);
|
||||
Syslogp('m', printable(buf, 0));
|
||||
if (!strncmp(buf, "\001MSGID: ", 8)) {
|
||||
msgid = xstrcpy(buf + 8);
|
||||
/*
|
||||
* Extra test to see if the mail comes from a pointaddress.
|
||||
*/
|
||||
l = strtok(buf," \n");
|
||||
l = strtok(NULL," \n");
|
||||
if ((ta = parsefnode(l))) {
|
||||
if (ta->zone == f->zone && ta->net == f->net && ta->node == f->node && !fmpt && ta->point) {
|
||||
Syslog('m', "Setting pointinfo (%d) from MSGID", ta->point);
|
||||
fmpt = f->point = ta->point;
|
||||
}
|
||||
tidy_faddr(ta);
|
||||
}
|
||||
}
|
||||
if (!strncmp(buf, "\001FMPT", 5)) {
|
||||
p = strtok(buf, " \n");
|
||||
p = strtok(NULL, " \n");
|
||||
fmpt = atoi(p);
|
||||
}
|
||||
if (!strncmp(buf, "\001TOPT", 5)) {
|
||||
p = strtok(buf, " \n");
|
||||
p = strtok(NULL, " \n");
|
||||
topt = atoi(p);
|
||||
}
|
||||
if (!strncmp(buf, "\001REPLY: ", 8))
|
||||
reply = xstrcpy(buf + 8);
|
||||
|
||||
/*
|
||||
* Check DOMAIN and INTL kludges
|
||||
*/
|
||||
if (!strncmp(buf, "\001DOMAIN", 7)) {
|
||||
l = strtok(buf," \n");
|
||||
l = strtok(NULL," \n");
|
||||
p = strtok(NULL," \n");
|
||||
r = strtok(NULL," \n");
|
||||
q = strtok(NULL," \n");
|
||||
if ((ta = parsefnode(p))) {
|
||||
t->point = ta->point;
|
||||
t->node = ta->node;
|
||||
t->net = ta->net;
|
||||
t->zone = ta->zone;
|
||||
tidy_faddr(ta);
|
||||
}
|
||||
t->domain = xstrcpy(l);
|
||||
if ((ta = parsefnode(q))) {
|
||||
f->point = ta->point;
|
||||
f->node = ta->node;
|
||||
f->net = ta->net;
|
||||
f->zone = ta->zone;
|
||||
tidy_faddr(ta);
|
||||
}
|
||||
f->domain = xstrcpy(r);
|
||||
} else {
|
||||
if (!strncmp(buf, "\001INTL", 5)) {
|
||||
l = strtok(buf," \n");
|
||||
l = strtok(NULL," \n");
|
||||
r = strtok(NULL," \n");
|
||||
if ((ta = parsefnode(l))) {
|
||||
t->point = ta->point;
|
||||
t->node = ta->node;
|
||||
t->net = ta->net;
|
||||
t->zone = ta->zone;
|
||||
if (ta->domain) {
|
||||
if (t->domain)
|
||||
free(t->domain);
|
||||
t->domain = ta->domain;
|
||||
ta->domain = NULL;
|
||||
}
|
||||
tidy_faddr(ta);
|
||||
}
|
||||
if ((ta = parsefnode(r))) {
|
||||
f->point = ta->point;
|
||||
f->node = ta->node;
|
||||
f->net = ta->net;
|
||||
f->zone = ta->zone;
|
||||
if (ta->domain) {
|
||||
if (f->domain)
|
||||
free(f->domain);
|
||||
f->domain = ta->domain;
|
||||
ta->domain = NULL;
|
||||
}
|
||||
tidy_faddr(ta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for X-FTN- kludges, this could be gated email.
|
||||
* This should be impossible.
|
||||
*/
|
||||
if (!strncmp(buf, "\001X-FTN-", 7)) {
|
||||
email = TRUE;
|
||||
Syslog('?', "Warning: detected ^aX-FTN- kludge in netmail");
|
||||
}
|
||||
}
|
||||
free(buf);
|
||||
|
||||
/*
|
||||
* Only set point info if there was any info.
|
||||
* GoldED doesn't set FMPT and TOPT kludges.
|
||||
*/
|
||||
if (fmpt)
|
||||
f->point = fmpt;
|
||||
if (topt)
|
||||
t->point = topt;
|
||||
|
||||
Syslog('m', "Final netmail from: %s", ascfnode(f, 0xff));
|
||||
Syslog('m', "Final netmail to : %s", ascfnode(t, 0xff));
|
||||
|
||||
memset(&na, 0, sizeof(na));
|
||||
na.zone = t->zone;
|
||||
na.net = t->net;
|
||||
@ -108,12 +227,10 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
|
||||
if (email) {
|
||||
/*
|
||||
* Send this netmail via mkrfcmsg -> postemail.
|
||||
* Send this netmail via ftn2rfc -> postemail.
|
||||
*/
|
||||
if (reply)
|
||||
free(reply);
|
||||
most_debug = TRUE;
|
||||
result = mkrfcmsg(f, t, subject, orig, mdate, flags, fp, 0L, FALSE);
|
||||
result = ftn2rfc(f, t, subject, orig, mdate, flags, fp);
|
||||
most_debug = FALSE;
|
||||
return result;
|
||||
}
|
||||
@ -142,18 +259,16 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
while (fread(&servrec, servhdr.recsize, 1, sfp) == 1) {
|
||||
if ((strncasecmp(servrec.Service, name, strlen(servrec.Service)) == 0) && servrec.Active) {
|
||||
switch (servrec.Action) {
|
||||
case AREAMGR: result = AreaMgr(f, t, mdate, flags, fp);
|
||||
case AREAMGR: result = AreaMgr(f, t, msgid, subject, mdate, flags, fp);
|
||||
break;
|
||||
case FILEMGR: result = FileMgr(f, t, mdate, flags, fp);
|
||||
case FILEMGR: result = FileMgr(f, t, msgid, subject, mdate, flags, fp);
|
||||
break;
|
||||
case EMAIL: most_debug = TRUE;
|
||||
result = mkrfcmsg(f, t, subject, orig, mdate, flags, fp, 0L, FALSE);
|
||||
result = ftn2rfc(f, t, subject, orig, mdate, flags, fp);
|
||||
most_debug = FALSE;
|
||||
break;
|
||||
}
|
||||
Syslog('m', "Handled service %s, rc=%d", servrec.Service, result);
|
||||
if (reply)
|
||||
free(reply);
|
||||
fclose(sfp);
|
||||
return result;
|
||||
}
|
||||
@ -174,9 +289,7 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
* Import if one fits.
|
||||
*/
|
||||
if (SearchUser(name)) {
|
||||
if (reply)
|
||||
free(reply);
|
||||
return importnet(f, t, mdate, flags, fp);
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp);
|
||||
}
|
||||
|
||||
Syslog('+', " \"%s\" is not a known BBS user", name);
|
||||
@ -187,9 +300,9 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
Syslog('+', " Readdress from %s to %s", name, CFG.sysop_name);
|
||||
sprintf(name, "%s", CFG.sysop_name);
|
||||
if (SearchUser(name)) {
|
||||
return importnet(f, t, mdate, flags, fp);
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp);
|
||||
} else {
|
||||
WriteError("Readdress import failed");
|
||||
WriteError("Readdress import failed, sysop doesn't exist. CHECK YOUR SETUP");
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@ -291,8 +404,6 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
fclose(net);
|
||||
free(buf);
|
||||
net_out++;
|
||||
if (reply)
|
||||
free(reply);
|
||||
Syslog('m', "Forward done.");
|
||||
return 0;
|
||||
|
||||
@ -303,9 +414,7 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
|
||||
*/
|
||||
WriteError("No ROUTE for this netmail");
|
||||
net_bad++;
|
||||
if (reply)
|
||||
free(reply);
|
||||
return importnet(f, t, mdate, flags, fp);
|
||||
return storenet(f, t, mdate, flags, subject, msgid, reply, fp);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/ptic.c
|
||||
* Purpose ...............: Process 1 .tic file
|
||||
* Last modification date : 08-Jul-2001
|
||||
* Last modification date : 31-Jul-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -730,7 +730,7 @@ int ProcessTic(fa_list *sbl, char *Realname)
|
||||
if (CFG.akavalid[i] && (tic.Aka.zone == CFG.aka[i].zone) &&
|
||||
!((tic.Aka.net == CFG.aka[i].net) && (tic.Aka.node == CFG.aka[i].node))) {
|
||||
sprintf(sbe, "%u:%u/%u", CFG.aka[i].zone, CFG.aka[i].net, CFG.aka[i].node);
|
||||
fill_list(&sbl, sbe, NULL, FALSE);
|
||||
fill_list(&sbl, sbe, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -743,7 +743,7 @@ int ProcessTic(fa_list *sbl, char *Realname)
|
||||
if (!((TIC.Aka.zone == Link.aka.zone) && (TIC.Aka.net == Link.aka.net) &&
|
||||
(TIC.Aka.node == Link.aka.node) && (TIC.Aka.point == Link.aka.point))) {
|
||||
sprintf(sbe, "%u:%u/%u", Link.aka.zone, Link.aka.net, Link.aka.node);
|
||||
fill_list(&sbl, sbe, NULL, FALSE);
|
||||
fill_list(&sbl, sbe, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/rnews.c
|
||||
* Purpose ...............: rnews function
|
||||
* Last modification date : 19-Jul-2001
|
||||
* Last modification date : 14-Aug-2001
|
||||
* Remarks ...............: Most of these functions are borrowed from inn.
|
||||
*
|
||||
*****************************************************************************
|
||||
@ -42,7 +42,7 @@
|
||||
#include "../lib/msg.h"
|
||||
#include "../lib/msgtext.h"
|
||||
#include "pack.h"
|
||||
#include "scannews.h"
|
||||
#include "rfc2ftn.h"
|
||||
#include "mbfido.h"
|
||||
#include "paths.h"
|
||||
#include "rnews.h"
|
||||
@ -88,6 +88,8 @@ static HEADER RequiredHeaders[] = {
|
||||
#define ISWHITE(c) ((c) == ' ' || (c) == '\t')
|
||||
#define caseEQn(a, b, n) (strncasecmp((a), (b), (size_t)(n)) == 0)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* External variables
|
||||
*/
|
||||
@ -95,6 +97,7 @@ extern int do_quiet;
|
||||
extern int most_debug;
|
||||
extern int news_in;
|
||||
extern int news_dupe;
|
||||
extern int check_dupe;
|
||||
|
||||
|
||||
void ProcessOne(FILE *);
|
||||
@ -109,9 +112,11 @@ const char *HeaderFindMem(const char *Article, const int ArtLen, const char *Hea
|
||||
const char *p;
|
||||
|
||||
for (p = Article; ; ) {
|
||||
/* Match first character, then colon, then whitespace (don't
|
||||
/*
|
||||
* Match first character, then colon, then whitespace (don't
|
||||
* delete that line -- meet the RFC!) then compare the rest
|
||||
* of the word. */
|
||||
* of the word.
|
||||
*/
|
||||
if (HeaderLen + 1 < Article + ArtLen - p && p[HeaderLen] == ':'
|
||||
&& ISWHITE(p[HeaderLen + 1]) && caseEQn(p, Header, (size_t)HeaderLen)) {
|
||||
p += HeaderLen + 2;
|
||||
@ -274,7 +279,6 @@ static int Process(char *article)
|
||||
char *id = NULL;
|
||||
FILE *fp;
|
||||
|
||||
Syslog('n', "Process article");
|
||||
/*
|
||||
* Empty article?
|
||||
*/
|
||||
@ -538,7 +542,7 @@ static int UnpackOne(int *fdp, int *countp)
|
||||
|
||||
|
||||
|
||||
void NewsUUCP(int unspool)
|
||||
void NewsUUCP(void)
|
||||
{
|
||||
int fd = STDIN, i, rc;
|
||||
|
||||
@ -550,19 +554,11 @@ void NewsUUCP(int unspool)
|
||||
printf("Process UUCP Newsbatch\n");
|
||||
}
|
||||
|
||||
if (unspool) {
|
||||
// Unspool();
|
||||
} else {
|
||||
// if (!UnpackOne(&fd, &i))
|
||||
// Spool(fd);
|
||||
most_debug = TRUE;
|
||||
rc = UnpackOne(&fd, &i);
|
||||
most_debug = FALSE;
|
||||
Syslog('+', "Batch result=%d", rc);
|
||||
WaitForChildren(i);
|
||||
}
|
||||
|
||||
Syslog('+', "End of UUCP batch");
|
||||
Syslog('+', "End of UUCP batch, rc=%d", rc);
|
||||
packmail();
|
||||
|
||||
if (!do_quiet)
|
||||
@ -601,7 +597,7 @@ void ProcessOne(FILE *fp)
|
||||
groups[nrofgroups] = xstrcpy(group);
|
||||
nrofgroups++;
|
||||
} else {
|
||||
Syslog('n', "Newsgroup %s doesn't exist", group);
|
||||
Syslog('-', "Newsgroup %s doesn't exist", group);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -620,19 +616,19 @@ void ProcessOne(FILE *fp)
|
||||
} else if (mbuf == NULL) {
|
||||
WriteError("No valid Message-ID found");
|
||||
} else {
|
||||
news_in++;
|
||||
IsDoing("Article %d", (news_in + 1));
|
||||
for (i = 0; i < nrofgroups; i++) {
|
||||
Syslog('n', "Process %s", groups[i]);
|
||||
p = xstrcpy(mbuf);
|
||||
p = xstrcat(p, groups[i]);
|
||||
crc = str_crc32(p);
|
||||
if (CheckDupe(crc, D_NEWS, CFG.nntpdupes)) {
|
||||
if (check_dupe && CheckDupe(crc, D_NEWS, CFG.nntpdupes)) {
|
||||
news_dupe++;
|
||||
news_in++;
|
||||
Syslog('+', "Duplicate article \"%s\" in group %s", mbuf, groups[i]);
|
||||
} else {
|
||||
if (SearchMsgsNews(groups[i])) {
|
||||
do_article(fp);
|
||||
rfc2ftn(fp, NULL);
|
||||
}
|
||||
}
|
||||
free(groups[i]);
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define SMBUF 256
|
||||
|
||||
|
||||
void NewsUUCP(int);
|
||||
void NewsUUCP(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/scan.h
|
||||
* Purpose ...............: Scan for outgoing mail.
|
||||
* Last modification date : 01-Jul-2001
|
||||
* Last modification date : 13-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -41,7 +41,7 @@
|
||||
#include "addpkt.h"
|
||||
#include "pack.h"
|
||||
#include "tracker.h"
|
||||
#include "mkrfcmsg.h"
|
||||
#include "ftn2rfc.h"
|
||||
#include "postemail.h"
|
||||
#include "scan.h"
|
||||
|
||||
@ -52,8 +52,6 @@ extern int net_bad;
|
||||
extern int echo_in;
|
||||
extern int email_out;
|
||||
extern int echo_out;
|
||||
extern int email_imp;
|
||||
extern int email_bad;
|
||||
extern int most_debug;
|
||||
int scanned;
|
||||
|
||||
@ -252,7 +250,7 @@ void ScanFull()
|
||||
*/
|
||||
if ((msgs.Type == ECHOMAIL) || (msgs.Type == NEWS)) {
|
||||
echo_in++;
|
||||
fill_list(&sbl, aka2str(msgs.Aka), NULL, FALSE);
|
||||
fill_list(&sbl, aka2str(msgs.Aka), NULL);
|
||||
for (i = 0; i < 40; i++) {
|
||||
if (CFG.akavalid[i] &&
|
||||
(msgs.Aka.zone == CFG.aka[i].zone) &&
|
||||
@ -260,14 +258,14 @@ void ScanFull()
|
||||
(msgs.Aka.node == CFG.aka[i].node))) {
|
||||
sprintf(sbe, "%u/%u", CFG.aka[i].net,
|
||||
CFG.aka[i].node);
|
||||
fill_list(&sbl, sbe, NULL, FALSE);
|
||||
fill_list(&sbl, sbe, NULL);
|
||||
}
|
||||
}
|
||||
fseek(pAreas, sysstart, SEEK_SET);
|
||||
for (i = 0; i < (msgshdr.syssize / sizeof(sysconnect)); i++) {
|
||||
fread(&Link, sizeof(sysconnect), 1, pAreas);
|
||||
if ((Link.aka.zone) && (Link.sendto) && (!Link.pause)) {
|
||||
fill_list(&sbl, aka2str(Link.aka), NULL, FALSE);
|
||||
fill_list(&sbl, aka2str(Link.aka), NULL);
|
||||
}
|
||||
}
|
||||
uniq_list(&sbl);
|
||||
@ -404,7 +402,7 @@ void ScanOne(char *path, unsigned long MsgNum)
|
||||
*/
|
||||
if (msgs.Type == ECHOMAIL || msgs.Type == NEWS) {
|
||||
echo_in++;
|
||||
fill_list(&sbl, aka2str(msgs.Aka), NULL, FALSE);
|
||||
fill_list(&sbl, aka2str(msgs.Aka), NULL);
|
||||
for (i = 0; i < 40; i++) {
|
||||
if (CFG.akavalid[i] &&
|
||||
(msgs.Aka.zone == CFG.aka[i].zone) &&
|
||||
@ -412,14 +410,14 @@ void ScanOne(char *path, unsigned long MsgNum)
|
||||
(msgs.Aka.node == CFG.aka[i].node))) {
|
||||
sprintf(sbe, "%u/%u", CFG.aka[i].net,
|
||||
CFG.aka[i].node);
|
||||
fill_list(&sbl, sbe, NULL, FALSE);
|
||||
fill_list(&sbl, sbe, NULL);
|
||||
}
|
||||
}
|
||||
fseek(pAreas, sysstart, SEEK_SET);
|
||||
for (i = 0; i < (msgshdr.syssize / sizeof(sysconnect)); i++) {
|
||||
fread(&Link, sizeof(sysconnect), 1, pAreas);
|
||||
if ((Link.aka.zone) && (Link.sendto) && (!Link.pause)) {
|
||||
fill_list(&sbl, aka2str(Link.aka), NULL, FALSE);
|
||||
fill_list(&sbl, aka2str(Link.aka), NULL);
|
||||
}
|
||||
}
|
||||
uniq_list(&sbl);
|
||||
@ -530,8 +528,8 @@ int RescanOne(faddr *L, char *marea, unsigned long Num)
|
||||
while (MsgNum<=Total){
|
||||
if (Msg_ReadHeader(MsgNum)) {
|
||||
if (Msg_Lock(15L)) {
|
||||
fill_list(&sbl, aka2str(msgs.Aka), NULL, FALSE);
|
||||
fill_list(&sbl, aka2str(Link.aka), NULL, FALSE);
|
||||
fill_list(&sbl, aka2str(msgs.Aka), NULL);
|
||||
fill_list(&sbl, aka2str(Link.aka), NULL);
|
||||
sort_list(&sbl);
|
||||
ExportEcho(Link, MsgNum, &sbl);
|
||||
tidy_falist(&sbl);
|
||||
@ -753,7 +751,7 @@ void ExportNews(unsigned long MsgNum, fa_list **sbl)
|
||||
|
||||
rewind(qp);
|
||||
most_debug = TRUE;
|
||||
mkrfcmsg(from, dest, NULL, NULL, Msg.Written + (gmt_offset((time_t)0) * 60), flags, qp, 0L, FALSE);
|
||||
ftn2rfc(from, dest, NULL, NULL, Msg.Written + (gmt_offset((time_t)0) * 60), flags, qp);
|
||||
most_debug = FALSE;
|
||||
tidy_faddr(from);
|
||||
fclose(qp);
|
||||
@ -781,6 +779,26 @@ void ExportNet(unsigned long MsgNum, int UUCPgate)
|
||||
Syslog('m', "Export netmail to %s of %s (%s) %s mode", Msg.To, Msg.ToAddress,
|
||||
(Msg.Crash || Msg.Direct || Msg.FileAttach) ? "Direct" : "Routed", UUCPgate ? "UUCP" : "Netmail");
|
||||
|
||||
/*
|
||||
* Analyze this message if it contains INTL, FMPT and TOPT kludges
|
||||
* and check if we need them. If they are missing they are inserted.
|
||||
* GoldED doesn't insert them but MBSE does.
|
||||
*/
|
||||
if (Msg_Read(MsgNum, 78)) {
|
||||
if ((p = (char *)MsgText_First()) != NULL) {
|
||||
do {
|
||||
if (strncmp(p, "\001FMPT", 5) == 0)
|
||||
is_fmpt = TRUE;
|
||||
if (strncmp(p, "\001TOPT", 5) == 0)
|
||||
is_topt = TRUE;
|
||||
if (strncmp(p, "\001INTL", 5) == 0)
|
||||
is_intl = TRUE;
|
||||
if (strncmp(p, "--- ", 4) == 0)
|
||||
break;
|
||||
} while ((p = (char *)MsgText_Next()) != NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if this a netmail to our own local UUCP gate.
|
||||
*/
|
||||
@ -824,6 +842,14 @@ void ExportNet(unsigned long MsgNum, int UUCPgate)
|
||||
fprintf(fp, "Content-Transfer-Encoding: 8bit\n");
|
||||
fprintf(fp, "X-Mailreader: MBSE BBS %s\r\n", VERSION);
|
||||
|
||||
if (msgs.Aka.point && !is_fmpt)
|
||||
fprintf(fp, "X-FTN-FMPT: %d\r", msgs.Aka.point);
|
||||
if (Dest.point && !is_topt)
|
||||
fprintf(fp, "X-FTN-TOPT: %d\r", Dest.point);
|
||||
if (!is_intl)
|
||||
fprintf(fp, "X-FTN-INTL: %d:%d/%d %d:%d/%d\r", Dest.zone, Dest.net, Dest.node,
|
||||
msgs.Aka.zone, msgs.Aka.net, msgs.Aka.node);
|
||||
|
||||
if (Msg_Read(MsgNum, 78)) {
|
||||
if ((p = (char *)MsgText_First()) != NULL) {
|
||||
do {
|
||||
@ -947,25 +973,6 @@ void ExportNet(unsigned long MsgNum, int UUCPgate)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Analyze this message if it contains INTL, FMPT and TOPT kludges
|
||||
* and check if we need them. If they are missing they are inserted.
|
||||
* GoldED doesn't insert them but MBSE does.
|
||||
*/
|
||||
if (Msg_Read(MsgNum, 78)) {
|
||||
if ((p = (char *)MsgText_First()) != NULL) {
|
||||
do {
|
||||
if (strncmp(p, "\001FMPT", 5) == 0)
|
||||
is_fmpt = TRUE;
|
||||
if (strncmp(p, "\001TOPT", 5) == 0)
|
||||
is_topt = TRUE;
|
||||
if (strncmp(p, "\001INTL", 5) == 0)
|
||||
is_intl = TRUE;
|
||||
if (strncmp(p, "--- ", 4) == 0)
|
||||
break;
|
||||
} while ((p = (char *)MsgText_Next()) != NULL);
|
||||
}
|
||||
}
|
||||
if (msgs.Aka.point && !is_fmpt)
|
||||
fprintf(qp, "\001FMPT %d\r", msgs.Aka.point);
|
||||
if (Dest.point && !is_topt)
|
||||
@ -1077,9 +1084,9 @@ void ExportEmail(unsigned long MsgNum)
|
||||
}
|
||||
rewind(qp);
|
||||
most_debug = TRUE;
|
||||
retval = mkrfcmsg(from, too, Msg.Subject, NULL, Msg.Written, flags, qp, 0L, TRUE);
|
||||
retval = ftn2rfc(from, too, Msg.Subject, NULL, Msg.Written, flags, qp);
|
||||
most_debug = FALSE;
|
||||
Syslog('m', "mkrfcmsg rc=%d", retval);
|
||||
Syslog('m', "ftn2rfc rc=%d", retval);
|
||||
email_out++;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/scannews.c
|
||||
* Purpose ...............: Scan for new News
|
||||
* Last modification date : 01-Jul-2001
|
||||
* Last modification date : 04-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -42,9 +42,10 @@
|
||||
#include "../lib/msgtext.h"
|
||||
#include "mkftnhdr.h"
|
||||
#include "hash.h"
|
||||
#include "echoout.h"
|
||||
#include "rollover.h"
|
||||
#include "pack.h"
|
||||
#include "storeecho.h"
|
||||
#include "rfc2ftn.h"
|
||||
#include "scannews.h"
|
||||
|
||||
|
||||
@ -58,16 +59,6 @@
|
||||
*/
|
||||
POverview xoverview = NULL;
|
||||
int marker = 0;
|
||||
static int ftnorigin;
|
||||
static int removemime;
|
||||
static int removemsgid;
|
||||
static int removeref;
|
||||
static int removeinreply;
|
||||
static int removesupersedes;
|
||||
static int removeapproved;
|
||||
static int removereplyto;
|
||||
static int removereturnto;
|
||||
static int dirtyoutcode = CHRS_NOTSET;
|
||||
|
||||
|
||||
|
||||
@ -84,9 +75,6 @@ extern int echo_out;
|
||||
extern int echo_in;
|
||||
extern char *replyaddr;
|
||||
|
||||
extern char *toname; /* To user */
|
||||
extern char *fromname; /* From user */
|
||||
extern char *subj; /* Message subject */
|
||||
|
||||
|
||||
/*
|
||||
@ -99,7 +87,7 @@ void tidy_artlist(List **);
|
||||
void fill_artlist(List **, char *, long, int);
|
||||
void Marker(void);
|
||||
int get_article(char *, char *);
|
||||
int needputrfc(rfcmsg *);
|
||||
|
||||
|
||||
|
||||
void tidy_artlist(List **fdp)
|
||||
@ -134,49 +122,6 @@ void fill_artlist(List **fdp, char *id, long nr, int dupe)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* write an arbitrary line to message body,
|
||||
* if a line starts with three dashes, insert a dash and a blank
|
||||
*/
|
||||
int charwrite(char *, FILE *);
|
||||
int charwrite(char *s, FILE *fp)
|
||||
{
|
||||
if ((strlen(s) >= 3) && (strncmp(s,"---",3) == 0) && (s[3] != '-')) {
|
||||
putc('-',fp);
|
||||
putc(' ',fp);
|
||||
}
|
||||
while (*s) {
|
||||
putc(*s, fp);
|
||||
s++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* write (multiline) header to kluge: change \n to ' ' and end line with \n
|
||||
*/
|
||||
int kludgewrite(char *, FILE *);
|
||||
int kludgewrite(char *s, FILE *fp)
|
||||
{
|
||||
while (*s) {
|
||||
if (*s == '\r')
|
||||
putc('\n', fp);
|
||||
else {
|
||||
if (*s != '\n')
|
||||
putc(*s, fp);
|
||||
else if (*(s+1))
|
||||
putc(' ',fp);
|
||||
}
|
||||
s++;
|
||||
}
|
||||
putc('\n',fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Marker(void)
|
||||
{
|
||||
if (do_quiet)
|
||||
@ -397,776 +342,13 @@ int get_article(char *msgid, char *ftntag)
|
||||
|
||||
news_in++;
|
||||
IsDoing("Article %d", (news_in));
|
||||
retval = do_article(fp);
|
||||
retval = rfc2ftn(fp, NULL);
|
||||
fclose(fp);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int do_article(FILE *fp)
|
||||
{
|
||||
char sbe[16], *p, *q, *temp;
|
||||
int i, incode, outcode, pgpsigned;
|
||||
int First = TRUE, seenlen, oldnet;
|
||||
sysconnect Link;
|
||||
rfcmsg *msg = NULL, *tmsg, *tmp;
|
||||
ftnmsg *fmsg = NULL;
|
||||
FILE *ofp;
|
||||
fa_list *sbl = NULL, *ptl = NULL, *tmpl;
|
||||
faddr *ta, *From;
|
||||
unsigned long svmsgid, svreply;
|
||||
int sot_kludge = FALSE, eot_kludge = FALSE, qp_or_base64 = FALSE, tinyorigin = FALSE;
|
||||
int needsplit, hdrsize, datasize, splitpart, forbidsplit, rfcheaders;
|
||||
char newsubj[4 * (MAXSUBJ+1)], *oldsubj, *acup_a = NULL;
|
||||
unsigned long acup_n = 0, crc2;
|
||||
int html_message = FALSE;
|
||||
time_t Now;
|
||||
|
||||
rewind(fp);
|
||||
msg = parsrfc(fp);
|
||||
incode = outcode = CHRS_NOTSET;
|
||||
pgpsigned = FALSE;
|
||||
|
||||
p = hdr((char *)"Content-Type",msg);
|
||||
if (p)
|
||||
incode=readcharset(p);
|
||||
if (incode == CHRS_NOTSET) {
|
||||
p = hdr((char *)"X-FTN-CHRS",msg);
|
||||
if (p == NULL)
|
||||
p = hdr((char *)"X-FTN-CHARSET", msg);
|
||||
if (p == NULL)
|
||||
p = hdr((char *)"X-FTN-CODEPAGE", msg);
|
||||
if (p)
|
||||
incode = readchrs(p);
|
||||
}
|
||||
|
||||
if ((p = hdr((char *)"Content-Type",msg)) && ((strcasestr(p,(char *)"multipart/signed")) ||
|
||||
(strcasestr(p,(char *)"application/pgp")))) {
|
||||
pgpsigned = TRUE;
|
||||
outcode = incode;
|
||||
} else if ((p = hdr((char *)"X-FTN-ORIGCHRS", msg)))
|
||||
outcode = readchrs(p);
|
||||
else if (dirtyoutcode != CHRS_NOTSET)
|
||||
outcode = dirtyoutcode;
|
||||
else
|
||||
outcode = getoutcode(incode);
|
||||
for (tmsg = msg; tmsg; tmsg = tmsg->next)
|
||||
if (strcasecmp(tmsg->key, "X-FTN-SEEN-BY") == 0)
|
||||
fill_list(&sbl, tmsg->val, NULL, TRUE);
|
||||
|
||||
if (!CFG.allowcontrol) {
|
||||
if (hdr((char *)"Control",msg)) {
|
||||
Syslog('n', "skipping news message");
|
||||
tidy_falist(&sbl);
|
||||
tidyrfc(msg);
|
||||
return RETVAL_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if ((fmsg = mkftnhdr(msg, incode, outcode, TRUE)) == NULL) {
|
||||
WriteError("Unable to create FTN headers from RFC ones, aborting");
|
||||
tidy_falist(&sbl);
|
||||
tidyrfc(msg);
|
||||
return RETVAL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup PATH line
|
||||
*/
|
||||
sprintf(sbe, "%u/%u", msgs.Aka.net, msgs.Aka.node);
|
||||
fill_path(&ptl, sbe);
|
||||
fmsg->area = xstrcpy(msgs.Tag);
|
||||
svmsgid = fmsg->msgid_n;
|
||||
svreply = fmsg->reply_n;
|
||||
if ((p = hdr((char *)"Message-ID",msg))) {
|
||||
ftnmsgid(p, &fmsg->msgid_a, &fmsg->msgid_n, fmsg->area);
|
||||
hash_update_s(&fmsg->msgid_n, fmsg->area);
|
||||
}
|
||||
|
||||
if ((p = hdr((char *)"References",msg))) {
|
||||
p = strrchr(p,' ');
|
||||
ftnmsgid(p,&fmsg->reply_a, &fmsg->reply_n,fmsg->area);
|
||||
if (!chkftnmsgid(p)) {
|
||||
hash_update_s(&fmsg->reply_n, fmsg->area);
|
||||
}
|
||||
} else if ((p = hdr((char *)"In-Reply-To",msg))) {
|
||||
ftnmsgid(p,&fmsg->reply_a, &fmsg->reply_n,fmsg->area);
|
||||
if (!chkftnmsgid(p)) {
|
||||
hash_update_s(&fmsg->reply_n, fmsg->area);
|
||||
}
|
||||
}
|
||||
|
||||
if (incode == CHRS_NOTSET)
|
||||
incode = msgs.Rfccode;
|
||||
if (outcode == CHRS_NOTSET)
|
||||
outcode = msgs.Ftncode;
|
||||
if ((incode == CHRS_NOTSET) && (hdr((char *)"Message-ID",msg))) {
|
||||
if (chkftnmsgid(hdr((char *)"Message-ID",msg)))
|
||||
incode = CHRS_DEFAULT_FTN;
|
||||
else
|
||||
incode = CHRS_DEFAULT_RFC;
|
||||
}
|
||||
temp = calloc(4096, sizeof(char));
|
||||
removemime = FALSE;
|
||||
removemsgid = FALSE;
|
||||
removeref = FALSE;
|
||||
removeinreply = FALSE;
|
||||
removesupersedes = FALSE;
|
||||
removeapproved = FALSE;
|
||||
removereplyto = TRUE;
|
||||
removereturnto = TRUE;
|
||||
ftnorigin = fmsg->ftnorigin;
|
||||
if ((hdr((char *)"X-PGP-Signed",msg)))
|
||||
pgpsigned = TRUE;
|
||||
if (pgpsigned)
|
||||
Syslog('n', "pgpsigned = %s", pgpsigned ? "True":"False");
|
||||
|
||||
q = hdr((char *)"Content-Transfer-Encoding",msg);
|
||||
if (q)
|
||||
while (*q && isspace(*q))
|
||||
q++;
|
||||
if (!(q))
|
||||
q = (char *)"8bit";
|
||||
if ((p = hdr((char *)"Content-Type",msg))) {
|
||||
while (*p && isspace(*p))
|
||||
p++;
|
||||
|
||||
/*
|
||||
* turn the quoted-printable decode mode on; remember FTN is virtually 8-bit clean
|
||||
*/
|
||||
if ((strncasecmp(p, "text/plain", 10) == 0) && (strncasecmp(q, "quoted-printable", 16) == 0))
|
||||
qp_or_base64 = 1;
|
||||
/*
|
||||
* turn the base64 decode mode on
|
||||
*/
|
||||
else if ((strncasecmp(p, "text/plain", 10) == 0) && (strncasecmp(q, "base64", 6) == 0))
|
||||
qp_or_base64 = 2;
|
||||
|
||||
/*
|
||||
* text/html support from FSC-HTML 001 proposal of Odinn Sorensen (2:236/77)
|
||||
*/
|
||||
if (strncasecmp(p, "text/html", 9) == 0)
|
||||
html_message = TRUE;
|
||||
for (tmp = msg; tmp; tmp = tmp->next)
|
||||
if (((strcasecmp(tmp->key,"X-FTN-KLUDGE") == 0) && (strcasecmp(tmp->val,"FSCHTML") == 0)) ||
|
||||
(strcasecmp(tmp->key,"X-FTN-HTML") == 0))
|
||||
html_message = FALSE;
|
||||
|
||||
if ((readcharset(p) != CHRS_NOTSET ) && ((q == NULL) || (strncasecmp(q,"7bit",4) == 0) ||
|
||||
((!pgpsigned) && (qp_or_base64==1)) || ((!pgpsigned) && (qp_or_base64==2)) || (strncasecmp(q,"8bit",4) == 0)))
|
||||
removemime=1; /* no need in MIME headers */
|
||||
/*
|
||||
* some old MUA puts "text" instead of "text/plain; charset=..."
|
||||
*/
|
||||
else if ((strcasecmp(p,"text\n") == 0))
|
||||
removemime = TRUE;
|
||||
}
|
||||
if (removemime || qp_or_base64 || html_message)
|
||||
Syslog('n', "removemime=%s, qp_or_base64 = %d, html_message=%s", removemime ? "True":"False", qp_or_base64,
|
||||
html_message ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Message-ID",msg))) {
|
||||
if (!removemsgid)
|
||||
removemsgid = chkftnmsgid(p);
|
||||
}
|
||||
Syslog('n', "removemsgid = %s", removemsgid ? "True":"False");
|
||||
|
||||
if ((!removeref) && (p = hdr((char *)"References",msg))) {
|
||||
p = xstrcpy(p);
|
||||
q = strtok(p," \t\n");
|
||||
if ((q) && (strtok(NULL," \t\n") == NULL))
|
||||
removeref = chkftnmsgid(q);
|
||||
free(p);
|
||||
}
|
||||
if (removeref)
|
||||
Syslog('n', "removeref = %s", removeref ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Supersedes",msg)))
|
||||
removesupersedes = chkftnmsgid(p);
|
||||
if (removesupersedes)
|
||||
Syslog('n', "removesupersedes = %s", removesupersedes ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Approved",msg))) {
|
||||
while (*p && isspace(*p))
|
||||
p++;
|
||||
if ((q = strchr(p,'\n')))
|
||||
*q='\0';
|
||||
if (strlen(msgs.Moderator) && (strcasestr(msgs.Moderator,p)))
|
||||
removeapproved = TRUE;
|
||||
if (q)
|
||||
*q='\n';
|
||||
}
|
||||
if (removeapproved)
|
||||
Syslog('n', "removeapproved = %s", removeapproved ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Reply-To",msg))) {
|
||||
removereplyto = FALSE;
|
||||
if ((q = hdr((char *)"From",msg))) {
|
||||
char *r;
|
||||
r = xstrcpy(p);
|
||||
p = r;
|
||||
while(*p && isspace(*p))
|
||||
p++;
|
||||
if (p[strlen(p)-1] == '\n')
|
||||
p[strlen(p)-1]='\0';
|
||||
if (strcasestr(q,p))
|
||||
removereplyto = TRUE;
|
||||
free(r);
|
||||
}
|
||||
}
|
||||
Syslog('n', "removereplyto = %s", removereplyto ? "True":"False");
|
||||
|
||||
if ((p = hdr((char *)"Return-Receipt-To",msg))) {
|
||||
removereturnto = FALSE;
|
||||
if ((q = hdr((char *)"From",msg))) {
|
||||
char *r;
|
||||
|
||||
r = xstrcpy(p);
|
||||
p = r;
|
||||
while (*p && isspace(*p))
|
||||
p++;
|
||||
if (p[strlen(p)-1] == '\n')
|
||||
p[strlen(p)-1]='\0';
|
||||
if (strcasestr(q,p))
|
||||
removereturnto = TRUE;
|
||||
// free(r);
|
||||
}
|
||||
}
|
||||
if (!removereturnto)
|
||||
Syslog('n', "removereturnto = %s", removereturnto ? "True":"False");
|
||||
|
||||
p = ascfnode(fmsg->from,0x1f);
|
||||
i = 79-11-3-strlen(p);
|
||||
if (ftnorigin && fmsg->origin && (strlen(fmsg->origin) > i)) {
|
||||
/* This is a kludge... I don't like it too much. But well,
|
||||
if this is a message of FTN origin, the original origin (:)
|
||||
line MUST have been short enough to fit in 79 chars...
|
||||
So we give it a try. Probably it would be better to keep
|
||||
the information about the address format from the origin
|
||||
line in a special X-FTN-... header, but this seems even
|
||||
less elegant. Any _good_ ideas, anyone? */
|
||||
|
||||
/* OK, I am keeping this, though if should never be used
|
||||
al long as X-FTN-Origin is used now */
|
||||
|
||||
p = ascfnode(fmsg->from,0x0f);
|
||||
Syslog('n', "checkorigin 3");
|
||||
i = 79-11-3-strlen(p);
|
||||
tinyorigin = TRUE;
|
||||
}
|
||||
if (tinyorigin)
|
||||
Syslog('n', "tinyorigin = %s", tinyorigin ? "True":"False");
|
||||
|
||||
if ((fmsg->origin) && (strlen(fmsg->origin) > i))
|
||||
fmsg->origin[i]='\0';
|
||||
forbidsplit = (ftnorigin || (hdr((char *)"X-FTN-Split",msg)));
|
||||
needsplit = 0;
|
||||
splitpart = 0;
|
||||
hdrsize = 20;
|
||||
hdrsize += (fmsg->subj)?strlen(fmsg->subj):0;
|
||||
if (fmsg->from)
|
||||
hdrsize += (fmsg->from->name)?strlen(fmsg->from->name):0;
|
||||
if (fmsg->to)
|
||||
hdrsize += (fmsg->to->name)?strlen(fmsg->to->name):0;
|
||||
do {
|
||||
Syslog('n', "split loop, splitpart = %d", splitpart);
|
||||
datasize = 0;
|
||||
|
||||
if (splitpart) {
|
||||
sprintf(newsubj,"[part %d] ",splitpart+1);
|
||||
strncat(newsubj,fmsg->subj,MAXSUBJ-strlen(newsubj));
|
||||
} else {
|
||||
strncpy(newsubj,fmsg->subj,MAXSUBJ);
|
||||
}
|
||||
strcpy(newsubj, hdrnconv(newsubj, incode, outcode, MAXSUBJ));
|
||||
newsubj[MAXSUBJ]='\0';
|
||||
|
||||
if (splitpart) {
|
||||
hash_update_n(&fmsg->msgid_n,splitpart);
|
||||
}
|
||||
oldsubj = fmsg->subj;
|
||||
fmsg->subj = newsubj;
|
||||
|
||||
/*
|
||||
* Create a new temp message in FTN style format
|
||||
*/
|
||||
if ((ofp = tmpfile()) == NULL) {
|
||||
WriteError("$Can't open second tmpfile");
|
||||
tidy_falist(&sbl);
|
||||
tidy_falist(&ptl);
|
||||
tidyrfc(msg);
|
||||
return RETVAL_ERROR;
|
||||
}
|
||||
fprintf(ofp, "AREA:%s\n", msgs.Tag);
|
||||
fprintf(ofp, "\001MSGID: %s %08lx\n", MBSE_SS(fmsg->msgid_a),fmsg->msgid_n);
|
||||
if (fmsg->reply_s)
|
||||
fprintf(ofp, "\1REPLY: %s\n", fmsg->reply_s);
|
||||
else if (fmsg->reply_a)
|
||||
fprintf(ofp, "\1REPLY: %s %08lx\n", fmsg->reply_a, fmsg->reply_n);
|
||||
Now = time(NULL) - (gmt_offset((time_t)0) * 60);
|
||||
fprintf(ofp, "\001TZUTC: %s\n", gmtoffset(Now));
|
||||
fmsg->subj = oldsubj;
|
||||
if ((p = hdr((char *)"X-FTN-REPLYADDR",msg))) {
|
||||
Syslog('n', "replyaddr 1 %s", p);
|
||||
hdrsize += 10+strlen(p);
|
||||
fprintf(ofp,"\1REPLYADDR:");
|
||||
kludgewrite(p,ofp);
|
||||
} else if (replyaddr) {
|
||||
Syslog('n', "replyaddr 2");
|
||||
hdrsize += 10+strlen(replyaddr);
|
||||
fprintf(ofp,"\1REPLYADDR: ");
|
||||
kludgewrite(replyaddr,ofp);
|
||||
}
|
||||
if ((p = hdr((char *)"X-FTN-REPLYTO",msg))) {
|
||||
hdrsize += 8+strlen(p);
|
||||
fprintf(ofp,"\1REPLYTO:");
|
||||
kludgewrite(p,ofp);
|
||||
} else if (replyaddr) {
|
||||
hdrsize += 15;
|
||||
fprintf(ofp,"\1REPLYTO: %s UUCP\n", aka2str(msgs.Aka));
|
||||
} else if ((p = hdr((char *)"Reply-To",msg))) {
|
||||
if ((ta = parsefaddr(p))) {
|
||||
if ((q = hdr((char *)"From",msg))) {
|
||||
if (!strcasestr(q,p)) {
|
||||
fprintf(ofp,"\1REPLYTO: %s %s\n", ascfnode(ta,0x1f), ta->name);
|
||||
}
|
||||
tidy_faddr(ta);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((p=strip_flags(hdr((char *)"X-FTN-FLAGS",msg)))) {
|
||||
hdrsize += 15;
|
||||
fprintf(ofp,"\1FLAGS:%s\n",p);
|
||||
free(p);
|
||||
}
|
||||
if (!hdr((char *)"X-FTN-PID", msg)) {
|
||||
p = hdr((char *)"User-Agent", msg);
|
||||
if (p == NULL)
|
||||
p = hdr((char *)"X-Newsreader", msg);
|
||||
if (p == NULL)
|
||||
p = hdr((char *)"X-Mailer", msg);
|
||||
if (p) {
|
||||
hdrsize += 4 + strlen(p);
|
||||
fprintf(ofp, "\1PID:");
|
||||
kludgewrite(p, ofp);
|
||||
} else {
|
||||
fprintf(ofp, "\001PID: MBSE-FIDO %s\n", VERSION);
|
||||
}
|
||||
}
|
||||
|
||||
hdrsize += 8 + strlen(getchrs(outcode));
|
||||
fprintf(ofp, "\001CHRS: %s\n", getchrs(outcode));
|
||||
if (html_message) {
|
||||
hdrsize += 9;
|
||||
fprintf(ofp, "\1HTML: 5\n");
|
||||
}
|
||||
|
||||
if (CFG.allowcontrol && (!hdr((char *)"X-FTN-ACUPDATE",msg)) && (p=hdr((char *)"Control",msg))) {
|
||||
if (strstr(p,"cancel")) {
|
||||
ftnmsgid(p,&acup_a,&acup_n,fmsg->area);
|
||||
if (acup_a) {
|
||||
hash_update_s(&acup_n,fmsg->area);
|
||||
hdrsize += 26 + strlen(acup_a);
|
||||
fprintf(ofp,"\1ACUPDATE: DELETE %s %08lx\n", acup_a,acup_n);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((!hdr((char *)"X-FTN-ACUPDATE",msg)) && (p=hdr((char *)"Supersedes",msg))) {
|
||||
ftnmsgid(p,&acup_a,&acup_n,fmsg->area);
|
||||
if (acup_a) {
|
||||
hash_update_s(&acup_n,fmsg->area);
|
||||
hdrsize += 26 + strlen(acup_a);
|
||||
fprintf(ofp,"\1ACUPDATE: MODIFY %s %08lx\n", acup_a,acup_n);
|
||||
}
|
||||
}
|
||||
#ifdef FSC_0070
|
||||
/* FSC-0070 */
|
||||
if((p = hdr((char *)"Message-ID", msg)) && !(hdr((char *)"X-FTN-RFCID", msg))) {
|
||||
q = strdup(p);
|
||||
fprintf(ofp,"\1RFCID:");
|
||||
if ((l = strrchr(q, '<')) && (r = strchr(q, '>')) && (l < r)) {
|
||||
*l++ = ' ';
|
||||
while(*l && isspace(*l))
|
||||
l++;
|
||||
l--; /* leading ' ' */
|
||||
*r-- = '\0';
|
||||
while(*r && isspace(*r))
|
||||
*r-- = '\0';
|
||||
} else
|
||||
l = q;
|
||||
kludgewrite(l, ofp);
|
||||
hdrsize += 6 + strlen(l);
|
||||
free(q);
|
||||
}
|
||||
#endif /* FSC_0070 */
|
||||
|
||||
if (!(hdr((char *)"X-FTN-Tearline", msg)) && !(hdr((char *)"X-FTN-TID", msg))) {
|
||||
sprintf(temp, " MBSE-FIDO %s", VERSION);
|
||||
hdrsize += 4 + strlen(temp);
|
||||
fprintf(ofp, "\1TID:");
|
||||
kludgewrite(temp, ofp);
|
||||
}
|
||||
if ((splitpart == 0) || (hdrsize < MAXHDRSIZE)) {
|
||||
for (tmp = msg; tmp; tmp = tmp->next) {
|
||||
if ((!strncmp(tmp->key,"X-Fsc-",6)) ||
|
||||
(!strncmp(tmp->key,"X-FTN-",6) &&
|
||||
strcasecmp(tmp->key,"X-FTN-Tearline") &&
|
||||
strcasecmp(tmp->key,"X-FTN-Origin") &&
|
||||
strcasecmp(tmp->key,"X-FTN-Sender") &&
|
||||
strcasecmp(tmp->key,"X-FTN-Split") &&
|
||||
strcasecmp(tmp->key,"X-FTN-FLAGS") &&
|
||||
strcasecmp(tmp->key,"X-FTN-AREA") &&
|
||||
strcasecmp(tmp->key,"X-FTN-MSGID") &&
|
||||
strcasecmp(tmp->key,"X-FTN-REPLY") &&
|
||||
strcasecmp(tmp->key,"X-FTN-SEEN-BY") &&
|
||||
strcasecmp(tmp->key,"X-FTN-PATH") &&
|
||||
strcasecmp(tmp->key,"X-FTN-REPLYADDR") &&
|
||||
strcasecmp(tmp->key,"X-FTN-REPLYTO") &&
|
||||
strcasecmp(tmp->key,"X-FTN-To") &&
|
||||
strcasecmp(tmp->key,"X-FTN-From") &&
|
||||
strcasecmp(tmp->key,"X-FTN-CHARSET") &&
|
||||
strcasecmp(tmp->key,"X-FTN-CHRS") &&
|
||||
strcasecmp(tmp->key,"X-FTN-CODEPAGE") &&
|
||||
strcasecmp(tmp->key,"X-FTN-ORIGCHRS") &&
|
||||
strcasecmp(tmp->key,"X-FTN-SOT") &&
|
||||
strcasecmp(tmp->key,"X-FTN-EOT") &&
|
||||
strcasecmp(tmp->key,"X-FTN-Via"))) {
|
||||
if ((strcasecmp(tmp->key,"X-FTN-KLUDGE") == 0)) {
|
||||
if (!strcasecmp(tmp->val," SOT:\n"))
|
||||
sot_kludge = TRUE;
|
||||
else if (!strcasecmp(tmp->val," EOT:\n"))
|
||||
eot_kludge = TRUE;
|
||||
else {
|
||||
hdrsize += strlen(tmp->val);
|
||||
fprintf(ofp,"\1");
|
||||
/* we should have restored the original string here... */
|
||||
kludgewrite((tmp->val)+1,ofp);
|
||||
}
|
||||
} else {
|
||||
hdrsize += strlen(tmp->key)+strlen(tmp->val);
|
||||
fprintf(ofp,"\1%s:",tmp->key+6);
|
||||
kludgewrite(tmp->val,ofp);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* ZConnect are X-ZC-*: in usenet, \1ZC-*: in FTN */
|
||||
for (tmp=msg;tmp;tmp=tmp->next)
|
||||
if ((!strncmp(tmp->key,"X-ZC-",5))) {
|
||||
hdrsize += strlen(tmp->key)+strlen(tmp->val);
|
||||
fprintf(ofp,"\1%s:",tmp->key+2);
|
||||
kludgewrite(tmp->val,ofp);
|
||||
}
|
||||
|
||||
/* mondo.org gateway uses ".MSGID: ..." in usenet */
|
||||
for (tmp=msg;tmp;tmp=tmp->next)
|
||||
if ((!strncmp(tmp->key,".",1)) && (strcasecmp(tmp->key,".MSGID"))) {
|
||||
hdrsize += strlen(tmp->key)+strlen(tmp->val);
|
||||
fprintf(ofp,"\1%s:",tmp->key+1);
|
||||
kludgewrite(tmp->val,ofp);
|
||||
}
|
||||
rfcheaders=0;
|
||||
for (tmp = msg; tmp; tmp = tmp->next) {
|
||||
if ((needputrfc(tmp) == 1)) {
|
||||
if (strcasestr((char *)"X-Origin-Newsgroups",tmp->key)) {
|
||||
hdrsize += 10+strlen(tmp->val);
|
||||
fprintf(ofp,"\1RFC-Newsgroups:");
|
||||
} else {
|
||||
hdrsize += strlen(tmp->key)+strlen(tmp->val);
|
||||
fprintf(ofp,"\1RFC-%s:",tmp->key);
|
||||
}
|
||||
kludgewrite(hdrconv(tmp->val, incode, outcode),ofp);
|
||||
}
|
||||
}
|
||||
|
||||
for (tmp=msg;tmp;tmp=tmp->next) {
|
||||
if ((needputrfc(tmp) > 1)) {
|
||||
rfcheaders++;
|
||||
if (strcasestr((char *)"X-Origin-Newsgroups",tmp->key)) {
|
||||
hdrsize += 10+strlen(tmp->val);
|
||||
fprintf(ofp,"Newsgroups:");
|
||||
} else {
|
||||
hdrsize += strlen(tmp->key)+strlen(tmp->val);
|
||||
fprintf(ofp,"%s:",tmp->key);
|
||||
}
|
||||
charwrite(hdrconv(tmp->val, incode, outcode),ofp);
|
||||
}
|
||||
}
|
||||
if (rfcheaders)
|
||||
charwrite((char *)"\n",ofp);
|
||||
if ((hdr((char *)"X-FTN-SOT",msg)) || (sot_kludge))
|
||||
fprintf(ofp,"\1SOT:\n");
|
||||
if ((splitpart == 0) && (hdr((char *)"X-PGP-Signed",msg)))
|
||||
fprintf(ofp,PGP_SIGNED_BEGIN"\n");
|
||||
}
|
||||
if (replyaddr) {
|
||||
// free(replyaddr); /* Gives SIGSEGV */
|
||||
replyaddr = NULL;
|
||||
}
|
||||
if (needsplit) {
|
||||
fprintf(ofp," * Continuation %d of a split message *\n\n", splitpart);
|
||||
needsplit = FALSE;
|
||||
} else if ((p=hdr((char *)"X-Body-Start",msg))) {
|
||||
datasize += strlen(p);
|
||||
if (qp_or_base64==1)
|
||||
charwrite(strkconv(qp_decode(p), incode, outcode), ofp);
|
||||
else if (qp_or_base64==2)
|
||||
charwrite(strkconv(b64_decode(p), incode, outcode), ofp);
|
||||
else
|
||||
charwrite(strkconv(p, incode, outcode), ofp);
|
||||
}
|
||||
while (!(needsplit=(!forbidsplit) && (((splitpart && (datasize > (CFG.new_split * 1024))) ||
|
||||
(!splitpart && ((datasize+hdrsize) > (CFG.new_split * 1024)))))) && (bgets(temp,4096-1,fp))) {
|
||||
datasize += strlen(temp);
|
||||
if (qp_or_base64==1)
|
||||
charwrite(strkconv(qp_decode(temp), incode, outcode), ofp);
|
||||
else if (qp_or_base64==2)
|
||||
charwrite(strkconv(b64_decode(temp), incode, outcode), ofp);
|
||||
else
|
||||
charwrite(strkconv(temp, incode, outcode), ofp);
|
||||
}
|
||||
if (needsplit) {
|
||||
fprintf(ofp,"\n * Message split, to be continued *\n");
|
||||
splitpart++;
|
||||
} else if ((p=hdr((char *)"X-PGP-Signed",msg))) {
|
||||
fprintf(ofp,PGP_SIG_BEGIN"\n");
|
||||
if ((q=hdr((char *)"X-PGP-Version",msg))) {
|
||||
fprintf(ofp,"Version:");
|
||||
charwrite(q,ofp);
|
||||
}
|
||||
if ((q=hdr((char *)"X-PGP-Charset",msg))) {
|
||||
fprintf(ofp,"Charset:");
|
||||
charwrite(q,ofp);
|
||||
}
|
||||
if ((q=hdr((char *)"X-PGP-Comment",msg))) {
|
||||
fprintf(ofp,"Comment:");
|
||||
charwrite(q,ofp);
|
||||
}
|
||||
fprintf(ofp,"\n");
|
||||
p=xstrcpy(p);
|
||||
q=strtok(p," \t\n");
|
||||
fprintf(ofp,"%s\n",q);
|
||||
while ((q=(strtok(NULL," \t\n"))))
|
||||
fprintf(ofp,"%s\n",q);
|
||||
fprintf(ofp,PGP_SIG_END"\n");
|
||||
}
|
||||
if ((p=hdr((char *)"X-FTN-EOT",msg)) || (eot_kludge))
|
||||
fprintf(ofp,"\1EOT:\n");
|
||||
|
||||
if ((p=hdr((char *)"X-FTN-Tearline",msg))) {
|
||||
fprintf(ofp,"---");
|
||||
if (strcasecmp(p," (none)\n") == 0)
|
||||
charwrite((char *)"\n",ofp);
|
||||
else
|
||||
charwrite(p,ofp);
|
||||
} else
|
||||
fprintf(ofp,"--- MBSE BBSv.%s\n",VERSION);
|
||||
|
||||
if ((p = hdr((char *)"X-FTN-Origin",msg))) {
|
||||
if (*(q=p+strlen(p)-1) == '\n')
|
||||
*q='\0';
|
||||
fprintf(ofp," * Origin:");
|
||||
charwrite(hdrconv(p, incode, outcode),ofp);
|
||||
} else {
|
||||
fprintf(ofp," * Origin: "); /* strlen=11 */
|
||||
if (fmsg->origin)
|
||||
charwrite(hdrconv(fmsg->origin, incode, outcode), ofp);
|
||||
else
|
||||
charwrite(CFG.origin, ofp);
|
||||
fprintf(ofp," (%s)",
|
||||
ascfnode(fmsg->from,tinyorigin?0x0f:0x1f));
|
||||
}
|
||||
/*
|
||||
* Setup SEEN-BY lines
|
||||
*/
|
||||
for (i = 0; i < 40; i++) {
|
||||
if (CFG.akavalid[i] && (msgs.Aka.zone == CFG.aka[i].zone) &&
|
||||
!((msgs.Aka.net == CFG.aka[i].net) && (msgs.Aka.node == CFG.aka[i].node))) {
|
||||
sprintf(sbe, "%u/%u", CFG.aka[i].net, CFG.aka[i].node);
|
||||
fill_list(&sbl, sbe, NULL, FALSE);
|
||||
}
|
||||
}
|
||||
sprintf(sbe, "%u/%u", msgs.Aka.net, msgs.Aka.node);
|
||||
First = TRUE;
|
||||
/*
|
||||
* Count downlinks, if there are none then no more SEEN-BY entries will be added.
|
||||
*/
|
||||
i = 0;
|
||||
while (GetMsgSystem(&Link, First)) {
|
||||
First = FALSE;
|
||||
if ((Link.aka.zone) && (Link.sendto) && (!Link.pause) && (!Link.cutoff)) {
|
||||
sprintf(sbe, "%u/%u", Link.aka.net, Link.aka.node);
|
||||
fill_list(&sbl, sbe, NULL, FALSE);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
uniq_list(&sbl);
|
||||
sort_list(&sbl);
|
||||
seenlen=MAXSEEN+1;
|
||||
if (i) {
|
||||
/* ensure it will not match for the first entry */
|
||||
oldnet = sbl->addr->net-1;
|
||||
for (tmpl = sbl; tmpl; tmpl = tmpl->next) {
|
||||
if (tmpl->addr->net == oldnet)
|
||||
sprintf(sbe," %u",tmpl->addr->node);
|
||||
else
|
||||
sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node);
|
||||
oldnet = tmpl->addr->net;
|
||||
seenlen += strlen(sbe);
|
||||
if (seenlen > MAXSEEN) {
|
||||
seenlen = 0;
|
||||
fprintf(ofp,"\nSEEN-BY:");
|
||||
sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node);
|
||||
seenlen = strlen(sbe);
|
||||
}
|
||||
fprintf(ofp,"%s",sbe);
|
||||
}
|
||||
} else {
|
||||
fprintf(ofp,"\nSEEN-BY: %s",sbe);
|
||||
}
|
||||
|
||||
for (tmp = msg; tmp; tmp = tmp->next) {
|
||||
if (!strcasecmp(tmp->key,"X-FTN-PATH")) {
|
||||
fill_path(&ptl,tmp->val);
|
||||
}
|
||||
}
|
||||
sprintf(sbe,"%u/%u",msgs.Aka.net, msgs.Aka.node);
|
||||
fill_path(&ptl,sbe);
|
||||
uniq_list(&ptl);
|
||||
seenlen = MAXPATH+1;
|
||||
/* ensure it will not match for the first entry */
|
||||
oldnet = ptl->addr->net-1;
|
||||
for (tmpl = ptl; tmpl; tmpl = tmpl->next) {
|
||||
if (tmpl->addr->net == oldnet)
|
||||
sprintf(sbe," %u",tmpl->addr->node);
|
||||
else
|
||||
sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node);
|
||||
oldnet = tmpl->addr->net;
|
||||
seenlen += strlen(sbe);
|
||||
if (seenlen > MAXPATH) {
|
||||
seenlen = 0;
|
||||
fprintf(ofp,"\n\1PATH:");
|
||||
sprintf(sbe," %u/%u",tmpl->addr->net, tmpl->addr->node);
|
||||
seenlen = strlen(sbe);
|
||||
}
|
||||
fprintf(ofp,"%s",sbe);
|
||||
}
|
||||
fprintf(ofp,"\n");
|
||||
|
||||
tidy_falist(&ptl);
|
||||
fflush(ofp);
|
||||
rewind(ofp);
|
||||
Syslog('n', "========== Fido start");
|
||||
while (fgets(temp, 4096, ofp) != NULL) {
|
||||
/*
|
||||
* Only log kludges, skip the body
|
||||
*/
|
||||
if ((temp[0] == '\001') || !strncmp(temp, "AREA:", 5) || !strncmp(temp, "SEEN-BY", 7)) {
|
||||
Striplf(temp);
|
||||
Syslogp('n', printable(temp, 0));
|
||||
}
|
||||
}
|
||||
Syslog('n', "========== Fido end");
|
||||
|
||||
rewind(ofp);
|
||||
Msg_New();
|
||||
|
||||
if ((fmsg->to != NULL) && (fmsg->to->name != NULL))
|
||||
strcpy(Msg.To, fmsg->to->name);
|
||||
else
|
||||
sprintf(Msg.To, "All");
|
||||
Syslog('n', "Msg.To: %s", printable(Msg.To, 0));
|
||||
toname = xstrcpy(Msg.To);
|
||||
|
||||
if ((fmsg->from != NULL) && (fmsg->from->name != NULL)) {
|
||||
strcpy(Msg.From, fmsg->from->name);
|
||||
Syslog('n', "Msg.From: %s", printable(Msg.From, 0));
|
||||
fromname = xstrcpy(Msg.From);
|
||||
} else {
|
||||
Syslog('n', "Warning: no Msg.From name found");
|
||||
}
|
||||
|
||||
strcpy(Msg.Subject, fmsg->subj);
|
||||
subj = xstrcpy(Msg.Subject);
|
||||
Msg.Echomail = TRUE;
|
||||
Msg.Written = fmsg->date;
|
||||
Msg.Arrived = time(NULL) - (gmt_offset((time_t)0) * 60);
|
||||
sprintf(Msg.FromAddress, "%s", aka2str(msgs.Aka));
|
||||
/*
|
||||
* These are the only usefull flags in echomail
|
||||
*/
|
||||
if ((fmsg->flags & M_PVT) && ((msgs.MsgKinds == BOTH) || (msgs.MsgKinds == PRIVATE)))
|
||||
Msg.Private = TRUE;
|
||||
if (fmsg->flags & M_FILE)
|
||||
Msg.FileAttach = TRUE;
|
||||
|
||||
/*
|
||||
* Set MSGID and REPLYID crc.
|
||||
*/
|
||||
if (fmsg->msgid_a != NULL) {
|
||||
crc2 = -1;
|
||||
Msg.MsgIdCRC = upd_crc32(fmsg->msgid_a, crc2, strlen(fmsg->msgid_a));
|
||||
}
|
||||
if (fmsg->reply_a != NULL) {
|
||||
crc2 = -1;
|
||||
Msg.ReplyCRC = upd_crc32(fmsg->reply_a, crc2, strlen(fmsg->reply_a));
|
||||
}
|
||||
|
||||
if (Msg_Open(msgs.Base)) {
|
||||
if (Msg_Lock(30L)) {
|
||||
rewind(ofp);
|
||||
fgets(temp, 2048, ofp); /* "Eat" the first line AREA:... */
|
||||
Msg_Write(ofp);
|
||||
Msg_AddMsg();
|
||||
Msg_UnLock();
|
||||
echo_in++;
|
||||
Syslog('+', "Newsgate %s => %s msg %ld", msgs.Newsgroup, msgs.Tag, Msg.Id);
|
||||
}
|
||||
Msg_Close();
|
||||
StatAdd(&msgs.Received, 1);
|
||||
time(&msgs.LastRcvd);
|
||||
StatAdd(&mgroup.MsgsRcvd, 1);
|
||||
time(&mgroup.LastDate);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now start exporting this echomail.
|
||||
*/
|
||||
First = TRUE;
|
||||
while (GetMsgSystem(&Link, First)) {
|
||||
First = FALSE;
|
||||
if ((Link.aka.zone) && (Link.sendto) && (!Link.pause) && (!Link.cutoff)) {
|
||||
if (SearchNode(Link.aka)) {
|
||||
StatAdd(&nodes.MailSent, 1L);
|
||||
UpdateNode();
|
||||
SearchNode(Link.aka);
|
||||
}
|
||||
echo_out++;
|
||||
Syslog('n', "Export to %s", aka2str(Link.aka));
|
||||
From = fido2faddr(msgs.Aka);
|
||||
EchoOut(From, Link.aka, ofp, fmsg->flags, 0, fmsg->date);
|
||||
tidy_faddr(From);
|
||||
}
|
||||
}
|
||||
|
||||
free(fromname);
|
||||
free(toname);
|
||||
free(subj);
|
||||
fclose(ofp);
|
||||
} while (needsplit);
|
||||
tidy_falist(&sbl);
|
||||
tidy_falist(&ptl);
|
||||
free(temp);
|
||||
news_imp++;
|
||||
tidyrfc(msg);
|
||||
tidy_ftnmsg(fmsg);
|
||||
UpdateMsgs();
|
||||
|
||||
return RETVAL_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int get_xover(char *grpname, long startnr, long endnr, List **art)
|
||||
{
|
||||
char cmd[81], *ptr, *ptr2, *resp, *p;
|
||||
@ -1319,119 +501,3 @@ int get_xoverview(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
int needputrfc(rfcmsg *msg)
|
||||
{
|
||||
faddr *ta;
|
||||
|
||||
/* 0-junk, 1-kludge, 2-pass */
|
||||
|
||||
// Syslog('M', "needputrfc(%s)", printable(msg->key,0));
|
||||
if ((msg->key == NULL) || (strlen(msg->key) == 0)) return 0;
|
||||
|
||||
if (!strcasecmp(msg->key,"X-UUCP-From")) return -1;
|
||||
if (!strcasecmp(msg->key,"X-Body-Start")) return -1;
|
||||
if (!strncasecmp(msg->key,".",1)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-FTN-",6)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-Fsc-",6)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-ZC-",5)) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Gateway")) return 0;
|
||||
if (!strcasecmp(msg->key,"Path")) return 0;
|
||||
if (!strcasecmp(msg->key,"Newsgroups")) {
|
||||
if ((hdr((char *)"X-Origin-Newsgroups",msg)))
|
||||
return 0;
|
||||
else if (strstr(msg->val,","))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcasecmp(msg->key,"X-Origin-Newsgroups")) {
|
||||
if (strstr(msg->val,","))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcasecmp(msg->key,"Control")) {
|
||||
if (CFG.allowcontrol) {
|
||||
if (strstr(msg->val,"cancel"))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
if (!strcasecmp(msg->key,"Return-Path")) return 1;
|
||||
if (!strcasecmp(msg->key,"Xref")) return 0;
|
||||
if (!strcasecmp(msg->key,"Approved")) return removeapproved ? -1:2;
|
||||
if (!strcasecmp(msg->key,"X-URL")) return 0;
|
||||
if (!strcasecmp(msg->key,"Return-Receipt-To")) return removereturnto? 0:1;
|
||||
if (!strcasecmp(msg->key,"Notice-Requested-Upon-Delivery-To")) return 0;
|
||||
if (!strcasecmp(msg->key,"Received")) return 0;
|
||||
if (!strcasecmp(msg->key,"From")) {
|
||||
if ((ta = parsefaddr(msg->val))) {
|
||||
tidy_faddr(ta);
|
||||
return 0;
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
if (!strcasecmp(msg->key,"To")) {
|
||||
return 0;
|
||||
}
|
||||
if (!strcasecmp(msg->key,"Cc")) return 2;
|
||||
if (!strcasecmp(msg->key,"Bcc")) return 0;
|
||||
if (!strcasecmp(msg->key,"Reply-To")) {
|
||||
if ((ta = parsefaddr(msg->val))) {
|
||||
tidy_faddr(ta);
|
||||
return -1;
|
||||
} else
|
||||
return removereplyto ?0:4;
|
||||
}
|
||||
if (!strcasecmp(msg->key,"Lines")) return 0;
|
||||
if (!strcasecmp(msg->key,"Date")) return 0;
|
||||
if (!strcasecmp(msg->key,"Subject")) {
|
||||
if ((msg->val) && (strlen(msg->val) > MAXSUBJ))
|
||||
return 2;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
if (!strcasecmp(msg->key,"Organization")) return 1;
|
||||
if (!strcasecmp(msg->key,"Comment-To")) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Comment-To")) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Apparently-To")) return 0;
|
||||
if (!strcasecmp(msg->key,"Apparently-To")) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Fidonet-Comment-To")) return 0;
|
||||
if (!strcasecmp(msg->key,"Keywords")) return 2;
|
||||
if (!strcasecmp(msg->key,"Summary")) return 2;
|
||||
if (!strcasecmp(msg->key,"MIME-Version")) return removemime ?0:1;
|
||||
if (!strcasecmp(msg->key,"Content-Type")) return removemime ?0:1;
|
||||
if (!strcasecmp(msg->key,"Content-Length")) return removemime ?0:1;
|
||||
if (!strcasecmp(msg->key,"Content-Transfer-Encoding")) return removemime ?0:1;
|
||||
if (!strcasecmp(msg->key,"Content-Name")) return 2;
|
||||
if (!strcasecmp(msg->key,"Content-Description")) return 2;
|
||||
if (!strcasecmp(msg->key,"Message-ID")) return removemsgid ?0:1;
|
||||
if (!strcasecmp(msg->key,"References")) return removeref ?0:1;
|
||||
if (!strcasecmp(msg->key,"Supersedes")) return removesupersedes ?0:1;
|
||||
if (!strcasecmp(msg->key,"Distribution")) return ftnorigin ?0:0;
|
||||
if (!strcasecmp(msg->key,"X-Newsreader")) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Mailer")) return 0;
|
||||
if (!strcasecmp(msg->key,"User-Agent")) return 0;
|
||||
if (!strncasecmp(msg->key,"NNTP-",5)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-Trace",7)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-Complaints",12)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-MSMail",9)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-MimeOLE",9)) return 0;
|
||||
if (!strncasecmp(msg->key,"X-MIME-Autoconverted",20)) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Origin-Date")) return 0;
|
||||
if (!strncasecmp(msg->key,"X-PGP-",6)) return 0;
|
||||
if (!strncasecmp(msg->key,"Resent-",7)) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Mailing-List")) return 0;
|
||||
if (!strcasecmp(msg->key,"X-Loop")) return 0;
|
||||
if (!strcasecmp(msg->key,"Precedence")) return 0;
|
||||
/*if (!strcasecmp(msg->key,"")) return ;*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,6 @@ enum { RETVAL_ERROR = -1, RETVAL_OK = 0, RETVAL_NOARTICLES, RETVAL_UNEXPECTEDANS
|
||||
|
||||
|
||||
void ScanNews(void);
|
||||
int do_article(FILE *);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbfido/tic.c
|
||||
* Purpose ...............: Process .tic files
|
||||
* Last modification date : 08-Jul-2001
|
||||
* Last modification date : 31-Jul-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -311,7 +311,7 @@ int LoadTic(char *inb, char *tfn)
|
||||
}
|
||||
|
||||
if (strncasecmp(Temp, "seenby ", 7) == 0) {
|
||||
fill_list(&sbl, Temp+7, NULL, FALSE);
|
||||
fill_list(&sbl, Temp+7, NULL);
|
||||
Kwd = TRUE;
|
||||
}
|
||||
|
||||
|
268
mbfido/tosspkt.c
268
mbfido/tosspkt.c
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: tosser/tosspkt.c
|
||||
* Purpose ...............: Toss a single *.pkt file
|
||||
* Last modification date : 03-Jun-2001
|
||||
* Last modification date : 03-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -34,9 +34,18 @@
|
||||
#include "../lib/records.h"
|
||||
#include "../lib/common.h"
|
||||
#include "../lib/clcomm.h"
|
||||
#include "../lib/msg.h"
|
||||
#include "../lib/msgtext.h"
|
||||
#include "../lib/dbcfg.h"
|
||||
#include "../lib/dbnode.h"
|
||||
#include "importmsg.h"
|
||||
#include "../lib/dbmsgs.h"
|
||||
#include "../lib/dbdupe.h"
|
||||
#include "../lib/dbuser.h"
|
||||
#include "../lib/dbftn.h"
|
||||
#include "tosspkt.h"
|
||||
#include "postnetmail.h"
|
||||
#include "postecho.h"
|
||||
#include "rollover.h"
|
||||
|
||||
|
||||
|
||||
@ -44,6 +53,11 @@
|
||||
* External declarations
|
||||
*/
|
||||
extern int do_quiet;
|
||||
extern int do_unsec;
|
||||
extern int check_dupe;
|
||||
extern int autocrea;
|
||||
extern time_t t_start;
|
||||
extern int most_debug;
|
||||
|
||||
|
||||
|
||||
@ -68,15 +82,20 @@ int email_in = 0; /* Email received */
|
||||
int email_imp = 0; /* Email imported */
|
||||
int email_out = 0; /* Email forwarded */
|
||||
int email_bad = 0; /* Bad email */
|
||||
char *toname = NULL; /* To user */
|
||||
char *fromname = NULL; /* From user */
|
||||
char *subj = NULL; /* Message subject */
|
||||
extern char *msgid;
|
||||
|
||||
|
||||
static int at_zero = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Internal prototypes
|
||||
*/
|
||||
char *aread(char *, int, FILE *);
|
||||
int importmsg(faddr *, faddr *, faddr *, char *, char *, time_t, int, int, FILE *);
|
||||
void autocreate(char *, faddr *);
|
||||
|
||||
|
||||
|
||||
char *aread(char *s, int count, FILE *fp)
|
||||
{
|
||||
int i,c,next;
|
||||
@ -118,6 +137,220 @@ char *aread(char *s, int count, FILE *fp)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Import 1 message, forward if needed.
|
||||
* pkt_from, from, to, subj, orig, mdate, flags, cost, file
|
||||
*
|
||||
* 0 - All Seems Well.
|
||||
* 1 - Can't access messagebase.
|
||||
* 2 - Cannot open mareas.data
|
||||
* 3 - Echomail without Origin line.
|
||||
* 4 - Echomail from unknown node, disconnected node.
|
||||
* 5 - Locking error.
|
||||
*
|
||||
*/
|
||||
int importmsg(faddr *p_from, faddr *f, faddr *t, char *orig, char *subj,
|
||||
time_t mdate, int flags, int cost, FILE *fp)
|
||||
{
|
||||
char *buf, *marea = NULL;
|
||||
int echomail = FALSE, rc = 0, bad = FALSE, Known = FALSE, FirstLine;
|
||||
sysconnect Link;
|
||||
|
||||
if (CFG.slow_util && do_quiet)
|
||||
usleep(1);
|
||||
|
||||
memset(&Link, 0, sizeof(Link));
|
||||
|
||||
/*
|
||||
* Increase uplink's statistic counter.
|
||||
*/
|
||||
Link.aka.zone = p_from->zone;
|
||||
Link.aka.net = p_from->net;
|
||||
Link.aka.node = p_from->node;
|
||||
Link.aka.point = p_from->point;
|
||||
if (SearchNode(Link.aka)) {
|
||||
StatAdd(&nodes.MailRcvd, 1);
|
||||
UpdateNode();
|
||||
SearchNode(Link.aka);
|
||||
Known = TRUE;
|
||||
}
|
||||
|
||||
buf = calloc(2048, sizeof(char));
|
||||
marea = NULL;
|
||||
|
||||
/*
|
||||
* First read the message for kludges we need.
|
||||
*/
|
||||
rewind(fp);
|
||||
|
||||
FirstLine = TRUE;
|
||||
while ((fgets(buf, 2048, fp)) != NULL) {
|
||||
|
||||
Striplf(buf);
|
||||
|
||||
/*
|
||||
* Check if message is echomail and if the areas exists.
|
||||
*/
|
||||
if (FirstLine && (!strncmp(buf, "AREA:", 5))) {
|
||||
|
||||
marea = xstrcpy(tu(buf + 5));
|
||||
|
||||
if (orig == NULL) {
|
||||
Syslog('!', "Echomail without Origin line");
|
||||
echo_bad++;
|
||||
echo_in++;
|
||||
bad = TRUE;
|
||||
free(buf);
|
||||
free(marea);
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (!SearchMsgs(marea)) {
|
||||
WriteError("Unknown echo area %s", marea);
|
||||
if (autocrea) {
|
||||
autocreate(marea, p_from);
|
||||
if (!SearchMsgs(marea)) {
|
||||
WriteError("Autocreate of area %s failed.", area);
|
||||
echo_bad++;
|
||||
echo_in++;
|
||||
bad = TRUE;
|
||||
free(marea);
|
||||
free(buf);
|
||||
return 4;
|
||||
}
|
||||
} else {
|
||||
echo_bad++;
|
||||
echo_in++;
|
||||
bad = TRUE;
|
||||
free(buf);
|
||||
free(marea);
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
echomail = TRUE;
|
||||
free(marea);
|
||||
}
|
||||
if (*buf != '\001')
|
||||
FirstLine = FALSE;
|
||||
} /* end of checking kludges */
|
||||
|
||||
|
||||
if (echomail)
|
||||
rc = postecho(p_from, f, t, orig, subj, mdate, flags, cost, fp, TRUE);
|
||||
else
|
||||
rc = postnetmail(fp, f, t, orig, subj, mdate, flags, TRUE);
|
||||
|
||||
free(buf);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Create echomail area if it doesn't excist and allowed.
|
||||
* Contributed by Redy Rodriguez.
|
||||
*/
|
||||
void autocreate(char *marea, faddr *p_from)
|
||||
{
|
||||
FILE *pMsgs;
|
||||
char temp[250];
|
||||
int i;
|
||||
struct _sysconnect syscon;
|
||||
|
||||
if (!SearchMsgs((char *)"DEFAULT")){
|
||||
WriteError("Can't find DEFAULT area, can't autocreate:");
|
||||
autocrea = FALSE;
|
||||
return;
|
||||
}
|
||||
sprintf(temp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||
if ((pMsgs = fopen(temp, "r+")) == NULL) {
|
||||
WriteError("$Database error: Can't create %s", temp);
|
||||
return;
|
||||
}
|
||||
strncat(msgs.Name,marea,40-strlen(msgs.Name));
|
||||
strncpy(msgs.Tag,marea,50);
|
||||
strncpy(msgs.QWKname,marea,20);
|
||||
strncat(msgs.Base,marea,64-strlen(msgs.Base));
|
||||
fseek(pMsgs, 0, SEEK_END);
|
||||
Syslog('+', "Autocreate area %s", marea);
|
||||
|
||||
memset(&syscon, 0, sizeof(syscon));
|
||||
syscon.aka.zone = p_from->zone;
|
||||
syscon.aka.node = p_from->node;
|
||||
syscon.aka.net = p_from->net;
|
||||
if (SearchFidonet(p_from->zone))
|
||||
strcpy(syscon.aka.domain,fidonet.domain);
|
||||
else {
|
||||
WriteError("New area %s from node of unknown zone %d not created.", marea,p_from->zone);
|
||||
fclose(pMsgs);
|
||||
return;
|
||||
}
|
||||
syscon.sendto = TRUE;
|
||||
syscon.receivefrom = TRUE;
|
||||
if (msgs.Aka.zone == 0) {
|
||||
for (i = 0; i < 40; i++) {
|
||||
if (CFG.akavalid[i]) {
|
||||
msgs.Aka.zone=CFG.aka[i].zone;
|
||||
msgs.Aka.net=CFG.aka[i].net;
|
||||
msgs.Aka.node=CFG.aka[i].node;
|
||||
msgs.Aka.point=CFG.aka[i].point;
|
||||
strcpy(msgs.Aka.domain,CFG.aka[i].domain);
|
||||
i=40;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 40; i++) {
|
||||
if (CFG.akavalid[i] && (strcmp(CFG.aka[i].domain,msgs.Aka.domain)==0)) {
|
||||
msgs.Aka.zone=CFG.aka[i].zone;
|
||||
msgs.Aka.net=CFG.aka[i].net;
|
||||
msgs.Aka.node=CFG.aka[i].node;
|
||||
msgs.Aka.point=CFG.aka[i].point;
|
||||
strcpy(msgs.Aka.domain,CFG.aka[i].domain);
|
||||
i=40;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 40; i++) {
|
||||
if ((CFG.akavalid[i]) && (CFG.aka[i].zone == p_from->zone)) {
|
||||
msgs.Aka.zone=CFG.aka[i].zone;
|
||||
msgs.Aka.net=CFG.aka[i].net;
|
||||
msgs.Aka.node=CFG.aka[i].node;
|
||||
msgs.Aka.point=CFG.aka[i].point;
|
||||
strcpy(msgs.Aka.domain,CFG.aka[i].domain);
|
||||
i=40;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 40; i++) {
|
||||
if ((CFG.akavalid[i]) && (CFG.aka[i].zone == p_from->zone) && (CFG.aka[i].net == p_from->net)) {
|
||||
msgs.Aka.zone=CFG.aka[i].zone;
|
||||
msgs.Aka.net=CFG.aka[i].net;
|
||||
msgs.Aka.node=CFG.aka[i].node;
|
||||
msgs.Aka.point=CFG.aka[i].point;
|
||||
strcpy(msgs.Aka.domain,CFG.aka[i].domain);
|
||||
i=40;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 40; i++) {
|
||||
if ((CFG.akavalid[i]) && (CFG.aka[i].zone == p_from->zone) &&
|
||||
(CFG.aka[i].net == p_from->net) && (CFG.aka[i].node == p_from->node)) {
|
||||
msgs.Aka.zone=CFG.aka[i].zone;
|
||||
msgs.Aka.net=CFG.aka[i].net;
|
||||
msgs.Aka.node=CFG.aka[i].node;
|
||||
msgs.Aka.point=CFG.aka[i].point;
|
||||
strcpy(msgs.Aka.domain,CFG.aka[i].domain);
|
||||
i=40;
|
||||
}
|
||||
}
|
||||
}
|
||||
fwrite(&msgs, msgshdr.recsize, 1, pMsgs);
|
||||
fwrite(&syscon, sizeof(syscon), 1, pMsgs);
|
||||
memset(&syscon, 0, sizeof(syscon));
|
||||
for (i = 1 ; i < CFG.toss_systems; i++ )
|
||||
fwrite(&syscon, sizeof(syscon), 1, pMsgs);
|
||||
fclose(pMsgs);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Toss one packet.
|
||||
*
|
||||
@ -198,11 +431,8 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
time_t mdate = 0L;
|
||||
FILE *fp;
|
||||
unsigned char buffer[0x0e];
|
||||
off_t orig_off;
|
||||
char *subj = NULL;
|
||||
|
||||
subj = NULL;
|
||||
toname = NULL;
|
||||
fromname = NULL;
|
||||
result = fread(&buffer, 1, sizeof(buffer), pkt);
|
||||
if (result == 0) {
|
||||
Syslog('m', "Zero bytes message, assume end of pkt");
|
||||
@ -259,7 +489,6 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
if (strlen(buf) > 36)
|
||||
Syslog('!', "to name too long (%d) \"%s\"", strlen(buf), printable(buf, 0));
|
||||
t.name = xstrcpy(buf);
|
||||
toname = xstrcpy(buf);
|
||||
if (aread(buf, sizeof(buf)-1, pkt)) {
|
||||
if (*(p=t.name+strlen(t.name)-1) == '\n')
|
||||
*p = '\0';
|
||||
@ -272,7 +501,6 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
if (strlen(buf) > 36)
|
||||
Syslog('!', "from name too long (%d) \"%s\"", strlen(buf), printable(buf, 0));
|
||||
f.name = xstrcpy(buf);
|
||||
fromname = xstrcpy(buf);
|
||||
if (aread(buf, sizeof(buf)-1, pkt)) {
|
||||
if (*(p=f.name+strlen(f.name)-1) == '\n')
|
||||
*p = '\0';
|
||||
@ -307,7 +535,6 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
WriteError("$unable to open temporary file");
|
||||
return 4;
|
||||
}
|
||||
orig_off = 0L;
|
||||
|
||||
/*
|
||||
* Read the text from the .pkt file
|
||||
@ -320,7 +547,6 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
* Extract info from Origin line if found.
|
||||
*/
|
||||
if (!strncmp(buf," * Origin:",10)) {
|
||||
orig_off = ftell(fp);
|
||||
p=buf+10;
|
||||
while (*p == ' ') p++;
|
||||
if ((l=strrchr(p,'(')) && (r=strrchr(p,')')) && (l < r)) {
|
||||
@ -346,7 +572,7 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
}
|
||||
}
|
||||
|
||||
rc = importmsg(p_from, &f,&t,orig,mdate,flags,cost,fp,orig_off);
|
||||
rc = importmsg(p_from, &f,&t,orig,subj,mdate,flags,cost,fp);
|
||||
if (rc)
|
||||
rc+=10;
|
||||
if (rc > maxrc)
|
||||
@ -370,14 +596,6 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
free(t.domain);
|
||||
t.domain=NULL;
|
||||
|
||||
if (fromname)
|
||||
free(fromname);
|
||||
fromname = NULL;
|
||||
|
||||
if (toname)
|
||||
free(toname);
|
||||
toname = NULL;
|
||||
|
||||
if (subj)
|
||||
free(subj);
|
||||
subj = NULL;
|
||||
@ -386,10 +604,6 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to)
|
||||
free(orig);
|
||||
orig = NULL;
|
||||
|
||||
if (msgid)
|
||||
free(msgid);
|
||||
msgid = NULL;
|
||||
|
||||
if (feof(pkt) || ferror(pkt)) {
|
||||
WriteError("Unexpected end of packet");
|
||||
return 5;
|
||||
|
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,7 +71,6 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
SUBDIRS = .
|
||||
noinst_PROGRAMS = mbmon
|
||||
@ -101,6 +101,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/common.P .deps/mbmon.P .deps/mutil.P
|
||||
SOURCES = $(mbmon_SOURCES)
|
||||
OBJECTS = $(mbmon_OBJECTS)
|
||||
|
||||
@ -108,9 +109,9 @@ all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mbmon/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu mbmon/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -124,9 +125,6 @@ distclean-noinstPROGRAMS:
|
||||
|
||||
maintainer-clean-noinstPROGRAMS:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
@ -241,6 +239,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = mbmon
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu mbmon/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
@ -261,13 +264,38 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
common.o: common.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h common.h
|
||||
mbmon.o: mbmon.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h common.h mutil.h
|
||||
mutil.o: mutil.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h common.h mutil.h
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
@ -305,23 +333,24 @@ distclean-generic:
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-generic clean-am
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
@ -336,13 +365,14 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck \
|
||||
install-exec-local install-exec-am install-exec install-data-am \
|
||||
install-data install-am install uninstall-am uninstall all-redirect \
|
||||
all-am all installdirs-am installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-local install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
install-exec-local:
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbmon/common.c
|
||||
* Purpose ...............: Common utilities
|
||||
* Last modification date : 25-May-2001
|
||||
* Last modification date : 10-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -39,6 +39,8 @@ unsigned long lcrc = 0, tcrc = 1; /* CRC value of logstring */
|
||||
int lcnt = 0; /* Same message counter */
|
||||
static char *pbuff = NULL;
|
||||
static int sock = -1; /* TCP/IP socket */
|
||||
int ttyfd; /* Filedescriptor for raw mode */
|
||||
struct termios tbufs, tbufsavs; /* Structure for raw mode */
|
||||
|
||||
struct sockaddr_un clntaddr; /* Client socket address */
|
||||
struct sockaddr_un servaddr; /* Server socket address */
|
||||
@ -453,26 +455,40 @@ int rawset = FALSE;
|
||||
*/
|
||||
void Setraw()
|
||||
{
|
||||
if (ioctl(ttyfd, TCGETA, &tbuf) == -1) {
|
||||
perror("TCGETA Failed");
|
||||
exit(1); /* ERROR - could not set get tty ioctl */
|
||||
int rc;
|
||||
|
||||
if ((rc = tcgetattr(ttyfd, &tbufs))) {
|
||||
perror("");
|
||||
printf("$tcgetattr(0, save) return %d\n", rc);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
tbufsav = tbuf;
|
||||
tbuf.c_iflag &= ~(INLCR | ICRNL | IUCLC | ISTRIP | IXON );
|
||||
// if (ioctl(ttyfd, TCGETA, &tbuf) == -1) {
|
||||
// perror("TCGETA Failed");
|
||||
// exit(1); /* ERROR - could not set get tty ioctl */
|
||||
// }
|
||||
|
||||
tbufsavs = tbufs;
|
||||
tbufs.c_iflag &= ~(INLCR | ICRNL | ISTRIP | IXON );
|
||||
/*
|
||||
* Map CRNL modes strip control characters and flow control
|
||||
*/
|
||||
tbuf.c_oflag &= ~OPOST; /* Don't do ouput character translation */
|
||||
tbuf.c_lflag &= ~(ICANON | ECHO); /* No canonical input and no echo */
|
||||
tbuf.c_cc[VMIN] = 1; /* Receive 1 character at a time */
|
||||
tbuf.c_cc[VTIME] = 0; /* No time limit per character */
|
||||
tbufs.c_oflag &= ~OPOST; /* Don't do ouput character translation */
|
||||
tbufs.c_lflag &= ~(ICANON | ECHO); /* No canonical input and no echo */
|
||||
tbufs.c_cc[VMIN] = 1; /* Receive 1 character at a time */
|
||||
tbufs.c_cc[VTIME] = 0; /* No time limit per character */
|
||||
|
||||
if (ioctl(ttyfd, TCSETAF, &tbuf) == -1) {
|
||||
perror("TCSETAF failed");
|
||||
exit(1); /* ERROR - could not set tty ioctl */
|
||||
if ((rc = tcsetattr(ttyfd, TCSADRAIN, &tbufs))) {
|
||||
perror("");
|
||||
printf("$tcsetattr(%d, TCSADRAIN, raw) return %d\n", ttyfd, rc);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// if (ioctl(ttyfd, TCSETAF, &tbuf) == -1) {
|
||||
// perror("TCSETAF failed");
|
||||
// exit(1); /* ERROR - could not set tty ioctl */
|
||||
// }
|
||||
|
||||
rawset = TRUE;
|
||||
}
|
||||
|
||||
@ -483,13 +499,20 @@ void Setraw()
|
||||
*/
|
||||
void Unsetraw()
|
||||
{
|
||||
int rc;
|
||||
|
||||
/*
|
||||
* Only unset the mode if it is set to raw mode
|
||||
*/
|
||||
if (rawset == TRUE) {
|
||||
if (ioctl(ttyfd, TCSETAF, &tbufsav) == -1) {
|
||||
perror("TCSETAF Normal Failed");
|
||||
exit(1); /* ERROR - could not save original tty ioctl */
|
||||
// if (ioctl(ttyfd, TCSETAF, &tbufsav) == -1) {
|
||||
// perror("TCSETAF Normal Failed");
|
||||
// exit(1); /* ERROR - could not save original tty ioctl */
|
||||
// }
|
||||
if ((rc = tcsetattr(ttyfd, TCSAFLUSH, &tbufsavs))) {
|
||||
perror("");
|
||||
printf("$tcsetattr(%d, TCSAFLUSH, save) return %d\n", ttyfd, rc);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
rawset = FALSE;
|
||||
|
@ -59,10 +59,6 @@ extern char SigName[32][16];
|
||||
|
||||
|
||||
|
||||
int ttyfd; /* Filedescriptor for raw mode */
|
||||
struct termio tbuf, tbufsav; /* Structure for raw mode */
|
||||
|
||||
|
||||
void InitClient(char *);
|
||||
void ExitClient(int);
|
||||
void SockS(const char *, ...);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbmon/mbmon.c
|
||||
* Purpose ...............: Monitor Program
|
||||
* Last modification date : 29-Jun-2001
|
||||
* Last modification date : 11-Aug-2001
|
||||
* Todo ..................: Trace logfiles
|
||||
* Chat with user via server
|
||||
*
|
||||
@ -366,7 +366,13 @@ void soft_info(void)
|
||||
{
|
||||
clr_index();
|
||||
set_color(YELLOW, BLACK);
|
||||
center_addstr( 7, (char *)"MBSE BBS");
|
||||
#ifdef __linux__
|
||||
center_addstr( 7, (char *)"MBSE BBS (Linux)");
|
||||
#elif __FreeBSD__
|
||||
center_addstr( 7, (char *)"MBSE BBS (FreeBSD)");
|
||||
#else
|
||||
center_addstr( 7, (char *)"MBSE BBS (Unknown)");
|
||||
#endif
|
||||
set_color(WHITE, BLACK);
|
||||
center_addstr( 9, (char *)"(c) Michiel Broek");
|
||||
set_color(YELLOW, BLACK);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mutil.c
|
||||
* Purpose ...............: Utilities
|
||||
* Last modification date : 25-May-2001
|
||||
* Last modification date : 07-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -33,6 +33,8 @@
|
||||
#include "common.h"
|
||||
#include "mutil.h"
|
||||
|
||||
extern int ttyfd;
|
||||
|
||||
|
||||
unsigned char readkey(int y, int x, int fg, int bg)
|
||||
{
|
||||
|
@ -31,9 +31,9 @@ mbuser_SOURCES = mbuser.c mbuser.h
|
||||
mbuseradd_SOURCES = mbuseradd.c mbuseradd.h
|
||||
|
||||
mbpasswd_SOURCES = mbpasswd.c commonio.c pwio.c shadowio.c sgetpwent.c \
|
||||
xmalloc.c myname.c rad64.c salt.c getdef.c encrypt.c \
|
||||
xmalloc.c myname.c rad64.c salt.c getdef.c encrypt.c putpwent.c \
|
||||
mbpasswd.h commonio.h pwio.h shadowio.h sgetpwent.h \
|
||||
xmalloc.h myname.h rad64.h salt.h getdef.h encrypt.h
|
||||
xmalloc.h myname.h rad64.h salt.h getdef.h encrypt.h putpwent.h
|
||||
|
||||
mbsebbs_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a ../lib/libmbinet.a
|
||||
mball_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||
@ -45,7 +45,7 @@ mbtoberep_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../
|
||||
mbuser_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||
|
||||
install-exec-local:
|
||||
@if [ "$(shell whoami)" != "root" ] ; then \
|
||||
@if [ "`id -un`" != "root" ] ; then \
|
||||
echo; echo " Must be root to install!"; echo; exit 3; \
|
||||
fi
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 6711 mbsebbs $(bindir)
|
||||
@ -55,7 +55,7 @@ install-exec-local:
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbfbgen $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbstat $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbtoberep $(bindir)
|
||||
$(INSTALL) -s -g root -o root -m 6711 mbuser $(bindir)
|
||||
$(INSTALL) -s -g root -o root -m 6711 mbuseradd $(bindir)
|
||||
$(INSTALL) -s -g root -o root -m 6711 mbpasswd $(bindir)
|
||||
$(INSTALL) -s -o `id -un` -g `id -gn` -m 6711 mbuser $(bindir)
|
||||
$(INSTALL) -s -o `id -un` -g `id -gn` -m 6711 mbuseradd $(bindir)
|
||||
$(INSTALL) -s -o `id -un` -g `id -gn` -m 6711 mbpasswd $(bindir)
|
||||
|
||||
|
@ -59,6 +59,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CHOWN = @CHOWN@
|
||||
COMPRESS = @COMPRESS@
|
||||
GROUP = @GROUP@
|
||||
GZIP = @GZIP@
|
||||
@ -70,7 +71,6 @@ OWNER = @OWNER@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
|
||||
SUBDIRS = .
|
||||
noinst_PROGRAMS = mbsebbs mball mblang mbchat mbfbgen mbstat mbtoberep mbuser mbuseradd mbpasswd
|
||||
@ -94,7 +94,7 @@ mbuser_SOURCES = mbuser.c mbuser.h
|
||||
|
||||
mbuseradd_SOURCES = mbuseradd.c mbuseradd.h
|
||||
|
||||
mbpasswd_SOURCES = mbpasswd.c commonio.c pwio.c shadowio.c sgetpwent.c xmalloc.c myname.c rad64.c salt.c getdef.c encrypt.c mbpasswd.h commonio.h pwio.h shadowio.h sgetpwent.h xmalloc.h myname.h rad64.h salt.h getdef.h encrypt.h
|
||||
mbpasswd_SOURCES = mbpasswd.c commonio.c pwio.c shadowio.c sgetpwent.c xmalloc.c myname.c rad64.c salt.c getdef.c encrypt.c putpwent.c mbpasswd.h commonio.h pwio.h shadowio.h sgetpwent.h xmalloc.h myname.h rad64.h salt.h getdef.h encrypt.h putpwent.h
|
||||
|
||||
|
||||
mbsebbs_LDADD = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a ../lib/libmbinet.a
|
||||
@ -157,7 +157,7 @@ mbuseradd_LDADD = $(LDADD)
|
||||
mbuseradd_DEPENDENCIES =
|
||||
mbuseradd_LDFLAGS =
|
||||
mbpasswd_OBJECTS = mbpasswd.o commonio.o pwio.o shadowio.o sgetpwent.o \
|
||||
xmalloc.o myname.o rad64.o salt.o getdef.o encrypt.o
|
||||
xmalloc.o myname.o rad64.o salt.o getdef.o encrypt.o putpwent.o
|
||||
mbpasswd_LDADD = $(LDADD)
|
||||
mbpasswd_DEPENDENCIES =
|
||||
mbpasswd_LDFLAGS =
|
||||
@ -172,6 +172,19 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/bank.P .deps/bbslist.P .deps/bye.P .deps/change.P \
|
||||
.deps/chat.P .deps/commonio.P .deps/email.P .deps/encrypt.P \
|
||||
.deps/exitinfo.P .deps/file.P .deps/filesub.P .deps/fsedit.P \
|
||||
.deps/funcs.P .deps/funcs4.P .deps/getdef.P .deps/language.P \
|
||||
.deps/lineedit.P .deps/mail.P .deps/mball.P .deps/mbchat.P \
|
||||
.deps/mbfbgen.P .deps/mblang.P .deps/mbpasswd.P .deps/mbsebbs.P \
|
||||
.deps/mbstat.P .deps/mbtoberep.P .deps/mbuser.P .deps/mbuseradd.P \
|
||||
.deps/menu.P .deps/misc.P .deps/msgutil.P .deps/myname.P \
|
||||
.deps/newuser.P .deps/nextuser.P .deps/offline.P .deps/oneline.P \
|
||||
.deps/page.P .deps/pinfo.P .deps/pop3.P .deps/putpwent.P \
|
||||
.deps/pwcheck.P .deps/pwio.P .deps/rad64.P .deps/safe.P .deps/salt.P \
|
||||
.deps/sgetpwent.P .deps/shadowio.P .deps/timecheck.P .deps/timeout.P \
|
||||
.deps/user.P .deps/xmalloc.P
|
||||
SOURCES = $(mbsebbs_SOURCES) $(mball_SOURCES) $(mblang_SOURCES) $(mbchat_SOURCES) $(mbfbgen_SOURCES) $(mbstat_SOURCES) $(mbtoberep_SOURCES) $(mbuser_SOURCES) $(mbuseradd_SOURCES) $(mbpasswd_SOURCES)
|
||||
OBJECTS = $(mbsebbs_OBJECTS) $(mball_OBJECTS) $(mblang_OBJECTS) $(mbchat_OBJECTS) $(mbfbgen_OBJECTS) $(mbstat_OBJECTS) $(mbtoberep_OBJECTS) $(mbuser_OBJECTS) $(mbuseradd_OBJECTS) $(mbpasswd_OBJECTS)
|
||||
|
||||
@ -179,9 +192,9 @@ all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mbsebbs/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu mbsebbs/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
@ -195,9 +208,6 @@ distclean-noinstPROGRAMS:
|
||||
|
||||
maintainer-clean-noinstPROGRAMS:
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
@ -348,6 +358,11 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
subdir = mbsebbs
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu mbsebbs/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
@ -368,174 +383,38 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
bank.o: bank.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/clcomm.h \
|
||||
../lib/common.h bank.h funcs4.h language.h funcs.h timeout.h \
|
||||
timecheck.h exitinfo.h
|
||||
bbslist.o: bbslist.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/clcomm.h ../lib/common.h bbslist.h \
|
||||
funcs.h funcs4.h language.h
|
||||
bye.o: bye.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/clcomm.h \
|
||||
../lib/common.h funcs.h language.h bye.h
|
||||
change.o: change.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h change.h \
|
||||
funcs.h funcs4.h language.h misc.h pwcheck.h timeout.h \
|
||||
exitinfo.h bye.h
|
||||
chat.o: chat.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h chat.h funcs.h funcs4.h language.h misc.h \
|
||||
exitinfo.h
|
||||
commonio.o: commonio.c ../config.h commonio.h
|
||||
email.o: email.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/msgtext.h ../lib/msg.h ../lib/common.h \
|
||||
../lib/clcomm.h ../lib/mbinet.h exitinfo.h language.h mail.h \
|
||||
timeout.h msgutil.h funcs4.h email.h
|
||||
encrypt.o: encrypt.c ../config.h encrypt.h
|
||||
exitinfo.o: exitinfo.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h funcs.h \
|
||||
funcs4.h language.h oneline.h misc.h bye.h timeout.h \
|
||||
timecheck.h exitinfo.h
|
||||
file.o: file.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h filesub.h file.h funcs.h funcs4.h language.h \
|
||||
misc.h timeout.h exitinfo.h change.h
|
||||
filesub.o: filesub.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h filesub.h \
|
||||
funcs.h language.h funcs4.h misc.h timeout.h exitinfo.h \
|
||||
change.h
|
||||
fsedit.o: fsedit.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/ansi.h ../lib/common.h ../lib/clcomm.h \
|
||||
mail.h funcs4.h language.h timeout.h pinfo.h fsedit.h
|
||||
funcs.o: funcs.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/msgtext.h ../lib/msg.h \
|
||||
../lib/clcomm.h funcs.h language.h funcs4.h oneline.h misc.h \
|
||||
bye.h timeout.h timecheck.h exitinfo.h mail.h email.h
|
||||
funcs4.o: funcs4.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/clcomm.h ../lib/common.h ../lib/msg.h \
|
||||
funcs4.h misc.h timeout.h language.h
|
||||
getdef.o: getdef.c ../config.h getdef.h
|
||||
language.o: language.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h funcs4.h \
|
||||
language.h
|
||||
lineedit.o: lineedit.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h mail.h \
|
||||
funcs4.h language.h timeout.h lineedit.h
|
||||
mail.o: mail.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/msgtext.h ../lib/clcomm.h ../lib/msg.h mail.h funcs.h \
|
||||
funcs4.h language.h misc.h timeout.h oneline.h exitinfo.h \
|
||||
lineedit.h fsedit.h filesub.h msgutil.h pop3.h email.h
|
||||
mball.o: mball.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/mbse.h \
|
||||
../lib/records.h ../lib/common.h ../lib/dbcfg.h ../lib/clcomm.h \
|
||||
mball.h
|
||||
mbchat.o: mbchat.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/common.h \
|
||||
../lib/clcomm.h
|
||||
mbfbgen.o: mbfbgen.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h
|
||||
mblang.o: mblang.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h
|
||||
mbpasswd.o: mbpasswd.c ../config.h encrypt.h rad64.h myname.h xmalloc.h \
|
||||
pwio.h shadowio.h mbpasswd.h
|
||||
mbsebbs.o: mbsebbs.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h \
|
||||
mbsebbs.h user.h funcs.h funcs4.h language.h menu.h misc.h \
|
||||
bye.h timeout.h
|
||||
mbstat.o: mbstat.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbstat.h
|
||||
mbtoberep.o: mbtoberep.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h
|
||||
mbuser.o: mbuser.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/records.h \
|
||||
../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbuser.h
|
||||
mbuseradd.o: mbuseradd.c ../config.h mbuseradd.h
|
||||
menu.o: menu.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h oneline.h mail.h bbslist.h change.h bank.h \
|
||||
chat.h file.h funcs.h funcs4.h misc.h nextuser.h safe.h \
|
||||
timeout.h menu.h page.h pinfo.h bye.h timecheck.h exitinfo.h \
|
||||
language.h offline.h email.h
|
||||
misc.o: misc.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/clcomm.h \
|
||||
../lib/common.h funcs.h funcs4.h language.h misc.h timeout.h \
|
||||
exitinfo.h
|
||||
msgutil.o: msgutil.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h \
|
||||
../lib/msgtext.h ../lib/msg.h oneline.h msgutil.h
|
||||
myname.o: myname.c ../config.h
|
||||
newuser.o: newuser.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/clcomm.h ../lib/common.h funcs4.h \
|
||||
pwcheck.h newuser.h language.h timeout.h change.h bye.h
|
||||
nextuser.o: nextuser.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/ansi.h ../lib/clcomm.h ../lib/common.h \
|
||||
nextuser.h funcs.h funcs4.h language.h timeout.h
|
||||
offline.o: offline.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/structs.h ../lib/mbse.h \
|
||||
../lib/records.h ../lib/bluewave.h ../lib/common.h \
|
||||
../lib/clcomm.h ../lib/msgtext.h ../lib/msg.h mail.h funcs.h \
|
||||
funcs4.h language.h file.h filesub.h exitinfo.h timeout.h \
|
||||
msgutil.h pop3.h offline.h
|
||||
oneline.o: oneline.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h oneline.h \
|
||||
funcs.h funcs4.h language.h
|
||||
page.o: page.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h funcs.h funcs4.h chat.h page.h timeout.h mail.h \
|
||||
language.h
|
||||
pinfo.o: pinfo.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h funcs4.h
|
||||
pop3.o: pop3.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h ../lib/mbinet.h ../lib/msgtext.h ../lib/msg.h \
|
||||
msgutil.h pop3.h
|
||||
pwcheck.o: pwcheck.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h pwcheck.h \
|
||||
funcs4.h timeout.h
|
||||
pwio.o: pwio.c ../config.h sgetpwent.h commonio.h pwio.h
|
||||
rad64.o: rad64.c ../config.h rad64.h
|
||||
safe.o: safe.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/clcomm.h \
|
||||
../lib/common.h exitinfo.h funcs.h funcs4.h misc.h safe.h \
|
||||
timeout.h language.h
|
||||
salt.o: salt.c ../config.h rad64.h getdef.h
|
||||
sgetpwent.o: sgetpwent.c ../config.h sgetpwent.h
|
||||
shadowio.o: shadowio.c ../config.h commonio.h shadowio.h
|
||||
timecheck.o: timecheck.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/clcomm.h ../lib/common.h timecheck.h \
|
||||
funcs.h funcs4.h misc.h bye.h exitinfo.h language.h
|
||||
timeout.o: timeout.c ../lib/libs.h ../lib/../config.h \
|
||||
../lib/../lib/memwatch.h ../lib/mbse.h ../lib/structs.h \
|
||||
../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h \
|
||||
timeout.h funcs.h funcs4.h bye.h filesub.h language.h
|
||||
user.o: user.c ../lib/libs.h ../lib/../config.h ../lib/../lib/memwatch.h \
|
||||
../lib/mbse.h ../lib/structs.h ../lib/records.h ../lib/common.h \
|
||||
../lib/clcomm.h timeout.h user.h pwcheck.h funcs.h funcs4.h \
|
||||
misc.h bye.h file.h mail.h change.h menu.h exitinfo.h \
|
||||
language.h offline.h statetbl.h email.h newuser.h
|
||||
xmalloc.o: xmalloc.c ../config.h xmalloc.h
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
@ -573,23 +452,24 @@ distclean-generic:
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-generic clean-am
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
@ -604,17 +484,18 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck \
|
||||
install-exec-local install-exec-am install-exec install-data-am \
|
||||
install-data install-am install uninstall-am uninstall all-redirect \
|
||||
all-am all installdirs-am installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-local install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
install-exec-local:
|
||||
@if [ "$(shell whoami)" != "root" ] ; then \
|
||||
@if [ "`id -un`" != "root" ] ; then \
|
||||
echo; echo " Must be root to install!"; echo; exit 3; \
|
||||
fi
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 6711 mbsebbs $(bindir)
|
||||
@ -624,9 +505,9 @@ install-exec-local:
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbfbgen $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbstat $(bindir)
|
||||
$(INSTALL) -s -o @OWNER@ -g @GROUP@ -m 0711 mbtoberep $(bindir)
|
||||
$(INSTALL) -s -g root -o root -m 6711 mbuser $(bindir)
|
||||
$(INSTALL) -s -g root -o root -m 6711 mbuseradd $(bindir)
|
||||
$(INSTALL) -s -g root -o root -m 6711 mbpasswd $(bindir)
|
||||
$(INSTALL) -s -o `id -un` -g `id -gn` -m 6711 mbuser $(bindir)
|
||||
$(INSTALL) -s -o `id -un` -g `id -gn` -m 6711 mbuseradd $(bindir)
|
||||
$(INSTALL) -s -o `id -un` -g `id -gn` -m 6711 mbpasswd $(bindir)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbuseradd/commonio.c
|
||||
* Purpose ...............: MBSE BBS Shadow Password Suite
|
||||
* Last modification date : 07-Feb-2001
|
||||
* Last modification date : 09-Aug-2001
|
||||
* Original Source .......: Shadow Password Suite
|
||||
* Original Copyrioght ...: Julianne Frances Haugh and others.
|
||||
*
|
||||
@ -60,6 +60,9 @@ static int name_is_nis (const char *);
|
||||
static int write_all (const struct commonio_db *);
|
||||
static struct commonio_entry *find_entry_by_name (struct commonio_db *, const char *);
|
||||
|
||||
#ifdef HAVE_LCKPWDF
|
||||
static int lock_count = 0;
|
||||
#endif
|
||||
|
||||
static int check_link_count(const char *file)
|
||||
{
|
||||
@ -143,7 +146,7 @@ static int do_lock_file(const char *file, const char *lock)
|
||||
static FILE *fopen_set_perms(const char *name, const char *mode, const struct stat *sb)
|
||||
{
|
||||
FILE *fp;
|
||||
int mask;
|
||||
mode_t mask;
|
||||
|
||||
mask = umask(0777);
|
||||
fp = fopen(name, mode);
|
||||
@ -151,14 +154,6 @@ static FILE *fopen_set_perms(const char *name, const char *mode, const struct st
|
||||
if (!fp)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_FCHMOD
|
||||
if (fchmod(fileno(fp), sb->st_mode & 0777))
|
||||
goto fail;
|
||||
#else
|
||||
if (chmod(name, sb->st_mode & 0777))
|
||||
goto fail;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCHOWN
|
||||
if (fchown(fileno(fp), sb->st_uid, sb->st_gid))
|
||||
goto fail;
|
||||
@ -166,6 +161,14 @@ static FILE *fopen_set_perms(const char *name, const char *mode, const struct st
|
||||
if (chown(name, sb->st_mode))
|
||||
goto fail;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCHMOD
|
||||
if (fchmod(fileno(fp), sb->st_mode & 0664))
|
||||
goto fail;
|
||||
#else
|
||||
if (chmod(name, sb->st_mode & 0664))
|
||||
goto fail;
|
||||
#endif
|
||||
return fp;
|
||||
|
||||
fail:
|
||||
@ -181,7 +184,8 @@ static int create_backup(const char *backup, FILE *fp)
|
||||
struct stat sb;
|
||||
struct utimbuf ub;
|
||||
FILE *bkfp;
|
||||
int c, mask;
|
||||
int c;
|
||||
mode_t mask;
|
||||
|
||||
if (fstat(fileno(fp), &sb))
|
||||
return -1;
|
||||
@ -249,7 +253,7 @@ int commonio_present(const struct commonio_db *db)
|
||||
|
||||
|
||||
|
||||
int commonio_lock(struct commonio_db *db)
|
||||
int commonio_lock_nowait(struct commonio_db *db)
|
||||
{
|
||||
char file[1024];
|
||||
char lock[1024];
|
||||
@ -267,48 +271,53 @@ int commonio_lock(struct commonio_db *db)
|
||||
}
|
||||
|
||||
|
||||
|
||||
int commonio_lock_first(struct commonio_db *db)
|
||||
int commonio_lock(struct commonio_db *db)
|
||||
{
|
||||
int i;
|
||||
|
||||
#ifdef HAVE_LCKPWDF
|
||||
/*
|
||||
* When locking several files, *_lock_first() is called
|
||||
* for the first one, and *_lock() for the others.
|
||||
* If lckpwdf() is available, call it here (it may block
|
||||
* for up to 15 seconds), and if it succeeds, call
|
||||
* *_lock() once (no retries, it should always succeed).
|
||||
* only if the system libc has a real lckpwdf() - the one from
|
||||
* lockpw.c calls us and would cause infinite recursion!
|
||||
*/
|
||||
|
||||
if (db->use_lckpwdf) {
|
||||
/*
|
||||
* Call lckpwdf() on the first lock.
|
||||
* If it succeeds, call *_lock() only once
|
||||
* (no retries, it should always succeed).
|
||||
*/
|
||||
if (lock_count == 0) {
|
||||
if (lckpwdf() == -1)
|
||||
return 0; /* failure */
|
||||
|
||||
if (!commonio_lock(db)) {
|
||||
}
|
||||
if (!commonio_lock_nowait(db)) {
|
||||
ulckpwdf();
|
||||
return 0; /* failure */
|
||||
}
|
||||
|
||||
lock_count++;
|
||||
return 1; /* success */
|
||||
#else
|
||||
int i;
|
||||
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* No lckpwdf() - do it the old way.
|
||||
* lckpwdf() not used - do it the old way.
|
||||
*/
|
||||
#ifndef LOCK_TRIES
|
||||
#define LOCK_TRIES 15
|
||||
#endif
|
||||
for (i = 1; i < LOCK_TRIES; i++) {
|
||||
if (commonio_lock(db))
|
||||
|
||||
#ifndef LOCK_SLEEP
|
||||
#define LOCK_SLEEP 1
|
||||
#endif
|
||||
for (i = 0; i < LOCK_TRIES; i++) {
|
||||
if (i > 0)
|
||||
sleep(LOCK_SLEEP); /* delay between retries */
|
||||
if (commonio_lock_nowait(db))
|
||||
return 1; /* success */
|
||||
|
||||
sleep(1);
|
||||
/* no unnecessary retries on "permission denied" errors */
|
||||
if (geteuid() != 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Retry the last time...
|
||||
*/
|
||||
return commonio_lock(db);
|
||||
#endif /* !HAVE_LCKPWDF */
|
||||
return 0; /* failure */
|
||||
}
|
||||
|
||||
|
||||
@ -323,9 +332,20 @@ int commonio_unlock(struct commonio_db *db)
|
||||
return 0;
|
||||
}
|
||||
if (db->locked) {
|
||||
/*
|
||||
* Unlock in reverse order: remove the lock file,
|
||||
* then call ulckpwdf() (if used) on last unlock.
|
||||
*/
|
||||
db->locked = 0;
|
||||
snprintf(lock, sizeof lock, "%s.lock", db->filename);
|
||||
unlink(lock);
|
||||
#ifdef HAVE_LCKPWDF
|
||||
if (db->use_lckpwdf && lock_count > 0) {
|
||||
lock_count--;
|
||||
if (lock_count == 0)
|
||||
ulckpwdf();
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -508,6 +528,7 @@ int commonio_close(struct commonio_db *db)
|
||||
goto success;
|
||||
}
|
||||
|
||||
memset(&sb, 0, sizeof sb);
|
||||
if (db->fp) {
|
||||
if (fstat(fileno(db->fp), &sb)) {
|
||||
fclose(db->fp);
|
||||
|
@ -8,9 +8,9 @@
|
||||
*/
|
||||
struct commonio_entry {
|
||||
char *line;
|
||||
int changed;
|
||||
void *entry; /* struct passwd, struct spwd, ... */
|
||||
struct commonio_entry *prev, *next;
|
||||
int changed:1;
|
||||
};
|
||||
|
||||
|
||||
@ -85,7 +85,11 @@ struct commonio_db {
|
||||
/*
|
||||
* Various flags.
|
||||
*/
|
||||
int changed, isopen, locked, readonly;
|
||||
int changed:1;
|
||||
int isopen:1;
|
||||
int locked:1;
|
||||
int readonly:1;
|
||||
int use_lckpwdf:1;
|
||||
};
|
||||
|
||||
|
||||
@ -93,7 +97,7 @@ struct commonio_db {
|
||||
int commonio_setname (struct commonio_db *, const char *);
|
||||
int commonio_present (const struct commonio_db *);
|
||||
int commonio_lock (struct commonio_db *);
|
||||
int commonio_lock_first (struct commonio_db *);
|
||||
int commonio_lock_nowait (struct commonio_db *);
|
||||
int commonio_open (struct commonio_db *, int);
|
||||
const void *commonio_locate (struct commonio_db *, const char *);
|
||||
int commonio_update (struct commonio_db *, const void *);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbuseradd/encrypt.c
|
||||
* Purpose ...............: MBSE BBS Shadow Password Suite
|
||||
* Last modification date : 13-May-2001
|
||||
* Last modification date : 09-Aug-2001
|
||||
* Original Source .......: Shadow Password Suite
|
||||
* Original Copyrioght ...: Julianne Frances Haugh and others.
|
||||
*
|
||||
@ -63,6 +63,7 @@
|
||||
#include "../config.h"
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#ifdef _XOPEN_CRYPT
|
||||
#include <crypt.h>
|
||||
#endif
|
||||
@ -113,6 +114,10 @@ char *pw_encrypt(const char *clear, const char *salt)
|
||||
|
||||
for (count = 0;count < 10;count++) {
|
||||
cp = crypt (clear, salt);
|
||||
if (!cp) {
|
||||
perror("crypt");
|
||||
exit(1);
|
||||
}
|
||||
if (strlen(cp) != 13)
|
||||
return cp;
|
||||
strcat (cipher, cp + 2);
|
||||
@ -125,6 +130,15 @@ char *pw_encrypt(const char *clear, const char *salt)
|
||||
}
|
||||
#else
|
||||
cp = crypt (clear, salt);
|
||||
if (!cp) {
|
||||
/*
|
||||
* Single Unix Spec: crypt() may return a null pointer,
|
||||
* and set errno to indicate an error. The caller doesn't
|
||||
* expect us to return NULL, so...
|
||||
*/
|
||||
perror("crypt");
|
||||
exit(1);
|
||||
}
|
||||
if (strlen(cp) != 13)
|
||||
return cp; /* nonstandard crypt() in libc, better bail out */
|
||||
strcpy (cipher, cp);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: bbs/file.c
|
||||
* Purpose ...............: All the file functions.
|
||||
* Last modification date : 28-Jun-2001
|
||||
* Last modification date : 10-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -473,7 +473,7 @@ void File_RawDir(char *OpData)
|
||||
printf("%-20s", dp->d_name);
|
||||
|
||||
colour(13,0);
|
||||
printf("%-12ld", statfile.st_size);
|
||||
printf("%-12ld", (long)(statfile.st_size));
|
||||
|
||||
colour(10,0);
|
||||
printf("%-10s\n", StrDateDMY(statfile.st_mtime));
|
||||
@ -1354,7 +1354,7 @@ void List_Home()
|
||||
printf("%-20s", dp->d_name);
|
||||
|
||||
colour(13,0);
|
||||
printf("%-12ld", statfile.st_size);
|
||||
printf("%-12ld", (long)(statfile.st_size));
|
||||
|
||||
colour(10,0);
|
||||
printf("%s ", StrDateDMY(statfile.st_mtime));
|
||||
@ -2098,7 +2098,7 @@ void EditTaglist()
|
||||
|
||||
Fg--;
|
||||
colour(Fg, 0);
|
||||
printf(" %8ld", Tag.Size);
|
||||
printf(" %8ld", (long)(Tag.Size));
|
||||
|
||||
Fg--;
|
||||
colour(Fg, 0);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: bbs/filesub.c
|
||||
* Purpose ...............: All the file sub functions.
|
||||
* Last modification date : 28-Jun-2001
|
||||
* Last modification date : 09-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -427,9 +427,9 @@ int ShowOneFile()
|
||||
|
||||
colour(CFG.FilesizeF, CFG.FilesizeB);
|
||||
if(strlen(file.Name) < 25)
|
||||
printf("%10lu ", file.Size);
|
||||
printf("%10lu ", (long)(file.Size));
|
||||
else
|
||||
printf("%25lu ", file.Size);
|
||||
printf("%25lu ", (long)(file.Size));
|
||||
|
||||
colour(CFG.FiledateF, CFG.FiledateB);
|
||||
printf("%-10s ", StrDateDMY(file.UploadDate));
|
||||
@ -813,7 +813,7 @@ int ImportFile(char *fn, int Area, int fileid, time_t iTime, off_t Size)
|
||||
x = atoi(token);
|
||||
Size *= i / x;
|
||||
/* You have */ /* extra download KBytes. */
|
||||
printf("%s %ld %s\n", (char *) Language(249), Size / 1024, (char *) Language(250));
|
||||
printf("%s %ld %s\n", (char *) Language(249), (long)(Size / 1024), (char *) Language(250));
|
||||
|
||||
exitinfo.DownloadKToday += (Size / 1024);
|
||||
Syslog('b', "DownloadKToday %d", exitinfo.DownloadKToday);
|
||||
@ -891,7 +891,7 @@ int Addfile(char *File, int AreaNum, int fileid)
|
||||
|
||||
memset(&file, 0, sizeof(file));
|
||||
strcpy(file.Name, File);
|
||||
sprintf(temp1,"%ld",statfile.st_size);
|
||||
sprintf(temp1,"%ld",(long)(statfile.st_size));
|
||||
file.Size = atoi(temp1);
|
||||
file.FileDate = statfile.st_mtime;
|
||||
strcpy(file.Uploader, exitinfo.sUserName);
|
||||
@ -998,7 +998,7 @@ int Addfile(char *File, int AreaNum, int fileid)
|
||||
fprintf(pPrivate, "****************************************************");
|
||||
fprintf(pPrivate, "\nUser : %s", file.Uploader);
|
||||
fprintf(pPrivate, "\nFile : %s", file.Name);
|
||||
fprintf(pPrivate, "\nSize : %lu", file.Size);
|
||||
fprintf(pPrivate, "\nSize : %lu", (long)(file.Size));
|
||||
fprintf(pPrivate, "\nUpload Date : %s\n\n", StrDateDMY(file.UploadDate));
|
||||
|
||||
for(i = 0; i < iDesc - 1; i++)
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: bbs/funcs4.c
|
||||
* Purpose ...............: Misc functions, also for some utils.
|
||||
* Last modification date : 28-Jun-2001
|
||||
* Last modification date : 08-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -834,11 +834,7 @@ int Check4UnixLogin(char *UsersName)
|
||||
struct passwd *pw;
|
||||
|
||||
while ((pw = getpwent())) {
|
||||
#ifdef linux
|
||||
if(strcmp(pw->pw_gecos, UsersName) == 0) {
|
||||
#else
|
||||
if(strcmp(pw->pw_comment, UsersName) == 0) {
|
||||
#endif
|
||||
UID = pw->pw_uid;
|
||||
break;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbuseradd/getdef.c
|
||||
* Purpose ...............: MBSE BBS Shadow Password Suite
|
||||
* Last modification date : 27-Jun-2001
|
||||
* Last modification date : 09-Aug-2001
|
||||
* Original Source .......: Shadow Password Suite
|
||||
* Original Copyrioght ...: Julianne Frances Haugh and others.
|
||||
*
|
||||
@ -78,30 +78,37 @@ struct itemdef {
|
||||
char *value; /* value given, or NULL if no value */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* This list *must* be sorted by the "name" member.
|
||||
* It doesn't hurt that there are extra entries here
|
||||
* that are not known by the system this is running
|
||||
* on. Missing entries here gives a nasty message to
|
||||
* new bbs users.
|
||||
*/
|
||||
|
||||
#define NUMDEFS (sizeof(def_table)/sizeof(def_table[0]))
|
||||
static struct itemdef def_table[] = {
|
||||
{ "CHFN_AUTH", NULL },
|
||||
{ "CHFN_RESTRICT", NULL },
|
||||
{ "CLOSE_SESSIONS", NULL },
|
||||
{ "CONSOLE", NULL },
|
||||
{ "CONSOLE_GROUPS", NULL },
|
||||
#ifdef HAVE_LIBCRACK
|
||||
{ "CRACKLIB_DICTPATH", NULL },
|
||||
#endif
|
||||
{ "CREATE_HOME", NULL },
|
||||
{ "DEFAULT_HOME", NULL },
|
||||
{ "DIALUPS_CHECK_ENAB", NULL },
|
||||
{ "ENVIRON_FILE", NULL },
|
||||
{ "ENV_HZ", NULL },
|
||||
{ "ENV_PATH" , NULL },
|
||||
{ "ENV_ROOTPATH", NULL },
|
||||
{ "ENV_SUPATH", NULL },
|
||||
{ "ENV_TZ", NULL },
|
||||
{ "ERASECHAR", NULL },
|
||||
{ "FAILLOG_ENAB", NULL },
|
||||
{ "FAIL_DELAY", NULL },
|
||||
{ "FAKE_SHELL", NULL },
|
||||
{ "FTMP_FILE", NULL },
|
||||
{ "GID_MAX", NULL },
|
||||
{ "GID_MIN", NULL },
|
||||
@ -121,6 +128,7 @@ static struct itemdef def_table[] = {
|
||||
{ "MOTD_FILE", NULL },
|
||||
{ "NOLOGINS_FILE", NULL },
|
||||
{ "NOLOGIN_STR", NULL },
|
||||
{ "NO_PASSWORD_CONSOLE", NULL },
|
||||
{ "OBSCURE_CHECKS_ENAB", NULL },
|
||||
{ "PASS_ALWAYS_WARN", NULL },
|
||||
{ "PASS_CHANGE_TRIES", NULL },
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbsebbs/mball.c
|
||||
* Purpose ...............: Creates allfiles listings
|
||||
* Last modification date : 28-Jun-2001
|
||||
* Last modification date : 09-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -564,7 +564,7 @@ void MakeIndex()
|
||||
if (strlen(file.Desc[z])) {
|
||||
if (z == 0)
|
||||
fprintf(fp, "%-12s %7luK %s ", file.Name,
|
||||
file.Size / 1024,
|
||||
(long)(file.Size / 1024),
|
||||
StrDateDMY(file.UploadDate));
|
||||
else
|
||||
fprintf(fp, " ");
|
||||
@ -604,7 +604,8 @@ void MakeIndex()
|
||||
area.Path+strlen(CFG.ftp_base), file.Name, file.Name);
|
||||
}
|
||||
fprintf(fa, "<TD><PRE>%s</PRE></TD>", StrDateDMY(file.FileDate));
|
||||
fprintf(fa, "<TD align=right><PRE>%lu Kb.</PRE></TD>", file.Size / 1024);
|
||||
fprintf(fa, "<TD align=right><PRE>%lu Kb.</PRE></TD>",
|
||||
(long)(file.Size / 1024));
|
||||
fprintf(fa, "<TD><PRE>%8ld</PRE></TD>",
|
||||
file.TimesDL + file.TimesFTP + file.TimesReq);
|
||||
fprintf(fa, "<TD><PRE>");
|
||||
@ -856,7 +857,7 @@ void Masterlist()
|
||||
if((!file.Deleted) && (!file.Missing)) {
|
||||
New = (((t_start - file.UploadDate) / 84400) <= CFG.newdays);
|
||||
sprintf(temp, "%-12s%10lu K %s [%04ld] Uploader: %s",
|
||||
file.Name, file.Size / 1024, StrDateDMY(file.UploadDate),
|
||||
file.Name, (long)(file.Size / 1024), StrDateDMY(file.UploadDate),
|
||||
file.TimesDL + file.TimesFTP + file.TimesReq,
|
||||
strlen(file.Uploader)?file.Uploader:"");
|
||||
fprintf(fp, "%s\r\n", temp);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbpasswd.c
|
||||
* Purpose ...............: setuid root version of passwd
|
||||
* Last modification date : 27-Jun-2001
|
||||
* Last modification date : 10-Aug-2001
|
||||
* Shadow Suite (c) ......: Julianne Frances Haugh
|
||||
*
|
||||
*****************************************************************************
|
||||
@ -32,10 +32,13 @@
|
||||
|
||||
#include "../config.h"
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <syslog.h>
|
||||
#include <string.h>
|
||||
@ -43,9 +46,15 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(SHADOW_PASSWORD)
|
||||
#include <shadow.h>
|
||||
#endif
|
||||
#ifdef HAVE_USERSEC_H
|
||||
#include <userpw.h>
|
||||
#include <usersec.h>
|
||||
#include <userconf.h>
|
||||
#endif
|
||||
|
||||
#include "encrypt.h"
|
||||
#include "rad64.h"
|
||||
@ -107,12 +116,19 @@ static int force; /* Force update of locked passwords */
|
||||
|
||||
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
static void fail_exit(int status)
|
||||
{
|
||||
pw_unlock();
|
||||
// gr_unlock();
|
||||
#ifdef SHADOWGRP
|
||||
if (is_shadow_grp)
|
||||
sgr_unlock();
|
||||
#endif
|
||||
#ifdef SHADOWPWD
|
||||
if (is_shadow_pwd)
|
||||
spw_unlock();
|
||||
#endif
|
||||
pw_unlock();
|
||||
exit(status);
|
||||
}
|
||||
|
||||
@ -121,7 +137,7 @@ static void fail_exit(int status)
|
||||
static void oom(void)
|
||||
{
|
||||
fprintf(stderr, "mbpasswd: out of memory\n");
|
||||
fail_exit(3);
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
@ -130,8 +146,7 @@ static void oom(void)
|
||||
* insert_crypt_passwd - add an "old-style" password to authentication string
|
||||
* result now malloced to avoid overflow, just in case. --marekm
|
||||
*/
|
||||
static char *
|
||||
insert_crypt_passwd(const char *string, char *passwd)
|
||||
static char *insert_crypt_passwd(const char *string, char *passwd)
|
||||
{
|
||||
#ifdef AUTH_METHODS
|
||||
if (string && *string) {
|
||||
@ -158,9 +173,10 @@ insert_crypt_passwd(const char *string, char *passwd)
|
||||
#endif
|
||||
return xstrdup(passwd);
|
||||
}
|
||||
#endif /* FreeBSD */
|
||||
|
||||
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
static char *update_crypt_pw(char *cp)
|
||||
{
|
||||
if (do_update_pwd)
|
||||
@ -168,6 +184,7 @@ static char *update_crypt_pw(char *cp)
|
||||
|
||||
return cp;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -178,6 +195,7 @@ static char *update_crypt_pw(char *cp)
|
||||
*/
|
||||
void pwd_init(void)
|
||||
{
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
struct rlimit rlim;
|
||||
|
||||
#ifdef RLIMIT_CORE
|
||||
@ -206,6 +224,11 @@ void pwd_init(void)
|
||||
#ifdef RLIMIT_STACK
|
||||
setrlimit(RLIMIT_STACK, &rlim);
|
||||
#endif
|
||||
#else /* !HAVE_SYS_RESOURCE_H */
|
||||
set_filesize_limit(30000);
|
||||
/* don't know how to set the other limits... */
|
||||
#endif /* !HAVE_SYS_RESOURCE_H */
|
||||
|
||||
signal(SIGALRM, SIG_IGN);
|
||||
signal(SIGHUP, SIG_IGN);
|
||||
signal(SIGINT, SIG_IGN);
|
||||
@ -238,6 +261,12 @@ int isexpired(const struct passwd *pw)
|
||||
{
|
||||
#endif
|
||||
long now;
|
||||
#ifdef HAVE_USERSEC_H
|
||||
int minage = 0;
|
||||
int maxage = 10000;
|
||||
int curage = 0;
|
||||
struct userpw *pu;
|
||||
#endif
|
||||
|
||||
now = time ((time_t *) 0) / SCALE;
|
||||
|
||||
@ -267,24 +296,57 @@ int isexpired(const struct passwd *pw)
|
||||
if (sp->sp_lstchg > 0 && sp->sp_max >= 0 && sp->sp_inact >= 0 &&
|
||||
now >= sp->sp_lstchg + sp->sp_max + sp->sp_inact)
|
||||
return 2;
|
||||
#endif
|
||||
#ifdef HAVE_USERSEC_H /*{*/
|
||||
/*
|
||||
* The aging information lives someplace else. Get it from the
|
||||
* login.cfg file
|
||||
*/
|
||||
|
||||
if (getconfattr (SC_SYS_PASSWD, SC_MINAGE, &minage, SEC_INT))
|
||||
minage = -1;
|
||||
|
||||
if (getconfattr (SC_SYS_PASSWD, SC_MAXAGE, &maxage, SEC_INT))
|
||||
maxage = -1;
|
||||
|
||||
pu = getuserpw (pw->pw_name);
|
||||
curage = (time (0) - pu->upw_lastupdate) / (7*86400L);
|
||||
|
||||
if (maxage != -1 && curage > maxage)
|
||||
return 1;
|
||||
#else /*} !HAVE_USERSEC_H */
|
||||
|
||||
/*
|
||||
* The last and max fields must be present for an account
|
||||
* to have an expired password. A maximum of >10000 days
|
||||
* is considered to be infinite.
|
||||
*/
|
||||
|
||||
#ifdef SHADOWPWD
|
||||
if (sp->sp_lstchg == -1 ||
|
||||
sp->sp_max == -1 || sp->sp_max >= (10000L*DAY/SCALE))
|
||||
return 0;
|
||||
#endif
|
||||
#ifdef ATT_AGE
|
||||
if (pw->pw_age[0] == '\0' || pw->pw_age[0] == '/')
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Calculate today's day and the day on which the password
|
||||
* is going to expire. If that date has already passed,
|
||||
* the password has expired.
|
||||
*/
|
||||
|
||||
#ifdef SHADOWPWD
|
||||
if (now >= sp->sp_lstchg + sp->sp_max)
|
||||
return 1;
|
||||
#endif
|
||||
#ifdef ATT_AGE
|
||||
if (a64l (pw->pw_age + 2) + c64i (pw->pw_age[1]) < now / 7)
|
||||
return 1;
|
||||
#endif
|
||||
#endif /*} HAVE_USERSEC_H */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -305,6 +367,9 @@ static void check_password(const struct passwd *pw)
|
||||
#endif
|
||||
time_t now, last, ok;
|
||||
int exp_status;
|
||||
#ifdef HAVE_USERSEC_H
|
||||
struct userpw *pu;
|
||||
#endif
|
||||
|
||||
#ifdef SHADOW_PASSWORD
|
||||
exp_status = isexpired(pw, sp);
|
||||
@ -332,7 +397,7 @@ static void check_password(const struct passwd *pw)
|
||||
fprintf (stderr, "The password for %s cannot be changed.\n", sp->sp_namp);
|
||||
syslog(LOG_WARNING, "password locked for %s", sp->sp_namp);
|
||||
closelog();
|
||||
exit (1);
|
||||
exit (E_NOPERM);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -346,16 +411,34 @@ static void check_password(const struct passwd *pw)
|
||||
fprintf (stderr, "The password for %s cannot be changed.\n", pw->pw_name);
|
||||
syslog(LOG_WARNING, "password locked for %s", pw->pw_name);
|
||||
closelog();
|
||||
exit (1);
|
||||
exit (E_NOPERM);
|
||||
}
|
||||
#ifdef ATT_AGE
|
||||
/*
|
||||
* Can always be changed if there is no age info
|
||||
*/
|
||||
|
||||
if (! pw->pw_age[0])
|
||||
return;
|
||||
|
||||
last = a64l (pw->pw_age + 2) * WEEK;
|
||||
ok = last + c64i (pw->pw_age[1]) * WEEK;
|
||||
#else /* !ATT_AGE */
|
||||
#ifdef HAVE_USERSEC_H
|
||||
pu = getuserpw(pw->pw_name);
|
||||
last = pu ? pu->upw_lastupdate : 0L;
|
||||
ok = last + (minage > 0 ? minage * WEEK : 0);
|
||||
#else
|
||||
last = 0;
|
||||
ok = 0;
|
||||
#endif
|
||||
#endif /* !ATT_AGE */
|
||||
#endif /* !SHADOW_PASSWORD */
|
||||
if (now < ok) {
|
||||
fprintf(stderr, "Sorry, the password for %s cannot be changed yet.\n", pw->pw_name);
|
||||
syslog(LOG_WARNING, "now < minimum age for `%s'", pw->pw_name);
|
||||
closelog();
|
||||
exit (1);
|
||||
exit (E_NOPERM);
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,12 +464,34 @@ struct spwd *pwd_to_spwd(const struct passwd *pw)
|
||||
sp.sp_namp = pw->pw_name;
|
||||
sp.sp_pwdp = pw->pw_passwd;
|
||||
|
||||
#ifdef ATT_AGE
|
||||
/*
|
||||
* AT&T-style password aging maps the sp_min, sp_max, and
|
||||
* sp_lstchg information from the pw_age field, which appears
|
||||
* after the encrypted password.
|
||||
*/
|
||||
if (pw->pw_age[0]) {
|
||||
sp.sp_max = (c64i(pw->pw_age[0]) * WEEK) / SCALE;
|
||||
|
||||
if (pw->pw_age[1])
|
||||
sp.sp_min = (c64i(pw->pw_age[1]) * WEEK) / SCALE;
|
||||
else
|
||||
sp.sp_min = (10000L * DAY) / SCALE;
|
||||
|
||||
if (pw->pw_age[1] && pw->pw_age[2])
|
||||
sp.sp_lstchg = (a64l(pw->pw_age + 2) * WEEK) / SCALE;
|
||||
else
|
||||
sp.sp_lstchg = time((time_t *) 0) / SCALE;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
* Defaults used if there is no pw_age information.
|
||||
*/
|
||||
sp.sp_min = 0;
|
||||
sp.sp_max = (10000L * DAY) / SCALE;
|
||||
sp.sp_lstchg = time((time_t *) 0) / SCALE;
|
||||
}
|
||||
|
||||
/*
|
||||
* These fields have no corresponding information in the password
|
||||
@ -421,7 +526,7 @@ static int new_password(const struct passwd *pw, char *newpasswd)
|
||||
* Encrypt the password, then wipe the cleartext password.
|
||||
*/
|
||||
cp = pw_encrypt(pass, crypt_make_salt());
|
||||
bzero(pass, sizeof pass);
|
||||
memset(&pass, 0, sizeof(pass));
|
||||
|
||||
#ifdef HAVE_LIBCRACK_HIST
|
||||
HistUpdate(pw->pw_name, crypt_passwd);
|
||||
@ -431,11 +536,17 @@ static int new_password(const struct passwd *pw, char *newpasswd)
|
||||
}
|
||||
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
|
||||
static void update_noshadow(int shadow_locked)
|
||||
{
|
||||
const struct passwd *pw;
|
||||
struct passwd *npw;
|
||||
#ifdef ATT_AGE
|
||||
char age[5];
|
||||
long week = time((time_t *) 0) / WEEK;
|
||||
char *cp;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* call this with shadow_locked != 0 to avoid calling lckpwdf()
|
||||
@ -444,38 +555,112 @@ static void update_noshadow(int shadow_locked)
|
||||
* and call lckpwdf() only before the first lock, and ulckpwdf()
|
||||
* after the last unlock.
|
||||
*/
|
||||
if (!(shadow_locked ? pw_lock() : pw_lock_first())) {
|
||||
if (!pw_lock()) {
|
||||
fprintf(stderr, "Cannot lock the password file; try again later.\n");
|
||||
syslog(LOG_WARNING, "can't lock password file");
|
||||
exit(5);
|
||||
exit(E_PWDBUSY);
|
||||
}
|
||||
if (!pw_open(O_RDWR)) {
|
||||
fprintf(stderr, "Cannot open the password file.\n");
|
||||
syslog(LOG_ERR, "can't open password file");
|
||||
fail_exit(3);
|
||||
fail_exit(E_MISSING);
|
||||
}
|
||||
pw = pw_locate(name);
|
||||
if (!pw) {
|
||||
fprintf(stderr, "mbpasswd: user %s not found in /etc/passwd\n", name);
|
||||
fail_exit(1);
|
||||
fail_exit(E_NOPERM);
|
||||
}
|
||||
npw = __pw_dup(pw);
|
||||
if (!npw)
|
||||
oom();
|
||||
npw->pw_passwd = update_crypt_pw(npw->pw_passwd);
|
||||
#ifdef ATT_AGE
|
||||
memset(age, 0, sizeof(age));
|
||||
STRFCPY(age, npw->pw_age);
|
||||
|
||||
/*
|
||||
* Just changing the password - update the last change date
|
||||
* if there is one, otherwise the age just disappears.
|
||||
*/
|
||||
if (do_update_age) {
|
||||
if (strlen(age) > 2) {
|
||||
cp = l64a(week);
|
||||
age[2] = cp[0];
|
||||
age[3] = cp[1];
|
||||
} else {
|
||||
age[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if (xflg) {
|
||||
if (age_max > 0)
|
||||
age[0] = i64c((age_max + 6) / 7);
|
||||
else
|
||||
age[0] = '.';
|
||||
|
||||
if (age[1] == '\0')
|
||||
age[1] = '.';
|
||||
}
|
||||
if (nflg) {
|
||||
if (age[0] == '\0')
|
||||
age[0] = 'z';
|
||||
|
||||
if (age_min > 0)
|
||||
age[1] = i64c((age_min + 6) / 7);
|
||||
else
|
||||
age[1] = '.';
|
||||
}
|
||||
/*
|
||||
* The last change date is added by -n or -x if it's
|
||||
* not already there.
|
||||
*/
|
||||
if ((nflg || xflg) && strlen(age) <= 2) {
|
||||
cp = l64a(week);
|
||||
age[2] = cp[0];
|
||||
age[3] = cp[1];
|
||||
}
|
||||
|
||||
/*
|
||||
* Force password change - if last change date is
|
||||
* present, it will be set to (today - max - 1 week).
|
||||
* Otherwise, just set min = max = 0 (will disappear
|
||||
* when password is changed).
|
||||
*/
|
||||
if (eflg) {
|
||||
if (strlen(age) > 2) {
|
||||
cp = l64a(week - c64i(age[0]) - 1);
|
||||
age[2] = cp[0];
|
||||
age[3] = cp[1];
|
||||
} else {
|
||||
strcpy(age, "..");
|
||||
}
|
||||
}
|
||||
|
||||
npw->pw_age = age;
|
||||
#endif
|
||||
|
||||
if (!pw_update(npw)) {
|
||||
fprintf(stderr, "Error updating the password entry.\n");
|
||||
syslog(LOG_ERR, "error updating password entry");
|
||||
fail_exit(3);
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
#ifdef NDBM
|
||||
if (pw_dbm_present() && !pw_dbm_update(npw)) {
|
||||
fprintf(stderr, _("Error updating the DBM password entry.\n"));
|
||||
SYSLOG((LOG_ERR, DBMERROR2));
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
endpwent();
|
||||
#endif
|
||||
if (!pw_close()) {
|
||||
fprintf(stderr, "Cannot commit password file changes.\n");
|
||||
syslog(LOG_ERR, "can't rewrite password file");
|
||||
fail_exit(3);
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
pw_unlock();
|
||||
}
|
||||
|
||||
#endif /* Not __FreeBSD__ */
|
||||
|
||||
|
||||
#ifdef SHADOW_PASSWORD
|
||||
@ -484,28 +669,23 @@ static void update_shadow(void)
|
||||
const struct spwd *sp;
|
||||
struct spwd *nsp;
|
||||
|
||||
if (!spw_lock_first()) {
|
||||
if (!spw_lock()) {
|
||||
fprintf(stderr, "Cannot lock the password file; try again later.\n");
|
||||
syslog(LOG_WARNING, "can't lock password file");
|
||||
exit(5);
|
||||
exit(E_PWDBUSY);
|
||||
}
|
||||
if (!spw_open(O_RDWR)) {
|
||||
fprintf(stderr, "Cannot open the password file.\n");
|
||||
syslog(LOG_ERR, "can't open password file");
|
||||
fail_exit(3);
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
sp = spw_locate(name);
|
||||
if (!sp) {
|
||||
#if 0
|
||||
fprintf(stderr, "%s: user %s not found in /etc/shadow\n",
|
||||
Prog, name);
|
||||
fail_exit(1);
|
||||
#else
|
||||
/* Try to update the password in /etc/passwd instead. */
|
||||
spw_unlock();
|
||||
spw_close();
|
||||
update_noshadow(1);
|
||||
spw_unlock();
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
nsp = __spw_dup(sp);
|
||||
if (!nsp)
|
||||
@ -517,12 +697,20 @@ static void update_shadow(void)
|
||||
if (!spw_update(nsp)) {
|
||||
fprintf(stderr, "Error updating the password entry.\n");
|
||||
syslog(LOG_ERR, "error updating password entry");
|
||||
fail_exit(3);
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
#ifdef NDBM
|
||||
if (sp_dbm_present() && !sp_dbm_update(nsp)) {
|
||||
fprintf(stderr, _("Error updating the DBM password entry.\n"));
|
||||
SYSLOG((LOG_ERR, DBMERROR2));
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
endspent();
|
||||
#endif
|
||||
if (!spw_close()) {
|
||||
fprintf(stderr, "Cannot commit password file changes.\n");
|
||||
syslog(LOG_ERR, "can't rewrite password file");
|
||||
fail_exit(3);
|
||||
fail_exit(E_FAILURE);
|
||||
}
|
||||
spw_unlock();
|
||||
}
|
||||
@ -542,6 +730,10 @@ int main(int argc, char *argv[])
|
||||
const struct spwd *sp;
|
||||
#endif
|
||||
char *cp;
|
||||
#ifdef __FreeBSD__
|
||||
char temp[81];
|
||||
char cmd[256];
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Get my username
|
||||
@ -560,11 +752,11 @@ int main(int argc, char *argv[])
|
||||
gr = getgrgid(pw->pw_gid);
|
||||
if (!gr) {
|
||||
fprintf(stderr, "mbpasswd: Cannot determine group name.\n");
|
||||
exit(1);
|
||||
exit(E_NOPERM);
|
||||
}
|
||||
if (strcmp(gr->gr_name, (char *)"bbs")) {
|
||||
fprintf(stderr, "mbpasswd: You are not a member of group \"bbs\".\n");
|
||||
exit(1);
|
||||
exit(E_NOPERM);
|
||||
}
|
||||
|
||||
// NOOT dit programma moet kontroleren of het is aangeroepen door mbsebbs.
|
||||
@ -577,7 +769,7 @@ int main(int argc, char *argv[])
|
||||
printf("mbpasswd [-opt] [username] [newpassword]\n");
|
||||
printf("options are: -n normal password change\n");
|
||||
printf(" -f forced password change\n");
|
||||
exit(1);
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
|
||||
if (strncmp(argv[1], "-f", 2) == 0)
|
||||
@ -590,17 +782,17 @@ int main(int argc, char *argv[])
|
||||
*/
|
||||
if (strlen(argv[2]) > 16) {
|
||||
fprintf(stderr, "mbpasswd: Username too long\n");
|
||||
exit(1);
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
if (strlen(argv[3]) > 16) {
|
||||
fprintf(stderr, "mbpasswd: Password too long\n");
|
||||
exit(1);
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
|
||||
name = strdup(argv[2]);
|
||||
if ((pw = getpwnam(name)) == NULL) {
|
||||
fprintf(stderr, "mbpasswd: Unknown user %s\n", name);
|
||||
exit(1);
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
|
||||
openlog("mbpasswd", LOG_PID|LOG_CONS|LOG_NOWAIT, LOG_AUTH);
|
||||
@ -627,8 +819,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (new_password(pw, argv[3])) {
|
||||
fprintf(stderr, "The password for %s is unchanged.\n", name);
|
||||
syslog(LOG_ERR, "The password for %s is unchanged", name);
|
||||
closelog();
|
||||
exit(1);
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
do_update_pwd = 1;
|
||||
do_update_age = 1;
|
||||
@ -645,19 +838,57 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Cannot change ID to root.\n");
|
||||
syslog(LOG_ERR, "can't setuid(0)");
|
||||
closelog();
|
||||
exit(1);
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
|
||||
#ifdef HAVE_USERSEC_H
|
||||
update_userpw(pw->pw_passwd);
|
||||
#else /* !HAVE_USERSEC_H */
|
||||
|
||||
#ifdef SHADOW_PASSWORD
|
||||
if (spw_file_present())
|
||||
update_shadow();
|
||||
else
|
||||
#endif
|
||||
update_noshadow(0);
|
||||
#endif /* !HAVE_USERSEC_H */
|
||||
|
||||
#else /* __FreeBSD__ */
|
||||
|
||||
/*
|
||||
* FreeBSD has no interface (that I know of) to change the users password,
|
||||
* but they do have a utility that does it. We will use that.
|
||||
*/
|
||||
if ((access("/usr/bin/chpass", X_OK)) == 0)
|
||||
strcpy(temp, "/usr/bin/chpass");
|
||||
else if ((access("/usr/sbin/chpass", X_OK)) == 0)
|
||||
strcpy(temp, "/usr/sbin/chpass");
|
||||
else if ((access("/bin/chpass", X_OK)) == 0)
|
||||
strcpy(temp, "/bin/chpass");
|
||||
else if ((access("/sbin/chpass", X_OK)) == 0)
|
||||
strcpy(temp, "/sbin/chpass");
|
||||
else {
|
||||
fprintf(stderr, "mbpasswd: Can't find chpass\n");
|
||||
syslog(LOG_INFO, "Can't find chpass");
|
||||
closelog();
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
sprintf(cmd, "%s -p \"%s\" %s", temp, crypt_passwd, name);
|
||||
|
||||
if (system(cmd) != 0) {
|
||||
perror("mbpasswd: failed to change password\n");
|
||||
syslog(LOG_INFO, "password change for `%s' failed", name);
|
||||
closelog();
|
||||
exit(E_FAILURE);
|
||||
}
|
||||
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
syslog(LOG_INFO, "password for `%s' changed by user `%s'", name, myname);
|
||||
closelog();
|
||||
exit(0);
|
||||
exit(E_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,21 +6,35 @@
|
||||
#define STRFCPY(A,B) \
|
||||
(strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
|
||||
|
||||
/*
|
||||
* exit status values
|
||||
*/
|
||||
|
||||
#define E_SUCCESS 0 /* success */
|
||||
#define E_NOPERM 1 /* permission denied */
|
||||
#define E_USAGE 2 /* invalid combination of options */
|
||||
#define E_FAILURE 3 /* unexpected failure, nothing done */
|
||||
#define E_MISSING 4 /* unexpected failure, passwd file missing */
|
||||
#define E_PWDBUSY 5 /* passwd file busy, try again later */
|
||||
#define E_BAD_ARG 6 /* invalid argument to option */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Function prototypes
|
||||
*/
|
||||
struct passwd *get_my_pwent(void);
|
||||
static int new_password (const struct passwd *, char *);
|
||||
static void fail_exit(int);
|
||||
static void oom(void);
|
||||
void pwd_init(void);
|
||||
char *crypt_make_salt(void);
|
||||
char *pw_encrypt(const char *, const char *);
|
||||
int i64c(int);
|
||||
char *l64a(long);
|
||||
#ifndef __FreeBSD__
|
||||
static void fail_exit(int);
|
||||
static void oom(void);
|
||||
static void update_noshadow(int);
|
||||
|
||||
#endif
|
||||
#ifdef SHADOW_PASSWORD
|
||||
struct spwd *pwd_to_spwd(const struct passwd *);
|
||||
static void update_shadow(void);
|
||||
|
@ -102,6 +102,13 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
// if (seteuid(pw->pw_uid) == -1) {
|
||||
// perror("Can't seteuid() to \"mbse\" user");
|
||||
//#ifdef MEMWATCH
|
||||
// mwTerm();
|
||||
//#endif
|
||||
// exit(1);
|
||||
// }
|
||||
|
||||
/*
|
||||
* Set local time and statistic indexes.
|
||||
@ -158,7 +165,7 @@ int main(int argc, char **argv)
|
||||
sprintf(pTTY, "%s", tty);
|
||||
}
|
||||
|
||||
umask(007);
|
||||
umask(000);
|
||||
|
||||
/*
|
||||
* Trap signals
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbtoberep/mbtoberep.c
|
||||
* Purpose ...............: Show contents of toberep.data
|
||||
* Last modification date : 28-Jun-2001
|
||||
* Last modification date : 09-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -69,7 +69,7 @@ int main(int argc, char **argv)
|
||||
printf("Comment %s\n", rep.Comment);
|
||||
printf("Group %s\n", rep.Group);
|
||||
printf("File name %s\n", rep.Name);
|
||||
printf("FIle size %lu\n", rep.Size);
|
||||
printf("FIle size %lu\n", (long)(rep.Size));
|
||||
printf("File size Kb %lu\n", rep.SizeKb);
|
||||
printf("File date %s", ctime(&rep.Fdate));
|
||||
printf("File CRC %s\n", rep.Crc);
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbuser/mbuser.c
|
||||
* Purpose ...............: User Pack Util
|
||||
* Last modification date : 01-Jul-2001
|
||||
* Last modification date : 12-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -305,8 +305,13 @@ void UserPack(int days, int level, int pack)
|
||||
WriteError("Cannot setuid(root) or setgid(root)");
|
||||
WriteError("Cannot delete unix account %s", usr.Name);
|
||||
} else {
|
||||
#ifndef __FreeBSD__
|
||||
rc = execute((char *)"/usr/sbin/userdel ", usr.Name, NULL,
|
||||
(char *)"/dev/null",(char *)"/dev/null",(char *)"/dev/null");
|
||||
#else
|
||||
rc = execute((char *)"/usr/sbin/pw userdel ", usr.Name, NULL,
|
||||
(char *)"/dev/null",(char *)"/dev/null",(char *)"/dev/null");
|
||||
#endif
|
||||
if (chdir(CFG.bbs_usersdir) == 0)
|
||||
rc = execute((char *)"/bin/rm -Rf ", usr.Name, NULL,
|
||||
(char *)"/dev/null",(char *)"/dev/null",(char *)"/dev/null");
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* File ..................: mbuseradd.c
|
||||
* Purpose ...............: setuid root version of useradd
|
||||
* Last modification date : 28-Jun-2001
|
||||
* Last modification date : 25-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -41,8 +41,7 @@
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <linux/limits.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#include "mbuseradd.h"
|
||||
|
||||
@ -71,7 +70,7 @@ int execute(char *cmd, char *file, char *in, char *out, char *err)
|
||||
if (open(in, O_RDONLY) != 0) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Reopen of stdin to %s failed\n", in);
|
||||
exit(-1);
|
||||
_exit(-1);
|
||||
}
|
||||
}
|
||||
if (out) {
|
||||
@ -79,7 +78,7 @@ int execute(char *cmd, char *file, char *in, char *out, char *err)
|
||||
if (open(out, O_WRONLY | O_APPEND | O_CREAT,0600) != 1) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Reopen of stdout to %s failed\n", out);
|
||||
exit(-1);
|
||||
_exit(-1);
|
||||
}
|
||||
}
|
||||
if (err) {
|
||||
@ -87,12 +86,12 @@ int execute(char *cmd, char *file, char *in, char *out, char *err)
|
||||
if (open(err, O_WRONLY | O_APPEND | O_CREAT,0600) != 2) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Reopen of stderr to %s failed\n", err);
|
||||
exit(-1);
|
||||
_exit(-1);
|
||||
}
|
||||
}
|
||||
rc = execv(vector[0],vector);
|
||||
fprintf(stderr, "mbuseradd: Exec \"%s\" returned %d\n", vector[0], rc);
|
||||
exit(-1);
|
||||
_exit(-1);
|
||||
}
|
||||
|
||||
do {
|
||||
@ -135,19 +134,13 @@ int main(int argc, char *argv[])
|
||||
char *PassEnt, *temp, *shell;
|
||||
int i;
|
||||
struct passwd *pwent, *pwuser;
|
||||
FILE *fp;
|
||||
|
||||
if (setuid(0) == -1 || setgid(1) == -1) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Unable to setuid(root) or setgid(root)\n");
|
||||
fprintf(stderr, "Make sure that this program is set to -rwsr-sr-x\n");
|
||||
fprintf(stderr, "Owner must be root and group root\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (argc != 5)
|
||||
Help();
|
||||
|
||||
/*
|
||||
* First simple check for argument overflow
|
||||
*/
|
||||
for (i = 1; i < 5; i++) {
|
||||
if (strlen(argv[i]) > 80) {
|
||||
fprintf(stderr, "mbuseradd: Argument %d is too long\n", i);
|
||||
@ -159,10 +152,20 @@ int main(int argc, char *argv[])
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
shell = calloc(PATH_MAX, sizeof(char));
|
||||
|
||||
if (setuid(0) == -1 || setgid(1) == -1) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Unable to setuid(root) or setgid(root)\n");
|
||||
fprintf(stderr, "Make sure that this program is set to -rwsr-sr-x\n");
|
||||
fprintf(stderr, "Owner must be root and group root\n");
|
||||
exit(1);
|
||||
}
|
||||
umask(0000);
|
||||
|
||||
/*
|
||||
* Build command to add user entry to the /etc/passwd and /etc/shadow
|
||||
* files. We use the systems own useradd program.
|
||||
*/
|
||||
#ifdef __linux__
|
||||
if ((access("/usr/bin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/usr/bin/useradd");
|
||||
else if ((access("/bin/useradd", R_OK)) == 0)
|
||||
@ -175,11 +178,30 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "mbuseradd: Can't find useradd\n");
|
||||
exit(1);
|
||||
}
|
||||
#elif __FreeBSD__
|
||||
if ((access("/usr/sbin/pw", X_OK)) == 0)
|
||||
strcpy(temp, "/usr/sbin/pw");
|
||||
else if ((access("/sbin/pw", X_OK)) == 0)
|
||||
strcpy(temp, "/sbin/pw");
|
||||
else {
|
||||
fprintf(stderr, "mbuseradd: Can't find pw\n");
|
||||
exit(1);
|
||||
}
|
||||
#else
|
||||
fprintf(stderr, "mbuseradd: Don't know how to add a user on this OS\n");
|
||||
exit(1);
|
||||
#endif
|
||||
|
||||
sprintf(shell, "%s/bin/mbsebbs", getenv("MBSE_ROOT"));
|
||||
|
||||
#ifdef __linux__
|
||||
sprintf(PassEnt, "%s -c \"%s\" -d %s/%s -g %s -s %s %s",
|
||||
temp, argv[3], argv[4], argv[2], argv[1], shell, argv[2]);
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
sprintf(PassEnt, "%s useradd %s -c \"%s\" -d %s/%s -g %s -s %s",
|
||||
temp, argv[2], argv[3], argv[4], argv[2], argv[1], shell);
|
||||
#endif
|
||||
fflush(stdout);
|
||||
fflush(stdin);
|
||||
|
||||
|
@ -2,12 +2,12 @@
|
||||
*
|
||||
* File ..................: mbuseradd/pwio.c
|
||||
* Purpose ...............: MBSE BBS Shadow Password Suite
|
||||
* Last modification date : 18-Sep-2000
|
||||
* Last modification date : 09-Aug-2001
|
||||
* Original Source .......: Shadow Password Suite
|
||||
* Original Copyrioght ...: Julianne Frances Haugh and others.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -43,6 +43,9 @@
|
||||
#include <string.h>
|
||||
#include "sgetpwent.h"
|
||||
#include "commonio.h"
|
||||
#ifndef HAVE_PUTPWENT
|
||||
#include "putpwent.h"
|
||||
#endif
|
||||
#include "pwio.h"
|
||||
|
||||
|
||||
@ -143,16 +146,17 @@ static struct commonio_ops passwd_ops = {
|
||||
|
||||
|
||||
static struct commonio_db passwd_db = {
|
||||
"/etc/passwd",
|
||||
&passwd_ops,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
PASSWD_FILE, /* filename */
|
||||
&passwd_ops, /* ops */
|
||||
NULL, /* fp */
|
||||
NULL, /* head */
|
||||
NULL, /* tail */
|
||||
NULL, /* cursor */
|
||||
0, /* changed */
|
||||
0, /* isopen */
|
||||
0, /* locked */
|
||||
0, /* readonly */
|
||||
1 /* use_lckpwdf */
|
||||
};
|
||||
|
||||
|
||||
@ -171,13 +175,6 @@ int pw_lock(void)
|
||||
|
||||
|
||||
|
||||
int pw_lock_first(void)
|
||||
{
|
||||
return commonio_lock_first(&passwd_db);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int pw_open(int mode)
|
||||
{
|
||||
return commonio_open(&passwd_db, mode);
|
||||
|
@ -1,6 +1,14 @@
|
||||
#ifndef _PWIO_H
|
||||
#define _PWIO_H
|
||||
|
||||
#ifndef PASSWD_FILE
|
||||
#define PASSWD_FILE "/etc/passwd"
|
||||
#endif
|
||||
|
||||
#ifndef GROUP_FILE
|
||||
#define GROUP_FILE "/etc/group"
|
||||
#endif
|
||||
|
||||
struct passwd *__pw_dup (const struct passwd *);
|
||||
void __pw_set_changed (void);
|
||||
int pw_close (void);
|
||||
|
@ -2,12 +2,12 @@
|
||||
*
|
||||
* File ..................: mbuseradd/shadowio.c
|
||||
* Purpose ...............: MBSE BBS Shadow Password Suite
|
||||
* Last modification date : 13-Aug-2000
|
||||
* Last modification date : 09-Aug-2001
|
||||
* Original Source .......: Shadow Password Suite
|
||||
* Original Copyrioght ...: Julianne Frances Haugh and others.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2001
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -117,16 +117,17 @@ static struct commonio_ops shadow_ops = {
|
||||
|
||||
|
||||
static struct commonio_db shadow_db = {
|
||||
SHADOW_FILE,
|
||||
&shadow_ops,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
SHADOW_FILE, /* filename */
|
||||
&shadow_ops, /* ops */
|
||||
NULL, /* fp */
|
||||
NULL, /* head */
|
||||
NULL, /* tail */
|
||||
NULL, /* cursor */
|
||||
0, /* changed */
|
||||
0, /* isopen */
|
||||
0, /* locked */
|
||||
0, /* readonly */
|
||||
1 /* use_lckpwdf */
|
||||
};
|
||||
|
||||
|
||||
@ -152,13 +153,6 @@ int spw_lock(void)
|
||||
|
||||
|
||||
|
||||
int spw_lock_first(void)
|
||||
{
|
||||
return commonio_lock_first(&shadow_db);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int spw_open(int mode)
|
||||
{
|
||||
return commonio_open(&shadow_db, mode);
|
||||
|
@ -5,6 +5,13 @@
|
||||
#ifndef SHADOW_FILE
|
||||
#define SHADOW_FILE "/etc/shadow"
|
||||
#endif
|
||||
|
||||
#ifdef SHADOWGRP
|
||||
#ifndef SGROUP_FILE
|
||||
#define SGROUP_FILE "/etc/gshadow"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -14,7 +21,6 @@ int spw_close (void);
|
||||
int spw_file_present (void);
|
||||
const struct spwd *spw_locate (const char *);
|
||||
int spw_lock (void);
|
||||
int spw_lock_first (void);
|
||||
int spw_name (const char *);
|
||||
const struct spwd *spw_next (void);
|
||||
int spw_open (int);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Main user login procedure. Checks for limits,
|
||||
* new ratio's cats all the welcome screens, and
|
||||
* does a lot of checking in general.
|
||||
* Last modification date : 28-Jun-2001
|
||||
* Last modification date : 08-Aug-2001
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2001
|
||||
@ -615,11 +615,7 @@ void user()
|
||||
} else {
|
||||
Syslog('+', "Unixmode login: %s", sUnixName);
|
||||
if ((pw = getpwnam(sUnixName)))
|
||||
#ifdef linux
|
||||
strcpy(sGetName, pw->pw_gecos);
|
||||
#else
|
||||
strcpy(sGetName, pw->pw_comment);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there are more fields in the passwd gecos field
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user