Added security editing, some bugfixes and bumped version number

This commit is contained in:
Michiel Broek 2002-09-29 20:08:32 +00:00
parent 3acdbd8239
commit b4b6e15cb7
16 changed files with 1258 additions and 1072 deletions

View File

@ -5,10 +5,44 @@ WARNING: Extra debug logging enabled for checking internet news dupes.
Since 28-08-2002 mbfido news produces real big logs!!
Extra debug logging will be removed around 14 Oct 2002.
NOTE: Areas security editing is present but doesn't do anything yet.
Work in progress!
MBSEBBS History.
v0.35.03 06-Jul-2002
v0.35.04 29-Sep-2002
general:
upgrade:
Start mbsetup, enter global configuration and exit and save.
This will set defaults for area-/filemgr logging and security.
The noderecords are updated with new security flags.
The filegroups, ticgroups, tic areas and message areas are
updated with default security flags.
clcomm.a:
Added Mgrlog function, logs default to manager.log. Does also
log to Syslog with level '+'.
mbfido:
Area- and FileMgr requests are now also logged in manager.log
Auto created and removed areas are also logged in manager.log
Auto created area now get the link security from the group.
With message areas auto update it should now only delete
missing echomail areas.
mbsetup:
Added setup for the nodes record for security flags.
Added setup for the ticgroups default security flags.
Added setup for the mailgroups default security flags.
Added setup for the tic areas security flags.
Added setup for the message areas security flags.
Menu 14, edit files database had the wrong selection prompt.
v0.35.03 06-Jul-2002 - 29-Sep-2002
general:
Now compiles and installs on HP-PARISC hardware, tested with
@ -18,18 +52,13 @@ 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. This will also set defaults for area-
filemgr logging and security.
/opt/mbse/var/queue.
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
@ -76,8 +105,6 @@ 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.
@ -125,7 +152,6 @@ 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)

6
TODO
View File

@ -1,6 +1,6 @@
$Id$
MBSE BBS V0.35.03 TODO list.
MBSE BBS V0.35.04 TODO list.
----------------------------
These are a list of things that must be implemented one way or
@ -138,8 +138,6 @@ mbsetup:
N: Add switch for file area to skip checking and indexing.
N: Add logging info about added/removed areas.
L: Generate crossreference document:
File Areas <=> BBS groups
File Areas <=> Newfiles groups
@ -160,8 +158,6 @@ mbsetup:
Fileecho groups <=> Newfile reports
Fileecho groups <=> BBS Areas
N: Add areas security flags.
N: Add backspace test and store result in global setup.
Note: experimental patch to test Rubout key as backspace.

2
configure vendored
View File

@ -1196,7 +1196,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html
PACKAGE="mbsebbs"
VERSION="0.35.03"
VERSION="0.35.04"
COPYRIGHT="Copyright (C) 1997-2002 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2002 M. Broek"
GROUP="bbs"

View File

@ -9,7 +9,7 @@ AC_SUBST(SUBDIRS)
dnl General settings for MBSE BBS
dnl After changeing the version number, run autoconf!
PACKAGE="mbsebbs"
VERSION="0.35.03"
VERSION="0.35.04"
COPYRIGHT="Copyright (C) 1997-2002 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2002 M. Broek"
GROUP="bbs"

View File

@ -919,6 +919,7 @@ struct msgareas {
int Rfccode; /* RFC characterset */
int Ftncode; /* FTN characterset */
int MaxArticles; /* Max. newsarticles to get */
securityrec LinkSec; /* Link security flags */
};
@ -1160,6 +1161,7 @@ struct _tic {
unsigned Deleted : 1; /* If this area is deleted */
statcnt Files; /* Total processed files */
statcnt KBytes; /* Total processed KBytes */
securityrec LinkSec; /* Link security flags */
};
@ -1350,6 +1352,7 @@ struct _fgroup {
char BbsGroup[13]; /* BBS Group */
char AnnGroup[13]; /* BBS Announce Group */
unsigned Upload; /* Upload area */
securityrec LinkSec; /* Default link security */
};
@ -1391,6 +1394,7 @@ struct _mgroup {
unsigned xRes7 : 1;
unsigned xRes8 : 1;
unsigned StartArea; /* Start at area number */
securityrec LinkSec; /* Default link security */
};

View File

@ -365,6 +365,9 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
tic.ConvertAll = fgroup.ConvertAll;
tic.SendOrg = fgroup.SendOrg;
tic.Active = TRUE;
tic.LinkSec.level = fgroup.LinkSec.level;
tic.LinkSec.flags = fgroup.LinkSec.flags;
tic.LinkSec.notflags = fgroup.LinkSec.notflags;
fwrite(&tic, sizeof(tic), 1, mp);
memset(&System, 0, sizeof(System));

View File

@ -231,6 +231,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
msgs.RDSec = mgroup.RDSec;
msgs.WRSec = mgroup.WRSec;
msgs.SYSec = mgroup.SYSec;
msgs.LinkSec = mgroup.LinkSec;
strncpy(msgs.Group, mgroup.Name, 12);
msgs.Aka = mgroup.UseAka;
strncpy(msgs.Origin, CFG.origin, 50);

View File

@ -584,7 +584,7 @@ int Areas(void)
}
fseek(fp, msgshdr.hdrsize, SEEK_SET);
while (fread(&msgs, msgshdr.recsize, 1, fp) == 1) {
if (msgs.Active && !strcmp(msgs.Group, mgroup.Name)) {
if (msgs.Active && !strcmp(msgs.Group, mgroup.Name) && (msgs.Type == ECHOMAIL)) {
Found = FALSE;
for (tmp = alist; tmp; tmp = tmp->next) {
if (!strcmp(msgs.Tag, tmp->Name))

View File

@ -1186,6 +1186,9 @@ char *getflag(unsigned long flag, unsigned long not)
/*
* Show bbs security
*/
void show_sec(int y, int x, securityrec sec)
{
show_int(y, x, sec.level);
@ -1194,6 +1197,9 @@ void show_sec(int y, int x, securityrec sec)
/*
* Edit bbs security for users access
*/
securityrec edit_sec(int y, int x, securityrec sec, char *shdr)
{
int c, i, xx, yy, s;
@ -1274,6 +1280,9 @@ securityrec edit_sec(int y, int x, securityrec sec, char *shdr)
/*
* Edit security for bbs users.
*/
securityrec edit_usec(int y, int x, securityrec sec, char *shdr)
{
int c, i, xx, yy, s;
@ -1349,6 +1358,9 @@ securityrec edit_usec(int y, int x, securityrec sec, char *shdr)
/*
* Edit securityflags for filegroups, mailgroups, tic areas and mail areas.
*/
securityrec edit_asec(securityrec sec, char *shdr)
{
int c, i, xx, yy, s;
@ -1423,6 +1435,78 @@ securityrec edit_asec(securityrec sec, char *shdr)
/*
* Edit security flags for nodes.
*/
securityrec edit_nsec(securityrec sec, char *shdr)
{
int c, i, xx, yy, s;
clr_index();
set_color(WHITE, BLACK);
mvprintw(4,3,shdr);
set_color(CYAN, BLACK);
xx = 3;
yy = 6;
for (i = 0; i < 32; i++) {
if (i == 11) {
xx = 28;
yy = 6;
}
if (i == 22) {
xx = 53;
yy = 6;
}
set_color(CYAN,BLACK);
mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.aname[i]);
yy++;
}
for (;;) {
set_color(WHITE, BLACK);
xx = 24;
yy = 6;
for (i = 0; i < 32; i++) {
if (i == 11) {
xx = 49;
yy = 6;
}
if (i == 22) {
xx = 74;
yy = 6;
}
c = '-';
if ((sec.flags >> i) & 1)
c = 'X';
if ((sec.notflags >> i) & 1)
c = 'O';
/*
* The next one may never show up
*/
if (((sec.flags >> i) & 1) && ((sec.notflags >> i) & 1))
c = '!';
mvprintw(yy,xx,(char *)"%c", c);
yy++;
}
s = select_menu(32);
switch(s) {
case 0: return sec;
default: if ((sec.flags >> (s - 1)) & 1) {
sec.flags = (sec.flags ^ (1 << (s - 1)));
break;
}
sec.flags = (sec.flags | (1 << (s - 1)));
break;
}
}
}
char *get_secstr(securityrec S)
{
static char temp[45];

View File

@ -35,6 +35,7 @@ void show_sec(int, int, securityrec);
securityrec edit_sec(int, int, securityrec, char *);
securityrec edit_usec(int, int, securityrec, char *);
securityrec edit_asec(securityrec, char *);
securityrec edit_nsec(securityrec, char *);
char *get_secstr(securityrec);
void show_int(int, int, int);
int edit_int(int, int, int, char *);

View File

@ -331,7 +331,7 @@ void EditFDB()
}
}
working(0, 0, 0);
strcpy(pick, select_record(records, 20));
strcpy(pick, select_pick(records, 20));
if (strncmp(pick, "-", 1) == 0) {
return;

View File

@ -139,7 +139,7 @@ int OpenFGroup(void)
/*
* Now set defaults
*/
if (FGrpUpdated) {
if (FGrpUpdated && !strlen(fgroup.BasePath)) {
fgroup.DupCheck = TRUE;
fgroup.Secure = TRUE;
fgroup.VirScan = TRUE;
@ -150,7 +150,10 @@ int OpenFGroup(void)
strcpy(temp, fgroup.Name);
sprintf(fgroup.BasePath, "%s/ftp/pub/%s", getenv("MBSE_ROOT"), tl(temp));
}
if (FGrpUpdated && !fgroup.LinkSec.level) {
fgroup.LinkSec.level = 1;
fgroup.LinkSec.flags = 1;
}
fwrite(&fgroup, sizeof(fgroup), 1, fout);
memset(&fgroup, 0, sizeof(fgroup));
}
@ -228,6 +231,8 @@ int AppendFGroup(void)
fgroup.FileId = TRUE;
fgroup.DupCheck = TRUE;
fgroup.Replace = TRUE;
fgroup.LinkSec.level = 1;
fgroup.LinkSec.flags = 1;
fwrite(&fgroup, sizeof(fgroup), 1, fil);
fclose(fil);
FGrpUpdated = 1;
@ -301,6 +306,7 @@ void FgScreen(void)
mvprintw(17,56, "32. UP sec");
mvprintw(18,56, "33. LT sec");
mvprintw(19,56, "34. Upl. area");
mvprintw(20,56, "35. Link sec");
}
@ -378,7 +384,7 @@ int EditFGrpRec(int Area)
show_int( 18,70, fgroup.LTSec.level);
show_int( 19,70, fgroup.Upload);
j = select_menu(34);
j = select_menu(35);
switch(j) {
case 0: if (!fgroup.StartArea && strlen(fgroup.AreaFile)) {
errmsg("Areas file defined but no BBS start area");
@ -482,6 +488,9 @@ int EditFGrpRec(int Area)
case 32:E_SEC( 17,70, fgroup.UPSec, "10.1.32 FILE GROUP UPLOAD SECURITY", FgScreen)
case 33:E_SEC( 18,70, fgroup.LTSec, "10.1.33 FILE GROUP LIST SECURITY", FgScreen)
case 34:E_INT( 19,70, fgroup.Upload, "Set the default ^Upload area^ in new created file areas")
case 35:fgroup.LinkSec = edit_asec(fgroup.LinkSec, (char *)"10.1.35 DEFAULT NEW TIC AREAS SECURITY");
FgScreen();
break;
}
}
@ -750,6 +759,7 @@ int tic_group_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Download sec. %s\n", get_secstr(fgroup.DLSec));
fprintf(fp, " Upload sec. %s\n", get_secstr(fgroup.UPSec));
fprintf(fp, " List security %s\n", get_secstr(fgroup.LTSec));
fprintf(fp, " Def. tic sec. %s\n", getflag(fgroup.LinkSec.flags, fgroup.LinkSec.notflags));
fprintf(fp, " BBS group %s\n", fgroup.BbsGroup);
fprintf(fp, " Announce group %s\n", fgroup.AnnGroup);
fprintf(fp, " Upload area %d\n", fgroup.Upload);

View File

@ -206,7 +206,11 @@ int OpenMsgarea(void)
oldsize = msgshdr.recsize;
oldsys = msgshdr.syssize;
oldsystems = oldsys / sizeof(syscon);
if ((oldsize != sizeof(msgs)) || (CFG.toss_systems != oldsystems)) {
if (oldsize != sizeof(msgs)) {
MsgUpdated = 1;
Syslog('+', "Updated %s, recordsize is changed", fnin);
}
if (CFG.toss_systems != oldsystems) {
MsgUpdated = 1;
Syslog('+', "Updated %s, nr of systems is changed to %d", fnin, CFG.toss_systems);
}
@ -226,6 +230,10 @@ int OpenMsgarea(void)
msgs.Rfccode = CHRS_DEFAULT_RFC;
msgs.Ftncode = CHRS_DEFAULT_FTN;
}
if ((oldsize != sizeof(msgs)) && !msgs.LinkSec.level) {
msgs.LinkSec.level = 1;
msgs.LinkSec.flags = 1;
}
fwrite(&msgs, sizeof(msgs), 1, fout);
memset(&msgs, 0, sizeof(msgs));
/*
@ -241,8 +249,7 @@ int OpenMsgarea(void)
}
if (oldsystems < CFG.toss_systems) {
/*
* The size is increased, fill with
* blank records.
* The size is increased, fill with blank records.
*/
memset(&syscon, 0, sizeof(syscon));
for (i = (oldsystems + 1); i <= CFG.toss_systems; i++)
@ -302,6 +309,8 @@ void InitMsgRec(void)
msgs.Ftncode = CHRS_DEFAULT_FTN;
msgs.MaxArticles = CFG.maxarticles;
strcpy(msgs.Origin, CFG.origin);
msgs.LinkSec.level = 1;
msgs.LinkSec.flags = 1;
}
@ -507,18 +516,19 @@ void SetScreen()
mvprintw(18,36, "20. Sysop Sec.");
mvprintw(19,36, "21. User Del.");
mvprintw(13,60, "22. Aliases");
mvprintw(14,60, "23. Quotes");
mvprintw(15,60, "24. Mandatory");
mvprintw(16,60, "25. UnSecure");
mvprintw(17,60, "26. OLR Default");
mvprintw(18,60, "27. OLR Forced");
mvprintw(12,60, "22. Aliases");
mvprintw(13,60, "23. Quotes");
mvprintw(14,60, "24. Mandatory");
mvprintw(15,60, "25. UnSecure");
mvprintw(16,60, "26. OLR Default");
mvprintw(17,60, "27. OLR Forced");
switch (msgs.Type) {
case ECHOMAIL:
case NEWS:
case LIST: mvprintw(19,60, "28. Connections");
case LIST: mvprintw(18,60, "28. Connections");
break;
}
mvprintw(19,60, "29. Security");
}
@ -643,7 +653,7 @@ void MsgGlobal(void)
int menu = 0, marea, Areas, akan = 0, Found;
int Total, Done, netbrd, daysold, maxmsgs, maxarticles;
long offset;
securityrec rs, ws, ss;
securityrec rs, ws, ss, as;
sysconnect S, Sc;
/*
@ -668,6 +678,9 @@ void MsgGlobal(void)
memset(&rs, 0, sizeof(securityrec));
memset(&ws, 0, sizeof(securityrec));
memset(&ss, 0, sizeof(securityrec));
memset(&as, 0, sizeof(securityrec));
as.level = 1;
as.flags = 1;
memset(&S, 0, sizeof(sysconnect));
S.sendto = TRUE;
S.receivefrom = TRUE;
@ -690,16 +703,17 @@ void MsgGlobal(void)
mvprintw(11, 6, "5. Change days old");
mvprintw(12, 6, "6. Change max. messages");
mvprintw(13, 6, "7. Change max. articles");
mvprintw(14, 6, "8. Change security");
mvprintw(15, 6, "9. Change aka to use");
mvprintw(16, 6, "10. Change origin line");
mvprintw(17, 6, "11. Change netmail reply");
mvprintw(18, 6, "12. Delete message area");
mvprintw(14, 6, "8. Change bbs security");
mvprintw(15, 6, "9. Change link security");
mvprintw(16, 6, "10. Change aka to use");
mvprintw(17, 6, "11. Change origin line");
mvprintw(18, 6, "12. Change netmail reply");
mvprintw(19, 6, "13. Delete message area");
memset(&a1, 0, sizeof(fidoaddr));
memset(&a2, 0, sizeof(fidoaddr));
menu = select_menu(12);
menu = select_menu(13);
switch (menu) {
case 0: return;
case 1: a1 = PullUplink((char *)"AKA TO DELETE");
@ -722,14 +736,16 @@ void MsgGlobal(void)
E_INT(LINES -3, 19, maxmsgs, (char *)"Enter ^maximum messages^")
case 7: mvprintw(LINES -3, 6, "Max. articles");
E_INT(LINES -3, 19, maxarticles, (char *)"Enter ^maximum news articles^ to fetch")
case 8: rs = edit_sec(6, 5, rs, (char *)"9.2.7 READ SECURITY");
ws = edit_sec(7, 5, ws, (char *)"9.2.7 WRITE SECURITY");
ss = edit_sec(8, 5, ss, (char *)"9.2.7 SYSOP SECURITY");
case 8: rs = edit_sec(6, 5, rs, (char *)"9.2.8 READ SECURITY");
ws = edit_sec(7, 5, ws, (char *)"9.2.8 WRITE SECURITY");
ss = edit_sec(8, 5, ss, (char *)"9.2.8 SYSOP SECURITY");
break;
case 9: akan = PickAka((char *)"9.2.8", TRUE);
case 9: as = edit_asec(as, (char *)"9.2.9 LINK SECURITY");
break;
case 10:E_STR(LINES -3, 5, 64, mfile, "Enter new ^origin^ line");
case 11:mvprintw(LINES -3, 5, "Netmail reply board");
case 10:akan = PickAka((char *)"9.2.8", TRUE);
break;
case 11:E_STR(LINES -3, 5, 64, mfile, "Enter new ^origin^ line");
case 12:mvprintw(LINES -3, 5, "Netmail reply board");
E_INT(LINES -3, 25, netbrd, (char *)"The ^netmail reply^ board number")
}
@ -765,14 +781,19 @@ void MsgGlobal(void)
show_sec(8, 21, ws);
show_sec(9, 21, ss);
break;
case 9: if (akan != -1)
case 9: set_color(CYAN, BLACK);
mvprintw(7, 6, "Link security");
set_color(WHITE, BLACK);
mvprintw(7,21, getflag(as.flags, as.notflags));
break;
case 10:if (akan != -1)
mvprintw( 7, 6, "Set %s as new aka to use", aka2str(CFG.aka[akan]));
break;
case 10:mvprintw(7, 6, "Origin: %s", mfile);
case 11:mvprintw(7, 6, "Origin: %s", mfile);
break;
case 11:mvprintw(7, 6, "New netmail reply board %d", netbrd);
case 12:mvprintw(7, 6, "New netmail reply board %d", netbrd);
break;
case 12:mvprintw(7, 6, "Delete message areas");
case 13:mvprintw(7, 6, "Delete message areas");
break;
}
@ -790,10 +811,8 @@ void MsgGlobal(void)
switch (menu) {
case 1: fseek(tfil, 0, SEEK_SET);
while (fread(&Sc, sizeof(sysconnect), 1, tfil) == 1) {
if ((Sc.aka.zone == a1.zone) &&
(Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) &&
(Sc.aka.point == a1.point)) {
if ((Sc.aka.zone == a1.zone) && (Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) && (Sc.aka.point == a1.point)) {
fseek(tfil, - sizeof(sysconnect), SEEK_CUR);
memset(&Sc, 0, sizeof(sysconnect));
fwrite(&Sc, sizeof(sysconnect), 1, tfil);
@ -808,10 +827,8 @@ void MsgGlobal(void)
case 2: fseek(tfil, 0, SEEK_SET);
Found = FALSE;
while (fread(&Sc, sizeof(sysconnect), 1, tfil) == 1)
if ((Sc.aka.zone == a2.zone) &&
(Sc.aka.net == a2.net) &&
(Sc.aka.node == a2.node) &&
(Sc.aka.point == a2.point)) {
if ((Sc.aka.zone == a2.zone) && (Sc.aka.net == a2.net) &&
(Sc.aka.node == a2.node) && (Sc.aka.point == a2.point)) {
Found = TRUE;
break;
}
@ -840,10 +857,8 @@ void MsgGlobal(void)
break;
case 3: fseek(tfil, 0, SEEK_SET);
while (fread(&Sc, sizeof(sysconnect), 1, tfil) == 1) {
if ((Sc.aka.zone == a1.zone) &&
(Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) &&
(Sc.aka.point == a1.point)) {
if ((Sc.aka.zone == a1.zone) && (Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) && (Sc.aka.point == a1.point)) {
Sc.aka.zone = a2.zone;
Sc.aka.net = a2.net;
Sc.aka.node = a2.node;
@ -863,10 +878,8 @@ void MsgGlobal(void)
break;
case 4: fseek(tfil, 0, SEEK_SET);
while (fread(&Sc, sizeof(sysconnect), 1, tfil) == 1) {
if ((Sc.aka.zone == S.aka.zone) &&
(Sc.aka.net == S.aka.net) &&
(Sc.aka.node == S.aka.node) &&
(Sc.aka.point == S.aka.point)) {
if ((Sc.aka.zone == S.aka.zone) && (Sc.aka.net == S.aka.net) &&
(Sc.aka.node == S.aka.node) && (Sc.aka.point == S.aka.point)) {
Sc.sendto = S.sendto;
Sc.receivefrom = S.receivefrom;
Sc.pause = S.pause;
@ -901,7 +914,8 @@ void MsgGlobal(void)
msgs.MaxArticles = maxarticles;
if (SaveMsgRec(marea, FALSE) == 0) {
Done++;
Syslog('+', "Changed max news articles to fetch to %d in area %s", maxarticles, msgs.Tag);
Syslog('+', "Changed max news articles to fetch to %d in area %s",
maxarticles, msgs.Tag);
}
}
break;
@ -919,15 +933,21 @@ void MsgGlobal(void)
memcpy(&msgs.SYSec, &ss, sizeof(securityrec));
if (SaveMsgRec(marea, FALSE) == 0) {
Done++;
Syslog('+', "Updated security levels in area %s", msgs.Tag);
Syslog('+', "Updated bbs security levels in area %s", msgs.Tag);
}
}
break;
case 9: if (akan != -1) {
if ((msgs.Aka.zone != CFG.aka[akan].zone) ||
(msgs.Aka.net != CFG.aka[akan].net) ||
(msgs.Aka.node != CFG.aka[akan].node) ||
(msgs.Aka.point != CFG.aka[akan].point)) {
case 9: if ((msgs.LinkSec.flags != as.flags) || (msgs.LinkSec.notflags != as.notflags)) {
memcpy(&msgs.LinkSec, &as, sizeof(securityrec));
if (SaveMsgRec(marea, FALSE) == 0) {
Done++;
Syslog('+', "Updated link security flags in area %s", msgs.Tag);
}
}
break;
case 10:if (akan != -1) {
if ((msgs.Aka.zone != CFG.aka[akan].zone) || (msgs.Aka.net != CFG.aka[akan].net) ||
(msgs.Aka.node != CFG.aka[akan].node) || (msgs.Aka.point != CFG.aka[akan].point)) {
msgs.Aka.zone = CFG.aka[akan].zone;
msgs.Aka.net = CFG.aka[akan].net;
msgs.Aka.node = CFG.aka[akan].node;
@ -940,7 +960,7 @@ void MsgGlobal(void)
}
}
break;
case 10:if (strcmp(msgs.Origin, mfile)) {
case 11:if (strcmp(msgs.Origin, mfile)) {
sprintf(msgs.Origin, "%s", mfile);
if (SaveMsgRec(marea, FALSE) == 0) {
Done++;
@ -948,7 +968,7 @@ void MsgGlobal(void)
}
}
break;
case 11:if (netbrd != msgs.NetReply) {
case 12:if (netbrd != msgs.NetReply) {
msgs.NetReply = netbrd;
if (SaveMsgRec(marea, FALSE) == 0) {
Done++;
@ -956,7 +976,7 @@ void MsgGlobal(void)
}
}
break;
case 12:if (msgs.Active) {
case 13:if (msgs.Active) {
msgs.Active = FALSE;
Msg_DeleteMsgBase(msgs.Base);
memset(&msgs, 0, sizeof(msgs));
@ -1037,12 +1057,12 @@ int EditMsgRec(int Area)
show_int( 18,52, msgs.SYSec.level);
show_bool(19,52, msgs.UsrDelete);
show_bool(13,76, msgs.Aliases);
show_bool(14,76, msgs.Quotes);
show_bool(15,76, msgs.Mandatory);
show_bool(16,76, msgs.UnSecure);
show_bool(17,76, msgs.OLR_Default);
show_bool(18,76, msgs.OLR_Forced);
show_bool(12,76, msgs.Aliases);
show_bool(13,76, msgs.Quotes);
show_bool(14,76, msgs.Mandatory);
show_bool(15,76, msgs.UnSecure);
show_bool(16,76, msgs.OLR_Default);
show_bool(17,76, msgs.OLR_Forced);
connections = 0;
switch (msgs.Type) {
case ECHOMAIL:
@ -1051,11 +1071,11 @@ int EditMsgRec(int Area)
while (fread(&System, sizeof(System), 1, tfil) == 1)
if (System.aka.zone)
connections++;
show_int(19,76, connections);
show_int(18,76, connections);
break;
}
switch (select_menu(28)) {
switch (select_menu(29)) {
case 0: crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&msgs, crc1, msgshdr.recsize);
fseek(tfil, 0, 0);
@ -1112,6 +1132,7 @@ int EditMsgRec(int Area)
msgs.Rfccode = CHRS_DEFAULT_RFC;
msgs.Ftncode = CHRS_DEFAULT_FTN;
strncpy(msgs.Origin, CFG.origin, 50);
msgs.LinkSec = mgroup.LinkSec;
/*
* If there is an uplink defined in the group,
@ -1266,12 +1287,12 @@ int EditMsgRec(int Area)
case 20:E_SEC( 18,52, msgs.SYSec, "9.2 EDIT SYSOP SECURITY", SetScreen)
case 21:E_BOOL(19,52, msgs.UsrDelete, "Allow users to ^Delete^ their messages")
case 22:E_BOOL(13,76, msgs.Aliases, "Allow ^aliases^ or real names only")
case 23:E_BOOL(14,76, msgs.Quotes, "Add random ^quotes^ to new messages")
case 24:E_BOOL(15,76, msgs.Mandatory, "Is this area ^mandatory^ for nodes")
case 25:E_BOOL(16,76, msgs.UnSecure, "Toss messages ^UnSecure^, ie: no originating check")
case 26:E_BOOL(17,76, msgs.OLR_Default, "Area is ^default^ for ^offline^ users.")
case 27:E_BOOL(18,76, msgs.OLR_Forced, "Area is ^always on^ for ^offline^ users.")
case 22:E_BOOL(12,76, msgs.Aliases, "Allow ^aliases^ or real names only")
case 23:E_BOOL(13,76, msgs.Quotes, "Add random ^quotes^ to new messages")
case 24:E_BOOL(14,76, msgs.Mandatory, "Is this area ^mandatory^ for nodes")
case 25:E_BOOL(15,76, msgs.UnSecure, "Toss messages ^UnSecure^, ie: no originating check")
case 26:E_BOOL(16,76, msgs.OLR_Default, "Area is ^default^ for ^offline^ users.")
case 27:E_BOOL(17,76, msgs.OLR_Forced, "Area is ^always on^ for ^offline^ users.")
case 28:switch (msgs.Type) {
case ECHOMAIL:
case NEWS:
@ -1281,6 +1302,9 @@ int EditMsgRec(int Area)
break;
}
break;
case 29:msgs.LinkSec = edit_asec(msgs.LinkSec, (char *)"9.2 EDIT LINK SECURITY");
SetScreen();
break;
}
}
}
@ -1649,9 +1673,8 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
{
char temp[PATH_MAX], status[5];
FILE *no;
int i = 0, j, systems, First = TRUE;
int i = 0, j, systems, First = TRUE, LMiy;
sysconnect System;
int LMiy;
struct tm *t;
time_t Now;
@ -1705,6 +1728,7 @@ int mail_area_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Read security %s\n", get_secstr(msgs.RDSec));
fprintf(fp, " Write security %s\n", get_secstr(msgs.WRSec));
fprintf(fp, " Sysop security %s\n", get_secstr(msgs.SYSec));
fprintf(fp, " Link security %s\n", getflag(msgs.LinkSec.flags, msgs.LinkSec.notflags));
fprintf(fp, " Minimum age %d\n", msgs.Age);
fprintf(fp, " Password %s\n", msgs.Password);
fprintf(fp, " Group %s\n", msgs.Group);

View File

@ -156,6 +156,10 @@ int OpenMGroup(void)
}
sprintf(mgroup.BasePath, "%s/var/mail/%s", getenv("MBSE_ROOT"), temp);
}
if (MGrpUpdated && !mgroup.LinkSec.level) {
mgroup.LinkSec.level = 1;
mgroup.LinkSec.flags = 1;
}
fwrite(&mgroup, sizeof(mgroup), 1, fout);
memset(&mgroup, 0, sizeof(mgroup));
}
@ -225,6 +229,8 @@ int AppendMGroup(void)
if ((fil = fopen(ffile, "a")) != NULL) {
memset(&mgroup, 0, sizeof(mgroup));
mgroup.StartDate = time(NULL);
mgroup.LinkSec.level = 1;
mgroup.LinkSec.flags = 1;
fwrite(&mgroup, sizeof(mgroup), 1, fil);
fclose(fil);
MGrpUpdated = 1;
@ -247,19 +253,20 @@ void MgScreen(void)
mvprintw(10, 2, "4. Read sec");
mvprintw(11, 2, "5. Write sec");
mvprintw(12, 2, "6. Sysop sec");
mvprintw(13, 2, "7. Start at");
mvprintw(14, 2, "8. Net reply");
mvprintw(15, 2, "9. Users del");
mvprintw(16, 2, "10. Aliases");
mvprintw(17, 2, "11. Quotes");
mvprintw(18, 2, "12. Active");
mvprintw(13, 2, "7. Link sec");
mvprintw(14, 2, "8. Start at");
mvprintw(15, 2, "9. Net reply");
mvprintw(16, 2, "10. Users del");
mvprintw(17, 2, "11. Aliases");
mvprintw(18, 2, "12. Quotes");
mvprintw(19, 2, "13. Active");
mvprintw(13,41, "13. Deleted");
mvprintw(14,41, "14. Auto change");
mvprintw(15,41, "15. User change");
mvprintw(16,41, "16. Use Aka");
mvprintw(17,41, "17. Uplink");
mvprintw(18,41, "18. Areas");
mvprintw(14,41, "14. Deleted");
mvprintw(15,41, "15. Auto change");
mvprintw(16,41, "16. User change");
mvprintw(17,41, "17. Use Aka");
mvprintw(18,41, "18. Uplink");
mvprintw(19,41, "19. Areas");
}
@ -324,24 +331,25 @@ int EditMGrpRec(int Area)
show_str( 7,16,12, mgroup.Name);
show_str( 8,16,55, mgroup.Comment);
show_str( 9,16,64, mgroup.BasePath);
show_int( 10,16, mgroup.RDSec.level);
show_int( 11,16, mgroup.WRSec.level);
show_int( 12,16, mgroup.SYSec.level);
show_int( 13,16, mgroup.StartArea);
show_int( 14,16, mgroup.NetReply);
show_bool(15,16, mgroup.UsrDelete);
show_bool(16,16, mgroup.Aliases);
show_bool(17,16, mgroup.Quotes);
show_bool(18,16, mgroup.Active);
show_sec( 10,16, mgroup.RDSec);
show_sec( 11,16, mgroup.WRSec);
show_sec( 12,16, mgroup.SYSec);
mvprintw( 13,22, getflag(mgroup.LinkSec.flags, mgroup.LinkSec.notflags));
show_int( 14,16, mgroup.StartArea);
show_int( 15,16, mgroup.NetReply);
show_bool(16,16, mgroup.UsrDelete);
show_bool(17,16, mgroup.Aliases);
show_bool(18,16, mgroup.Quotes);
show_bool(19,16, mgroup.Active);
show_bool(13,57, mgroup.Deleted);
show_bool(14,57, mgroup.AutoChange);
show_bool(15,57, mgroup.UserChange);
show_aka( 16,57, mgroup.UseAka);
show_aka( 17,57, mgroup.UpLink);
show_str( 18,57,12, mgroup.AreaFile);
show_bool(14,57, mgroup.Deleted);
show_bool(15,57, mgroup.AutoChange);
show_bool(16,57, mgroup.UserChange);
show_aka( 17,57, mgroup.UseAka);
show_aka( 18,57, mgroup.UpLink);
show_str( 19,57,12, mgroup.AreaFile);
j = select_menu(18);
j = select_menu(19);
switch(j) {
case 0: if (!mgroup.StartArea && strlen(mgroup.AreaFile)) {
errmsg("Areas file defined but no BBS start area");
@ -387,33 +395,36 @@ int EditMGrpRec(int Area)
case 4: E_SEC( 10,16, mgroup.RDSec, "9.1.4 MESSAGE GROUP READ SECURITY", MgScreen)
case 5: E_SEC( 11,16, mgroup.WRSec, "9.1.5 MESSAGE GROUP WRITE SECURITY", MgScreen)
case 6: E_SEC( 12,16, mgroup.SYSec, "9.1.6 MESSAGE GROUP SYSOP SECURITY", MgScreen)
case 7: E_INT( 13,16, mgroup.StartArea, "The ^Start area number^ from where to add areas")
case 8: E_INT( 14,16, mgroup.NetReply, "The ^Area Number^ for netmail replies")
case 9: E_BOOL(15,16, mgroup.UsrDelete, "Allow users to ^Delete^ their messages")
case 10:E_BOOL(16,16, mgroup.Aliases, "Allow ^Aliases^ or real names only")
case 11:E_BOOL(17,16, mgroup.Quotes, "Allow random ^quotes^ to new messages")
case 12:if (CheckMgroup())
case 7: mgroup.LinkSec = edit_asec(mgroup.LinkSec, (char *)"9.1.7 DEFAULT SECURITY FOR NEW AREAS");
MgScreen();
break;
E_BOOL(18,16, mgroup.Active, "Is this message group ^active^")
case 8: E_INT( 14,16, mgroup.StartArea, "The ^Start area number^ from where to add areas")
case 9: E_INT( 15,16, mgroup.NetReply, "The ^Area Number^ for netmail replies")
case 10:E_BOOL(16,16, mgroup.UsrDelete, "Allow users to ^Delete^ their messages")
case 11:E_BOOL(17,16, mgroup.Aliases, "Allow ^Aliases^ or real names only")
case 12:E_BOOL(18,16, mgroup.Quotes, "Allow random ^quotes^ to new messages")
case 13:if (CheckMgroup())
break;
E_BOOL(13,57, mgroup.Deleted, "Is this group ^Deleted^")
case 14:E_BOOL(14,57, mgroup.AutoChange, "^Auto change^ areas from new areas lists")
case 15:tmp = edit_bool(15,57, mgroup.UserChange, (char *)"^Auto add/delete^ areas from downlinks requests");
E_BOOL(19,16, mgroup.Active, "Is this message group ^active^")
case 14:if (CheckMgroup())
break;
E_BOOL(14,57, mgroup.Deleted, "Is this group ^Deleted^")
case 15:E_BOOL(15,57, mgroup.AutoChange, "^Auto change^ areas from new areas lists")
case 16:tmp = edit_bool(16,57, mgroup.UserChange, (char *)"^Auto add/delete^ areas from downlinks requests");
if (tmp && !mgroup.UpLink.zone)
errmsg("It looks like you are the toplevel, no Uplink defined");
else
mgroup.UserChange = tmp;
break;
case 16:tmp = PickAka((char *)"9.1.16", TRUE);
case 17:tmp = PickAka((char *)"9.1.17", TRUE);
if (tmp != -1)
memcpy(&mgroup.UseAka, &CFG.aka[tmp], sizeof(fidoaddr));
MgScreen();
break;
case 17:mgroup.UpLink = PullUplink((char *)"9.1.17");
case 18:mgroup.UpLink = PullUplink((char *)"9.1.18");
MgScreen();
break;
case 18:E_STR( 18,57,12, mgroup.AreaFile, "The name of the ^Areas File^ from the uplink")
case 19:E_STR( 19,57,12, mgroup.AreaFile, "The name of the ^Areas File^ from the uplink")
}
}
@ -660,6 +671,7 @@ int mail_group_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Read security %s\n", get_secstr(mgroup.RDSec));
fprintf(fp, " Write security %s\n", get_secstr(mgroup.WRSec));
fprintf(fp, " Sysop security %s\n", get_secstr(mgroup.SYSec));
fprintf(fp, " Def. link security %s\n", getflag(mgroup.LinkSec.flags, mgroup.LinkSec.notflags));
fprintf(fp, " Use aliases %s\n", getboolean(mgroup.Aliases));
fprintf(fp, " Add quotes %s\n", getboolean(mgroup.Quotes));
fprintf(fp, " Auto add/del areas %s\n", getboolean(mgroup.AutoChange));

View File

@ -1169,7 +1169,7 @@ int EditNodeRec(int Area)
break;
case 8: DirectoryEdit();
break;
case 9: nodes.Security = edit_asec(nodes.Security, (char *)"7.9 SECURITY FLAGS");
case 9: nodes.Security = edit_nsec(nodes.Security, (char *)"7.9 NODE SECURITY FLAGS");
break;
case 10:S_Stat();
break;

View File

@ -147,6 +147,10 @@ int OpenTicarea(void)
*/
memset(&tic, 0, sizeof(tic));
while (fread(&tic, oldsize, 1, fin) == 1) {
if (TicUpdated && !tic.LinkSec.level) {
tic.LinkSec.level = 1;
tic.LinkSec.flags = 1;
}
fwrite(&tic, sizeof(tic), 1, fout);
memset(&tic, 0, sizeof(tic));
/*
@ -256,6 +260,8 @@ int AppendTicarea(void)
tic.FileId = TRUE;
tic.Active = TRUE;
tic.AreaStart = time(NULL);
tic.LinkSec.level = 1;
tic.LinkSec.flags = 1;
fwrite(&tic, sizeof(tic), 1, fil);
memset(&syscon, 0, sizeof(syscon));
for (i = 1; i <= CFG.tic_systems; i++)
@ -410,33 +416,35 @@ void SetTicScreen(void)
set_color(WHITE, BLACK);
mvprintw( 4, 2, "10.2 EDIT TIC AREA");
set_color(CYAN, BLACK);
mvprintw( 6, 2, "1. Comment");
mvprintw( 7, 2, "2. Area tag");
mvprintw( 8, 2, "3. BBS area");
mvprintw( 9, 2, "4. Message");
mvprintw(10, 2, "5. Group");
mvprintw(11, 2, "6. Keep #");
mvprintw(12, 2, "7. Fido aka");
mvprintw(13, 2, "8. Convert");
mvprintw(14, 2, "9. Banner");
mvprintw(15, 2, "10. Replace");
mvprintw( 8, 2, "3. Security");
mvprintw( 9, 2, "4. BBS area");
mvprintw(10, 2, "5. Message");
mvprintw(11, 2, "6. Group");
mvprintw(12, 2, "7. Keep #");
mvprintw(13, 2, "8. Fido aka");
mvprintw(14, 2, "9. Convert");
mvprintw(15, 2, "10. Banner");
mvprintw(16, 2, "11. Replace");
mvprintw( 7,41, "11. Dupecheck");
mvprintw( 8,41, "12. Secure");
mvprintw( 9,41, "13. Touch");
mvprintw(10,41, "14. Virus sc.");
mvprintw(11,41, "15. Announce");
mvprintw(12,41, "16. Upd magic");
mvprintw(13,41, "17. File_id");
mvprintw(14,41, "18. Conv.all");
mvprintw(15,41, "19. Send org.");
mvprintw( 9,41, "12. Dupecheck");
mvprintw(10,41, "13. Secure");
mvprintw(11,41, "14. Touch");
mvprintw(12,41, "15. Virus sc.");
mvprintw(13,41, "16. Announce");
mvprintw(14,41, "17. Upd magic");
mvprintw(15,41, "18. File_id");
mvprintw(16,41, "19. Conv.all");
mvprintw( 7,63, "20. Mandatory");
mvprintw( 8,63, "21. Notified");
mvprintw( 9,63, "22. Upl discon");
mvprintw(10,63, "23. Deleted");
mvprintw(11,63, "24. Active");
mvprintw(12,63, "25. Systems");
mvprintw( 9,63, "20. Send org.");
mvprintw(10,63, "21. Mandatory");
mvprintw(11,63, "22. Notified");
mvprintw(12,63, "23. Upl discon");
mvprintw(13,63, "24. Deleted");
mvprintw(14,63, "25. Active");
mvprintw(15,63, "26. Systems");
}
@ -558,6 +566,7 @@ void TicGlobal(void)
int Total, Done;
long offset;
sysconnect S, Sc;
securityrec as;
/*
* Build the groups select array
@ -581,6 +590,9 @@ void TicGlobal(void)
memset(&S, 0, sizeof(sysconnect));
S.sendto = TRUE;
S.receivefrom = FALSE;
as.level = 1;
as.flags = 1;
as.notflags = 0;
for (;;) {
clr_index();
@ -592,12 +604,13 @@ void TicGlobal(void)
mvprintw( 9, 6, "3. Replace connection");
mvprintw(10, 6, "4. Change connection status");
mvprintw(11, 6, "5. Change aka to use");
mvprintw(12, 6, "6. Delete TIC area");
mvprintw(12, 6, "6. Change security flags");
mvprintw(13, 6, "7. Delete TIC area");
memset(&a1, 0, sizeof(fidoaddr));
memset(&a2, 0, sizeof(fidoaddr));
menu = select_menu(6);
menu = select_menu(7);
switch (menu) {
case 0: return;
case 1: a1 = PullUplink((char *)"AKA TO DELETE");
@ -615,6 +628,8 @@ void TicGlobal(void)
break;
case 5: akan = PickAka((char *)"10.2.5", TRUE);
break;
case 6: as = edit_asec(as, (char *)"10.2.6 EDIT LINK SECURITY");
break;
}
E_Group(&mgr, (char *)"SELECT TIC GROUPS TO CHANGE");
@ -636,7 +651,12 @@ void TicGlobal(void)
case 5: if (akan != -1)
mvprintw( 7, 6, "Set %s as new aka to use", aka2str(CFG.aka[akan]));
break;
case 6: mvprintw(7, 6, "Delete TIC areas");
case 6: set_color(CYAN, BLACK);
mvprintw(7, 6, "Link security");
set_color(WHITE, BLACK);
mvprintw(7,21, getflag(as.flags, as.notflags));
break;
case 7: mvprintw(7, 6, "Delete TIC areas");
break;
}
@ -654,10 +674,8 @@ void TicGlobal(void)
switch (menu) {
case 1: fseek(ttfil, 0, SEEK_SET);
while (fread(&Sc, sizeof(sysconnect), 1, ttfil) == 1) {
if ((Sc.aka.zone == a1.zone) &&
(Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) &&
(Sc.aka.point == a1.point)) {
if ((Sc.aka.zone == a1.zone) && (Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) && (Sc.aka.point == a1.point)) {
fseek(ttfil, - sizeof(sysconnect), SEEK_CUR);
memset(&Sc, 0, sizeof(sysconnect));
fwrite(&Sc, sizeof(sysconnect), 1, ttfil);
@ -672,10 +690,8 @@ void TicGlobal(void)
case 2: fseek(ttfil, 0, SEEK_SET);
Found = FALSE;
while (fread(&Sc, sizeof(sysconnect), 1, ttfil) == 1)
if ((Sc.aka.zone == a2.zone) &&
(Sc.aka.net == a2.net) &&
(Sc.aka.node == a2.node) &&
(Sc.aka.point == a2.point)) {
if ((Sc.aka.zone == a2.zone) && (Sc.aka.net == a2.net) &&
(Sc.aka.node == a2.node) && (Sc.aka.point == a2.point)) {
Found = TRUE;
break;
}
@ -704,10 +720,8 @@ void TicGlobal(void)
break;
case 3: fseek(ttfil, 0, SEEK_SET);
while (fread(&Sc, sizeof(sysconnect), 1, ttfil) == 1) {
if ((Sc.aka.zone == a1.zone) &&
(Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) &&
(Sc.aka.point == a1.point)) {
if ((Sc.aka.zone == a1.zone) && (Sc.aka.net == a1.net) &&
(Sc.aka.node == a1.node) && (Sc.aka.point == a1.point)) {
Sc.aka.zone = a2.zone;
Sc.aka.net = a2.net;
Sc.aka.node = a2.node;
@ -727,10 +741,8 @@ void TicGlobal(void)
break;
case 4: fseek(ttfil, 0, SEEK_SET);
while (fread(&Sc, sizeof(sysconnect), 1, ttfil) == 1) {
if ((Sc.aka.zone == S.aka.zone) &&
(Sc.aka.net == S.aka.net) &&
(Sc.aka.node == S.aka.node) &&
(Sc.aka.point == S.aka.point)) {
if ((Sc.aka.zone == S.aka.zone) && (Sc.aka.net == S.aka.net) &&
(Sc.aka.node == S.aka.node) && (Sc.aka.point == S.aka.point)) {
Sc.sendto = S.sendto;
Sc.receivefrom = S.receivefrom;
Sc.pause = S.pause;
@ -762,7 +774,15 @@ void TicGlobal(void)
}
}
break;
case 6: if (tic.Active) {
case 6: if ((tic.LinkSec.flags != as.flags) || (tic.LinkSec.notflags != as.notflags)) {
memcpy(&tic.LinkSec, &as, sizeof(securityrec));
if (SaveTicRec(areanr, FALSE) == 0) {
Done++;
Syslog('+', "Area %s changed link security flags", tic.Name);
}
}
break;
case 7: if (tic.Active) {
tic.Active = FALSE;
tic.Deleted = TRUE;
if (SaveTicRec(areanr, FALSE) == 0) {
@ -831,37 +851,38 @@ int EditTicRec(int Area)
set_color(WHITE, BLACK);
show_str( 6,16,55, tic.Comment);
show_str( 7,16,20, tic.Name);
show_str( 8,16,24, temp);
show_str( 9,16,14, tic.Message);
show_str(10,16,12, tic.Group);
show_int(11,16, tic.KeepLatest);
show_str(12,16,20, aka2str(tic.Aka));
show_str(13,16,5, tic.Convert);
show_str(14,16,14, tic.Banner);
show_bool(15,16, tic.Replace);
mvprintw( 8,16, getflag(tic.LinkSec.flags, tic.LinkSec.notflags));
show_str( 9,16,24, temp);
show_str(10,16,14, tic.Message);
show_str(11,16,12, tic.Group);
show_int(12,16, tic.KeepLatest);
show_str(13,16,20, aka2str(tic.Aka));
show_str(14,16,5, tic.Convert);
show_str(15,16,14, tic.Banner);
show_bool(16,16, tic.Replace);
show_bool( 7,55, tic.DupCheck);
show_bool( 8,55, tic.Secure);
show_bool( 9,55, tic.Touch);
show_bool(10,55, tic.VirScan);
show_bool(11,55, tic.Announce);
show_bool(12,55, tic.UpdMagic);
show_bool(13,55, tic.FileId);
show_bool(14,55, tic.ConvertAll);
show_bool(15,55, tic.SendOrg);
show_bool( 9,55, tic.DupCheck);
show_bool(10,55, tic.Secure);
show_bool(11,55, tic.Touch);
show_bool(12,55, tic.VirScan);
show_bool(13,55, tic.Announce);
show_bool(14,55, tic.UpdMagic);
show_bool(15,55, tic.FileId);
show_bool(16,55, tic.ConvertAll);
show_bool( 7,77, tic.Mandat);
show_bool( 8,77, tic.Notified);
show_bool( 9,77, tic.UplDiscon);
show_bool(10,77, tic.Deleted);
show_bool(11,77, tic.Active);
show_bool( 9,77, tic.SendOrg);
show_bool(10,77, tic.Mandat);
show_bool(11,77, tic.Notified);
show_bool(12,77, tic.UplDiscon);
show_bool(13,77, tic.Deleted);
show_bool(14,77, tic.Active);
fseek(ttfil, 0, SEEK_SET);
connections = 0;
while (fread(&System, sizeof(System), 1, ttfil) == 1) {
if (System.aka.zone)
connections++;
}
show_int( 12,77, connections);
show_int( 15,77, connections);
switch(select_menu(25)) {
case 0:
@ -886,14 +907,17 @@ int EditTicRec(int Area)
case 1: E_STR( 6,16,55, tic.Comment, "The ^description^ for this area.");
case 2: E_STR( 7,16,20, tic.Name, "The ^name^ of this ^TIC^ area.");
case 3: tmp = PickFilearea((char *)"10.2.3");
case 3: tic.LinkSec = edit_asec(tic.LinkSec, (char *)"LINK SECURITY FLAGS");
SetTicScreen();
break;
case 4: tmp = PickFilearea((char *)"10.2.4");
if (tmp != 0)
tic.FileArea = tmp;
SetTicScreen();
break;
case 4: E_STR( 9,16,14, tic.Message, "The ^message^ to include with the .tic files.");
case 5: tmp = strlen(tic.Group);
strcpy(tic.Group, PickFGroup((char *)"10.2.5"));
case 5: E_STR(10,16,14, tic.Message, "The ^message^ to include with the .tic files.");
case 6: tmp = strlen(tic.Group);
strcpy(tic.Group, PickFGroup((char *)"10.2.6"));
if (strlen(tic.Group) && !tmp) {
/*
* If set the first time, fill in defaults
@ -911,6 +935,7 @@ int EditTicRec(int Area)
tic.FileId = fgroup.FileId;
tic.ConvertAll = fgroup.ConvertAll;
tic.SendOrg = fgroup.SendOrg;
tic.LinkSec = fgroup.LinkSec;
/*
* If there is an uplink defined in the group,
@ -931,38 +956,37 @@ int EditTicRec(int Area)
}
SetTicScreen();
break;
case 6: E_INT(11,16, tic.KeepLatest, "^Keep^ the ^latest^ number of files.");
case 7: tmp = PickAka((char *)"10.2.7", TRUE);
case 7: E_INT(12,16, tic.KeepLatest, "^Keep^ the ^latest^ number of files.");
case 8: tmp = PickAka((char *)"10.2.8", TRUE);
if (tmp != -1)
tic.Aka = CFG.aka[tmp];
SetTicScreen();
break;
case 8: strcpy(tic.Convert, PickArchive((char *)"10.2.8"));
case 9: strcpy(tic.Convert, PickArchive((char *)"10.2.9"));
SetTicScreen();
break;
case 9: E_STR(14,16,14, tic.Banner, "The ^banner^ to put in the file archives");
case 10:E_BOOL(15,16, tic.Replace, "Allow ^Replace^ files command");
case 11:E_BOOL( 7,55, tic.DupCheck, "Check for ^duplicates^ in received files");
case 12:E_BOOL( 8,55, tic.Secure, "Check for ^secure^ systems");
case 13:E_BOOL( 9,55, tic.Touch, "^Touch filedate^ on rearchived files to the origininal filedate");
case 14:E_BOOL(10,55, tic.VirScan, "Check received files for ^virusses^");
case 15:E_BOOL(11,55, tic.Announce, "^Announce^ received files");
case 16:E_BOOL(12,55, tic.UpdMagic, "Update files ^magic^ names");
case 17:E_BOOL(13,55, tic.FileId, "Extract ^FILE_ID.DIZ^ from received files");
case 18:tmp = edit_bool(14,55, tic.ConvertAll, (char *)"^Convert^ archive always");
case 10:E_STR(15,16,14, tic.Banner, "The ^banner^ to put in the file archives");
case 11:E_BOOL(16,16, tic.Replace, "Allow ^Replace^ files command");
case 12:E_BOOL( 9,55, tic.DupCheck, "Check for ^duplicates^ in received files");
case 13:E_BOOL(10,55, tic.Secure, "Check for ^secure^ systems");
case 14:E_BOOL(11,55, tic.Touch, "^Touch filedate^ on rearchived files to the origininal filedate");
case 15:E_BOOL(12,55, tic.VirScan, "Check received files for ^virusses^");
case 16:E_BOOL(13,55, tic.Announce, "^Announce^ received files");
case 17:E_BOOL(14,55, tic.UpdMagic, "Update files ^magic^ names");
case 18:E_BOOL(15,55, tic.FileId, "Extract ^FILE_ID.DIZ^ from received files");
case 19:tmp = edit_bool(16,55, tic.ConvertAll, (char *)"^Convert^ archive always");
if (tmp && !tic.ConvertAll && strlen(tic.Convert) == 0)
errmsg("No archiver configured to convert to, edit 8 first");
else
tic.ConvertAll = tmp;
break;
case 19:E_BOOL(15,55, tic.SendOrg, "^Send original^ file to downlinks");
case 20:E_BOOL( 7,77, tic.Mandat, "Is this area ^mandatory^");
case 21:E_BOOL( 8,77, tic.Notified, "Is the sysop ^notified^ if this area is (dis)connected");
case 22:E_BOOL( 9,77, tic.UplDiscon, "Is the uplink ^disconnected^ from this area");
case 23:E_BOOL(10,77, tic.Deleted, "Is this area ^deleted^");
case 24:E_BOOL(11,77, tic.Active, "Is this area ^active^");
case 25:
if (EditTicConnections(ttfil))
case 20:E_BOOL( 9,77, tic.SendOrg, "^Send original^ file to downlinks");
case 21:E_BOOL(10,77, tic.Mandat, "Is this area ^mandatory^");
case 22:E_BOOL(11,77, tic.Notified, "Is the sysop ^notified^ if this area is (dis)connected");
case 23:E_BOOL(12,77, tic.UplDiscon, "Is the uplink ^disconnected^ from this area");
case 24:E_BOOL(13,77, tic.Deleted, "Is this area ^deleted^");
case 25:E_BOOL(14,77, tic.Active, "Is this area ^active^");
case 26:if (EditTicConnections(ttfil))
changed = TRUE;
SetTicScreen();
break;
@ -1282,6 +1306,7 @@ int tic_areas_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Convert to %s\n", tic.Convert);
fprintf(fp, " Convert all %s\n", getboolean(tic.ConvertAll));
fprintf(fp, " Banner file %s\n", tic.Banner);
fprintf(fp, " Security %s\n", getflag(tic.LinkSec.flags, tic.LinkSec.notflags));
fprintf(fp, " Replace ok. %s\n", getboolean(tic.Replace));
fprintf(fp, " Dupe check %s\n", getboolean(tic.DupCheck));
fprintf(fp, " Secure %s\n", getboolean(tic.Secure));