home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume35
/
mbox
/
part01
next >
Wrap
Text File
|
1993-02-05
|
59KB
|
2,081 lines
Newsgroups: comp.sources.misc
From: Volker.Schuermann@unnet.w.open.de (Volker Schuermann)
Subject: v35i036: mbox - ix/Mbox, A BBS for UNIX and MINIX v1.6 PL10j7, Part01/15
Message-ID: <csm-v35i036=mbox.125415@sparky.IMD.Sterling.COM>
X-Md4-Signature: 877ce1f148682d47363035ad52d24b33
Date: Fri, 5 Feb 1993 18:54:41 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: Volker.Schuermann@unnet.w.open.de (Volker Schuermann)
Posting-number: Volume 35, Issue 36
Archive-name: mbox/part01
Environment: MINIX, ISC, ESIX, SVR3
Supersedes: mbox: Volume 31, Issue 16-27
Announcement for the BBS-package ix/MBox 1.6 PL10j7 25.01.1993
The package includes a BBS for UNIX. The following derivations and compilers
have been tested:
- MINIX 386 (You have to have the 386 version!) with BCC
- MINIX 386 with GCC 1.37 (with or w/o ESTDIO-patches)
- ESIX SVR3 with CC (MSC) or GCC
- ISC 2.21 with "Shared Libs"
- DELL UNIX 2.1 SVR4 with GCC 2.1
- LINUX 0.99pl2 with GCC 2.3.3
If you don't have one of those systems or anything that's compatible to
any of them, you may stop reading now!
NOTE: The 64+64 limitation of Coherent and plain MINIX makes it impossible
to run ix/MBox BBS! The BBS itself needs more than 170kB of memory!
For all who are still reading, some other requirements. The ix/MBox uses
some UNIX services to stay compatible to the UNIX world and to make updates
more easy. You need:
- a mailer like SMAIL (RMAIL) or UMAIL
- a news-package B/C-NEWS (INEWS) or WNEWS
- a uucp-system like HDB, Taylor or MNXUUCP or UUCP1.2
(The packages UMAIL and WNEWS are MINIX stuff by Fred v. Kempen, UUCP1.2
is the (best) UUCP-package for MINIX by Will Rose)
You're STILL (!) reading? Ok, now the features of the BBS. If you're missing
a feature that is important for you, just talk to me. Maybe I've forgotten
to mention it, or I'm able to offer it with the next patchlevel!
The BBS ...
... uses NEWS to handle all boards/articles. You may use the BBS or your
prevered newsreader to maintain the articles.
... uses an internal mailer for mails between BBS-users.
... uses (R/S)MAIL to receive/deliver mails from BBS-users to system-users
of the same or foreigen sites and vice versa.
... uses a variable command set. If you don't like the presetted commands,
just change the config-file to have your own commands set.
... commands are all fitted out with a user-level and a prototype-flag.
You may have several commands with the same function, but only the
commands with the prototype-flag set will be shown in the command-
survey.
... has "user defined commands". If you like to offer an external newsreader
or mailer to your users, you only have to state that in a config-file.
... is able to communicate in various languages. A german and an english
language-file are delivered with this package. It takes about two or
three hours to build language- and help-files for other countries.
... offers PD-areas like all other boards. The trick is, that the articles
in the PD-boards are including a pointer to the real PD-package. You
are able to maintain that areas like all other boards. You don't have to
copy your PD-directories!
... uses SX/SZ/SB and RX/RZ/RB as filetransfer protocols. Also ASCII up-
and download are available for text and PD transfer.
... has it's own line-editor (B)LED. Users with higher level may use
fullscreen-editors, of course. You only have to put all offered editors
in a config-file.
... even has it's on fullscreen (MIME) RTF-Editor. This one also handles
8bit texts (like texts including 'umlauts' ;-)
... NEWS&MAIL have a total 8bit-transparency. ISO 8859-1 and IBM-Keymaps are
no longer a problem.
... offers games to the users. Again, there's a config-file, which
includes the list of your online-games (rogue/nethack etc.).
... may call a CHAT-program. If you don't have one, please tell me. I've
a PD-mutliport-chat program, too. Otherwise you can use TALK or
phone as a two-person chat.
... is able to read Bellcore RTF (Richtext Format) and Qouted-Printable.
... creates MIME-Headers. This, and the RTF-feature are the first steps to
multimedia-mail.
... allows to change the headerfield of news-articles and mails. (Depending
on userlevel, of course!)
... supports the (critical) header field "return-receipt-to:", to get an
acknowledge for you sent mails and to confirm mails sent to mbox-users.
... allows to reedit articles, if you are the autor. If you are the sysop,
you may reedit everything ;-)
... is able to generate statistics on calls, downloads, news-articles.
... builds hitlists on calls per user, downloads per file, etc.
... contains a users database with online-maintenance-facility.
... allows users to setup the BBS to hit their preferences. They may
choose:
- TERMINAL ANSI X3.64, VT100, VT52, Dump (have a look at TERMCAP)
- EDITOR VI, EMACS, PED, MINED, LED, WENDY (or whatever you offer)
- PROMPT BOARD, TIME, RATES (with or w/o BELL)
- OUTPUT TYPE, MORE, MORE with marks, direction, lines, etc. ...
- INTRO INFOTEXT, STATE, both
- SCANNER DATE&TIME, DATE, change scanner date
... supports the following commands by default:
+, -, ACCOUNT, AREA, BOARD, CHAT, DIR, DATE, DELETE, DOWNLOAD, DIRECTION,
DISUSSION, EDIT, FINGER, FORWARD, GAMES, GOODBYE, HELP, MAIL, MACRO,
MESSAGE, MINIX, PORTINFO, PROTOCOL, PM, READ, SETUP, SYSINFO, SIGNATURES,
STATE, STATISTICS, SEARCH, TIME, USERS, UPLOAD, VERSION, WRITE
If you count the them and their various flags/options, you'll get a list
of 102 commands.
- Volker Schuermann UUCP: volkers@unnet.w.open.de
The Underground Network, Germany [Carpe diem!]
--------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: README README.addrpat README.wendy etc src src/intro.c
# wendy
# Wrapped by kent@sparky on Fri Feb 5 12:18:01 1993
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 1 (of 15)."'
if test -f 'README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(33036 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X
X
X
X
X
X
X
X
X
X
X
X ix/MBox R E A D M E
X Bulletin Board System for UNIX(-Derivations)
X
X Volker Schuermann
X Wuppertal, FRG, 16.01.1993
X
X
X
X
X
X
X
X
X
X
X TABLE OF CONTENTS
X
X
X PREFACE ....................................................... IV
X
X 1. FIRST STEPS ............................................... V
X
X 2. SHELL SCRIPTS
X
X 2.1. Appending new Users to the 'Aliases'-File ........... 1
X 2.2. Sending Articles to the NEWS-System ................. 2
X 2.3. Sending Mail ........................................ 3
X 2.4. Aliasing Recepients ................................. 4
X 2.5. Handling PD (Public Domain) Stuff ................... 5
X
X 3. CONFIGUREABLE FILES
X
X 3.1. The List of Editors ................................. 6
X 3.2. The offered Games ................................... 7
X 3.3. The Commands ........................................ 8
X 3.4. User defined Commands ............................... 9
X 3.5. List of Packers (Download) .......................... 10
X 3.5. The Helpfile (long) ................................. 11
X 3.6. The Helpfile (short) ................................ 12
X
X 4. ACCOUNTING
X
X 4.1. The Users DATABASE .................................. 13
X
X 5. DEFINITIONS IN SOURCE CODE
X
X 5.1. The Headerfile ...................................... 14
X 5.2. The Makefile ........................................ 15
X
X 6. SUPPORTING TOOLS
X
X 6.1. The NEWS SCANNER (MB-DAEMON) ........................ 16
X 6.2 The MAILING AGENT (XMD) ............................. 17
X
X
X APPENDIX
X
X A. DICTIONARY for german Error Codes ......................... 18
X B. DIRECTORIES with Permissions and Owners ................... 19
X C. QUICK REFERENCE put in order by Files ..................... 20
X
X
XJanuary 16, 1993 - III - ix/MBox
X
X PREFACE
X
X This BBS-Package is the first international release of the ix/MBox. The
Xgerman version has been tested and modified for month. Several problems have
Xoccured while using other OSs (than MINIX), but they have been fixed with
Xthe help of some guys out there on the net and on my BBS. Their names and
Xtheir 'heroic deeds' are documented (try using 'version #') to show who was
Xinvolved in the BBS develoment.
X
X Also special thanks to Fred v. Kempen and Will Rose. They made UUCP and
XNEWS available on MINIX. And don't forget Burce D. Evans. Without his 386er
Xpatches, programs like this BBS would never have been possible.
X
X Though this package is not a Beta-Release, some difficulties will appear
Xwhile your're installing and setting up the BBS. To render the exchange of
XBug-Reports, FAQs, hints and fixes two services are offered:
X
XE-MAIL: Volker.Schuermann@unnet.w.open.de
X
XMAILING-LIST: mbox@unnet.w.open.de (Both: SUBSCRIBING & BROADCASTING)
X
X Feel free to make use of both offers everytime you aren't able to get rid
Xof problem, or if you're having questions, or if you found/fixed a bug, or if
Xyou created a better language-file, or whatever ...
X
XRegards, Volker
X
X
X
XDecember 27, 1991 - IV - ix/MBox
X
X
X
X
X
X
X
X
X
X
X1. FIRST STEPS
X
X You managed to unpack the BBS-package without any help - congratulations!
XIt's time now to correct your first failure :-) This file (README) has to be
Xin the [/mbox] directory. This directory will be the HOME of your BBS. If you
Xdon't like '/mbox' to be the base for all following work, you have to create
Xa directory to you favor and unpack the BBS-package again in this new HOME.
X
X After unpacking the BBS, the HOME should look like the sample in the
Xdirectory [/mbox] (see APPENDIX B.). In the following, you are confronted
Xwith some files that are configurable to make the BBS running on your special
Xenvironment.
X
X
X
XDecember 27, 1991 - V - ix/MBox
X
X
X
X
X
X
X
X
X
X2. SHELL SCRIPTS
X
X2.1. Appending new Users to the 'Aliases'-File (SMAIL only!)
X
X This script is called by ix/MBox to append a line for every new BBS-user
Xto the 'aliases'-file of SMAIL.
X
X The name of the new user is send as parameter ($1). If a mail arrives for
Xthis user, SMAIL uses this entry to deliver the mail.
X
XFile /mbox/etc/alias.sh
X=======================
Xecho $1 " " \"\|/usr/bin/xmd $1 -\" >> /usr/lib/smail/aliases
X
X# $1 includes the name of the new BBS-User (Format: "Prename.Name")
X
X You mustn't change the "/usr/bin/xmd $1 -" part of this line. All other
Xitem could be changed.
X
XNOTE: If you're using UMAIL, you can forget about using this file - it would
Xbe best to comment out everything!
X
X
X
XDecember 27, 1991 - 1 - ix/MBox
X
X
X
X
X
X
X
X
X
X2.2. Sending Articles to the NEWS-System
X
X To communicate with any kind of NEWS-System, this file makes the necessary
Xcalls. As described below, INEWS gets the name of (i.e. path to) a file,
Xwhere ix/MBox stores the user-written new article.
X
XFile /mbox/etc/inews.sh
X=======================
X/usr/lib/news/inews -h < $2
X
X# $1 is the newsgroup which should receive the article
X# $2 includes the file, where the ix/MBox saves the article
X
X
X
XDecember 27, 1991 - 2 - ix/MBox
X
X
X
X
X
X
X
X
X
X2.3. Sending Mail
X
X Since there are some very powerful/intelligent mailing systems available
Xunder UNIX/MINIX, ix/MBox doesn't offer it's own mailer (for external mails).
X
X Your are able to use your most favorite mailer without making any changes
Xto your configuration. (RMAIL should be a link to UMAIL, SMAIL etc.)
X
XFile /mbox/etc/rmail.sh
X=======================
Xrmail -d -i $1 $2
X
X# $1 name/path to the user-written mail
X# $2 receiver of the mail (full address)
X
X
X
XDecember 27, 1991 - 3 - ix/MBox
X
X
X
X
X
X2.4. Aliasing receipients
X
X You may wish to redirect some mailing to other receipients as stated
Xout in the mail headers. Use the following file for this purpose.
X
XFile /mbox/src/xmd.alias
X========================
XTo: Multiple receipients of <TEX-D-L@dearn.bitnet>
XTo: J.Random.Looser@mydomain.myfeed.whatever
X
XTo: mydomain!hacker
XTo: sysop@mydomain.myfeed.whatever
X
X If the first "To:"-line is found in a mail header, it will be replaced
Xbe the second one. Note that here has to be a blank line between each
Xcouple of "To:"-lines!
X
X
X
XJanuary 16, 1993 - 4 - ix/MBox
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X2.5. Handling PD (Public Domain) Stuff
X
X The BBS doesn't know anything about where you hide your PD (Public Domain
XSoftware). So if a user wants to send such a program to the BBS, the file has
Xto be stored in the NEWS-PD-area (the place where articles are collected,
Xthat contain PD-files). After such an upload, you have two new files in that
Xarea (let's call it [/usr/spool/news/local/pd/minix]):
X
X1. An article, containing the identifier BINFILE and the path to:
X2. A PD.nnnnnnn file, which contains the PD-file itself
X
XIn our example below, there are the following files:
X
X1. 2157 (the article)
X2. PD.693419573 (the PD-file)
X
X If we would start [sh /mbox/etc/pd.script] now , the file (2.) would be
Xcopied to our PD-area ([/public/pd]), and the article (1.) would be changed
Xto get the new path to (2.).
X
X That sounds much more compilcate as it is. The comment '#' tells you where
Xthe PD belongs to and who sent it to you.
X
XFile /mbox/etc/pd.script
X========================
Xmv /usr/spool/news/local/pd/minix/PD.693419573 /public/pd/tel.tar.Z
Xmined /usr/spool/news/local/pd/minix/2157
X#local.pd.minix Andreas Zell
X
X
X
XDecember 27, 1991 - 5 - ix/MBox
X
X
X
X
X
X
X
X3. CONFIGUREABLE FILES
X
X3.1. The List of Editors
X
X There is a LineEditor delivered with this BBS-Package, but on your system
Xthere are lots of editors, I suppose. Therefore you may offer some of them
Xto your users.
X
XFile /mbox/etc/mbox.editors
X===========================
XLed /usr/bin/bled
XMined /usr/bin/mined
XVi /usr/bin/vi
XME /usr/bin/me
X
XNOTE: Between the comments-box (/* comments */) and the table itself, there
Xhas to be ONE empty line.
X
X
XDecember 27, 1991 - 6 - ix/MBox
X
X
X
X
X
X
X
X
X3.2. The offered Games
X
X Users are kids, anyway ... so allow them playing games (Don't deny ...
XI know, you're still playing rogue/empire, too!).
X
XFile /mbox/etc/mbox.games
X=========================
XAnimals /usr/bin/animals
XDiepbom /usr/games/diepbom
XEmpire /usr/games/empire
XKiller /usr/games/killer
XSokoban /usr/games/sokoban
XRogue /usr/bin/rogue
XRobots /usr/games/robots
X
XNOTE: Between the comments-box (/* comments */) and the table itself, there
Xhas to be ONE empty line.
X
X
XDecember 27, 1991 - 7 - ix/MBox
X
X
X
X
X
X
X
X3.3. The Commands
X
X This one is the MOST IMPORTANT file of all. It contains the whole command
Xstructure of the BBS.
X
XThe rows containing the following informations:
X
XID (Commands No.) This is the only connection between this table and
X the BBS (see [loop.c]).
X
XIntern/Extern (Level) That means the minimum level to be allowed to use
X the command.
X
X The difference between intern and extern is used
X to decide whether a user can write external mails
X too, or internal mails only.
X
XPrototyp(e) If you set '1' in this row, the command is shown
X in the "command survey". Otherwise the command
X is known, but not displayed.
X
XBefehl (Command) The command itself.
X
X As you see in the table, some IDs are mentioned more than once. That's
Xallowed! If there is a couple of commands doing the same action, you may
Xcollect them:
X
X180 0 0 1 Goodbye
X180 0 0 0 Quit
X180 0 0 0 Bye
X180 0 0 0 End
X
X The prototype for the LOGOUT-Command is called 'Goodbye' - only this one
Xwill be displayed, if a user types '?' (and only this one is described in the
XHELP-file). But 'Quit', 'Bye' and 'End' may also be used to leave the BBS.
X
XFile /mbox/etc/help.befehle
X===========================
XID Intern Extern Prototyp Befehl
X==============================================
X110 0 0 1 + # next board
X120 0 0 1 - # previous board
X260 0 0 1 Account # Registration
X125 9 9 0 Admin # Administration
X150 0 0 1 Board # Board
X170 0 0 1 Chat # Chat (See 'mbox.h')
X200 0 0 1 Dir # Contents
X370 0 0 1 Date # Date
X220 1 1 1 Delete # Delete
X150 0 0 0 Cd
X400 0 0 1 Direction # Direction (OLD <> NEW)
X340 1 1 1 Forward # Forward a MSG
X390 0 0 1 Games # Games
X180 0 0 1 Goodbye # Logout
X180 0 0 0 Quit
X180 0 0 0 Bye
X180 0 0 0 End
X190 0 0 1 Help # Help
X160 0 2 1 Mail # Write a Mail
X330 0 0 1 Macro # Macro Definition
X140 0 0 1 Message # 'Hello' MSG
X240 6 6 1 Minix # OS-Shell
X240 6 6 0 Execute
X270 0 0 1 Portinfo # A Kind of 'who'
X130 0 0 1 Protocol # Logfile
X250 0 0 1 PM # PM
X210 0 0 1 Read # Read
X280 0 0 1 Setup # Configurations
X280 0 0 0 Password
X280 0 0 0 Ansi
X280 0 0 0 Bell
X280 0 0 0 Address
X310 1 0 1 Signature # Signature
X290 0 0 1 State # Configurations List
X410 0 0 1 Statistics # Statistics
X380 0 0 1 Time # Time
X300 0 0 1 Users # List of Users
X320 0 0 1 Version # Version
X230 0 5 1 Write # Write a Mail/Article
X270 0 0 0 Who
X195 0 1 0 ~PD # Up-/Download LEVEL-Dummy
X215 0 0 0 Level # Level
X275 9 9 0 Relogin # Login again ...
X350 0 0 0 Sleep # Macro Special
X360 0 0 0 Keypressed # Macro Special
X230 0 5 0 Upload
X210 0 0 0 Download
X998 2 2 0 ~MAIL_DUMMY # LEVEL-Dummy
X
X The LEVEL-Dummys are useful to set the required LEVEL for UP-/DOWNLOADING
X(~PD) or mailing to external hosts (~MAIL_DUMMY).
X
X The comments '#' are NOT allowed in the [/mbox/etc/help.befehle] file,
Xthough they are used in this documentation.
X
XNOTE: Between the comments-box (/* comments */) and the table itself, there
Xhas to be ONE empty line.
X
X
X
XDecember 27, 1991 - 8 - ix/MBox
X
X
X
X
X
X
X
X
X
X
X
X
X
X3.4. User defined Commands
X
X Use this file to offer external commands to the BBS users. They want
Xnotice any difference between BBS commands and your external ones. The
Xnumber between the name (elm) and the path (/usr/bin/elm) gives the mini-
Xmum userlevel to be allowed to execute the command.
X
XFile /mbox/etc/mbox.udc
X=======================
Xelm 1 /usr/bin/elm
Xlmail 3 /usr/local/bin/lmail
Xps 5 /usr/bin/ps -lax
X
XBUT: Be careful! You have to sort the entries in alphbetic order!
X
XNOTE: Between the comments-box (/* comments */) and the table itself, there
Xhas to be ONE empty line.
X
X
X
XJune 06, 1992 - 9 - ix/MBox
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X3.5. Packers/Archivers for downloading news-articles
X
X The command download also works in normal (i.e. none pd-) groups. In
Xthis normal groups, articles have to be archived and packed before trans-
Xmitting them with X-, Y-, Z-Modem or a an ASCII text. The following list
Xincludes this packers/archivers.
X
XFile /mbox/etc/mbox.packers
X===========================
XCompress /usr/bin/compress ? + .Z
XLharc /usr/bin/lharc a - .lzh
XZoo /usr/bin/zoo -add - .zoo
X
X The first entry specifies the name of the packer - this name is shown
Xto the users. The second column includes the path to the binaries. The next
Xitem includes a command which has to be add to order packing. A '?' means
Xthat no such command is needed.
X
X A '+' in the next column stands for using TAR before compressing. If
Xthe mbox reads a '-' instead, TAR is not called.
X
X
X
XJanuary 16, 1993 - 10 - ix/MBox
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X3.6. The Helpfile (long)
X
X It's just a textfile, that contains informations on every prototyped
Xcommand of [/mbox/etc/help.befehle].
X
XFile /mbox/etc/help.hilfe
X=========================
X#BOARD
XCommand: "Board"
X
XThere is a board for every single subject/theme with it's own index. So you
Xhadn't to search long for special information on any item. To move from one
Xboard to another, you use the command 'board' with some options:
X.
X.
X.
X
X
XNOTE: The '#COMMAND' has to be set before any further text. This line is
Xused to select which commands info follows.
X
X
X
XDecember 27, 1991 - 11 - ix/MBox
X
X
X
X
X
X
X
X
X
X
X3.7. The Helpfile (short)
X
X A textfile, which is displayed complete to any user who types 'help'.
X
XFile /mbox/etc/help.shorthelp
X=============================
X? reachable commands are shown
X? * all commands are shown
Xcommand ? help on 'command'
X
XACCOUNT establish an account & a maildrop for a new user
X
XBOARD list boards with new articles
X
X
XNOTE: If you've changed [/mbox/etc/help.befehle], you have to change this
Xfile, too!
X
X
X
XDecember 27, 1991 - 12 - ix/MBox
X
X
X
X
X
X
X
X
X
X4. ACCOUNTING
X
X4.1. The Users DATABASE
X
X NEVER try to edit this file. It's created automagically by the BBS and
Xmaintained with the command 'admin'.
X
X And how to install this database? That's simple. Just erase the files
X[/mbox/etc/users.data] and [/mbox/etc/users.seq]. After doing that, you
Xmay start the BBS, which will install a new database for you.
X
X The first two entries in this database are generated from data in
X[/mbox/src/mbox.h] ... if you (as "root") are not allowed to use the
X'admin' command, you have to change the 'extern' and 'intern' entry of
X"admin" in [/mbox/etc/help.befehle] to level 0.
X
XNOTE: Don't forget to set the 'admin' level back to 9 again, after you've
Xset your own level to 10 (try 'admin' to see how)!
X
X
XDecember 27, 1991 - 13 - ix/MBox
X
X
X
X
X
X
X
X
X
X5. DEFINITIONS IN SOURCE CODE
X
X5.1. The Headerfile
X
X The following file HAS TO BE CHANGED before trying to compile the BBS. It
Xcontains all stuff, that depends on you special environment.
X
X
XFile /mbox/src/mbox.h
X=====================
X
X- Even your BBS needs a name:
X
X#define ORGANIZATION "THE UNDERGROUND NETWORK"
X#define SYSTEM "The Time Traveling Agency"
X
X
X- UUCP/Internet Identifications:
X
X#define UUCPSITE "unnet"
X#define UUCPID1 "unnet.w.open.de"
X#define UUCPID2 "unnet.ruhr.sub.org"
X#define UUCPBANG "~!unido!horga!xenox!unnet!"
X
X
X- If your UUCP supports any kind of protocol/logfile:
X
X#define UUCPCOSTS "/usr/spool/uucp/.costs"
X
X
X- Where does the BBS live (i.e. HOME):
X
X#define HOME "/mbox"
X
X
X- Some directories:
X
X#define BIN "/usr/bin"
X#define TMP "/tmp"
X#define SPOOL "/usr/spool"
X#define NEWS "/usr/spool/news"
X#define MAILDROP "/usr/spool/mail"
X
X
X- If you don't use SMAIL:
X
X#define ERRMBOX "/usr/spool/mail/postmaster"
X
X
X- NEWS 'active' file:
X
X#define NGROUPS "/usr/lib/news/active"
X
X
X- Define the device/file where to display log-informations:
X (if defined as 'REDIRECT', the device/file is used, that
X you've specified in the file CDIRECTFL !)
X
X#define CONSOLE "REDIRECT"
X#define CDIRECTFL "/etc/mbox.out"
X#define CPRN '/tmp/errlog'
X
X
X- Who's the BOSS (don't use "root"):
X
X#define POSTMASTER "volkers"
X
X
X- On which terminal POSTMASTER can use MBOX only:
X
X#define PMS_TTY "/dev/tty4"
X
X
X- The fastest BPS-Rate of your Modem-Ports:
X
X#define MAX_BPS 2400
X
X
X- What's the Name of your Visitors:
X
X#define GUEST "GAST"
X
X
X- This file is displayed after the BBS started:
X
X#define INTRO "./etc/intro"
X
X
X- If this file exists, it's shown as BBS-'Jingle':
X
X#define LOGO "./etc/logo"
X
X
X- The number of 'all time calls' to your BBS:
X
X#define SEQ "./etc/mbox.seq"
X
X
X- The callers logfile:
X
X#define CALLS "./etc/mbox.calls"
X
X
X- Your List of Editors:
X
X#define EDITORS "./etc/mbox.editors"
X
X
X- The Games:
X
X#define GAMES "'./etc/mbox.games"
X
X
X- If you like to offer a CHAT/WRITE/TALK:
X
X#define CHAT "/usr/bin/chat"
X
X
X- A special BBS-OS-Shell:
X
X#define RSH "./mbrsh"
X
X
X- Have a look at '/etc/passwd' to find the correct values:
X
X#define ROOT_UID 0
X#define ROOT_GID 0
X#define GUEST_GID 1 !!! Users and Guests have to have DIFFERENT GIDs !!!
X
X It's very, very, very important to change '/etc/passwd' if 'guest'
X and 'users' had the same GID until now. The BBS uses the GID to
X fix if a User is 'guest' or a real 'user' ...
X
X
X
X- For MINIX only (the number of the first Modem-Port):
X
X#define FIRST_EX_TTY 64
X
X
X- Where does your local mail hides the signatures:
X
X#define SIGNATURE ".wmailsign"
X
X
X- Where is your TSET:
X
X#define TSET "./etc/tset"
X
X
X- What's the prefix of your PD-boards ([local.pd.minix] etc.):
X
X#define PDNG "local.pd"
X
X
X- Where do you want protocol the downloads:
X
X#define PDLOG "./etc/pd.log"
X
X
X- Where do you like to have the upload script:
X
X#define PDSCRIPT "./etc/pd.script"
X
X
X- Which groups should new users be allowed to read:
X
X#define NEWS_MINIMUM "junk dnet local sub xenox"
X
X
X- How many entries are allowed per board/group:
X
X#define MAX_PER_NG 2000
X
X If use use a VERY high value, EXPIRE will never be started by
X MB-DAEMON ! (CNEWS don't like any handstarted EXPIREs)
X
X
X- How many days should be expired, if MAX_PRE_NG is reached:
X
X#define EXPIRED_DAYS 32
X
X
X- Which domains may be reached by 'normal' users if they send
X external mails:
X
X#define NAT_DOMAIN1 ".de"
X#define NAT_DOMAIN2 ".sub.org"
X#define NAT_DOMAIN3 ".de" NOTE: None of them must be empty!
X
X
X- Where are the Up-/Download Protocols:
X
X#define SZ "/usr/bin/sz"
X#define SX "/usr/bin/sx"
X#define SB "/usr/bin/sb"
X
X#define RZ "/usr/bin/rz"
X#define RX "/usr/bin/rx"
X#define RB "/usr/bin/rb"
X
X
X- What's the actual telephone rate (in Pfennig :-):
X
X#define TARIF 23
X
X
X- How many seconds can you talk (three zones, each day/night):
X
X#define NZNT 360
X#define NZBT 720
X#define RZNT 60
X#define RZBT 120
X#define WZNT 21
X#define WZBT 42
X
X
X- How many entries will be hold in callers protocol:
X
X#define PRO_ENTRIES 600
X
X
X Yep, I know, there are some items missing. Don't play around with one of
Xthem! To get the definitions in [mbox.h] right is the most important and most
Xcompilcate work on your way to get the BBS up and running. So spend a little
Xtime on this job - it will be a big advantage to have no errors or misunder-
Xstandings in this file.
X
X
X
XJanuary 16, 1993 - 14 - ix/MBox
X
X
X
X
X
X
X
X
X
X5.2. The Makefile
X
X Type 'make' (keep finger crossed and pray) and see what you'll get ...
XNo, that's not the right way to get this packaged compiled!
X
X The Makefile is fitted out with some special definitions for different
XUNIX-Versions and favors. Use the CFLAGS to modify the Makefile for your
Xenvironment.
X
XFile /mbox/src/Makefile
X=======================
X#CFLAGS:
X# -D_SYS7 UNIX System 7 (UNIX, COHERENT, ...)
X# -D_MBOX EVER!!!
X# -D_MINIX For MINIX only
X# -D_ISC For Interactive UNIX
X# -D_SCO For SCO UNIX
X# -D_ESTDIO For Earl Chew's [estdio.h] (or GCC)
X# -D_CORELEFT Check your memory
X# -D_DATESTAMP Protocol time&date, too
X# -D_NOINDEX Don't store INDEX-Files for every group/board
X# -D_BAUDRATE If your modem is an HST with 'fixed baudrate'
X
X If you are using SYSV, comment out everything that belongs to Sys7 and
Xvice versa, if you're using Sys7.
X
XThat's what you can 'make':
X
Xmake all <- Build all executables
Xmake world <- Create the directories and set the permissions
Xmake inst <- Build and install ALL !!
Xmake english <- Prepare for english version
Xmake german <- Prepare for german version
Xmake clean <- Delete the executables (links etc.)
Xmake mbox <- Build the BBS-executable 'mbox'
Xmake mb-daemon <- Build the NEWS-SCANNER 'mb-daemon'
Xmake xmd <- Build the MAILING-AGENT 'xmd'
Xmake mbrsh <- Build the SHELL 'mbrsh'
Xmake bled <- Build the LINE-EDITOR 'bled'
X
X If everything's ok, you only have to type 'make inst' to build and install
Xthe whole BBS and it's "world".
X
X The MINIX-Version of ix/MBox needs much more memory as given by compiler.
XWith the command 'chmem +200000', the necessary amount is set up. Yes, that's
Xwasting memory in some cases. To minimize the amount, use the FLAG _CORELEFT
Xin format '-D_CORELEFT=20000'. Now you can test around with 'chmem +/-' until
Xyou reach a value, which allows to run the BBS without producing "cores".
X
X
X
XDecember 27, 1991 - 15 - ix/MBox
X
X
X
X
X
X
X
X
X6. SUPPORTING TOOLS
X
X6.1. The NEWS SCANNER (MB-DAEMON)
X
X For every board/newsgroup in your BBS, you need an INDEX-File. As the
Xcontents of such an INDEX-File depends on which articles are collected in
Xthe corresponding newsgroup, a program is needed, that scans those articles
Xand derives the informations for the INDEX.
X
X That's exactly what 'mb-daemon' does. It would be best, to append a
Xline to [/usr/lib/crontab] for calling 'mb-daemon' after each 'rnews' run.
X
XSYNOPSIS:
X
Xmb-daemon rebuild all INDEX-Files (Fastmode)
Xmb-daemon all -x rebuild all INDEX-Files (totally rebuilding)
Xmb-daemon newsgroup rebuild INDEX-File(s) for 'newsgroup'
Xmb-daemon newsgroup -x rebuild INDEX-File(s) for 'newsgroup' (total)
X
XEXAMPLES:
X
Xmb-daemon local.pd.minix
Xmb-daemon local.pd (means: all newgroups at 'local.pd')
X
X
X
XDecember 27, 1991 - 16 - ix/MBox
X
X
X
X
X
X
X
X
X
X6.2 The MAILING AGENT (XMD)
X
X The Usernames on this BBS are Realnames. If your name is "Jack Daniels",
Xyour UUCP/Internet-ID is "Jack.Daniels@host.domain". Since normal mailing
Xagents can't handle such IDs, the BBS needs it's own agent.
X
X This one is called 'xmd'. It works in two different modes. The first one
Xscans the ERRMBOX [/usr/spool/mail/postmaster] and delivers all mails with
Xreceiver "Prename.Name" ("Jack.Daniels") to the BBS-maildrops. Spend a line
Xin [/usr/lib/crontab] for the execution of 'xmd' every hour.
X
X The second mode is used if SMAIL is the systems mailer. Have a look at
Xthe description of 'alias.sh' (see 2.1.).
X
XSYNOPSIS:
X
Xxmd Scanns ERRMBOX and delivers mail to BBS-Users
Xxmd Prename.Name - Delivers mail from STDIN (-) to Prename.Name on BBS
X
X
XEXAMPLE:
X
Xxmd Jack.Daniels -
X
X
X
XDecember 27, 1991 - 17 - ix/MBox
X
X
X
X
X
X
X
X APPENDIX
X
X
XA. DICTIONARY for german Error Codes
X
X The ix/MBox (BBS) was created in Germany. That's why all lowlevel comments
Xand error-codes are written in german.
X
X If any of those error-codes appears on your screen, you're really in
Xtrouble, because they MUSTN'T !!! (But they will :-)
X
XGerman Error-Code Meaning
X-----------------------------------------------------------------------------
XDatei-Lesefehler BBS can't read the specified file
XDatei-Schreibfehler BBS can't write the specified file
XPositionierungsfehler Error in [users.data] (FATAL!)
XDatei-Erstellungsfehler BBS can't create specified file
XDatei-Ergaenzungsfehler BBS can't append to specified file
XDatei gesperrt File locked
XPRO_ENTRIES zu klein dimensioniert Definition PRO_ENTRIES (mbox.h) to low
XDatei-Schreib/-Lesefehler BBS can't write/read file
XZuviele Artikel Too much articles in board/group
XSpeicherplatz kleiner nnnn Free Bytes lower than nnnn
XMAX_BEF ueberschritten !! Too much commands in [help.befehle]
XMAX_MAK ueberschritten !! Too much macros defined
X
X If one of the "Datei-XXXX" errors occures, 'touch' the specified file and
Xcheck the permissions/owners (see APPENDIX B.) - in most cases, that will
Xhelp.
X
X
X
XDecember 27, 1991 - 18 - ix/MBox
X
X
X
X
X
X
X
X
X
XB. DIRECTORIES with Permissions and Owners
X
XDirectory /mbox
X===============
Xdrwxrwx--- 6 root root 896 Dec 27 11:07 .
Xdrwxr-xr-x 14 bin bin 576 Dec 27 11:00 ..
X-rw-rw-rw 1 root root 1000 Dec 27 11:30 README
Xdrwxrwx--- 2 root root 576 Dec 27 10:42 etc
Xdrwxrwx--- 2 root root 1728 Dec 27 02:05 lib
X-rwxr-xr-x 1 root root 3912 Dec 21 22:48 mbrsh
X-rw-r--r-- 1 root root 1562 Aug 10 13:40 rz.cdiff
Xdrwxrwx--- 2 root root 1536 Dec 27 11:05 src
Xdrwxrwx--- 19 root root 1920 Dec 26 14:11 usr
X
X
XDirectory /mbox/etc
X===================
Xdrwxrwx--- 2 root root 321 Dec 27 11:07 .
Xdrwxrwx--- 6 root root 896 Dec 27 11:07 ..
X-rw-rw-rw- 1 root root 3002 Dec 27 02:05 active
X-rw-rw-r-- 1 root root 829 Dec 8 16:41 alias.sh
X-rw-r----- 1 root root 2693 Dec 25 12:48 help.befehle
X-rw-r--r-- 1 root root 16492 Dec 26 14:45 help.hilfe
X-rw-r--r-- 1 root root 3801 Dec 24 09:57 help.shorthelp
X-rw-r--r-- 1 root root 701 Dec 8 13:55 inews.sh
X-rw-rw---- 1 root root 245 Dec 25 13:17 intro
X-rw-r--r-- 1 root root 243 Dec 7 21:05 logo
X-rw-rw-rw- 1 root root 16426 Dec 27 02:05 mbd.log
X-rw-rw---- 1 root root 24080 Dec 27 10:40 mbox.calls
X-rw-rw---- 1 root root 627 Dec 7 21:05 mbox.editors
X-rw-r--r-- 1 root root 734 Dec 7 21:05 mbox.games
X-rw-r--r-- 1 root root 1200 Dec 27 21:07 mbox.packers
X-rw-rw---- 1 root root 5 Dec 27 10:40 mbox.seq
X-rw-r--r-- 1 root root 111 Dec 27 10:41 mbox.udc
X-rw-rw---- 1 root root 79 Dec 27 10:42 mbox.who
X-rw-rw---- 1 root root 44474 Dec 27 00:55 pd.log
X-rw-rw---- 1 root root 143 Dec 22 16:33 pd.script
X-rw-rw-rw- 1 root root 14634 Dec 16 21:30 reflector.log
X-rw-r--r-- 1 root root 727 Dec 8 13:53 rmail.sh
X-rwxrwx--- 1 root root 21 Dec 7 21:06 tset
X-rw-r--r-- 1 root root 73416 Dec 27 10:42 users.data
X-rw-r--r-- 1 root root 4 Dec 26 14:11 users.seq
X-rw-r--r-- 1 root root 1234 May 31 01:11 xmd.alias
X
X
XDirectory /mbox/lib
X===================
Xdrwxrwx--- 2 root root 1728 Dec 27 02:05 .
Xdrwxrwx--- 6 root root 896 Dec 27 11:07 ..
X-rw-rw-rw- 1 root root 4080 Dec 27 02:01 com0ws.x.motif
X-rw-rw-rw- 1 root root 28880 Dec 27 02:00 comp.os.minix
X-rw-rw-rw- 1 root root 240 Dec 27 02:01 control
X-rw-rw-rw- 1 root root 4240 Dec 27 02:01 junk
X-rw-rw-rw- 1 root root 320 Dec 27 02:01 local.lists
X-rw-rw-rw- 1 root root 26240 Dec 27 02:02 sub.config
X-rw-rw-rw- 1 root root 13760 Dec 27 02:02 sub.general
X-rw-rw-rw- 1 root root 3040 Dec 27 02:03 sub.os.minix
X
X
XDirectory /mbox/usr
X===================
Xdrwxrwx--- 19 root root 1920 Dec 26 14:11 .
Xdrwxrwx--- 6 root root 896 Dec 27 11:07 ..
Xdrwxrwx--- 2 root root 240 Aug 28 19:27 1
Xdrwxrwx--- 2 root root 128 Aug 2 19:42 2
Xdrwxrwx--- 2 root root 192 Dec 11 22:30 3
Xdrwxrwx--- 2 root root 112 Aug 2 19:42 4
Xdrwxrwx--- 2 root root 112 Aug 2 19:42 5
Xdrwxrwx--- 2 root root 112 Aug 2 19:40 6
Xdrwxrwx--- 2 root root 112 Aug 2 19:42 7
X
X
XDirectory /mbox/usr/1
X=====================
Xdrwxrwx--- 2 root root 5680 Dec 27 11:01 .
Xdrwxrwx--- 19 root root 1920 Dec 26 14:11 ..
X-rw-rw---- 1 root root 199 Dec 27 10:09 .active
X-rw-rw---- 1 root root 104 Jun 16 1991 .hello
X-rw-rw---- 1 root root 12 Dec 26 21:14 .lastsubject
X-rw-rw---- 1 root root 971 Dec 22 16:48 .makro
X-rw-rw---- 1 root root 313 Sep 11 19:31 .signature
X-rw-rw---- 1 root root 606 Sep 13 07:36 1116
X-rw-rw---- 1 root root 945 Sep 13 10:48 1117
X-rw-rw---- 1 root root 1168 Sep 13 12:49 1118
X-rw-rw---- 1 root root 2775 Dec 27 11:01 INDEX
X-rw-rw---- 1 root root 5 Dec 27 11:01 seq
X
X
XDirectory /usr/bin
X==================
X-rwsr-sr-x 1 root root 40684 Dec 26 10:50 /usr/bin/mb-daemon
X-rwsr-sr-x 1 root root 136604 Dec 26 11:23 /usr/bin/mbox
X-rwxr-xr-x 1 root root 29408 Dec 15 13:06 /usr/bin/xmd
X-rwxr-xr-x 1 root root 33228 Dec 26 18:02 /usr/bin/bled
X
X
X
XDecember 27, 1991 - 19 - ix/MBox
X
X
X
X
X
X
X
X
X
XC. QUICK REFERENCE put in order by Files
X
X2.1. /mbox/etc/alias.sh
X2.2. /mbox/etc/inews.sh
X2.3. /mbox/etc/rmail.sh
X2.4. /mbox/etc/xmd.alias
X2.5. /mbox/etc/pd.script
X
X3.1. /mbox/etc/mbox.editors
X3.2. /mbox/etc/mbox.games
X3.3. /mbox/etc/help.befehle
X3.4. /mbox/etc/mbox.udc
X3.5. /mbox/etc/mbox.packers
X3.6. /mbox/etc/help.hilfe
X3.7. /mbox/etc/help.shorthelp
X
X4.1. /mbox/etc/users.data & /mbox/etc/users.seq
X
X5.1. /mbox/src/mbox.h
X5.2. /mbox/src/Makefile
X
X
X
XJanuary 16, 1993 - 20 - ix/MBox
END_OF_FILE
if test 33036 -ne `wc -c <'README'`; then
echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'README.addrpat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'README.addrpat'\"
else
echo shar: Extracting \"'README.addrpat'\" \(976 characters\)
sed "s/^X//" >'README.addrpat' <<'END_OF_FILE'
XREADME.addrpatch // ix/MBox BBS 1.6 PL10b // 18.06.1992
X
X:From unnet.w.open.DE !Volker.Schuermann Thu, 18 Jun 92 11:04:24 remote from unnet
X: ^^^^^^^^^^^^^^^^^
X:From: unnet!Volker.Schuermann@unnet.w.open.DE (Volker Schuermann)
X: ^^^^^^
X:Received: by unnet.w.open.DE (UMAIL 3.45/UNIX) with UUCP;
X: id AA4063; Thu, 18 Jun 92 11:04:24 CET
X
X
XIf your ix/MBox BBS produces such kind of headers, too, you have to work
Xwith addrpatch!
X
X:CURDIR=`pwd`
X:
X:cd /usr/spool/uucp
X:
X:for i in D.unnet*
X: ^^^^^
X: do
X: echo -n $i' ... '
X: sed '/From unnet.w.open.DE !/s//From /g' < $i > SED.TMP
X: ^^^^^^^^^^^^^^^^^
X: sed '/From: unnet!/s//From: /g' < SED.TMP > $i
X: ^^^^^^
X: echo 'patched.'
X: done
X:
X:rm SED.TMP
X:
X:cd $CURDIR
X
XYou have to substitute 'unnet' and 'unnet.w.open.DE' by your sites name
Xand your domain address. After you've done that, start addrpatch before
Xyou start any UUCP-polling activities.
X
END_OF_FILE
if test 976 -ne `wc -c <'README.addrpat'`; then
echo shar: \"'README.addrpat'\" unpacked with wrong size!
fi
# end of 'README.addrpat'
fi
if test -f 'README.wendy' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'README.wendy'\"
else
echo shar: Extracting \"'README.wendy'\" \(256 characters\)
sed "s/^X//" >'README.wendy' <<'END_OF_FILE'
XREADME.wendy // ix/MBox BBS 1.6 PL10j7 // 16.01.1993
X
XIn the subdirectory [~/wendy] you'll find the sources of an RTF-fullscreen-
Xeditor. It has it's own Makefile and some definitions in [wendy.h]. Edit
Xboth files and than try to 'make' it ...
X
XGood luck!
END_OF_FILE
if test 256 -ne `wc -c <'README.wendy'`; then
echo shar: \"'README.wendy'\" unpacked with wrong size!
fi
# end of 'README.wendy'
fi
if test ! -d 'etc' ; then
echo shar: Creating directory \"'etc'\"
mkdir 'etc'
fi
if test ! -d 'src' ; then
echo shar: Creating directory \"'src'\"
mkdir 'src'
fi
if test -f 'src/intro.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'src/intro.c'\"
else
echo shar: Extracting \"'src/intro.c'\" \(14441 characters\)
sed "s/^X//" >'src/intro.c' <<'END_OF_FILE'
X/***************************************************************************/
X/* PROGRAMM ix/Mbox */
X/* DATEI intro.c */
X/* FUNKTIONEN intro(), init_user() */
X/* AUTOR vs (Volker Schuermann/MINIX-Version) */
X/* LETZTE AENDERUNG 29.11.1992 */
X/***************************************************************************/
X
X#include <sys/types.h>
X#include <sys/stat.h>
X#include <unistd.h>
X#include <fcntl.h>
X#include <stdio.h>
X#include <time.h>
X
X#include "mbox.h"
X
Xtime_t time_start, time_now;
X
X
Xvoid init_user();
X
X/***************************************************************************/
X/* FUNKTION intro() */
X/* BESCHREIBUNG Teilnehmer melden sich an. Beim Aufruf von SHELL, wird */
X/* die Prozedur automagisch abgewickelt. Gaeste koennen */
X/* ausserdem in dieser Funktion ein Terminal auswaehlen. */
X/* PARAMETER keine */
X/* RUECKGABE keine */
X/***************************************************************************/
X
Xvoid intro()
X{
X FILE *fp;
X FILE *ff;
X int fd;
X unsigned char s[LSTRING];
X unsigned char t[STRING];
X unsigned char f[STRING];
X unsigned char tmp[STRING];
X unsigned char crypt_pw[STRING];
X unsigned char ex[255];
X unsigned char tmpuser[STRING];
X unsigned char moreLASTLOG[STRING];
X int i, calls;
X unsigned char c;
X int ok;
X int a, b;
X long ll, lalo;
X struct userdaten LOOSER;
X
X struct tm *timeptr;
X time_t timer;
X
X struct stat fst;
X
X umask(0007);
X
X sprintf(TERMINAL, "ansi");
X ansi("INIT");
X
X time(&time_start);
X
X fp = fopen( LOGO, "r" );
X if(fp != NULL){
X fclose(fp);
X printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
X ansi("cl");
X ansi("md");
X show( LOGO, 24, 0 );
X ansi("me");
X c = getint();
X }
X
X printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
X ansi("cl");
X
X ansi("md");
X printf("\n%s ", INT01_MSG);
X ansi("me");
X printf("%s", ORGANIZATION);
X
X ansi("md");
X printf("\n%s ", INT02_MSG);
X ansi("me");
X printf("%s %s %s", VERSION, PATCHLEVEL, AUTOR);
X
X ansi("md");
X printf("\n%s ", INT03_MSG);
X ansi("me");
X printf("%s", SYSTEM);
X
X BAUDRATE = (int) 0;
X
X if (OLDGID == GUEST_GID) { /* GAESTE */
X
X TRY_AGAIN:
X
X printf("\n\n%s ", GBL04_MSG);
X strcpy(LOOSER.name, (unsigned char *) getline(30, 11, '.', ""));
X if (LOOSER.name[0] == '\0') goto TRY_AGAIN;
X
X strcpy(s, (unsigned char *) upcased(LOOSER.name));
X
X if (strcomp(GUEST, s) != 0) {
X
X printf("\n%s ", GBL09_MSG);
X strcpy(LOOSER.passwort, (unsigned char *) getline(10, 12, '.', ""));
X strcpy(crypt_pw, (unsigned char *) crypted(LOOSER.passwort));
X
X maybe_locked(UDBASE, "r"); mblock(UDBASE);
X fd = open(UDBASE, O_RDONLY);
X if (fd == -1) {
X nerror("intro.c", 78, "intro", "Datei-Lesefehler", UDBASE);
X }
X ok = 0;
X while ((ok == 0) && (read(fd, (unsigned char *) &USER, sizeof(USER)) == sizeof(USER))) {
X if (((strcomp(LOOSER.name, USER.name) == 0) ||
X (strcomp(LOOSER.name, USER.nick) == 0)) &&
X ((strcomp(USER.passwort, (unsigned char *) crypt_pw) == 0) ||
X (strcomp(USER.passwort, LOOSER.passwort) == 0)))
X ok = 1;
X }
X close(fd);
X mbunlock(UDBASE);
X
X if (ok == 1) goto WELL_DONE;
X goto TRY_AGAIN;
X }
X strcpy(LOOSER.name, (unsigned char *) upcased(s));
X
X maybe_locked(UDBASE, "r"); mblock(UDBASE);
X fd = open(UDBASE, O_RDONLY);
X if (fd == -1) {
X nerror("intro.c", 98, "intro", "Datei-Lesefehler", UDBASE);
X }
X ok = 0;
X while ((ok == 0) && (read(fd, (unsigned char *) &USER, sizeof(USER)) == sizeof(USER))) {
X if (strcomp(LOOSER.name, USER.name) == 0) ok = 1;
X }
X close(fd);
X mbunlock(UDBASE);
X
X ansi("md");
X printf("\n\n%s\n\n", INT04_MSG);
X ansi("me");
X printf("%s\n", INT05_MSG);
X ansi("md");
X printf("\n%s > ", INT06_MSG);
X ansi("me");
X
X do {
X c = getint();
X } while ((c < '1') || (c > '5'));
X printf("%c", c);
X USER.terminal = c - 48;
X
X strcpy(USER.name, (unsigned char *) GUEST);
X sprintf(USER.passwort, "%s", "*****");
X
X USER.level = 0;
X USER.prompt = 2;
X USER.bell = 0;
X USER.intro = 1;
X USER.more = 3;
X USER.lastmode = 2;
X USER.leserichtung = 2;
X USER.tlines = 23;
X USER.schluessel[0] = 1;
X USER.schluessel[1] = 3;
X
X if(USER.terminal < 2)
X USER.editor = 1;
X else
X USER.editor = 2;
X
X sprintf(USER.newsgrps, "%s", NEWS_MINIMUM);
X
X LASTLOG = (long) 19700101;
X LASTTIME = 0;
X sprintf(moreLASTLOG, "%s", "01.01.1970");
X }
X else { /* USER */
X
X printf("\n\n%s ....................", GBL04_MSG);
X for (i = 0; i < 20; i++) printf("%c", BS);
X
X strcpy(tmpuser, (unsigned char *) whoami());
X printf("%s", tmpuser);
X
X printf("\n%s ..........", GBL09_MSG);
X
X for (i = 0; i < 10; i++) printf("%c", BS);
X for (i = 0; i < 10; i++) printf("*");
X
X if (strcomp(tmpuser, "root") == 0) {
X strcpy(tmpuser, (unsigned char *) POSTMASTER);
X
X strcpy(s, (unsigned char *) ttyname(0));
X if(strcomp(PMS_TTY, s) != 0){
X printf("\n\n");
X ansi("mr");
X printf("%s", INT07_MSG);
X ansi("me");
X printf("\n\n");
X exit(-1);
X }
X else {
X USER.level = 10;
X }
X }
X maybe_locked(UDBASE, "r"); mblock(UDBASE);
X fd = open(UDBASE, O_RDONLY);
X if (fd == -1) {
X nerror("intro.c", 156, "intro", "Datei-Lesefehler", UDBASE);
X }
X ok = 0;
X while ((ok == 0) && (read(fd, (unsigned char *) &USER, sizeof(USER)) == sizeof(USER))) {
X if ((strcomp(tmpuser, USER.sh_name) == 0)) ok = 1;
X }
X close(fd);
X mbunlock(UDBASE);
X
X if (ok == 0) postfach(tmpuser);
X
X }
X
X WELL_DONE:
X
X setuid( ROOT_UID );
X setgid( ROOT_GID );
X
X if (strcomp(GUEST, USER.name) != 0) {
X LASTLOG = (long) dateconv(USER.lastlog);
X LASTTIME = USER.lasttime;
X sprintf(moreLASTLOG, "%s", USER.lastlog);
X }
X if (USER.lastmode == 2) LASTTIME = 0;
X
X sprintf(UGROUPS, "%s/usr/%d/.active", HOME, USER.id);
X
X maybe_locked( AGROUPS, "r" );
X fp = fopen(AGROUPS, "r");
X if (fp == NULL) {
X nerror("intro.c", 182, "intro", "Datei-Lesefehler", AGROUPS);
X }
X ff = fopen(UGROUPS, "w");
X if (ff == NULL) {
X nerror("intro.c", 195, "intro", "Datei-Schreibfehler", UGROUPS);
X }
X while (fscanf(fp, "%s %ld", s, &lalo) > 0) {
X if (LASTLOG < lalo) {
X sprintf(t, "%s 00000 00000 y\n", s);
X fputs(t, ff);
X }
X if (LASTLOG == lalo) {
X }
X }
X fclose(ff);
X fclose(fp);
X
X sprintf(s, "%s \"%s\" (%d) %s", INT08_MSG, USER.name, USER.id, INT09_MSG);
X control(s, 3);
X whodo( INT10_MSG );
X
X printf("\n\n");
X
X if ((USER.level < 10) && (strcomp(MYNAME, USER.name) != 0)) {
X
X maybe_locked(SEQ, "r"); mblock(SEQ);
X fp = fopen(SEQ, "r");
X if (fp == NULL) {
X nerror("intro.c", 223, "intro", "Datei-Lesefehler", SEQ);
X }
X fscanf(fp, "%d", &calls);
X fclose(fp);
X calls++;
X
X fp = fopen(SEQ, "w");
X if (fp == NULL) {
X nerror("intro.c", 227, "intro", "Datei-Schreibfehler", SEQ);
X }
X fprintf(fp, "%d\n", calls);
X fclose(fp);
X mbunlock(SEQ);
X
X sprintf(tmp, "%s/%dT", TMP, getpid());
X
X fp = fopen(tmp, "w");
X if (fp == NULL) {
X nerror("intro.c", 236, "intro", "Datei-Schreibfehler", tmp);
X }
X maybe_locked(CALLS, "r"); mblock(CALLS);
X ff = fopen(CALLS, "r");
X if (ff == NULL) {
X nerror("intro.c", 239, "intro", "Datei-Lesefehler", CALLS);
X }
X sprintf(s, "%s (%s)", USER.name, USER.nick);
X sprintf(t, "%s", numstripped(USER.wohnort));
X if (t[0] == '\0') sprintf(t, "%s", " ");
X
X sprintf(f, "%s", (unsigned char *) ttyna());
X
X fprintf(fp, "%5.d %-28.28s %-17.17s%8.8s %s %s\n",
X calls, s, stripped(t), f, (unsigned char *) mydate(1), (unsigned char *) mytime(1));
X
X if(PRO_ENTRIES < 10){
X nerror("intro.c", 291, "intro", "PRO_ENTRIES zu klein dimensioniert", "mbox.h");
X }
X
X i = 1;
X while ((fgets(s, 84, ff) != NULL) && (i <= PRO_ENTRIES)) {
X fputs(s, fp);
X i++;
X }
X
X fclose(ff);
X fclose(fp);
X
X sprintf(s, "cp %s %s > /dev/null", tmp, CALLS);
X system(s);
X
X unlink(tmp);
X mbunlock(CALLS);
X }
X
X sprintf(s, "%s/usr/%d/INDEX", HOME, USER.id);
X if(atol(USER.abused) == 0L){
X stat(s, &fst);
X IDX_SIZE = (long) fst.st_size;
X }
X else IDX_SIZE = atol(USER.abused);
X
X init_user( INT11_MSG );
X
X if (USER.intro < 3) {
X
X a = 0;
X fp = fopen(UGROUPS, "r");
X if (fp == NULL) {
X nerror("intro.c", 283, "intro", "Datei-Lesefehler", AGROUPS);
X }
X while (fgets(ex, 200, fp) != NULL) a++;
X fclose(fp);
X
X b = 0;
X sprintf(s, "%s/usr/%d/INDEX", HOME, USER.id);
X
X fp = fopen(s, "r");
X if (fp == NULL) {
X nerror("intro.c", 291, "intro", "Datei-Lesefehler", s);
X }
X while (fgets(ex, 200, fp) != NULL){
X if(ex[0] < 65) b++;
X }
X fclose(fp);
X b -= 1;
X
X ansi("md");
X printf("%s %d. %s %s %s.\n",
X INT12_MSG, USER.seq, INT13_MSG, moreLASTLOG, INT14_MSG);
X printf("%s %d %s %d %s.\n",
X INT15_MSG, a, INT16_MSG, b, INT17_MSG);
X ansi("me");
X printf("\n");
X }
X if ((USER.intro != 2) && (USER.intro != 4)) show(INTRO, 9999, 1);
X
X
X
X
X fp = fopen(WHO, "a");
X if (fp == NULL) {
X nerror("intro.c", 309, "intro", "Datei-Lesefehler", WHO);
X }
X strcpy(s, (unsigned char *) USER.sh_name);
X if (s[0] == '\0') strcpy(s, (unsigned char *) USER.nick);
X if (s[0] == '\0') strcpy(s, (unsigned char *) GBL10_MSG);
X sprintf(ex, "%-8.8s %s (%s) ",
X (unsigned char *) ttyna(), USER.name, s);
X
X ex[39] = '\0';
X fputs(ex, fp);
X
X sprintf(ex, "%8.8s", (unsigned char *) ttyna());
X fputs(ex, fp);
X
X strcpy(s, (unsigned char *) mytime(1));
X if (USER.level < 10)
X sprintf(ex, " %s [%d] MBox: %s\n", s, USER.level, INT10_MSG);
X else
X sprintf(ex, " %s [%d] MBox: %s\n", s, ADMIN_LEV, INT10_MSG);
X
X fputs(ex, fp);
X fclose(fp);
X
X
X
X sprintf(MYNAME, "%s", USER.name);
X
X sprintf(s, "%s", (unsigned char *) mydate(0));
X s[6] = '\0';
X if (strcomp(s, USER.geburtsdatum) == 0) {
X ansi("md");
X printf("\n\n%s\n", INT18_MSG);
X printf("%s\n\n", INT19_MSG);
X ansi("me");
X }
X if (strcomp("24.12.", s) == 0) {
X ansi("md");
X printf("\n\n%s\n", INT20_MSG);
X printf("%s\n\n", INT21_MSG);
X ansi("me");
X }
X if (strcomp("06.12.", s) == 0) {
X ansi("md");
X printf("\n\n%s\n", INT22_MSG);
X printf("\n%s\n\n", INT23_MSG);
X ansi("me");
X }
X if (strcomp("01.01.", s) == 0) {
X ansi("md");
X printf("\n\n%s\n", INT24_MSG);
X printf("%s\n\n", INT25_MSG);
X ansi("me");
X }
X if ((calls == 1000) || (calls == 10000) || (calls == 100000)) {
X ansi("md");
X printf("\n\n%s %d%s\n\n", INT26_MSG, calls, INT27_MSG);
X ansi("me");
X }
X
X
X /* Strict Accounting ... decrease Level if User doesn't pay */
X
X strcpy(s, (unsigned char *) mydate( 0 ));
X lalo = dateconv(s);
X
X strcpy(s, (unsigned char *) USER.account);
X s[10] = '\0';
X ll = dateconv(s);
X
X if((ll <= lalo) && (ll > 19000000L)){
X ansi( "md" );
X printf("\n%s %s %s\n", INT28_MSG, s, INT29_MSG);
X ansi( "me" );
X printf("%s\n", INT30_MSG);
X
X if(lalo > (ll + 14)){
X USER.level = WRITE_INTERNAT - 1;
X sprintf(USER.newsgrps, "%s", NEWS_MINIMUM);
X }
X }
X
X uptodate();
X}
X
X
X
X/***************************************************************************/
X/* FUNKTION init_user() */
X/* BESCHREIBUNG Teilnehmer-Parameter werden zugewiesen, Rechte verteilt */
X/* und die Daten aktualisiert. */
X/* PARAMETER info = Ansage-Text */
X/* RUECKGABE keine */
X/***************************************************************************/
X
Xvoid init_user(info)
Xunsigned char info[];
X{
X FILE *fp;
X FILE *ff;
X int fd;
X unsigned char s[STRING];
X unsigned char t[STRING];
X int i;
X struct userdaten DUMMY;
X int dummy = sizeof(DUMMY);
X long ll, lalo;
X int lati;
X int ok;
X
X printf("%s ..", info);
X
X switch (USER.terminal) {
X case 1: sprintf(TERMINAL, "ansi");
X break;
X case 2: sprintf(TERMINAL, "vt100");
X break;
X case 3: sprintf(TERMINAL, "vt52");
X break;
X case 4: sprintf(TERMINAL, "vt52");
X break;
X case 5: sprintf(TERMINAL, "col-ansi");
X break;
X }
X printf(".");
X
X ansi("INIT");
X
X fp = fopen(EDITORS, "r");
X if (fp == NULL) {
X nerror("intro.c", 487, "intro", "Datei-Lesefehler", EDITORS);
X }
X i = 0;
X while((fgets(s, 80, fp) != NULL) && (s[0] == '/'));
X /*
X while ((i != USER.editor) && (fscanf(fp, "%s %s", s, EDDY) > 0)) i++;
X fclose(fp);
X */
X while (fscanf(fp, "%s %s", t, s) > 0){
X if(i == (USER.editor -1)) strcpy(EDDY, (unsigned char *) s);
X i++;
X }
X fclose(fp);
X
X OFFERED_EDITORS = i;
X
X printf(".");
X
X if (USER.leserichtung == 0) USER.leserichtung = 2;
X
X USER.seq++;
X
X maybe_locked(UDBASE, "r"); mblock(UDBASE);
X fd = open(UDBASE, O_RDWR);
X if (fd == -1) {
X nerror("intro.c", 395, "init_user", "Datei-Schreib/-Lesefehler", UDBASE);
X }
X while (read(fd, (unsigned char *) &DUMMY, dummy) == dummy) {
X if (USER.id == DUMMY.id) {
X ll = lseek(fd, 0L, SEEK_CUR) - dummy;
X }
X }
X lseek(fd, ll, SEEK_SET);
X write(fd, (unsigned char *) &USER, sizeof(USER));
X close(fd);
X mbunlock(UDBASE);
X
X printf(".");
X
X sprintf(UGROUPS, "%s/usr/%d/.active", HOME, USER.id);
X sprintf(MAKRO, "%s/usr/%d/.makro", HOME, USER.id);
X
X maybe_locked( AGROUPS, "r" );
X fp = fopen(AGROUPS, "r");
X if (fp == NULL) {
X nerror("intro.c", 412, "intro", "Datei-Lesefehler", AGROUPS);
X }
X ff = fopen(UGROUPS, "w");
X if (ff == NULL) {
X nerror("intro.c", 442, "intro", "Datei-Schreibfehler", UGROUPS);
X }
X while (fscanf(fp, "%s %ld %d", s, &lalo, &lati) > 0) {
X if (LASTLOG < lalo) {
X sprintf(t, "%s 00000 00000 y\n", s);
X fputs(t, ff);
X }
X if (LASTLOG == lalo) {
X if (LASTTIME <= lati) {
X sprintf(t, "%s 00000 00000 y\n", s);
X fputs(t, ff);
X }
X }
X }
X fclose(ff);
X fclose(fp);
X
X printf(".");
X
X strcpy(BRETT, "PM");
X sprintf(NG, "%s.PM", USER.name);
X sprintf(INHALT, "%s/usr/%d/INDEX", HOME, USER.id);
X
X printf(".");
X
X if (USER.newsgrps[0] == '\0') sprintf(USER.newsgrps, "%s", NEWS_MINIMUM);
X
X sscanf(USER.newsgrps, "%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s",
X newsgrp[1], newsgrp[2], newsgrp[3], newsgrp[4], newsgrp[5],
X newsgrp[6], newsgrp[7], newsgrp[8], newsgrp[9], newsgrp[10],
X newsgrp[11], newsgrp[12], newsgrp[13], newsgrp[14], newsgrp[15]);
X
X MAX_SCR_LINES = USER.tlines;
X
X if(USER.schluessel[0] == 32)
X SHORT_HEADER = 1;
X else
X SHORT_HEADER = 0;
X
X if(USER.schluessel[1] == 0)
X USER.schluessel[1] = 4;
X
X if(USER.level >= WRITE_INTERNAT){
X strcpy(UUCPID, UUCPID2);
X }
X else{
X strcpy(UUCPID, UUCPID1);
X }
X
X if((USER.schluessel[2] != 1) && (USER.schluessel[2] != 2) && (USER.schluessel[2] != 4))
X USER.schluessel[2] = 3;
X
X UMLAUT_MODUS = USER.schluessel[2];
X
X if(USER.account[0] == '\0') strcpy(USER.account, "00.00.0000 000.00");
X
X printf("%c", CR);
X}
END_OF_FILE
if test 14441 -ne `wc -c <'src/intro.c'`; then
echo shar: \"'src/intro.c'\" unpacked with wrong size!
fi
# end of 'src/intro.c'
fi
if test ! -d 'wendy' ; then
echo shar: Creating directory \"'wendy'\"
mkdir 'wendy'
fi
echo shar: End of archive 1 \(of 15\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 15 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...