Updated logging init

This commit is contained in:
Michiel Broek 2002-09-28 22:22:50 +00:00
parent 9c82eff9a8
commit 3acdbd8239
21 changed files with 102 additions and 97 deletions

View File

@ -3,6 +3,7 @@ $Id$
WARNING: Extra debug logging enabled for checking internet news dupes.
This will just make bigger logfiles if you gate news.
Since 28-08-2002 mbfido news produces real big logs!!
Extra debug logging will be removed around 14 Oct 2002.
MBSEBBS History.
@ -17,13 +18,18 @@ v0.35.03 06-Jul-2002
After installation restart mbtask.
Start mbsetup, enter global configuration and exit and save.
This will setup the new outbound queue path, default is
/opt/mbse/var/queue.
/opt/mbse/var/queue. This will also set defaults for area-
filemgr logging and security.
common.a:
Added nodelist override to the nodelist lookup function.
Added protection against emty rfc headers with only a space.
Added test for HA archiver.
clcomm.a:
Added Mgrlog function, logs default to manager.log. Does also
log to Syslog with level '+'.
mbinet.a:
If during a connect a newsserver refuses the connection then
don't close our side of the connection. This is a temporary
@ -70,6 +76,8 @@ v0.35.03 06-Jul-2002
made, this must prevent destroying a another lock.
Added extra check to unlock directory function to check that
only the owned lock is removed.
Area- and FileMgr requests are now also logged in manager.log
Auto created and removed areas are also logged in manager.log
newuser:
Check for Unix accounts is now case sensitive.
@ -117,6 +125,7 @@ v0.35.03 06-Jul-2002
Added setup setting for outbound queue in global setup.
Added support for default setup of the HA archiver.
Changed Rubout key to do the same as Backspace. (experimental)
Added setup to the nodes record for security flags.
mbmon:
Changed Rubout key to do the same as Backspace. (experimental)

4
TODO
View File

@ -70,10 +70,6 @@ mbfido:
N: Add macro's for stats of all months.
L: A separate log for processed area/filemgr requests.
N: Add logging info about added/removed areas.
L: Implement netmail K/S flag to mark netmail Deleted.
N: Implement file requests for directory nodes.

View File

@ -191,7 +191,7 @@ int main(int argc, char *argv[])
TermInit(1);
t_start = c_start = c_end = time(NULL);
InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile, CFG.cico_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile, CFG.cico_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBCICO v%s", VERSION);

View File

@ -231,7 +231,7 @@ int main(int argc, char *argv[])
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbout", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbout", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBOUT v%s", VERSION);
Syslog(' ', cmd);

View File

@ -84,7 +84,7 @@ void A_Help(faddr *t, char *replyid)
char *subject;
faddr *ta;
Syslog('+', "AreaMgr: Help");
Mgrlog("AreaMgr: Help");
subject = calloc(255, sizeof(char));
sprintf(subject,"AreaMgr Help");
@ -141,22 +141,22 @@ void A_List(faddr *t, char *replyid, int Notify)
MacroVars("Y", "s", ascfnode(f, 0xff));
switch (Notify) {
case LIST_NOTIFY: Syslog('+', "AreaMgr: Notify to %s", ascfnode(t, 0xff));
case LIST_NOTIFY: Mgrlog("AreaMgr: Notify to %s", ascfnode(t, 0xff));
sprintf(subject,"AreaMgr Notify");
GetRpSubject("areamgr.notify.list",subject);
fi = OpenMacro("areamgr.notify.list", nodes.Language, FALSE);
break;
case LIST_LIST: Syslog('+', "AreaMgr: List");
case LIST_LIST: Mgrlog("AreaMgr: List");
sprintf(subject,"AreaMgr list");
GetRpSubject("areamgr.list",subject);
fi = OpenMacro("areamgr.list", nodes.Language, FALSE);
break;
case LIST_QUERY: Syslog('+', "AreaMgr: Query");
case LIST_QUERY: Mgrlog("AreaMgr: Query");
sprintf(subject,"AreaMgr Query");
GetRpSubject("areamgr.query",subject);
fi = OpenMacro("areamgr.query", nodes.Language, FALSE);
break;
case LIST_UNLINK: Syslog('+', "AreaMgr: Unlinked");
case LIST_UNLINK: Mgrlog("AreaMgr: Unlinked");
sprintf(subject,"AreaMgr: Unlinked areas");
GetRpSubject("areamgr.unlink",subject);
fi = OpenMacro("areamgr.unlink", nodes.Language, FALSE);
@ -327,12 +327,12 @@ void A_Flow(faddr *t, char *replyid, int Notify)
MacroVars("sKyY", "sdss", nodes.Sysop, Notify, ascfnode(t, 0xff), ascfnode(f, 0xf));
if (Notify){
Syslog('+', "AreaMgr: Flow report to %s", ascfnode(t, 0xff));
Mgrlog("AreaMgr: Flow report to %s", ascfnode(t, 0xff));
sprintf(subject,"AreaMgr Notify Flow Report");
GetRpSubject("areamgr.notify.flow",subject);
fi = OpenMacro("areamgr.notify.flow", nodes.Language, FALSE);
}else{
Syslog('+', "AreaMgr: Flow report");
Mgrlog("AreaMgr: Flow report");
sprintf(subject,"AreaMgr Flow Report");
GetRpSubject("areamgr.flow",subject);
fi = OpenMacro("areamgr.flow", nodes.Language, FALSE);
@ -476,7 +476,7 @@ void A_Status(faddr *t, char *replyid)
subject = calloc(255, sizeof(char));
sprintf(subject,"AreaMgr Status");
Syslog('+', "AreaMgr: Status");
Mgrlog("AreaMgr: Status");
if (Miy == 0)
i = 11;
@ -537,7 +537,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
faddr *b, *Temp;
sysconnect Sys;
Syslog('+', "AreaMgr: \"%s\"", Area);
Mgrlog("AreaMgr: disconnect \"%s\"", Area);
ShiftBuf(Area, 1);
for (i=0; i < strlen(Area); i++ )
Area[i]=toupper(Area[i]);
@ -546,7 +546,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTFOUND",Area,"","","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', " Area not found");
Mgrlog(" Area not found");
MacroClear();
return;
}
@ -563,7 +563,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTGROUP",Area,"","","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', " Group %s not available for %s", mgroup.Name, ascfnode(t, 0x1f));
Mgrlog(" Group %s not available for %s", mgroup.Name, ascfnode(t, 0x1f));
MacroClear();
return;
}
@ -578,7 +578,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_BADADD",Area,ascfnode(t, 0x1f),"","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', " %s may not disconnect from group %s", ascfnode(t, 0x1f), mgroup.Name);
Mgrlog(" %s may not disconnect from group %s", ascfnode(t, 0x1f), mgroup.Name);
MacroClear();
return;
}
@ -592,7 +592,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_NC",Area,"","","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', " %s is not connected to %s", ascfnode(t, 0x1f), Area);
Mgrlog(" %s is not connected to %s", ascfnode(t, 0x1f), Area);
MacroClear();
return;
}
@ -603,7 +603,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
* Make sure to write an overview afterwards.
*/
a_list = TRUE;
Syslog('+', "Disconnected echo area %s", Area);
Mgrlog("Disconnected echo area %s", Area);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","OK_DISC",Area,"","","","");
MsgResult("areamgr.responses",tmp);
@ -614,7 +614,7 @@ void A_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTAVAIL",Area,"","","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', "Didn't disconnect %s from mandatory or cutoff echo area %s", ascfnode(t, 0x1f), Area);
Mgrlog("Didn't disconnect %s from mandatory or cutoff echo area %s", ascfnode(t, 0x1f), Area);
MacroClear();
}
@ -629,7 +629,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
sysconnect Sys;
FILE *gp;
Syslog('+', "AreaMgr: \"%s\"", printable(Area, 0));
Mgrlog("AreaMgr: connect \"%s\"", printable(Area, 0));
if (Area[0] == '+')
ShiftBuf(Area, 1);
@ -675,7 +675,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTFOUND",Area,"","","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', "Area %s not found", Area);
Mgrlog("Area %s not found", Area);
MacroClear();
return;
}
@ -693,7 +693,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Areamgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTGROUP",Area,"","","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', " Group %s not available for node %s", mgroup.Name, ascfnode(t, 0x1f));
Mgrlog(" Group %s not available for node %s", mgroup.Name, ascfnode(t, 0x1f));
MacroClear();
return;
}
@ -708,7 +708,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_BADADD",Area,ascfnode(t, 0x1f),"","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', " %s may not connect to group %s", ascfnode(t, 0x1f), mgroup.Name);
Mgrlog(" %s may not connect to group %s", ascfnode(t, 0x1f), mgroup.Name);
MacroClear();
return;
}
@ -722,7 +722,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_ALREADY",Area,"","","","");
MsgResult("areamgr.responses",tmp);
Syslog('+', " %s is already connected to %s", ascfnode(t, 0x1f), Area);
Mgrlog(" %s is already connected to %s", ascfnode(t, 0x1f), Area);
MacroClear();
return;
}
@ -733,7 +733,7 @@ void A_Connect(faddr *t, char *Area, FILE *tmp)
* Make sure to write an overview afterwards.
*/
a_list = TRUE;
Syslog('+', "Connected echo area %s", Area);
Mgrlog("Connected echo area %s", Area);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","OK_CONN",Area,aka2str(msgs.Aka),"","","");
MsgResult("areamgr.responses",tmp);
@ -761,14 +761,14 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
if (Grp == NULL) {
if (Connect)
Syslog('+', "AreaMgr: Connect All");
Mgrlog("AreaMgr: Connect All");
else
Syslog('+', "AreaMgr: Disconnect All");
Mgrlog("AreaMgr: Disconnect All");
} else {
if (Connect)
Syslog('+', "AreaMgr: Connect group %s", Grp);
Mgrlog("AreaMgr: Connect group %s", Grp);
else
Syslog('+', "AreaMgr: Disconnect group %s", Grp);
Mgrlog("AreaMgr: Disconnect group %s", Grp);
}
f = bestaka_s(t);
@ -835,7 +835,7 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
Sys.receivefrom = TRUE;
fseek(mp, - sizeof(Sys), SEEK_CUR);
fwrite(&Sys, sizeof(Sys), 1, mp);
Syslog('+', "AreaMgr: Connected %s", msgs.Tag);
Mgrlog("AreaMgr: Connected %s", msgs.Tag);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","OK_CONN",msgs.Tag,aka2str(msgs.Aka),"","","");
MsgResult("areamgr.responses",tmp);
@ -855,7 +855,7 @@ void A_All(faddr *t, int Connect, FILE *tmp, char *Grp)
memset(&Sys, 0, sizeof(Sys));
fseek(mp, - sizeof(Sys), SEEK_CUR);
fwrite(&Sys, sizeof(Sys), 1, mp);
Syslog('+', "AreaMgr: Disconnected %s", msgs.Tag);
Mgrlog("AreaMgr: Disconnected %s", msgs.Tag);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssssss","OK_DISC",msgs.Tag,"","","","");
MsgResult("areamgr.responses",tmp);
@ -901,9 +901,9 @@ void A_Pause(faddr *t, int Pause, FILE *tmp)
char *temp;
if (Pause)
Syslog('+', "AreaMgr: Pause");
Mgrlog("AreaMgr: Pause");
else
Syslog('+', "AreaMgr: Resume");
Mgrlog("AreaMgr: Resume");
f = bestaka_s(t);
Syslog('m', "Bestaka for %s is %s", ascfnode(t, 0x1f), ascfnode(f, 0x1f));
@ -928,7 +928,7 @@ void A_Pause(faddr *t, int Pause, FILE *tmp)
Sys.pause = Pause;
fseek(mp, - sizeof(Sys), SEEK_CUR);
fwrite(&Sys, sizeof(Sys), 1, mp);
Syslog('+', "AreaMgr: %s area %s", Pause?"Pause":"Resume", msgs.Tag);
Mgrlog("AreaMgr: %s area %s", Pause?"Pause":"Resume", msgs.Tag);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
MacroVars("RABCDE", "ssdsss","OK_PAUSE",msgs.Tag,Pause,"","","");
MsgResult("areamgr.responses",tmp);
@ -957,7 +957,7 @@ void A_Rescan(faddr *t, char *Area, FILE *tmp)
CleanBuf(Area);
for (i = 0; i < strlen(Area); i++ )
Area[i] = toupper(Area[i]);
Syslog('+', "AreaMgr: Rescan %s, MSGS=%lu", Area, a_msgs);
Mgrlog("AreaMgr: Rescan %s, MSGS=%lu", Area, a_msgs);
result = RescanOne(t, Area, a_msgs);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Areamgr");
if (result == 0){
@ -987,7 +987,7 @@ void A_Msgs(char *Buf, int skip)
ShiftBuf(Buf, skip);
CleanBuf(Buf);
a_msgs = strtoul( Buf, (char **)NULL, 10 );
Syslog('+', "AreaMgr: msgs %s ", Buf );
Mgrlog("AreaMgr: msgs %s ", Buf );
}
@ -1003,7 +1003,7 @@ int AreaMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
if (SearchFidonet(f->zone))
f->domain = xstrcpy(fidonet.domain);
Syslog('+', "AreaMgr msg from %s", ascfnode(f, 0xff));
Mgrlog("AreaMgr request from %s", ascfnode(f, 0xff));
/*
* If the password failed, we return silently and don't respond.

View File

@ -389,9 +389,9 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
free(buf);
free(temp);
if (f == NULL)
Syslog('+', "Auto created TIC area %s, group %s, bbs area %ld", tic.Name, tic.Group, AreaNr);
Mgrlog("Auto created TIC area %s, group %s, bbs area %ld", tic.Name, tic.Group, AreaNr);
else
Syslog('+', "Auto created TIC area %s, group %s, bbs area %ld, for node %s",
Mgrlog("Auto created TIC area %s, group %s, bbs area %ld, for node %s",
tic.Name, tic.Group, AreaNr, ascfnode(f, 0x1f));
return 0;

View File

@ -264,9 +264,9 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
free(buf);
free(temp);
if (f == NULL)
Syslog('+', "Auto created echo %s, group %s, area %ld", msgs.Tag, msgs.Group, offset);
Mgrlog("Auto created echo %s, group %s, area %ld", msgs.Tag, msgs.Group, offset);
else
Syslog('+', "Auto created echo %s, group %s, area %ld, for node %s",
Mgrlog("Auto created echo %s, group %s, area %ld, for node %s",
msgs.Tag, msgs.Group, offset, ascfnode(f , 0x1f));
return 0;
} /* if (strcmp(tag, Area) == 0) */

View File

@ -79,7 +79,7 @@ void F_Help(faddr *t, char *replyid)
FILE *fp, *fi;
char *subject;
Syslog('+', "FileMgr: Help");
Mgrlog("FileMgr: Help");
subject=calloc(255,sizeof(char));
sprintf(subject,"FileMgr help");
GetRpSubject("filemgr.help",subject);
@ -130,22 +130,22 @@ void F_List(faddr *t, char *replyid, int Notify)
MacroVars("Y", "s", ascfnode(f, 0xff));
switch (Notify) {
case LIST_NOTIFY: Syslog('+', "FileMgr: Notify to %s", ascfnode(t, 0xff));
case LIST_NOTIFY: Mgrlog("FileMgr: Notify to %s", ascfnode(t, 0xff));
sprintf(subject,"FileMgr Notify");
GetRpSubject("filemgr.notify.list",subject);
fi=OpenMacro("filemgr.notify.list", nodes.Language, FALSE);
break;
case LIST_LIST: Syslog('+', "FileMgr: List");
case LIST_LIST: Mgrlog("FileMgr: List");
sprintf(subject,"FileMgr list");
GetRpSubject("filemgr.list",subject);
fi=OpenMacro("filemgr.list", nodes.Language, FALSE);
break;
case LIST_QUERY: Syslog('+', "FileMgr: Query");
case LIST_QUERY: Mgrlog("FileMgr: Query");
sprintf(subject,"FileMgr Query");
GetRpSubject("filemgr.query",subject);
fi=OpenMacro("filemgr.query", nodes.Language, FALSE);
break;
default: Syslog('+', "FileMgr: Unlinked");
default: Mgrlog("FileMgr: Unlinked");
sprintf(subject,"FileMgr: Unlinked areas");
GetRpSubject("filemgr.unlink",subject);
fi=OpenMacro("filemgr.unlink", nodes.Language, FALSE);
@ -296,7 +296,7 @@ void F_Status(faddr *t, char *replyid)
subject = calloc(255, sizeof(char));
sprintf(subject,"FileMgr Status");
Syslog('+', "FileMgr: Status");
Mgrlog("FileMgr: Status");
if (Miy == 0)
i = 11;
else
@ -363,7 +363,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
faddr *b, *Temp;
sysconnect Sys;
Syslog('+', "FileMgr: %s", Area);
Mgrlog("FileMgr: disconnect %s", Area);
ShiftBuf(Area, 1);
for (i = 0; i < strlen(Area); i++)
Area[i] = toupper(Area[i]);
@ -389,7 +389,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTGROUP",Area,"","","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', " Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
Mgrlog(" Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
MacroClear();
return;
}
@ -404,7 +404,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_BADADD",Area,ascfnode(t, 0x1f),"","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', " %s may not disconnect from group %s", ascfnode(t, 0x1f), fgroup.Name);
Mgrlog(" %s may not disconnect from group %s", ascfnode(t, 0x1f), fgroup.Name);
MacroClear();
return;
}
@ -418,7 +418,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_NC",Area,"","","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', " %s is not connected to %s", ascfnode(t, 0x1f), Area);
Mgrlog(" %s is not connected to %s", ascfnode(t, 0x1f), Area);
MacroClear();
return;
}
@ -429,7 +429,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
* Make sure to write an overview afterwards
*/
f_list = TRUE;
Syslog('+', "Disconnected file area %s", Area);
Mgrlog("Disconnected file area %s", Area);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","OK_DISC",Area,"","","","");
MsgResult("filemgr.responses",tmp);
@ -440,7 +440,7 @@ void F_Disconnect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","ERR_DISC_NOTAVAIL",Area,"","","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', "Didn't disconnect %s from mandatory file area %s", ascfnode(t, 0x1f), Area);
Mgrlog("Didn't disconnect %s from mandatory file area %s", ascfnode(t, 0x1f), Area);
MacroClear();
}
@ -455,7 +455,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
sysconnect Sys;
FILE *gp;
Syslog('+', "FileMgr: %s", Area);
Mgrlog("FileMgr: connect %s", Area);
if (Area[0] == '+')
ShiftBuf(Area, 1);
@ -501,7 +501,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTFOUND",Area,"","","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', "Area %s not found", Area);
Mgrlog("Area %s not found", Area);
MacroClear();
return;
}
@ -519,7 +519,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop, "Filemgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_NOTGROUP",Area,"","","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', " Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
Mgrlog(" Group %s not available for %s", fgroup.Name, ascfnode(t, 0x1f));
MacroClear();
return;
}
@ -534,7 +534,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_BADADD",Area,ascfnode(t, 0x1f),"","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', " Node %s may not connect to group %s", ascfnode(t, 0x1f), fgroup.Name);
Mgrlog(" Node %s may not connect to group %s", ascfnode(t, 0x1f), fgroup.Name);
MacroClear();
return;
}
@ -547,7 +547,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","ERR_CONN_ALREADY",Area,"","","","");
MsgResult("filemgr.responses",tmp);
Syslog('+', " %s is already connected to %s", ascfnode(t, 0x1f), Area);
Mgrlog(" %s is already connected to %s", ascfnode(t, 0x1f), Area);
MacroClear();
return;
}
@ -558,7 +558,7 @@ void F_Connect(faddr *t, char *Area, FILE *tmp)
* Make sure to write an overview afterwards
*/
f_list = TRUE;
Syslog('+', "Connected to file area %s", Area);
Mgrlog("Connected to file area %s", Area);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","OK_CONN",Area,aka2str(tic.Aka),"","","");
MsgResult("filemgr.responses",tmp);
@ -586,14 +586,14 @@ void F_All(faddr *t, int Connect, FILE *tmp, char *Grp)
if (Grp == NULL) {
if (Connect)
Syslog('+', "FileMgr: Connect All");
Mgrlog("FileMgr: Connect All");
else
Syslog('+', "FileMgr: Disconnect All");
Mgrlog("FileMgr: Disconnect All");
} else {
if (Connect)
Syslog('+', "FileMgr: Connect group %s", Grp);
Mgrlog("FileMgr: Connect group %s", Grp);
else
Syslog('+', "FileMgr: Disconnect group %s", Grp);
Mgrlog("FileMgr: Disconnect group %s", Grp);
}
f = bestaka_s(t);
@ -654,7 +654,7 @@ void F_All(faddr *t, int Connect, FILE *tmp, char *Grp)
Sys.sendto = TRUE;
fseek(fp, - sizeof(Sys), SEEK_CUR);
fwrite(&Sys, sizeof(Sys), 1, fp);
Syslog('+', "FileMgr: Connected %s", tic.Name);
Mgrlog("FileMgr: Connected %s", tic.Name);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","OK_CONN",tic.Name,aka2str(tic.Aka),"","","");
MsgResult("filemgr.responses",tmp);
@ -674,7 +674,7 @@ void F_All(faddr *t, int Connect, FILE *tmp, char *Grp)
memset(&Sys, 0, sizeof(Sys));
fseek(fp, - sizeof(Sys), SEEK_CUR);
fwrite(&Sys, sizeof(Sys), 1, fp);
Syslog('+', "FileMgr: Disconnected %s", tic.Name);
Mgrlog("FileMgr: Disconnected %s", tic.Name);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "ssssss","OK_DISC",tic.Name,"","","","");
MsgResult("filemgr.responses",tmp);
@ -720,9 +720,9 @@ void F_Pause(faddr *t, int Pause, FILE *tmp)
char *temp;
if (Pause)
Syslog('+', "FileMgr: Pause");
Mgrlog("FileMgr: Pause");
else
Syslog('+', "FileMgr: Resume");
Mgrlog("FileMgr: Resume");
f = bestaka_s(t);
Syslog('m', "Bestaka for %s is %s", ascfnode(t, 0x1f), ascfnode(f, 0x1f));
@ -746,7 +746,7 @@ void F_Pause(faddr *t, int Pause, FILE *tmp)
Sys.pause = Pause;
fseek(fp, - sizeof(Sys), SEEK_CUR);
fwrite(&Sys, sizeof(Sys), 1, fp);
Syslog('+', "FileMgr: %s area %s", Pause?"Pause":"Resume", tic.Name);
Mgrlog("FileMgr: %s area %s", Pause?"Pause":"Resume", tic.Name);
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"FileMgr");
MacroVars("RABCDE", "ssdsss","OK_PAUSE",tic.Name,Pause,"","","");
MsgResult("filemgr.responses",tmp);
@ -777,7 +777,7 @@ void F_Message(faddr *t, char *Buf, FILE *tmp)
UpdateNode();
SearchNodeFaddr(t);
Syslog('+', "FileMgr: Message %s", nodes.Message?"Yes":"No");
Mgrlog("FileMgr: Message %s", nodes.Message?"Yes":"No");
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
MacroVars("RABCDE", "sdssss","OK_MESSAGE",nodes.Message,"","","","");
MsgResult("filemgr.responses",tmp);
@ -803,7 +803,7 @@ void F_Tick(faddr *t, char *Buf, FILE *tmp)
UpdateNode();
SearchNodeFaddr(t);
Syslog('+', "FileMgr: Tick %s, Advanced %s", nodes.Tic?"Yes":"No", nodes.AdvTic?"Yes":"No");
Mgrlog("FileMgr: Tick %s, Advanced %s", nodes.Tic?"Yes":"No", nodes.AdvTic?"Yes":"No");
if (nodes.Tic)
if (nodes.AdvTic){
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,"Filemgr");
@ -834,13 +834,14 @@ int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
if (SearchFidonet(f->zone))
f->domain = xstrcpy(fidonet.domain);
Syslog('+', "FileMgr msg from %s", ascfnode(f, 0xff));
Mgrlog("FileMgr request from %s", ascfnode(f, 0xff));
/*
* If the password failed, we return silently and don't respond.
*/
if ((!strlen(subj)) || (strcasecmp(subj, nodes.Fpasswd))) {
WriteError("FileMgr: password expected \"%s\", got \"%s\"", nodes.Fpasswd, subj);
Mgrlog("FileMgr: password expected \"%s\", got \"%s\"", nodes.Fpasswd, subj);
net_bad++;
return FALSE;
}

View File

@ -141,7 +141,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbaff", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbaff", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBAFF v%s", VERSION);

View File

@ -166,7 +166,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbdiff", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbdiff", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBDIFF v%s", VERSION);

View File

@ -425,7 +425,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbfido", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbfido", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBFIDO v%s", VERSION);

View File

@ -203,7 +203,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbfile", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbfile", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBFILE v%s", VERSION);

View File

@ -250,7 +250,7 @@ int main(int argc,char *argv[])
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbindex", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbindex", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBINDEX v%s", VERSION);

View File

@ -156,7 +156,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbmsg", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbmsg", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBMSG v%s", VERSION);

View File

@ -54,8 +54,7 @@ int main(int argc, char **argv)
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbseq", CFG.location,
CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbseq", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBSEQ v%s", VERSION);

View File

@ -247,7 +247,7 @@ void MgrPasswd(faddr *t, char *Buf, FILE *tmp, int Len, int mgr)
if ((strlen(Buf) < 3) || (strlen(Buf) > 15)) {
MacroVars("RABCDE", "ssssss",(char *)"ERR_PASS_LEN",(char *)"",(char *)"",(char *)"",(char *)"",(char *)"");
MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp);
Syslog('+', "XxxxMgr: Password length %d, not changed", strlen(Buf));
Mgrlog("%s: Password length %d, not changed", mgr?(char *)"Filemgr":(char *)"Areamgr", strlen(Buf));
return;
}
@ -255,7 +255,7 @@ void MgrPasswd(faddr *t, char *Buf, FILE *tmp, int Len, int mgr)
strncpy(nodes.Apasswd, tu(Buf), 15);
MacroVars("RABCDE", "ssssss",(char *)"OK_PASS",nodes.Apasswd,(char *)"",(char *)"",(char *)"",(char *)"");
MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp);
Syslog('+', "XxxxMgr: Password \"%s\" for node %s", nodes.Apasswd, ascfnode(t, 0x1f));
Mgrlog("%s: Password \"%s\" for node %s", mgr?(char *)"Filemgr":(char *)"Areamgr", nodes.Apasswd, ascfnode(t, 0x1f));
MacroClear();
UpdateNode();
SearchNodeFaddr(t);
@ -283,7 +283,7 @@ void MgrNotify(faddr *t, char *Buf, FILE *tmp, int mgr)
UpdateNode();
SearchNodeFaddr(t);
Syslog('+', "XxxxMgr: Notify %s", nodes.Notify?"Yes":"No");
Mgrlog("%s: Notify %s", mgr?(char *)"Filemgr":(char *)"Areamgr", nodes.Notify?"Yes":"No");
MacroVars("SsP", "sss", CFG.sysop_name, nodes.Sysop,mgr?(char *)"Filemgr":(char *)"Areamgr");
MacroVars("RABCDE", "sdssss",(char *)"NOTIFY",nodes.Notify,(char *)"",(char *)"",(char *)"",(char *)"");
MsgResult(mgr?"filemgr.responses":"areamgr.responses",tmp);
@ -510,7 +510,7 @@ int Areas(void)
sysconnect System;
faddr *From, *To;
Syslog('+', "Process areas taglists");
Mgrlog("Process areas taglists");
if (!do_quiet) {
colour(3, 0);
@ -642,13 +642,13 @@ int Areas(void)
fseek(fp, - msgshdr.recsize, SEEK_CUR);
sprintf(temp, "%s.jhr", msgs.Base);
if (strlen(msgs.Base) && (file_size(temp) != 1024)) {
Syslog('+', "Marking message area %d, %s read-only",
Mgrlog("Marking message area %d, %s read-only",
((ftell(fp) - msgshdr.hdrsize) / (msgshdr.recsize + msgshdr.syssize)) + 1,
msgs.Tag);
msgs.MsgKinds = RONLY; // Area read-only
sprintf(msgs.Group, "DELETED"); // Make groupname invalid
} else {
Syslog('+', "Removing empty message area %d, %s",
Mgrlog("Removing empty message area %d, %s",
((ftell(fp) - msgshdr.hdrsize) / (msgshdr.recsize + msgshdr.syssize)) + 1,
msgs.Tag);
memset(&msgs, 0, sizeof(msgs));
@ -697,7 +697,7 @@ int Areas(void)
if (UplinkRequest(To, From, FALSE, cmd)) {
WriteError("Uplink request failed");
} else {
Syslog('+', "AreaMgr request sent to %s", aka2str(mgroup.UpLink));
Mgrlog("AreaMgr request sent to %s", aka2str(mgroup.UpLink));
}
tidy_faddr(From);
tidy_faddr(To);
@ -940,7 +940,7 @@ int Areas(void)
fclose(ap);
unlink(temp);
rename(buf, temp);
Syslog('+', "Purged %d TIC records", count);
Mgrlog("Purged %d TIC records", count);
}
}
@ -955,7 +955,7 @@ int Areas(void)
if (UplinkRequest(To, From, TRUE, cmd)) {
WriteError("Uplink request failed");
} else {
Syslog('+', "AreaMgr request sent to %s", aka2str(fgroup.UpLink));
Mgrlog("AreaMgr request sent to %s", aka2str(fgroup.UpLink));
}
tidy_faddr(From);
tidy_faddr(To);

View File

@ -178,7 +178,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mball", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mball", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBALL v%s", VERSION);

View File

@ -115,7 +115,8 @@ int main(int argc, char **argv)
* who is at the other end of the line, so that's what we tell.
*/
do_quiet = TRUE;
InitClient((char *)"Unknown", (char *)"mbnewusr", (char *)"Unknown", CFG.logfile, CFG.bbs_loglevel, CFG.error_log);
InitClient((char *)"Unknown", (char *)"mbnewusr", (char *)"Unknown",
CFG.logfile, CFG.bbs_loglevel, CFG.error_log, CFG.mgrlog);
IsDoing("Loging in");
Syslog(' ', " ");

View File

@ -105,8 +105,7 @@ int main(int argc, char **argv)
* Initialize this client with the server.
*/
do_quiet = TRUE;
InitClient(sUnixName, (char *)"mbsebbs", (char *)"Unknown",
CFG.logfile, CFG.bbs_loglevel, CFG.error_log);
InitClient(sUnixName, (char *)"mbsebbs", (char *)"Unknown", CFG.logfile, CFG.bbs_loglevel, CFG.error_log, CFG.mgrlog);
IsDoing("Loging in");
Syslog(' ', " ");

View File

@ -156,7 +156,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbstat", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbstat", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
usleep(1);
Syslog(' ', " ");

View File

@ -101,7 +101,7 @@ int main(int argc, char **argv)
ProgName();
pw = getpwuid(getuid());
InitClient(pw->pw_name, (char *)"mbuser", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log);
InitClient(pw->pw_name, (char *)"mbuser", CFG.location, CFG.logfile, CFG.util_loglevel, CFG.error_log, CFG.mgrlog);
Syslog(' ', " ");
Syslog(' ', "MBUSER v%s", VERSION);
Syslog(' ', cmd);