Basic installation updates

This commit is contained in:
Michiel Broek 2004-09-27 11:41:03 +00:00
parent 6f89414c80
commit 1ef0643fcc
3 changed files with 132 additions and 96 deletions

View File

@ -5,6 +5,12 @@ v0.61.5 25-Sep-2004
general:
In SETUP.sh better xinetd.d system detection.
On Linux SETUP.sh adds user mbse to group wheel and uucp.
SETUP.sh adds disabled telnet service to inetd.conf or xinetd.
mbsetup:
In user setup, if user gets a new security level, his timelimit
is updated with your permission.
v0.61.4 11-Aug-2004 - 25-Sep-2004

View File

@ -245,7 +245,11 @@ log "+" "[$?] Added group bbs"
echo -n ", user 'mbse'"
if [ "$OSTYPE" = "Linux" ]; then
if [ "`grep wheel /etc/group`" = "" ]; then
useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G uucp -m -s /bin/bash mbse
else
useradd -c "MBSE BBS Admin" -d $MHOME -g bbs -G wheel,uucp -m -s /bin/bash mbse
fi
fi
if [ "$OSTYPE" = "FreeBSD" ]; then
pw useradd mbse -c "MBSE BBS Admin" -d $MHOME -g bbs -G wheel,dialer -m -s /usr/local/bin/bash
@ -445,6 +449,7 @@ cat << EOF >>/etc/inetd.conf
binkp stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ibn
fido stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t ifc
tfido stream tcp nowait mbse $MHOME/bin/mbcico mbcico -t itn
#telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -L $MHOME/bin/mblogin
EOF
chmod 644 /etc/inetd.conf
@ -459,8 +464,8 @@ EOF
fi
fi
if [ -f /etc/xinetd.conf ] || [ -d /etc/xinetd.d ]; then
log "+" "/etc/xinetd.conf or /etc/xinetd.d found, xinetd system"
if [ -f /etc/xinetd.conf ]; then
log "+" "/etc/xinetd.conf found, xinetd system"
if [ -d /etc/xinetd.d ]; then
log "+" "has xinetd.d subdir, writing files"
XINET="/etc/xinetd.d/mbsebbs"
@ -471,7 +476,7 @@ if [ -f /etc/xinetd.conf ] || [ -d /etc/xinetd.d ]; then
cat << EOF >> $XINET
#:MBSE BBS services are defined here.
#
# Author: Michiel Broek <mbse@mbse.dds.nl>, 01-Feb-2004
# Author: Michiel Broek <mbse@mbse.dds.nl>, 27-Sep-2004
service binkp
{
@ -505,6 +510,24 @@ service tfido
server = $MHOME/bin/mbcico
server_args = -t itn
}
disable=yes
# Telnet to the bbs using mblogin, disabled by default.
#
service telnet
{
disable = yes
protocol = tcp
instances = 10
flags = REUSE
log_on_failure += USERID
socket_type = stream
user = root
server = /usr/sbin/telnetd
server_args = -L $MHOME/bin/mblogin
wait = no
}
EOF
fi

View File

@ -454,25 +454,25 @@ void Reset_Time(void)
char *temp;
FILE *pLimits;
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT"));
if ((pLimits = fopen(temp,"r")) == NULL) {
WriteError("$Can't open %s", temp);
} else {
fread(&LIMIThdr, sizeof(LIMIThdr), 1, pLimits);
while (fread(&LIMIT, sizeof(LIMIT), 1, pLimits) == 1) {
if (LIMIT.Security == usrconfig.Security.level) {
if (LIMIT.Time)
usrconfig.iTimeLeft = LIMIT.Time;
else
usrconfig.iTimeLeft = 86400;
usrconfig.iTimeUsed = 0;
break;
}
}
fclose(pLimits);
}
free(temp);
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT"));
if ((pLimits = fopen(temp,"r")) == NULL) {
WriteError("$Can't open %s", temp);
} else {
fread(&LIMIThdr, sizeof(LIMIThdr), 1, pLimits);
while (fread(&LIMIT, sizeof(LIMIT), 1, pLimits) == 1) {
if (LIMIT.Security == usrconfig.Security.level) {
if (LIMIT.Time)
usrconfig.iTimeLeft = LIMIT.Time;
else
usrconfig.iTimeLeft = 86400;
usrconfig.iTimeUsed = 0;
break;
}
}
fclose(pLimits);
}
free(temp);
}
@ -486,7 +486,7 @@ int EditUsrRec(int Area)
char mfile[PATH_MAX];
long offset;
int j = 0;
unsigned long crc, crc1;
unsigned long crc, crc1, level;
clr_index();
working(1, 0, 0);
@ -514,8 +514,7 @@ int EditUsrRec(int Area)
Fields1();
j = select_menu(16);
switch(j) {
case 0:
crc1 = 0xffffffff;
case 0: crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&usrconfig, crc1, sizeof(usrconfig));
if (crc != crc1) {
if (yes_no((char *)"Record is changed, save") == 1) {
@ -534,7 +533,15 @@ int EditUsrRec(int Area)
IsDoing("Browsing Menu");
return 0;
case 1: E_STR( 6,17,35,usrconfig.sUserName, "The ^First and Last name^ of this user")
case 2: E_USEC( 7,17, usrconfig.Security, "15.2 EDIT USER SECURITY", Screen1)
case 2: level = usrconfig.Security.level;
usrconfig.Security = edit_usec(7,17,usrconfig.Security, (char *)"15.2 EDIT USER SECURITY");
Screen1();
Fields1();
if (level != usrconfig.Security.level) {
if (yes_no((char *)"Set time left for new level") == 1) {
Reset_Time();
}
}
break;
case 3 :E_STR( 8,17,10,usrconfig.sExpiryDate, "The ^Expiry Date^ in DD-MM-YYYY format, 00-00-0000 is no expire")
case 4 :E_INT( 9,17, usrconfig.ExpirySec.level,"The ^Expiry Level^ for this user")