Fixes for Fedora Linux
This commit is contained in:
parent
ef422b88f0
commit
1d076afea1
17
ChangeLog
17
ChangeLog
@ -30,11 +30,28 @@ v0.51.3 22-Mar-2003
|
|||||||
announces of files like FP-DEF.ZIP.
|
announces of files like FP-DEF.ZIP.
|
||||||
Fixed (I hope for real now) the double announce of the files
|
Fixed (I hope for real now) the double announce of the files
|
||||||
like FP-DEF.ZIP received twice a day.
|
like FP-DEF.ZIP received twice a day.
|
||||||
|
Fixed SIGCHLD logmessages on Fedora.
|
||||||
|
|
||||||
|
mbfile:
|
||||||
|
Fixed SIGCHLD logmessages on Fedora.
|
||||||
|
|
||||||
|
mbdiff:
|
||||||
|
Fixed SIGCHLD logmessages on Fedora.
|
||||||
|
|
||||||
mbtask:
|
mbtask:
|
||||||
Fixed crash on NetBSD Sparc when getsysinfo was called.
|
Fixed crash on NetBSD Sparc when getsysinfo was called.
|
||||||
Fixed disk search check when /opt/mbse is a symlink on a non-
|
Fixed disk search check when /opt/mbse is a symlink on a non-
|
||||||
root disk to display the correct partition.
|
root disk to display the correct partition.
|
||||||
|
Fixed SIGCHLD logmessages on Fedora.
|
||||||
|
|
||||||
|
mbsebbs:
|
||||||
|
Fixed SIGCHLD logmessages on Fedora.
|
||||||
|
|
||||||
|
mbnewusr:
|
||||||
|
Fixed SIGCHLD logmessages on Fedora.
|
||||||
|
|
||||||
|
mball:
|
||||||
|
Fixed SIGCHLD logmessages on Fedora.
|
||||||
|
|
||||||
mblogin:
|
mblogin:
|
||||||
Changed some defines for NetBSD 1.6.2
|
Changed some defines for NetBSD 1.6.2
|
||||||
|
3
TODO
3
TODO
@ -14,9 +14,6 @@ $Id$
|
|||||||
L = Cosmetic or nice to have.
|
L = Cosmetic or nice to have.
|
||||||
X = Will not be done unless it's really needed.
|
X = Will not be done unless it's really needed.
|
||||||
|
|
||||||
general:
|
|
||||||
N: Investigate the wait logmessages on Fedora.
|
|
||||||
|
|
||||||
everything:
|
everything:
|
||||||
L: Consider XML format for databases.
|
L: Consider XML format for databases.
|
||||||
|
|
||||||
|
@ -14,20 +14,19 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
<BLOCKQUOTE>
|
<BLOCKQUOTE>
|
||||||
<div align='right'><h5>Last update 30-Jan-2001</h5></div>
|
<div align='right'><h5>Last update 09-Apr-2004</h5></div>
|
||||||
<div align='center'><H1>MBSE BBS Setup - Create Sitedocs.</H1></div>
|
<div align='center'><H1>MBSE BBS Setup - Create Sitedocs.</H1></div>
|
||||||
|
|
||||||
|
|
||||||
<H3>Create Sitedocs</H3>
|
<H3>Create Sitedocs</H3>
|
||||||
<P>
|
<P>
|
||||||
This option creates 3 documents in the doc directory under the home directory
|
This option creates everal documents in the share/doc and share/doc/html
|
||||||
of MBSE BBS, site.doc, xref.doc and stat.doc. Only the file site.doc is more
|
directories under the home directory of MBSE BBS. In the first directory is a
|
||||||
or less complete, the other 2 are heavily under construction. These three
|
file called site.doc that is formatted to print. In the html directory are
|
||||||
files are a complete reference of your BBS setup. Especially the site.doc is
|
a lot of html pages with cross reference links. Since these pages contain
|
||||||
a large document, think at least four times before you send it to a printer.
|
confidentional information of your users and links, you should not make these
|
||||||
The document xref.doc will contain lists with data from your setup that
|
html pages public available, but you can browse these with a browser with open
|
||||||
depends on eachother. The file stat.doc will be a listing of all statistic
|
file and point to /opt/mbse/share/html/index.html.
|
||||||
counters that are present in several data files.
|
|
||||||
<P>
|
<P>
|
||||||
|
|
||||||
<A HREF="./"><IMG SRC="../images/larrow.png" ALT="Back" Border="0">Back to index</A>
|
<A HREF="./"><IMG SRC="../images/larrow.png" ALT="Back" Border="0">Back to index</A>
|
||||||
|
@ -127,6 +127,8 @@ int main(int argc, char **argv)
|
|||||||
for (i = 0; i < NSIG; i++) {
|
for (i = 0; i < NSIG; i++) {
|
||||||
if ((i == SIGHUP) || (i == SIGINT) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV))
|
if ((i == SIGHUP) || (i == SIGINT) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV))
|
||||||
signal(i, (void (*))die);
|
signal(i, (void (*))die);
|
||||||
|
else if (i == SIGCHLD)
|
||||||
|
signal(i, SIG_DFL);
|
||||||
else if ((i != SIGKILL) && (i != SIGSTOP))
|
else if ((i != SIGKILL) && (i != SIGSTOP))
|
||||||
signal(i, SIG_IGN);
|
signal(i, SIG_IGN);
|
||||||
}
|
}
|
||||||
|
@ -312,6 +312,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if ((i == SIGINT) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
if ((i == SIGINT) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
||||||
signal(i, (void (*))die);
|
signal(i, (void (*))die);
|
||||||
|
else if (i == SIGCHLD)
|
||||||
|
signal(i, SIG_DFL);
|
||||||
else if ((i != SIGKILL) && (i != SIGSTOP))
|
else if ((i != SIGKILL) && (i != SIGSTOP))
|
||||||
signal(i, SIG_IGN);
|
signal(i, SIG_IGN);
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,8 @@ int main(int argc, char **argv)
|
|||||||
for (i = 0; i < NSIG; i++) {
|
for (i = 0; i < NSIG; i++) {
|
||||||
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
||||||
signal(i, (void (*))die);
|
signal(i, (void (*))die);
|
||||||
|
else if (i == SIGCHLD)
|
||||||
|
signal(i, SIG_DFL);
|
||||||
else if ((i != SIGKILL) && (i != SIGSTOP))
|
else if ((i != SIGKILL) && (i != SIGSTOP))
|
||||||
signal(i, SIG_IGN);
|
signal(i, SIG_IGN);
|
||||||
}
|
}
|
||||||
|
@ -142,6 +142,8 @@ int main(int argc, char **argv)
|
|||||||
for (i = 0; i < NSIG; i++) {
|
for (i = 0; i < NSIG; i++) {
|
||||||
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
||||||
signal(i, (void (*))die);
|
signal(i, (void (*))die);
|
||||||
|
else if (i == SIGCHLD)
|
||||||
|
signal(i, SIG_DFL);
|
||||||
else if ((i != SIGKILL) && (i != SIGSTOP))
|
else if ((i != SIGKILL) && (i != SIGSTOP))
|
||||||
signal(i, SIG_IGN);
|
signal(i, SIG_IGN);
|
||||||
}
|
}
|
||||||
|
@ -49,160 +49,161 @@ char *StartTime;
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char *p, *tty;
|
char *p, *tty, temp[PATH_MAX];
|
||||||
FILE *pTty;
|
FILE *pTty;
|
||||||
int i;
|
int i;
|
||||||
char temp[PATH_MAX];
|
struct passwd *pw;
|
||||||
struct passwd *pw;
|
|
||||||
|
|
||||||
printf("\n\nLoading MBSE BBS New User Registration ...\n\n");
|
printf("\n\nLoading MBSE BBS New User Registration ...\n\n");
|
||||||
pTTY = calloc(15, sizeof(char));
|
pTTY = calloc(15, sizeof(char));
|
||||||
tty = ttyname(1);
|
tty = ttyname(1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get MBSE_ROOT Path and load Config into Memory
|
* Get MBSE_ROOT Path and load Config into Memory
|
||||||
*/
|
*/
|
||||||
FindMBSE();
|
FindMBSE();
|
||||||
if (!strlen(CFG.startname)) {
|
if (!strlen(CFG.startname)) {
|
||||||
printf("FATAL: No bbs startname, edit mbsetup 1.2.10\n");
|
printf("FATAL: No bbs startname, edit mbsetup 1.2.10\n");
|
||||||
exit(MBERR_CONFIG_ERROR);
|
exit(MBERR_CONFIG_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set uid and gid to the "mbse" user.
|
* Set uid and gid to the "mbse" user.
|
||||||
*/
|
*/
|
||||||
if ((pw = getpwnam((char *)"mbse")) == NULL) {
|
if ((pw = getpwnam((char *)"mbse")) == NULL) {
|
||||||
perror("Can't find user \"mbse\" in /etc/passwd");
|
perror("Can't find user \"mbse\" in /etc/passwd");
|
||||||
exit(MBERR_INIT_ERROR);
|
exit(MBERR_INIT_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set effective user to mbse.bbs
|
* Set effective user to mbse.bbs
|
||||||
*/
|
*/
|
||||||
if ((seteuid(pw->pw_uid) == -1) || (setegid(pw->pw_gid) == -1)) {
|
if ((seteuid(pw->pw_uid) == -1) || (setegid(pw->pw_gid) == -1)) {
|
||||||
perror("Can't seteuid() or setegid() to \"mbse\" user");
|
perror("Can't seteuid() or setegid() to \"mbse\" user");
|
||||||
exit(MBERR_INIT_ERROR);
|
exit(MBERR_INIT_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set local time and statistic indexes.
|
* Set local time and statistic indexes.
|
||||||
*/
|
*/
|
||||||
Time_Now = t_start = time(NULL);
|
Time_Now = t_start = time(NULL);
|
||||||
l_date = localtime(&Time_Now);
|
l_date = localtime(&Time_Now);
|
||||||
Diw = l_date->tm_wday;
|
Diw = l_date->tm_wday;
|
||||||
Miy = l_date->tm_mon;
|
Miy = l_date->tm_mon;
|
||||||
ltime = time(NULL);
|
ltime = time(NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize this client with the server. We don't know
|
* Initialize this client with the server. We don't know
|
||||||
* who is at the other end of the line, so that's what we tell.
|
* who is at the other end of the line, so that's what we tell.
|
||||||
*/
|
*/
|
||||||
do_quiet = TRUE;
|
do_quiet = TRUE;
|
||||||
InitClient((char *)"Unknown", (char *)"mbnewusr", (char *)"Unknown",
|
InitClient((char *)"Unknown", (char *)"mbnewusr", (char *)"Unknown",
|
||||||
CFG.logfile, CFG.bbs_loglevel, CFG.error_log, CFG.mgrlog, CFG.debuglog);
|
CFG.logfile, CFG.bbs_loglevel, CFG.error_log, CFG.mgrlog, CFG.debuglog);
|
||||||
IsDoing("Loging in");
|
IsDoing("Loging in");
|
||||||
|
|
||||||
Syslog(' ', " ");
|
Syslog(' ', " ");
|
||||||
Syslog(' ', "MBNEWUSR v%s", VERSION);
|
Syslog(' ', "MBNEWUSR v%s", VERSION);
|
||||||
|
|
||||||
if ((p = getenv("CONNECT")) != NULL)
|
if ((p = getenv("CONNECT")) != NULL)
|
||||||
Syslog('+', "CONNECT %s", p);
|
Syslog('+', "CONNECT %s", p);
|
||||||
if ((p = getenv("CALLER_ID")) != NULL)
|
if ((p = getenv("CALLER_ID")) != NULL)
|
||||||
if (strncmp(p, "none", 4))
|
if (strncmp(p, "none", 4))
|
||||||
Syslog('+', "CALLER %s", p);
|
Syslog('+', "CALLER %s", p);
|
||||||
|
|
||||||
sUnixName[0] = '\0';
|
sUnixName[0] = '\0';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize
|
* Initialize
|
||||||
*/
|
*/
|
||||||
InitLanguage();
|
InitLanguage();
|
||||||
|
|
||||||
if ((tty = ttyname(0)) == NULL) {
|
if ((tty = ttyname(0)) == NULL) {
|
||||||
WriteError("Not at a tty");
|
WriteError("Not at a tty");
|
||||||
Fast_Bye(MBERR_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strncmp("/dev/", tty, 5) == 0)
|
|
||||||
sprintf(pTTY, "%s", tty+5);
|
|
||||||
else if (*tty == '/') {
|
|
||||||
tty = strrchr(ttyname(0), '/');
|
|
||||||
++tty;
|
|
||||||
sprintf(pTTY, "%s", tty);
|
|
||||||
}
|
|
||||||
|
|
||||||
umask(007);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Trap signals
|
|
||||||
*/
|
|
||||||
for(i = 0; i < NSIG; i++) {
|
|
||||||
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM) || (i == SIGKILL))
|
|
||||||
signal(i, (void (*))die);
|
|
||||||
else
|
|
||||||
signal(i, SIG_IGN);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Default set the terminal to ANSI mode. If your logo
|
|
||||||
* is in color, the user will see color no mather what.
|
|
||||||
*/
|
|
||||||
TermInit(1, 80, 24);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Now it's time to check if the bbs is open. If not, we
|
|
||||||
* log the user off.
|
|
||||||
*/
|
|
||||||
if (CheckStatus() == FALSE) {
|
|
||||||
Syslog('+', "Kicking user out, the BBS is closed");
|
|
||||||
Fast_Bye(MBERR_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
colour(YELLOW, BLACK);
|
|
||||||
printf("MBSE BBS v%s (Release: %s) on %s/%s\n", VERSION, ReleaseDate, OsName(), OsCPU());
|
|
||||||
colour(WHITE, BLACK);
|
|
||||||
printf("%s\n\n", COPYRIGHT);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check if this port is available.
|
|
||||||
*/
|
|
||||||
sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
|
|
||||||
|
|
||||||
if ((pTty = fopen(temp, "r")) == NULL) {
|
|
||||||
WriteError("Can't read %s", temp);
|
|
||||||
} else {
|
|
||||||
fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, pTty);
|
|
||||||
|
|
||||||
while (fread(&ttyinfo, ttyinfohdr.recsize, 1, pTty) == 1) {
|
|
||||||
if (strcmp(ttyinfo.tty, pTTY) == 0)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
fclose(pTty);
|
|
||||||
|
|
||||||
if ((strcmp(ttyinfo.tty, pTTY) != 0) || (!ttyinfo.available)) {
|
|
||||||
Syslog('+', "No BBS allowed on port \"%s\"", pTTY);
|
|
||||||
printf("No BBS on this port allowed!\n\n");
|
|
||||||
Fast_Bye(MBERR_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Ask whether to display Connect String
|
|
||||||
*/
|
|
||||||
if (CFG.iConnectString) {
|
|
||||||
/* Connected on port */
|
|
||||||
colour(CYAN, BLACK);
|
|
||||||
printf("%s\"%s\" ", (char *) Language(348), ttyinfo.comment);
|
|
||||||
/* on */
|
|
||||||
printf("%s %s\n", (char *) Language(135), ctime(<ime));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
alarm_on();
|
|
||||||
Pause();
|
|
||||||
|
|
||||||
newuser();
|
|
||||||
Fast_Bye(MBERR_OK);
|
Fast_Bye(MBERR_OK);
|
||||||
return 0;
|
}
|
||||||
|
|
||||||
|
if (strncmp("/dev/", tty, 5) == 0)
|
||||||
|
sprintf(pTTY, "%s", tty+5);
|
||||||
|
else if (*tty == '/') {
|
||||||
|
tty = strrchr(ttyname(0), '/');
|
||||||
|
++tty;
|
||||||
|
sprintf(pTTY, "%s", tty);
|
||||||
|
}
|
||||||
|
|
||||||
|
umask(007);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Trap signals
|
||||||
|
*/
|
||||||
|
for (i = 0; i < NSIG; i++) {
|
||||||
|
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM) || (i == SIGKILL))
|
||||||
|
signal(i, (void (*))die);
|
||||||
|
else if (i == SIGCHLD)
|
||||||
|
signal(i, SIG_DFL);
|
||||||
|
else
|
||||||
|
signal(i, SIG_IGN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Default set the terminal to ANSI mode. If your logo
|
||||||
|
* is in color, the user will see color no mather what.
|
||||||
|
*/
|
||||||
|
TermInit(1, 80, 24);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Now it's time to check if the bbs is open. If not, we
|
||||||
|
* log the user off.
|
||||||
|
*/
|
||||||
|
if (CheckStatus() == FALSE) {
|
||||||
|
Syslog('+', "Kicking user out, the BBS is closed");
|
||||||
|
Fast_Bye(MBERR_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
colour(YELLOW, BLACK);
|
||||||
|
printf("MBSE BBS v%s (Release: %s) on %s/%s\n", VERSION, ReleaseDate, OsName(), OsCPU());
|
||||||
|
colour(WHITE, BLACK);
|
||||||
|
printf("%s\n\n", COPYRIGHT);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if this port is available.
|
||||||
|
*/
|
||||||
|
sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
|
if ((pTty = fopen(temp, "r")) == NULL) {
|
||||||
|
WriteError("Can't read %s", temp);
|
||||||
|
} else {
|
||||||
|
fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, pTty);
|
||||||
|
|
||||||
|
while (fread(&ttyinfo, ttyinfohdr.recsize, 1, pTty) == 1) {
|
||||||
|
if (strcmp(ttyinfo.tty, pTTY) == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fclose(pTty);
|
||||||
|
|
||||||
|
if ((strcmp(ttyinfo.tty, pTTY) != 0) || (!ttyinfo.available)) {
|
||||||
|
Syslog('+', "No BBS allowed on port \"%s\"", pTTY);
|
||||||
|
printf("No BBS on this port allowed!\n\n");
|
||||||
|
Fast_Bye(MBERR_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ask whether to display Connect String
|
||||||
|
*/
|
||||||
|
if (CFG.iConnectString) {
|
||||||
|
/* Connected on port */
|
||||||
|
colour(CYAN, BLACK);
|
||||||
|
printf("%s\"%s\" ", (char *) Language(348), ttyinfo.comment);
|
||||||
|
/* on */
|
||||||
|
printf("%s %s\n", (char *) Language(135), ctime(<ime));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
alarm_on();
|
||||||
|
Pause();
|
||||||
|
|
||||||
|
newuser();
|
||||||
|
Fast_Bye(MBERR_OK);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,6 +143,8 @@ int main(int argc, char **argv)
|
|||||||
for(i = 0; i < NSIG; i++) {
|
for(i = 0; i < NSIG; i++) {
|
||||||
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
if ((i == SIGHUP) || (i == SIGBUS) || (i == SIGILL) || (i == SIGSEGV) || (i == SIGTERM))
|
||||||
signal(i, (void (*))die);
|
signal(i, (void (*))die);
|
||||||
|
else if (i == SIGCHLD)
|
||||||
|
signal(i, SIG_DFL);
|
||||||
else if ((i != SIGKILL) && (i != SIGSTOP))
|
else if ((i != SIGKILL) && (i != SIGSTOP))
|
||||||
signal(i, SIG_IGN);
|
signal(i, SIG_IGN);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user