Release 0.50.0 stable
This commit is contained in:
parent
c90a7f8b19
commit
ccd6fbfded
457
ChangeLog_2003
Normal file
457
ChangeLog_2003
Normal file
@ -0,0 +1,457 @@
|
||||
$Id$
|
||||
|
||||
|
||||
v0.38.0 26-Dec-2002 - 03-Oct-2003
|
||||
|
||||
upgrade:
|
||||
Note: if upgrading from a 0.37.8 or 0.37.9 development version,
|
||||
then no upgrade procedure is needed. All others read the next
|
||||
carefully!
|
||||
|
||||
A bit tricky to upgrade and start using the new debug logfile,
|
||||
follow the next steps exactly!!
|
||||
1. Download and install the source
|
||||
2. Run "./configure"
|
||||
3. Run "make" (and do not install yet)
|
||||
4. Run "mbstat close"
|
||||
5. Backup /opt/mbse/bin and /opt/mbse/etc.
|
||||
6. Run "mbstat close"
|
||||
7. Kill mbtask, mostly "kill `/sbin/pidoff mbtask`" will do.
|
||||
8. Run (as root) "make install" to install the new software.
|
||||
9. Make sure you are user mbse again.
|
||||
10. Start mbtask manual, "mbtask"
|
||||
11. Run "mbsetup", enter menu 1, exit, save and close.
|
||||
12. Wait one minute.
|
||||
13. Run "mbstat open"
|
||||
After this is done the first time, restarting mbtask can be
|
||||
done as usual by running the mbsed init script. If something
|
||||
doesn't work (you get socket errors), it is important that you
|
||||
kill mbtask during software versions swap. All software must
|
||||
be of the same build.
|
||||
Check settings menu 1.5.21 for maximum allowed logins.
|
||||
Check setting of menu 1.14.15.
|
||||
Remove ~/etc/archiver.data, start mbsetup menu 3, leave and
|
||||
save. This updates the archiver view contents commands.
|
||||
After upgrade you may remove ~/etc/maptabs and it's contents.
|
||||
After upgrade you may remove ~/etc/bank.data.
|
||||
After upgrade you may remove ~/etc/safe.data.
|
||||
If you want, download and install the nu-door and safe-door
|
||||
packages.
|
||||
In mbsetup 1.17.3 check if you have the XX,CM,IBN,IFC flags,
|
||||
which indicates your TCP/IP capabilities. This is only for
|
||||
systems that use TCP/IP, dialup systems should only have
|
||||
the XX,CM flags. Important: only protocols that you place
|
||||
in this entry are supported, so XX,CM,IBN will let your system
|
||||
only call binkp nodes.
|
||||
|
||||
general:
|
||||
The nodelist lookup functions are now in a separate library.
|
||||
This will give us easy implemtation of new nodelist formats
|
||||
and flags.
|
||||
Introduced a new file, ~/etc/nodelist.conf, this file will
|
||||
be used for nodelist lookup behaviour.
|
||||
The current looked-up nodelist strcuture has an extra field,
|
||||
the URL how that node must be contacted.
|
||||
Debug logging is now in a separate file, the normal logging is
|
||||
now only in the normal logfiles.
|
||||
Changed all Linux references into GNU/Linux.
|
||||
Changed the address of the FSF in all sources.
|
||||
Removed memwatch debugger.
|
||||
Changed all gif and jpg images to png images.
|
||||
Added a setup switch for the nodes for selecting the wrong
|
||||
binkp long filenames escape method for Argus and Irex nodes.
|
||||
Activated the productcode for mbse that is published in the
|
||||
ftscprod.007, MBSE now has an official product code.
|
||||
Changed the website address in several sources.
|
||||
Added switches for binkp CRC mode in global and node records.
|
||||
Added check for inconv.h in configure script for UNIX98
|
||||
character set conversion. (Not yet used).
|
||||
Removed external (sysop) chat, chat paging times and other
|
||||
chat stuff that is of no use anymore. The sysop shows his
|
||||
presence by running mbmon. The mbchat program is obsolete.
|
||||
Menu item 22 is added, this is user chat session.
|
||||
For chat (and sysop/user paging chat) works now using the
|
||||
mbtask daemon.
|
||||
In several messages handling functions the international
|
||||
charset translations are removed because of several bugs. They
|
||||
will be replaced by standard library functions. Right now the
|
||||
messages are 8 bit clean and there is no translation on the
|
||||
gateway. The maptabs are removed.
|
||||
Menu items 22 and 23 are removed, menu 319 is added. You may
|
||||
want to replace the default txtfiles and menus, upgraded
|
||||
versions are in the distribution but are not automatic
|
||||
installed.
|
||||
Documented menu 318, was present for a long time, just not in
|
||||
the html docs.
|
||||
The main Makefile now sets each txtfiles directory to mode 775
|
||||
to allow doors to write ansi/ascii screens.
|
||||
Removed the safe cracker door, this is now external.
|
||||
A new developer/translator joined the team, David Gonzalez.
|
||||
The settings to suppres some IP protocols (global and nodes)
|
||||
are removed, this behaviour must be set using nodelist flags
|
||||
configuration.
|
||||
Debug logging for mail and news now have one setting, the M.
|
||||
Nodelist debug logging now uses the N character.
|
||||
In some makefiles the chown user.group syntax changed to
|
||||
user:group to follow the new POSIX syntax. Please let me know
|
||||
if you are using an older distribution that complains about
|
||||
this. This was needed for FreeBSD 4.7.
|
||||
Added Dutch template macro files. Updated English and German
|
||||
template macro files. Please remove old ones before installing.
|
||||
|
||||
common.a:
|
||||
Added a set of general purpose timers.
|
||||
Node locking tests for non-stale lockfiles older then 6 hours.
|
||||
Added general code for prgram locking.
|
||||
The getheader function changed to support stone-age .pkt's.
|
||||
If the packet year has a Y2K bug, the year is fixed. This is
|
||||
only cosmetic for logging.
|
||||
If the zone info is missing, the zone is guessed from 2d aka
|
||||
matching against the system aka's. Then all mail in the .pkt
|
||||
file is also assumed to be in that zone if there is no zone
|
||||
info in the messages also.
|
||||
Guess what, these packets do still exist in Fidonet, it took
|
||||
5 years to find them! If you want to check, call 5:5/0
|
||||
Fixed compiler warning in network code.
|
||||
printable function now escapes all non-printable characters.
|
||||
In rfcmsg function the Cc: header is now treated as any other
|
||||
header to prevent a SIGSEGV when the headerline is empty.
|
||||
Removed charset conversion/translation.
|
||||
Added integer endian byteorder swapper, usefull for non-Intel
|
||||
hardware.
|
||||
The poutCR function for the bbs never did send a newline.
|
||||
New function to get the real case of a filename.
|
||||
|
||||
nodelist.a:
|
||||
Added experimental support for IP nodes lookup using a default
|
||||
domain method. This is not the final implementation yet!
|
||||
Update, this works now as described in a FSP-xxxx that is in
|
||||
discussion in the FTSC. This will also work for current
|
||||
practice.
|
||||
|
||||
msgbase.a:
|
||||
Moved messages link from mbmsg program into library.
|
||||
Resolved a buffer overflow problem with kludges larger then
|
||||
512 bytes.
|
||||
|
||||
mbcico:
|
||||
Compiled IEMSI code back in, starts mblogin which is not IEMSI
|
||||
ready yet. A user with an IEMSI terminal can from there do a
|
||||
manual login.
|
||||
If doesn't do Multiple Batch mode anymore against binkp/1.1
|
||||
mailers.
|
||||
File resync during receive finally works.
|
||||
In binkp we don't send a empty dataframe after a file anymore.
|
||||
Completly changed the files inbound receive, all files are now
|
||||
first stored in a unique per node temporary inbound directory.
|
||||
Only after a successfull session all received files are moved
|
||||
to the final inbound directory.
|
||||
Another goodie is that this is more safe on busy multiline
|
||||
systems.
|
||||
A light improvement in session handshake setup timers.
|
||||
Added EMSI handshake timers, this gives a more relaxed EMSI
|
||||
handshake.
|
||||
Set the EMSI receive failure count to 20 instead of 6, we can
|
||||
now even accept buggy maindoor sessions and still display a
|
||||
banner.
|
||||
For FTS-0001 sessions the mail password was used instead of the
|
||||
session password. Also improved the password check.
|
||||
The product code was not entered in the FTS-0001 packet headers.
|
||||
Revised some state tables in the binkp session setup stage.
|
||||
Fixed a possible buffer overflow in the binkp driver.
|
||||
Implemented CRAM rev.4 change in binkp driver.
|
||||
Binkp now sends M_BSY to the remote when the bbs is closed.
|
||||
Better logging of BSY and ERR messages.
|
||||
The binkp transmitter does now escape the unsafe filename
|
||||
characters. Method is selectable in the setup.
|
||||
The binkp receiver now does process escaped filenames.
|
||||
The binkp protocol now supports MD5 crypted passwords.
|
||||
Removed some heavy debug code from ttyio functions to increase
|
||||
throughput.
|
||||
Standarized raw ifcico protocol logging.
|
||||
Some minor changes to the raw ifcico protocol, better error
|
||||
checking and a check for buffer overflow.
|
||||
YooHoo transmitter fixed for transmitting 16 bits product
|
||||
codes.
|
||||
With binkp and EMSI sessions double received remote aka's are
|
||||
filtered.
|
||||
When calling ITN nodes, the default port is now 23.
|
||||
Call setup changed and uses now the nodelist lookup URL.
|
||||
Changed raw ifcico debug logging.
|
||||
|
||||
mbout:
|
||||
When a poll was removed, the outbound was not rescanned.
|
||||
|
||||
mbfile:
|
||||
Added program locking to prevent that more than one mbfile can
|
||||
run at the same time.
|
||||
When a file was deleted for age or download age, the 8.3
|
||||
filename was not removed from disk.
|
||||
A better check againts empty upload dates when purging files.
|
||||
Also added a log when this happens. Please report if you see
|
||||
any of these.
|
||||
In the import function several bugfixes for reading files.bbs.
|
||||
Fixed upper/lowercase filenames bug with import.
|
||||
Move old files to another area failed, only the symbolic link
|
||||
was moved.
|
||||
Prepared for multilanguage html pages creation.
|
||||
|
||||
mbfido:
|
||||
The rfc to ftn gate now drops the headerlines starting with
|
||||
X-Spam- because they are only filled with advertisents and are
|
||||
very large (upto 1200 bytes which is somewhat larger for a
|
||||
fidonet kludge).
|
||||
Stone age packet support, see common.a.
|
||||
Due to a configuration error in some system using some tic
|
||||
processor mbfido did crash.
|
||||
Now it will log this and continue processing ticfiles with the
|
||||
risk of sending files back to the owner of that faulty program.
|
||||
Added the same check for Seenby lines.
|
||||
In a scanned netmail destined to our own local UUCP gate the
|
||||
useless X-FTN-INTL and X-FTN-TOPT kludges are no longer
|
||||
inserted in the message.
|
||||
Finding the inbound tic file now uses the new filecase function.
|
||||
Removed all code for charset translation.
|
||||
In areamgr/filemgr lists the messages are forced splitted when
|
||||
the force limit is reached in the middle of a group listing.
|
||||
The nodes statistics are expanded with flow counters.
|
||||
If echomail is accepted in a unsecure area or the unsecure
|
||||
commandline option is set, a violation is logged as warning.
|
||||
Removed some debugging tests and log messages.
|
||||
If a tic file was received in uppercase, during import in the
|
||||
bbs the LFN is converted to lowercase.
|
||||
Promoted some normal debug logmessages to heavy debug messages
|
||||
in the outbound queue packer.
|
||||
Echomail from other zones showed the address of your own zone.
|
||||
Added logging when other errors are found.
|
||||
At zonegates, the seenby lines were twice stripped.
|
||||
Another patch to compensate for sysops that pack pascalnet
|
||||
files in fidonet packets and send these messages into the world
|
||||
without zone information.
|
||||
Made the incoming tic files complete case insensitive, mixed
|
||||
case is now processed. If such file is received, the LFN will
|
||||
be set to that name.
|
||||
The magic unpack command now uses the mail unpack command
|
||||
instead of file unpack command so that paths in the archive are
|
||||
junked.
|
||||
|
||||
mbsebbs:
|
||||
When a message is saved, the messages in that area are linked.
|
||||
Added check for maximum simultaneous logins.
|
||||
Removed debug logging for userrecord i/o
|
||||
During virusscan of file uploads, the mbtask timeout timer is
|
||||
set to one hour to support very long scans.
|
||||
Changed logging during user login.
|
||||
Fixed bugs in QWK mail upload processing.
|
||||
Allow - and _ in email names (GetstrU function).
|
||||
Increased internal message buffer size to 700 lines.
|
||||
Fullscreen editor code cleanup, debug messages removed.
|
||||
When entering a message, the first character of the subject
|
||||
line was capitalized.
|
||||
Fixed recognition of tar.gz files.
|
||||
Added menu function display file.
|
||||
Display ascii textfiles now uses the More Y/n/= prompt.
|
||||
When a new message is saved in a local area, the mailout
|
||||
semafore is not set anymore.
|
||||
Offline reader, the reply packets are now handled complete
|
||||
case insensitive.
|
||||
Dropped BlueWave v2 format completly, obsolete format.
|
||||
The BlueWave and QWK download packets can have kludges, this
|
||||
depends on a setting in the userbase.
|
||||
In downloaded netmail, if message comes from a point, the FMPT
|
||||
kludge is allways included in the message.
|
||||
Added some forgotten checks for a valid QWK board name.
|
||||
Lots of code cleanups in the offline code.
|
||||
Added menu 320, toggle Offline Reader Extended Info.
|
||||
Added new control code: control-U + 8, this displays YES or NO
|
||||
for the new Extended Info setting.
|
||||
The display file function now displays the ^U8 code.
|
||||
Added support for door32.sys dropfile.
|
||||
Fixed user idle logoff when new mailcheck took too long.
|
||||
Added email reply when reading new (e)mail.
|
||||
To page the sysop, the CPAG and CCAN commands to mbtask are now
|
||||
used.
|
||||
Removed all old chat code that worked on the tty device.
|
||||
Added chat client site. If the sysop responds to the page
|
||||
request, the user is dropped into chatmode in the sysop
|
||||
channel as soon as the user does nothing (ie in a menu or still
|
||||
in page mode).
|
||||
It will now refuse to up/download OLR packets when the system
|
||||
bbs id is not set in the global setup.
|
||||
When a reply is made on a message in a area which allows
|
||||
aliases, the user is asked to use his alias.
|
||||
When a reply is made on a message in a newsgroup and your
|
||||
systems has a permanent mail domain the email address is used
|
||||
as from name.
|
||||
Removed timebank and nextuser doors.
|
||||
Added editing of user's signature file. New menu item 319.
|
||||
If the sysop is exporting a echomail message he will have the
|
||||
option to save to his private directory or to the rules
|
||||
directory. If saved to the rules directory the message will
|
||||
have the filename of the area tag. Normal users can only export
|
||||
to their private directory. Sysops: now you can start
|
||||
collecting area rules!
|
||||
New menu 221, display arearules. This function tries to find
|
||||
the arearules in the rules directory and if found displays
|
||||
this to the user.
|
||||
Fixed whoson list to display user real names and handles again.
|
||||
Fixed send online message to send to user real names, handles
|
||||
and unix names again.
|
||||
The menus are machine endian independant.
|
||||
Maybe removed a bug where the bbs sometimes crashed during
|
||||
mail reading.
|
||||
Fixed some minor things to the door.sys file.
|
||||
Normal users were allowed to delete messages of other users,
|
||||
now only the writer or those with sysop access to the area are
|
||||
allowed to delete messages.
|
||||
Finally wrote Delete Message from the menu (menu 206).
|
||||
Removed the safe cracker door.
|
||||
Changed to use the new nodelist lookup methods.
|
||||
|
||||
mbsetup:
|
||||
Made menus editor work on non-intel platforms.
|
||||
Added support for debug logging in menu 1.3 and removed the
|
||||
mbtask debug switch from menu 18.
|
||||
Import and purge oneliners now log what is done.
|
||||
In the nodes setup a switch is added to fallback to the wrong
|
||||
binkp escape method.
|
||||
Added menu entry 1.5.21 for setting maximum allowed logins.
|
||||
Added program locking, only one mbsetup can run at the same
|
||||
time.
|
||||
In menu 1.14 added global switch to disable binkp CRC32 file
|
||||
transfers.
|
||||
In menu 7.x.3 added a switch to enable binkp CRC32 file
|
||||
transfers with this node.
|
||||
In menu 1.14 added a switch to turn MD5 crypted passwords off.
|
||||
The edit archiver has now an edit line for the view archive
|
||||
commands.
|
||||
Added protection against wrong database sizes depending on
|
||||
global settings.
|
||||
When moving a message area to area zero mbsetup doesn't crash
|
||||
anymore.
|
||||
Added new menu item 319, removed menu items 22 and 23.
|
||||
Added setup for rules directory.
|
||||
Added setup for menu 221. Changed description of menu 103.
|
||||
The menu editor is machine endian independant.
|
||||
Removed setup for the safe cracker door.
|
||||
In menu 8.3 showing long option data lines, the lines were too
|
||||
long for a 80 characters display.
|
||||
Removed global flags No-IBN, IFC and ITN from the setup.
|
||||
Removed nodes flags No-IBN, IFC and ITN from the setup.
|
||||
removed del/rubout/bs keys logging.
|
||||
|
||||
mbtask:
|
||||
Added support for debug logfile. Dropped the debug switch for
|
||||
mbtask logging, this is now allways on.
|
||||
On new installations sets max logins to 1.
|
||||
Now uses standard locking in ~/var/run
|
||||
When idle, it now reports the time to the next event to be
|
||||
seen in mbmon menu 1.
|
||||
With startup it now shows the tty flags in the log.
|
||||
Remove some semafore debug messages.
|
||||
Fixed compiler warnings in network code.
|
||||
Safer logging of user log messages.
|
||||
In personal message text the text after a ; character is not
|
||||
ignored anymore.
|
||||
With mbtask start, the ports locktimes are reset to zero.
|
||||
Added CSYS command to report if sysop is available.
|
||||
Added CPAG command to page the sysop.
|
||||
Added CCAN command to cancel the sysop page.
|
||||
Added CCKP command to check for a page.
|
||||
Added CCON, CCLO, CPUT and CGET commands for chatserver.
|
||||
Implemented a chatserver, this looks like a simple IRC server
|
||||
to the users.
|
||||
Arcmail for non-CM nodes and Txx nodes is now sent during the
|
||||
node's opening hours or ZMH.
|
||||
Fixed a bug where one of the nodelists was node closed with
|
||||
each outbound scan and was causing mbtask to stop functioning
|
||||
after a few days.
|
||||
After forking the daemon, the stdin, stdout and stderr are
|
||||
reopend to /dev/null.
|
||||
Zero the daily status counters finally works again.
|
||||
Added experimental code where tossing mail is not started as
|
||||
long as there are mailers running, but not longer as 30 mins.
|
||||
This should make the whole system less nervous.
|
||||
Modified this code, didn't work, the toss was always started
|
||||
at once.
|
||||
|
||||
mbdiff:
|
||||
If unpacking a diff file fails, a second attempt is done after
|
||||
a sync and one second delay.
|
||||
|
||||
mbmon:
|
||||
Updated software info screen.
|
||||
Added program locking, only one mbmon can run at the same time
|
||||
to prevent troubles with chat and sysop available.
|
||||
Reports sysop available or left the system when mbmon starts
|
||||
or stops.
|
||||
Reports a page from a user in row 3 of the screen (but doesn't
|
||||
do chat right now).
|
||||
Adjusts its screensize if the environment variables LINES and
|
||||
COLUMNS are set.
|
||||
(in ~/.profile add the line "export LINES COLUMNS").
|
||||
The show lastcallers now adjusts the number of lines available.
|
||||
The show server clients screen now adjusts to the number of
|
||||
lines available.
|
||||
Added chatserver client, there are 2 modes, one id general chat
|
||||
and the other is respond to a users page request where the
|
||||
channel is automatic set.
|
||||
|
||||
mbuser:
|
||||
Added program locking to prevent that more than one mbuser can
|
||||
run at the same time.
|
||||
Added nopper code during pack.
|
||||
|
||||
mbaff:
|
||||
Added program locking to prevent that more than one mbaff can
|
||||
run at the same time.
|
||||
|
||||
mball:
|
||||
Added program locking to prevent that more than one mball can
|
||||
run at the same time.
|
||||
|
||||
mbmsg:
|
||||
Moved message linking to msgbase library.
|
||||
|
||||
unix:
|
||||
Fixed compiler warning.
|
||||
|
||||
examples:
|
||||
Updated Spaning and English chat menu to use the internal
|
||||
chatserver.
|
||||
Removed the last menu item from the offline menu, added new
|
||||
Extended Info toggle (English only).
|
||||
Updated offline textfiles to remove point download and add
|
||||
new Extended Info toggle (English only)
|
||||
The English and Dutch templates are updated to show the new
|
||||
nodes flow counters (html.nodes).
|
||||
English textfiles and menus are updated to show the new menu
|
||||
functions.
|
||||
Prepared for more example translations.
|
||||
Added German template files made by Joachim Kuwan.
|
||||
|
||||
script:
|
||||
Fixed debian init script to allow it to run over the network
|
||||
by using kill `pidof mbtask` to kill the daemon.
|
||||
Added full path to pidof command in FreeBSD init script.
|
||||
Added new init script for FreeBSD.
|
||||
|
||||
lang:
|
||||
Added language prompts 18 and 19.
|
||||
Added germandu, a German language file in "Du" style instead of
|
||||
"Sie". Written by Malte Tychsen.
|
||||
Changed the last Englsh language prompts in the german.txt.
|
||||
New language prompt number 17.
|
||||
Erased language prompts 18..36.
|
||||
Changed language prompts 15, 16 and 152.
|
||||
Changed english, german and dutch language prompts 11, 12, 13,
|
||||
14 and 107.
|
||||
Changed in other languages as well, but in English.
|
||||
|
||||
SETUP.sh
|
||||
Made the script more portable.
|
||||
|
||||
CRON.sh
|
||||
Removed explanation about Zone Mail Hour, this is obsolete
|
||||
for a long time already.
|
||||
|
4
Makefile
4
Makefile
@ -6,8 +6,8 @@ include Makefile.global
|
||||
OTHER = AUTHORS ChangeLog COPYING DEBUG CRON.sh FILE_ID.DIZ.in \
|
||||
INSTALL.in Makefile Makefile.global.in NEWS \
|
||||
ChangeLog_1998 ChangeLog_1999 ChangeLog_2000 ChangeLog_2001 \
|
||||
ChangeLog_2002 README SETUP.sh TODO UPGRADE aclocal.m4 \
|
||||
checkbasic config.h.in configure configure.in paths.h.in
|
||||
ChangeLog_2002 ChangeLog_2003 README SETUP.sh TODO UPGRADE \
|
||||
aclocal.m4 checkbasic config.h.in configure configure.in paths.h.in
|
||||
TARFILE = ${PACKAGE}-${VERSION}.tar.bz2
|
||||
|
||||
###############################################################################
|
||||
|
@ -24,6 +24,7 @@ mbsebbs-0_36_00_release 26-Dec-2002 Version 0.36.00 release.
|
||||
mbsebbs-0_37_00_current 26-Dec-2002 Start version 0.37 development.
|
||||
mbsebbs-0_38_00_release 03-Oct-2003 Version 0.38.00 release.
|
||||
mbsebbs-0_39_00_current 09-Oct-2003 Start version 0.39 development.
|
||||
mbsebbs-0_50_00_release 09-Feb-2004 Version 0.50.0 release.
|
||||
|
||||
|
||||
CVS usage.
|
||||
|
4
configure
vendored
4
configure
vendored
@ -1274,8 +1274,8 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html
|
||||
|
||||
PACKAGE="mbsebbs"
|
||||
MAJOR="0"
|
||||
MINOR="39"
|
||||
REVISION="9"
|
||||
MINOR="50"
|
||||
REVISION="0"
|
||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"
|
||||
SHORTRIGHT="Copyright (C) 1997-2004 M. Broek"
|
||||
|
@ -12,8 +12,8 @@ dnl After changeing the version number, run autoconf!
|
||||
dnl
|
||||
PACKAGE="mbsebbs"
|
||||
MAJOR="0"
|
||||
MINOR="39"
|
||||
REVISION="9"
|
||||
MINOR="50"
|
||||
REVISION="0"
|
||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"
|
||||
SHORTRIGHT="Copyright (C) 1997-2004 M. Broek"
|
||||
|
@ -354,7 +354,7 @@ int EditFidoRec(int Area)
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:E_IRC(j,74, fidonet.zone[j-12], 1, 32767, "A ^Zone number^ which belongs to this domain (1..32767)")
|
||||
case 17:E_IRC(j,74, fidonet.zone[j-12], 0, 32767, "A ^Zone number^ which belongs to this domain (1..32767)")
|
||||
}
|
||||
}
|
||||
|
||||
|
376
unix/mbuseradd.c
376
unix/mbuseradd.c
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: setuid root version of useradd
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2002
|
||||
* Copyright (C) 1997-2004
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -41,6 +41,7 @@
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/param.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "mbuseradd.h"
|
||||
|
||||
@ -49,77 +50,71 @@
|
||||
|
||||
int execute(char *cmd, char *file, char *in, char *out, char *err)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char *vector[16];
|
||||
int i;
|
||||
int pid, status, rc, sverr;
|
||||
char buf[PATH_MAX], *vector[16];
|
||||
int i, pid, status = 0, rc = 0;
|
||||
|
||||
sprintf(buf, "%s %s", cmd, file);
|
||||
sprintf(buf, "%s %s", cmd, file);
|
||||
syslog(LOG_WARNING, "Execute: %s", buf);
|
||||
|
||||
memset(vector, 0, sizeof(vector));
|
||||
i = 0;
|
||||
vector[i++] = strtok(buf, " \t\n");
|
||||
while ((vector[i++] = strtok(NULL," \t\n")) && (i < 16)) { syslog(LOG_NOTICE, "%s", vector[i]); } ;
|
||||
vector[15] = NULL;
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
i=0;
|
||||
vector[i++] = strtok(buf, " \t\n");
|
||||
while ((vector[i++] = strtok(NULL," \t\n")) && (i < 16));
|
||||
vector[15] = NULL;
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
if ((pid = fork()) == 0) {
|
||||
if (in) {
|
||||
close(0);
|
||||
if (open(in, O_RDONLY) != 0) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Reopen of stdin to %s failed\n", in);
|
||||
_exit(-1);
|
||||
}
|
||||
}
|
||||
if (out) {
|
||||
close(1);
|
||||
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);
|
||||
}
|
||||
}
|
||||
if (err) {
|
||||
close(2);
|
||||
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);
|
||||
}
|
||||
}
|
||||
rc = execv(vector[0],vector);
|
||||
fprintf(stderr, "mbuseradd: Exec \"%s\" returned %d\n", vector[0], rc);
|
||||
if ((pid = fork()) == 0) {
|
||||
if (in) {
|
||||
close(0);
|
||||
if (open(in, O_RDONLY) != 0) {
|
||||
syslog(LOG_WARNING, "Reopen of stdin to %s failed", in);
|
||||
_exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
rc = wait(&status);
|
||||
sverr = errno;
|
||||
} while (((rc > 0) && (rc != pid)) || ((rc == -1) && (sverr == EINTR)));
|
||||
|
||||
if (rc == -1) {
|
||||
fprintf(stderr, "mbuseradd: Wait returned %d, status %d,%d\n", rc, status >> 8, status & 0xff);
|
||||
return -1;
|
||||
if (out) {
|
||||
close(1);
|
||||
if (open(out, O_WRONLY | O_APPEND | O_CREAT,0600) != 1) {
|
||||
syslog(LOG_WARNING, "Reopen of stdout to %s failed", out);
|
||||
_exit(-1);
|
||||
}
|
||||
}
|
||||
if (err) {
|
||||
close(2);
|
||||
if (open(err, O_WRONLY | O_APPEND | O_CREAT,0600) != 2) {
|
||||
syslog(LOG_WARNING, "Reopen of stderr to %s failed", err);
|
||||
_exit(-1);
|
||||
}
|
||||
}
|
||||
rc = execv(vector[0],vector);
|
||||
syslog(LOG_WARNING, "Exec \"%s\" returned %d", vector[0], rc);
|
||||
_exit(-1);
|
||||
}
|
||||
|
||||
return status;
|
||||
do {
|
||||
rc = wait(&status);
|
||||
} while (((rc > 0) && (rc != pid)) || ((rc == -1) && (errno == EINTR)));
|
||||
|
||||
if (rc == -1) {
|
||||
syslog(LOG_WARNING, "Wait returned %d, status %d,%d", rc, status >> 8, status & 0xff);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void makedir(char *path, mode_t mode, uid_t owner, gid_t group)
|
||||
{
|
||||
if (mkdir(path, mode) != 0) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Can't create %s\n", path);
|
||||
exit(2);
|
||||
}
|
||||
if ((chown(path, owner, group)) == -1) {
|
||||
perror("");
|
||||
fprintf(stderr, "mbuseradd: Unable to change ownership of %s\n", path);
|
||||
exit(2);
|
||||
}
|
||||
if (mkdir(path, mode) != 0) {
|
||||
syslog(LOG_WARNING, "Can't create directory %s", path);
|
||||
exit(2);
|
||||
}
|
||||
if ((chown(path, owner, group)) == -1) {
|
||||
syslog(LOG_WARNING, "Unable to change ownership of %s", path);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -130,167 +125,170 @@ void makedir(char *path, mode_t mode, uid_t owner, gid_t group)
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *PassEnt, *temp, *shell;
|
||||
int i;
|
||||
struct passwd *pwent, *pwuser;
|
||||
char *PassEnt, *temp, *shell;
|
||||
int i;
|
||||
struct passwd *pwent, *pwuser;
|
||||
|
||||
if (argc != 5)
|
||||
Help();
|
||||
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);
|
||||
exit(1);
|
||||
}
|
||||
/*
|
||||
* 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);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
PassEnt = calloc(PATH_MAX, sizeof(char));
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
shell = calloc(PATH_MAX, sizeof(char));
|
||||
PassEnt = calloc(PATH_MAX, sizeof(char));
|
||||
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);
|
||||
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.
|
||||
*/
|
||||
/*
|
||||
* We don't log into MBSE BBS logfiles but to the system logfiles,
|
||||
* because we are modifying system files not belonging to MBSE BBS.
|
||||
*/
|
||||
openlog("mbuseradd", LOG_PID|LOG_CONS|LOG_NOWAIT, LOG_AUTH);
|
||||
syslog(LOG_WARNING, "mbuseradd %s %s %s %s", argv[1], argv[2], argv[3], argv[4]);
|
||||
|
||||
/*
|
||||
* Build command to add user entry to the /etc/passwd and /etc/shadow
|
||||
* files. We use the systems own useradd program.
|
||||
*/
|
||||
#if defined(__linux__) || defined(__NetBSD__)
|
||||
if ((access("/usr/bin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/usr/bin/useradd");
|
||||
else if ((access("/bin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/bin/useradd");
|
||||
else if ((access("/usr/sbin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/usr/sbin/useradd");
|
||||
else if ((access("/sbin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/sbin/useradd");
|
||||
else {
|
||||
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");
|
||||
if ((access("/usr/bin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/usr/bin/useradd");
|
||||
else if ((access("/bin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/bin/useradd");
|
||||
else if ((access("/usr/sbin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/usr/sbin/useradd");
|
||||
else if ((access("/sbin/useradd", R_OK)) == 0)
|
||||
strcpy(temp, "/sbin/useradd");
|
||||
else {
|
||||
syslog(LOG_WARNING, "Can't find useradd");
|
||||
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 {
|
||||
syslog(LOG_WARNING, "Can't find pw");
|
||||
exit(1);
|
||||
}
|
||||
#else
|
||||
syslog(LOG_WARNING, "Don't know how to add a user on this OS");
|
||||
exit(1);
|
||||
#endif
|
||||
|
||||
sprintf(shell, "%s/bin/mbsebbs", getenv("MBSE_ROOT"));
|
||||
sprintf(shell, "%s/bin/mbsebbs", getenv("MBSE_ROOT"));
|
||||
|
||||
#if defined(__linux__) || defined(__NetBSD__)
|
||||
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]);
|
||||
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);
|
||||
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);
|
||||
|
||||
if (system(PassEnt) != 0) {
|
||||
perror("mbuseradd: Failed to create unix account\n");
|
||||
exit(1);
|
||||
}
|
||||
syslog(LOG_WARNING, "system(%s)", PassEnt);
|
||||
if (system(PassEnt) != 0) {
|
||||
syslog(LOG_WARNING, "Failed to create unix account");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now create directories and files for this user.
|
||||
*/
|
||||
if ((pwent = getpwnam((char *)"mbse")) == NULL) {
|
||||
perror("mbuseradd: Can't get password entry for \"mbse\"\n");
|
||||
exit(2);
|
||||
/*
|
||||
* Now create directories and files for this user.
|
||||
*/
|
||||
if ((pwent = getpwnam((char *)"mbse")) == NULL) {
|
||||
syslog(LOG_WARNING, "Can't get password entry for \"mbse\"");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Check bbs users base home directory
|
||||
*/
|
||||
if ((access(argv[4], R_OK)) != 0)
|
||||
makedir(argv[4], 0770, pwent->pw_uid, pwent->pw_gid);
|
||||
|
||||
/*
|
||||
* Now create users home directory. Check for an existing directory,
|
||||
* some systems have already created a home directory. If one is found
|
||||
* it is removed to create a fresh one.
|
||||
*/
|
||||
sprintf(temp, "%s/%s", argv[4], argv[2]);
|
||||
if ((access(temp, R_OK)) == 0) {
|
||||
if ((access("/bin/rm", X_OK)) == 0)
|
||||
strcpy(shell, "/bin/rm");
|
||||
else if ((access("/usr/bin/rm", X_OK)) == 0)
|
||||
strcpy(shell, "/usr/bin/rm");
|
||||
else {
|
||||
syslog(LOG_WARNING, "Can't find rm");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check bbs users base home directory
|
||||
*/
|
||||
if ((access(argv[4], R_OK)) != 0)
|
||||
makedir(argv[4], 0770, pwent->pw_uid, pwent->pw_gid);
|
||||
|
||||
/*
|
||||
* Now create users home directory. Check for an existing directory,
|
||||
* some systems have already created a home directory. If one is found
|
||||
* it is removed to create a fresh one.
|
||||
*/
|
||||
sprintf(temp, "%s/%s", argv[4], argv[2]);
|
||||
if ((access(temp, R_OK)) == 0) {
|
||||
if ((access("/bin/rm", X_OK)) == 0)
|
||||
strcpy(shell, "/bin/rm");
|
||||
else if ((access("/usr/bin/rm", X_OK)) == 0)
|
||||
strcpy(shell, "/usr/bin/rm");
|
||||
else {
|
||||
fprintf(stderr, "mbuseradd: Can't find rm\n");
|
||||
exit(2);
|
||||
}
|
||||
sprintf(PassEnt, " -Rf %s", temp);
|
||||
fflush(stdout);
|
||||
fflush(stdin);
|
||||
i = execute(shell, PassEnt, (char *)"/dev/tty", (char *)"/dev/tty", (char *)"/dev/tty");
|
||||
|
||||
if (i != 0) {
|
||||
fprintf(stderr, "mbuseradd: Unable remove old home directory\n");
|
||||
exit(2);
|
||||
}
|
||||
sprintf(PassEnt, " -Rf %s", temp);
|
||||
i = execute(shell, PassEnt, (char *)"/dev/tty", (char *)"/dev/tty", (char *)"/dev/tty");
|
||||
if (i != 0) {
|
||||
syslog(LOG_WARNING, "Unable remove old home directory");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Create users home directory.
|
||||
*/
|
||||
pwuser = getpwnam(argv[2]);
|
||||
makedir(temp, 0770, pwuser->pw_uid, pwent->pw_gid);
|
||||
/*
|
||||
* Create users home directory.
|
||||
*/
|
||||
if ((pwuser = getpwnam(argv[2])) == NULL) {
|
||||
syslog(LOG_WARNING, "Can't get passwd entry for %s", argv[2]);
|
||||
exit(2);
|
||||
}
|
||||
makedir(temp, 0770, pwuser->pw_uid, pwent->pw_gid);
|
||||
|
||||
/*
|
||||
* Create Maildir and subdirs for Qmail.
|
||||
*/
|
||||
sprintf(temp, "%s/%s/Maildir", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
sprintf(temp, "%s/%s/Maildir/cur", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
sprintf(temp, "%s/%s/Maildir/new", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
sprintf(temp, "%s/%s/Maildir/tmp", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
/*
|
||||
* Create Maildir and subdirs for Qmail.
|
||||
*/
|
||||
sprintf(temp, "%s/%s/Maildir", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
sprintf(temp, "%s/%s/Maildir/cur", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
sprintf(temp, "%s/%s/Maildir/new", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
sprintf(temp, "%s/%s/Maildir/tmp", argv[4], argv[2]);
|
||||
makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
|
||||
|
||||
#ifdef _VPOPMAIL_PATH
|
||||
sprintf(temp, "%s/vadduser %s %s", _VPOPMAIL_PATH, argv[2], argv[2]);
|
||||
fflush(stdout);
|
||||
fflush(stdin);
|
||||
sprintf(temp, "%s/vadduser %s %s", _VPOPMAIL_PATH, argv[2], argv[2]);
|
||||
|
||||
if (system(temp) != 0) {
|
||||
perror("mbuseradd: Failed to create vpopmail account\n");
|
||||
}
|
||||
if (system(temp) != 0) {
|
||||
syslog(LOG_WARNING, "Failed to create vpopmail account");
|
||||
}
|
||||
#endif
|
||||
|
||||
free(shell);
|
||||
free(PassEnt);
|
||||
free(temp);
|
||||
|
||||
exit(0);
|
||||
free(shell);
|
||||
free(PassEnt);
|
||||
free(temp);
|
||||
syslog(LOG_WARNING, "Added system account for user\"%s\"", argv[2]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Help()
|
||||
{
|
||||
fprintf(stderr, "\nmbuseradd commandline:\n\n");
|
||||
fprintf(stderr, "mbuseradd [gid] [name] [comment] [usersdir]\n");
|
||||
exit(1);
|
||||
fprintf(stderr, "\nmbuseradd commandline:\n\n");
|
||||
fprintf(stderr, "mbuseradd [gid] [name] [comment] [usersdir]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user