UNaXcess update #1
sources-request at panda.UUCP
sources-request at panda.UUCP
Mon May 12 22:21:36 AEST 1986
Mod.sources: Volume 4, Issue 117
Submitted by: genrad!decvax!cwruecmp!ncoast!allbery (Brandon S. Allbery)
The UNaXcess distribution contained an out-of-date README and install.sh which
were written before the UDL module was added to UNaXcess. The following
context diff (suitable for input to patch) contains the diffs required to
upgrade the distributed UNaXcess sources. The change to install.sh creates
an empty default download directory
This upgrade also includes a C code bug fix, where an A_WITNESS can't add
messages to a read-only conference.
[ There is also a patch to the version of mkconf program distributed with
UNaXcess - this is one I wrote to replace the original mkconf that had
to be installed set-uid to root - moderator
]
You will have to unshar the patch files, then apply patch on each file
individually (or make the edits by hand).
--------------------------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
# README.pat
# install.pat
# mkconf.c.pat
# msg.c.pat
# This archive created: Mon May 12 08:18:44 1986
export PATH; PATH=/bin:$PATH
echo shar: extracting "'README.pat'" '(1982 characters)'
if test -f 'README.pat'
then
echo shar: will not over-write existing file "'README.pat'"
else
cat << \SHAR_EOF > 'README.pat'
*** ../temp1/README Mon May 12 07:36:56 1986
--- README Mon May 12 07:41:14 1986
***************
*** 151,156
escapes (\n \r \t \b \f \e \nnn \a) (\a is bell). Comments are indicated by
#; they do NOT have to be at the beginning of a line.
UNaXcess depends on being setuid to its owner, not only for permissions in
the BBS, but also to insure that the home directory (containing the message
database and config file) can be located.
--- 151,180 -----
escapes (\n \r \t \b \f \e \nnn \a) (\a is bell). Comments are indicated by
#; they do NOT have to be at the beginning of a line.
+ ---
+
+ The up/download (UDL) module uses a log file for uploads, and a directory for
+ downloads. Both files are created by the install script; "upload-log" is
+ empty, and "directory" contains one line:
+
+ branch file GENERAL; <date> by <sysop name>: General up/downloads
+
+ This is the basic format of a directory entry. The word "branch" is reserved,
+ and indicates that this is the directory entry for the branch itself; files
+ in this branch have the word "branch" replaced by the branch's name. There is
+ no way to automatically create or delete files or branches; it has to be done
+ from the shell. (On the other hand, if the branch has a (UNIX) directory in
+ the "uploads" directory, uploads will be logged there in such a way that the
+ log entry may be simply copied from the upload-log to the directory.)
+
+ Note that each branch is represented by a UNIX directory in the "library"
+ directory. The name should be lowercase, although user input of the name
+ and the name listed in the "directory" file are case-independent. If uploads
+ are to be permitted, a directory of the same name should be created in the
+ "upload" directory.
+
+ ---
+
UNaXcess depends on being setuid to its owner, not only for permissions in
the BBS, but also to insure that the home directory (containing the message
database and config file) can be located.
SHAR_EOF
if test 1982 -ne "`wc -c < 'README.pat'`"
then
echo shar: error transmitting "'README.pat'" '(should have been 1982 characters)'
fi
fi
echo shar: extracting "'install.pat'" '(1817 characters)'
if test -f 'install.pat'
then
echo shar: will not over-write existing file "'install.pat'"
else
cat << \SHAR_EOF > 'install.pat'
*** ../temp1/Utilities/install.sh Mon May 12 07:37:21 1986
--- Utilities/install.sh Mon May 12 07:43:58 1986
***************
*** 19,24
:
: Yes, the "-> ->" business is copped from Unify. I sincerely doubt that it is
: copyrighted, and it is fairly obvious.
if test ! -w /etc/passwd; then
echo "I'm not running as root. Please ask a system administrator to run this install"
--- 19,25 -----
:
: Yes, the "-> ->" business is copped from Unify. I sincerely doubt that it is
: copyrighted, and it is fairly obvious.
+ :
if test ! -w /etc/passwd; then
echo "I'm not running as root. Please ask a system administrator to run this install"
***************
*** 398,403
chown $UAOWNER $UAHOME/userfile
chmod 644 $UAHOME/userfile
: end of userfile installation
echo ""
echo "I am going to create a simple new-user bulletin. It is your job to change it"
--- 399,420 -----
chown $UAOWNER $UAHOME/userfile
chmod 644 $UAHOME/userfile
: end of userfile installation
+
+ echo ""
+ today="`date | sed -e 's/^... \(...\) *\([0-9][0-9]*\) [^ ][^ ]* 19\(..\)$/\1\/\2\/\3/'`"
+ today="`echo $today | sed -e s/Jan/1/ -e s/Feb/2/ -e s/Mar/3/ -e s/Apr/4/ -e s/May/5/ -e s/Jun/6/`"
+ today="`echo $today | sed -e s/Jul/7/ -e s/Aug/8/ -e s/Sep/9/ -e s/Oct/10 -e s/Nov/11/ -e s/Dec/12/`"
+ echo "Creating $UAHOME/directory..."
+ cat << --LIBCATLG-- > $UAHOME/directory
+ branch file GENERAL; $today by $sysop: General up/downloading
+ --LIBCATLG--
+ chown $UAOWNER $UAHOME/directory
+ chmod 644 $UAHOME/directory
+ echo "Creating $UAHOME/upload-log..."
+ cp /dev/null $UAHOME/upload-log
+ chown $UAOWNER $UAHOME/upload-log
+ chmod 644 $UAHOME/upload-log
+ : end of directory installation
echo ""
echo "I am going to create a simple new-user bulletin. It is your job to change it"
SHAR_EOF
if test 1817 -ne "`wc -c < 'install.pat'`"
then
echo shar: error transmitting "'install.pat'" '(should have been 1817 characters)'
fi
fi
echo shar: extracting "'mkconf.c.pat'" '(442 characters)'
if test -f 'mkconf.c.pat'
then
echo shar: will not over-write existing file "'mkconf.c.pat'"
else
cat << \SHAR_EOF > 'mkconf.c.pat'
*** ../temp1/Utilities/mkconf.c Mon May 12 07:37:01 1986
--- Utilities/mkconf.c Mon May 12 07:50:12 1986
***************
*** 15,20
{
setuid(geteuid());
umask(022);
execvp("mkdir", argv);
}
--- 15,23 -----
{
setuid(geteuid());
umask(022);
+ /* oops. UNaXcess is passing two args - only the first is wanted */
+ if (argc >= 3)
+ argv[3] = 0;
execvp("mkdir", argv);
}
SHAR_EOF
if test 442 -ne "`wc -c < 'mkconf.c.pat'`"
then
echo shar: error transmitting "'mkconf.c.pat'" '(should have been 442 characters)'
fi
fi
echo shar: extracting "'msg.c.pat'" '(640 characters)'
if test -f 'msg.c.pat'
then
echo shar: will not over-write existing file "'msg.c.pat'"
else
cat << \SHAR_EOF > 'msg.c.pat'
*** ../temp1/msg.c Mon May 12 07:38:00 1986
--- msg.c Mon May 12 07:46:09 1986
***************
*** 514,520
struct tm *ltbuf;
struct user ubuf;
! if (parms.ua_roc && conf[0] == 'r' && conf[1] == '-')
{
conf = "general"; /* responses get redirected */
puts("Read-only conference; message will be added to \"general\".");
--- 514,520 -----
struct tm *ltbuf;
struct user ubuf;
! if (user.u_access != A_WITNESS && parms.ua_roc && conf[0] == 'r' && conf[1] == '-')
{
conf = "general"; /* responses get redirected */
puts("Read-only conference; message will be added to \"general\".");
SHAR_EOF
if test 640 -ne "`wc -c < 'msg.c.pat'`"
then
echo shar: error transmitting "'msg.c.pat'" '(should have been 640 characters)'
fi
fi
exit 0
# End of shell archive
More information about the Mod.sources
mailing list