segfault bugfix in mbsetup in preconfig state

This commit is contained in:
Michiel Broek 2001-10-25 12:21:55 +00:00
parent 2b61ca6e91
commit ac4e4efc4c
3 changed files with 17 additions and 15 deletions

View File

@ -4156,6 +4156,8 @@ v0.33.18 27-Jul-2001
should be used only once (but doesn't hurt if run more then
once) on a new installation.
A check is build in that mbsetup is started by user mbse.
Fixed segfault error during exit of mbsetup when writing the
golded.inc file when the bbs is more or less unconfigured.
mbcico:
Renamed sendfile function in zmsend.c to sendzfile to prevent a

View File

@ -2,7 +2,7 @@
*
* File ..................: m_node.c
* Purpose ...............: Nodes Setup Program
* Last modification date : 19-Oct-2001
* Last modification date : 25-Oct-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
@ -70,7 +70,6 @@ int CountNoderec(void)
nodeshdr.mailgrp = CFG.toss_groups * 13;
fwrite(&nodeshdr, sizeof(nodeshdr), 1, fil);
fclose(fil);
Syslog('+', "Created nodes.data");
return 0;
} else
return -1;

View File

@ -92,24 +92,25 @@ static void die(int onsig)
if ((fp = fopen(temp, "w")) != NULL) {
fprintf(fp, "; GoldED.inc -- Automatic created by mbsetup %s -- Do not edit!\n\n", VERSION);
fprintf(fp, "; Basic information\n;\n");
fprintf(fp, "USERNAME %s\n\n", CFG.sysop_name);
fprintf(fp, "ADDRESS %s\n", aka2str(CFG.aka[0]));
for (i = 1; i < 40; i++)
if (strlen(CFG.sysop_name) && CFG.akavalid[0] && CFG.aka[0].zone) {
fprintf(fp, "USERNAME %s\n\n", CFG.sysop_name);
fprintf(fp, "ADDRESS %s\n", aka2str(CFG.aka[0]));
for (i = 1; i < 40; i++)
if (CFG.akavalid[i])
fprintf(fp, "AKA %s\n", aka2str(CFG.aka[i]));
fprintf(fp, "\n");
fprintf(fp, "\n");
gold_akamatch(fp);
gold_akamatch(fp);
fprintf(fp, "; JAM MessageBase Setup\n;\n");
fprintf(fp, "JAMPATH %s/tmp/\n", getenv("MBSE_ROOT"));
fprintf(fp, "JAMHARDDELETE NO\n\n");
fprintf(fp, "; JAM MessageBase Setup\n;\n");
fprintf(fp, "JAMPATH %s/tmp/\n", getenv("MBSE_ROOT"));
fprintf(fp, "JAMHARDDELETE NO\n\n");
fprintf(fp, "; Semaphore files\n;\n");
fprintf(fp, "SEMAPHORE NETSCAN %s/sema/mailout\n", getenv("MBSE_ROOT"));
fprintf(fp, "SEMAPHORE ECHOSCAN %s/sema/mailout\n\n", getenv("MBSE_ROOT"));
fprintf(fp, "; Semaphore files\n;\n");
fprintf(fp, "SEMAPHORE NETSCAN %s/sema/mailout\n", getenv("MBSE_ROOT"));
fprintf(fp, "SEMAPHORE ECHOSCAN %s/sema/mailout\n\n", getenv("MBSE_ROOT"));
gold_areas(fp);
gold_areas(fp);
}
Syslog('+', "Created new %s", temp);
} else {
WriteError("$Could not create %s", temp);