diff --git a/ChangeLog b/ChangeLog index cbadd568..031a276b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/mbsetup/m_node.c b/mbsetup/m_node.c index c2b39910..af645aab 100644 --- a/mbsetup/m_node.c +++ b/mbsetup/m_node.c @@ -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; diff --git a/mbsetup/mbsetup.c b/mbsetup/mbsetup.c index 9cddb154..2e0e3810 100644 --- a/mbsetup/mbsetup.c +++ b/mbsetup/mbsetup.c @@ -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);