Added areas security
This commit is contained in:
parent
2c0aa5ea42
commit
6ba7ecc05c
@ -1349,6 +1349,80 @@ securityrec edit_usec(int y, int x, securityrec sec, char *shdr)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
securityrec edit_asec(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.notflags >> (s - 1)) & 1) {
|
||||||
|
sec.notflags = (sec.notflags ^ (1 << (s - 1)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if ((sec.flags >> (s - 1)) & 1) {
|
||||||
|
sec.flags = (sec.flags ^ (1 << (s - 1)));
|
||||||
|
sec.notflags = (sec.notflags | (1 << (s - 1)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sec.flags = (sec.flags | (1 << (s - 1)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char *get_secstr(securityrec S)
|
char *get_secstr(securityrec S)
|
||||||
{
|
{
|
||||||
static char temp[45];
|
static char temp[45];
|
||||||
|
@ -34,6 +34,7 @@ char *getflag(unsigned long, unsigned long);
|
|||||||
void show_sec(int, int, securityrec);
|
void show_sec(int, int, securityrec);
|
||||||
securityrec edit_sec(int, int, securityrec, char *);
|
securityrec edit_sec(int, int, securityrec, char *);
|
||||||
securityrec edit_usec(int, int, securityrec, char *);
|
securityrec edit_usec(int, int, securityrec, char *);
|
||||||
|
securityrec edit_asec(securityrec, char *);
|
||||||
char *get_secstr(securityrec);
|
char *get_secstr(securityrec);
|
||||||
void show_int(int, int, int);
|
void show_int(int, int, int);
|
||||||
int edit_int(int, int, int, char *);
|
int edit_int(int, int, int, char *);
|
||||||
|
@ -183,35 +183,39 @@ void e_reginfo(void)
|
|||||||
|
|
||||||
void e_filenames(void)
|
void e_filenames(void)
|
||||||
{
|
{
|
||||||
clr_index();
|
clr_index();
|
||||||
|
set_color(WHITE, BLACK);
|
||||||
|
mvprintw( 5, 6, "1.3 EDIT GLOBAL FILENAMES");
|
||||||
|
set_color(CYAN, BLACK);
|
||||||
|
mvprintw( 7, 6, "1. System logfile");
|
||||||
|
mvprintw( 8, 6, "2. Error logfile");
|
||||||
|
mvprintw( 9, 6, "3. Mgr logfile");
|
||||||
|
mvprintw(10, 6, "4. Default Menu");
|
||||||
|
mvprintw(11, 6, "5. Default Language");
|
||||||
|
mvprintw(12, 6, "6. Chat Logfile");
|
||||||
|
mvprintw(13, 6, "7. Welcome Logo");
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 6, "1.3 EDIT GLOBAL FILENAMES");
|
show_str( 7,28,14, CFG.logfile);
|
||||||
set_color(CYAN, BLACK);
|
show_str( 8,28,14, CFG.error_log);
|
||||||
mvprintw( 7, 6, "1. System logfile");
|
show_str( 9,28,14, CFG.mgrlog);
|
||||||
mvprintw( 8, 6, "2. Error logfile");
|
show_str(10,28,14, CFG.default_menu);
|
||||||
mvprintw( 9, 6, "3. Default Menu");
|
show_str(11,28,14, CFG.current_language);
|
||||||
mvprintw(10, 6, "4. Default Language");
|
show_str(12,28,14, CFG.chat_log);
|
||||||
mvprintw(11, 6, "5. Chat Logfile");
|
show_str(13,28,14, CFG.welcome_logo);
|
||||||
mvprintw(12, 6, "6. Welcome Logo");
|
|
||||||
for (;;) {
|
|
||||||
set_color(WHITE, BLACK);
|
|
||||||
show_str( 7,28,14, CFG.logfile);
|
|
||||||
show_str( 8,28,14, CFG.error_log);
|
|
||||||
show_str( 9,28,14, CFG.default_menu);
|
|
||||||
show_str(10,28,14, CFG.current_language);
|
|
||||||
show_str(11,28,14, CFG.chat_log);
|
|
||||||
show_str(12,28,14, CFG.welcome_logo);
|
|
||||||
|
|
||||||
switch(select_menu(6)) {
|
switch(select_menu(7)) {
|
||||||
case 0: return;
|
case 0: return;
|
||||||
case 1: E_STR( 7,28,14, CFG.logfile, "The name of the ^system^ logfile.")
|
case 1: E_STR( 7,28,14, CFG.logfile, "The name of the ^system^ logfile.")
|
||||||
case 2: E_STR( 8,28,14, CFG.error_log, "The name of the ^errors^ logfile.")
|
case 2: E_STR( 8,28,14, CFG.error_log, "The name of the ^errors^ logfile.")
|
||||||
case 3: E_STR( 9,28,14, CFG.default_menu, "The name of the ^default^ (top) ^menu^.")
|
case 3: E_STR( 9,28,14, CFG.mgrlog, "The name of the ^area-/filemgr^ logfile.")
|
||||||
case 4: E_STR(10,28,14, CFG.current_language, "The name of the ^default language^.")
|
case 4: E_STR(10,28,14, CFG.default_menu, "The name of the ^default^ (top) ^menu^.")
|
||||||
case 5: E_STR(11,28,14, CFG.chat_log, "The name of the ^chat^ logfile.")
|
case 5: E_STR(11,28,14, CFG.current_language, "The name of the ^default language^.")
|
||||||
case 6: E_STR(12,28,14, CFG.welcome_logo, "The name of the ^BBS logo^ file.")
|
case 6: E_STR(12,28,14, CFG.chat_log, "The name of the ^chat^ logfile.")
|
||||||
}
|
case 7: E_STR(13,28,14, CFG.welcome_logo, "The name of the ^BBS logo^ file.")
|
||||||
};
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -741,54 +745,76 @@ void e_paging(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void e_flags(void)
|
void e_flags(int Users)
|
||||||
{
|
{
|
||||||
int i, x, y, z;
|
int i, x, y, z;
|
||||||
char temp[80];
|
char temp[80];
|
||||||
|
|
||||||
clr_index();
|
clr_index();
|
||||||
|
set_color(WHITE, BLACK);
|
||||||
|
if (Users)
|
||||||
|
mvprintw( 5, 6, "1.6 EDIT USER FLAG DESCRIPTIONS");
|
||||||
|
else
|
||||||
|
mvprintw( 5, 6, "1.20 EDIT MANAGER FLAG DESCRIPTIONS");
|
||||||
|
|
||||||
|
set_color(CYAN, BLACK);
|
||||||
|
for (i = 0; i < 32; i++) {
|
||||||
|
if (i < 11)
|
||||||
|
mvprintw(i + 7, 2, (char *)"%d.", i+1);
|
||||||
|
else
|
||||||
|
if (i < 22)
|
||||||
|
mvprintw(i - 4, 28, (char *)"%d.", i+1);
|
||||||
|
else
|
||||||
|
mvprintw(i - 15, 54, (char *)"%d.", i+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 6, "1.6 EDIT FLAG DESCRIPTIONS");
|
|
||||||
set_color(CYAN, BLACK);
|
|
||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
if (i < 11)
|
if (i < 11) {
|
||||||
mvprintw(i + 7, 2, (char *)"%d.", i+1);
|
if (Users)
|
||||||
|
show_str(i + 7, 6, 16, CFG.fname[i]);
|
||||||
else
|
else
|
||||||
if (i < 22)
|
show_str(i + 7, 6, 16, CFG.aname[i]);
|
||||||
mvprintw(i - 4, 28, (char *)"%d.", i+1);
|
} else {
|
||||||
else
|
if (i < 22) {
|
||||||
mvprintw(i - 15, 54, (char *)"%d.", i+1);
|
if (Users)
|
||||||
}
|
show_str(i - 4, 32, 16, CFG.fname[i]);
|
||||||
for (;;) {
|
else
|
||||||
set_color(WHITE, BLACK);
|
show_str(i - 4, 32, 16, CFG.aname[i]);
|
||||||
for (i = 0; i < 32; i++) {
|
} else {
|
||||||
if (i < 11)
|
if (Users)
|
||||||
show_str(i + 7, 6, 16, CFG.fname[i]);
|
show_str(i -15, 58, 16, CFG.fname[i]);
|
||||||
else
|
else
|
||||||
if (i < 22)
|
show_str(i - 15,58, 16, CFG.aname[i]);
|
||||||
show_str(i - 4, 32, 16, CFG.fname[i]);
|
|
||||||
else
|
|
||||||
show_str(i -15, 58, 16, CFG.fname[i]);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
z = select_menu(32);
|
z = select_menu(32);
|
||||||
if (z == 0)
|
if (z == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (z < 12) {
|
if (z < 12) {
|
||||||
x = 6;
|
x = 6;
|
||||||
y = z + 6;
|
y = z + 6;
|
||||||
} else
|
} else {
|
||||||
if (z < 23) {
|
if (z < 23) {
|
||||||
x = 32;
|
x = 32;
|
||||||
y = z - 5;
|
y = z - 5;
|
||||||
} else {
|
} else {
|
||||||
x = 58;
|
x = 58;
|
||||||
y = z - 16;
|
y = z - 16;
|
||||||
}
|
}
|
||||||
sprintf(temp, "Enter a short ^description^ of flag bit %d", z);
|
}
|
||||||
strcpy(CFG.fname[z-1], edit_str(y, x, 16, CFG.fname[z-1], temp));
|
|
||||||
};
|
sprintf(temp, "Enter a short ^description^ of flag bit %d", z);
|
||||||
|
if (Users) {
|
||||||
|
strcpy(CFG.fname[z-1], edit_str(y, x, 16, CFG.fname[z-1], temp));
|
||||||
|
} else {
|
||||||
|
strcpy(CFG.aname[z-1], edit_str(y, x, 16, CFG.aname[z-1], temp));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1544,144 +1570,159 @@ void e_html(void)
|
|||||||
|
|
||||||
void global_menu(void)
|
void global_menu(void)
|
||||||
{
|
{
|
||||||
unsigned long crc, crc1;
|
unsigned long crc, crc1;
|
||||||
|
int i;
|
||||||
|
|
||||||
if (! check_free())
|
if (! check_free())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cf_open() == -1)
|
if (cf_open() == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Syslog('+', "Opened main config");
|
Syslog('+', "Opened main config");
|
||||||
crc = 0xffffffff;
|
crc = 0xffffffff;
|
||||||
crc = upd_crc32((char *)&CFG, crc, sizeof(CFG));
|
crc = upd_crc32((char *)&CFG, crc, sizeof(CFG));
|
||||||
|
|
||||||
if (CFG.xmax_login) {
|
if (CFG.xmax_login) {
|
||||||
/*
|
/*
|
||||||
* Do automatic upgrade for unused fields, erase them.
|
* Do automatic upgrade for unused fields, erase them.
|
||||||
*/
|
*/
|
||||||
Syslog('+', "Main config, clearing unused fields");
|
Syslog('+', "Main config, clearing unused fields");
|
||||||
memset(&CFG.alists_path, 0, sizeof(CFG.alists_path));
|
memset(&CFG.alists_path, 0, sizeof(CFG.alists_path));
|
||||||
CFG.xmax_login = 0;
|
CFG.xmax_login = 0;
|
||||||
CFG.xUseSysDomain = FALSE;
|
CFG.xUseSysDomain = FALSE;
|
||||||
CFG.xChkMail = FALSE;
|
CFG.xChkMail = FALSE;
|
||||||
memset(&CFG.xquotestr, 0, sizeof(CFG.xquotestr));
|
memset(&CFG.xquotestr, 0, sizeof(CFG.xquotestr));
|
||||||
CFG.xNewBytes = FALSE;
|
CFG.xNewBytes = FALSE;
|
||||||
memset(&CFG.extra4, 0, sizeof(CFG.extra4));
|
memset(&CFG.extra4, 0, sizeof(CFG.extra4));
|
||||||
memset(&CFG.xmgrname, 0, sizeof(CFG.xmgrname));
|
memset(&CFG.xmgrname, 0, sizeof(CFG.xmgrname));
|
||||||
memset(&CFG.xtoss_log, 0, sizeof(CFG.xtoss_log));
|
memset(&CFG.xtoss_log, 0, sizeof(CFG.xtoss_log));
|
||||||
memset(&CFG.xareamgr, 0, sizeof(CFG.xareamgr));
|
memset(&CFG.xareamgr, 0, sizeof(CFG.xareamgr));
|
||||||
CFG.xNoJanus = FALSE;
|
CFG.xNoJanus = FALSE;
|
||||||
memset(&CFG.extra5, 0, sizeof(CFG.extra5));
|
memset(&CFG.extra5, 0, sizeof(CFG.extra5));
|
||||||
sprintf(CFG.alists_path, "%s/var/arealists", getenv("MBSE_ROOT"));
|
sprintf(CFG.alists_path, "%s/var/arealists", getenv("MBSE_ROOT"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(CFG.bbs_macros) == 0) {
|
if (strlen(CFG.bbs_macros) == 0) {
|
||||||
sprintf(CFG.bbs_macros, "%s/english/macro", getenv("MBSE_ROOT"));
|
sprintf(CFG.bbs_macros, "%s/english/macro", getenv("MBSE_ROOT"));
|
||||||
}
|
Syslog('+', "Main config, upgraded default macro path");
|
||||||
|
}
|
||||||
|
|
||||||
if (strlen(CFG.out_queue) == 0) {
|
if (strlen(CFG.out_queue) == 0) {
|
||||||
sprintf(CFG.out_queue, "%s/var/queue", getenv("MBSE_ROOT"));
|
sprintf(CFG.out_queue, "%s/var/queue", getenv("MBSE_ROOT"));
|
||||||
}
|
Syslog('+', "Main config, upgraded for new queue");
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
if (strlen(CFG.mgrlog) == 0) {
|
||||||
|
sprintf(CFG.mgrlog, "manager.log");
|
||||||
|
for (i = 0; i < 32; i++)
|
||||||
|
sprintf(CFG.aname[i], "Flags %d", i+1);
|
||||||
|
sprintf(CFG.aname[0], "Everyone");
|
||||||
|
Syslog('+', "Main config, upgraded for manager security");
|
||||||
|
}
|
||||||
|
|
||||||
clr_index();
|
for (;;) {
|
||||||
set_color(WHITE, BLACK);
|
|
||||||
mvprintw( 5, 6, "1. GLOBAL SETUP");
|
|
||||||
set_color(CYAN, BLACK);
|
|
||||||
mvprintw( 7, 6, "1. Edit Fidonet Aka's");
|
|
||||||
mvprintw( 8, 6, "2. Edit Registration Info");
|
|
||||||
mvprintw( 9, 6, "3. Edit Global Filenames");
|
|
||||||
mvprintw(10, 6, "4. Edit Global Paths");
|
|
||||||
mvprintw(11, 6, "5. Edit Global Settings");
|
|
||||||
mvprintw(12, 6, "6. Edit Flag Descriptions");
|
|
||||||
mvprintw(13, 6, "7. Edit New Users defaults");
|
|
||||||
mvprintw(14, 6, "8. Edit Text Colors");
|
|
||||||
mvprintw(15, 6, "9. Edit Next User Door");
|
|
||||||
mvprintw(16, 6, "10. Edit Safe Door");
|
|
||||||
|
|
||||||
mvprintw( 7,46, "11. Edit Time Bank Door");
|
clr_index();
|
||||||
mvprintw( 8,46, "12. Edit Sysop Paging");
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 9,46, "13. Edit Files Processing");
|
mvprintw( 5, 6, "1. GLOBAL SETUP");
|
||||||
mvprintw(10,46, "14. Edit Fidonet Mail/Echomail");
|
set_color(CYAN, BLACK);
|
||||||
mvprintw(11,46, "15. Edit Internet Mail/News");
|
mvprintw( 7, 6, "1. Edit Fidonet Aka's");
|
||||||
mvprintw(12,46, "16. Edit All-/Newfiles lists");
|
mvprintw( 8, 6, "2. Edit Registration Info");
|
||||||
mvprintw(13,46, "17. Edit Mailer setup");
|
mvprintw( 9, 6, "3. Edit Global Filenames");
|
||||||
mvprintw(14,46, "18. Edit Ftp daemon setup");
|
mvprintw(10, 6, "4. Edit Global Paths");
|
||||||
mvprintw(15,46, "19. Edit HTML pages setup");
|
mvprintw(11, 6, "5. Edit Global Settings");
|
||||||
|
mvprintw(12, 6, "6. Edit User flag Descriptions");
|
||||||
|
mvprintw(13, 6, "7. Edit New Users defaults");
|
||||||
|
mvprintw(14, 6, "8. Edit Text Colors");
|
||||||
|
mvprintw(15, 6, "9. Edit Next User Door");
|
||||||
|
mvprintw(16, 6, "10. Edit Safe Door");
|
||||||
|
|
||||||
switch(select_menu(19)) {
|
mvprintw( 7,46, "11. Edit Time Bank Door");
|
||||||
case 0:
|
mvprintw( 8,46, "12. Edit Sysop Paging");
|
||||||
crc1 = 0xffffffff;
|
mvprintw( 9,46, "13. Edit Files Processing");
|
||||||
crc1 = upd_crc32((char *)&CFG, crc1, sizeof(CFG));
|
mvprintw(10,46, "14. Edit Fidonet Mail/Echomail");
|
||||||
if (crc != crc1) {
|
mvprintw(11,46, "15. Edit Internet Mail/News");
|
||||||
if (yes_no((char *)"Configuration is changed, save") == 1) {
|
mvprintw(12,46, "16. Edit All-/Newfiles lists");
|
||||||
cf_close();
|
mvprintw(13,46, "17. Edit Mailer global setup");
|
||||||
Syslog('+', "Saved main config");
|
mvprintw(14,46, "18. Edit Ftp daemon setup");
|
||||||
}
|
mvprintw(15,46, "19. Edit HTML pages setup");
|
||||||
|
mvprintw(16,46, "20. Edit Mgr flag descriptions");
|
||||||
|
|
||||||
|
switch(select_menu(20)) {
|
||||||
|
case 0:
|
||||||
|
crc1 = 0xffffffff;
|
||||||
|
crc1 = upd_crc32((char *)&CFG, crc1, sizeof(CFG));
|
||||||
|
if (crc != crc1) {
|
||||||
|
if (yes_no((char *)"Configuration is changed, save") == 1) {
|
||||||
|
cf_close();
|
||||||
|
Syslog('+', "Saved main config");
|
||||||
}
|
}
|
||||||
open_bbs();
|
}
|
||||||
return;
|
open_bbs();
|
||||||
case 1:
|
return;
|
||||||
e_fidoakas();
|
case 1:
|
||||||
break;
|
e_fidoakas();
|
||||||
case 2:
|
break;
|
||||||
e_reginfo();
|
case 2:
|
||||||
break;
|
e_reginfo();
|
||||||
case 3:
|
break;
|
||||||
e_filenames();
|
case 3:
|
||||||
break;
|
e_filenames();
|
||||||
case 4:
|
break;
|
||||||
e_global();
|
case 4:
|
||||||
break;
|
e_global();
|
||||||
case 5:
|
break;
|
||||||
e_bbsglob();
|
case 5:
|
||||||
break;
|
e_bbsglob();
|
||||||
case 6:
|
break;
|
||||||
e_flags();
|
case 6:
|
||||||
break;
|
e_flags(TRUE);
|
||||||
case 7:
|
break;
|
||||||
e_newuser();
|
case 7:
|
||||||
break;
|
e_newuser();
|
||||||
case 8:
|
break;
|
||||||
e_colors();
|
case 8:
|
||||||
break;
|
e_colors();
|
||||||
case 9:
|
break;
|
||||||
e_nu_door();
|
case 9:
|
||||||
break;
|
e_nu_door();
|
||||||
case 10:
|
break;
|
||||||
e_safe_door();
|
case 10:
|
||||||
break;
|
e_safe_door();
|
||||||
case 11:
|
break;
|
||||||
e_timebank();
|
case 11:
|
||||||
break;
|
e_timebank();
|
||||||
case 12:
|
break;
|
||||||
e_paging();
|
case 12:
|
||||||
break;
|
e_paging();
|
||||||
case 13:
|
break;
|
||||||
e_ticconf();
|
case 13:
|
||||||
break;
|
e_ticconf();
|
||||||
case 14:
|
break;
|
||||||
e_fidomailcfg();
|
case 14:
|
||||||
break;
|
e_fidomailcfg();
|
||||||
case 15:
|
break;
|
||||||
e_intmailcfg();
|
case 15:
|
||||||
break;
|
e_intmailcfg();
|
||||||
case 16:
|
break;
|
||||||
e_newfiles();
|
case 16:
|
||||||
break;
|
e_newfiles();
|
||||||
case 17:
|
break;
|
||||||
e_mailer();
|
case 17:
|
||||||
break;
|
e_mailer();
|
||||||
case 18:
|
break;
|
||||||
e_ftpd();
|
case 18:
|
||||||
break;
|
e_ftpd();
|
||||||
case 19:
|
break;
|
||||||
e_html();
|
case 19:
|
||||||
break;
|
e_html();
|
||||||
}
|
break;
|
||||||
|
case 20:
|
||||||
|
e_flags(FALSE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1798,6 +1839,7 @@ int global_doc(FILE *fp, FILE *toc, int page)
|
|||||||
addtoc(fp, toc, 1, 4, page, (char *)"Global filenames");
|
addtoc(fp, toc, 1, 4, page, (char *)"Global filenames");
|
||||||
fprintf(fp, " System logfile %s\n", CFG.logfile);
|
fprintf(fp, " System logfile %s\n", CFG.logfile);
|
||||||
fprintf(fp, " Error logfile %s\n", CFG.error_log);
|
fprintf(fp, " Error logfile %s\n", CFG.error_log);
|
||||||
|
fprintf(fp, " Manager logfile %s\n", CFG.mgrlog);
|
||||||
fprintf(fp, " Default menu %s\n", CFG.default_menu);
|
fprintf(fp, " Default menu %s\n", CFG.default_menu);
|
||||||
fprintf(fp, " Default language %s\n", CFG.current_language);
|
fprintf(fp, " Default language %s\n", CFG.current_language);
|
||||||
fprintf(fp, " Chat logfile %s\n", CFG.chat_log);
|
fprintf(fp, " Chat logfile %s\n", CFG.chat_log);
|
||||||
@ -1853,7 +1895,7 @@ int global_doc(FILE *fp, FILE *toc, int page)
|
|||||||
fprintf(fp, " Free diskspace %d MB.\n", CFG.freespace);
|
fprintf(fp, " Free diskspace %d MB.\n", CFG.freespace);
|
||||||
|
|
||||||
page = newpage(fp, page);
|
page = newpage(fp, page);
|
||||||
addtoc(fp, toc, 1, 7, page, (char *)"Flag descriptions");
|
addtoc(fp, toc, 1, 7, page, (char *)"Users flag descriptions");
|
||||||
fprintf(fp, " 1 1 2 2 3 3\n");
|
fprintf(fp, " 1 1 2 2 3 3\n");
|
||||||
fprintf(fp, " 1 5 0 5 0 5 0 2\n");
|
fprintf(fp, " 1 5 0 5 0 5 0 2\n");
|
||||||
fprintf(fp, " --------------------------------\n");
|
fprintf(fp, " --------------------------------\n");
|
||||||
@ -2083,6 +2125,22 @@ int global_doc(FILE *fp, FILE *toc, int page)
|
|||||||
fprintf(fp, " Convert command %s\n", CFG.www_convert);
|
fprintf(fp, " Convert command %s\n", CFG.www_convert);
|
||||||
fprintf(fp, " File per webpage %d\n", CFG.www_files_page);
|
fprintf(fp, " File per webpage %d\n", CFG.www_files_page);
|
||||||
|
|
||||||
|
page = newpage(fp, page);
|
||||||
|
addtoc(fp, toc, 1,21, page, (char *)"Manager flag descriptions");
|
||||||
|
fprintf(fp, " 1 1 2 2 3 3\n");
|
||||||
|
fprintf(fp, " 1 5 0 5 0 5 0 2\n");
|
||||||
|
fprintf(fp, " --------------------------------\n");
|
||||||
|
fprintf(fp, " ||||||||||||||||||||||||||||||||\n");
|
||||||
|
for (i = 0; i < 32; i++) {
|
||||||
|
fprintf(fp, " ");
|
||||||
|
for (j = 0; j < (31 - i); j++)
|
||||||
|
fprintf(fp, "|");
|
||||||
|
fprintf(fp, "+");
|
||||||
|
for (j = (32 - i); j < 32; j++)
|
||||||
|
fprintf(fp, "-");
|
||||||
|
fprintf(fp, " %s\n", CFG.aname[31 - i]);
|
||||||
|
}
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,16 @@ int OpenNoderec(void)
|
|||||||
memset(&nodes, 0, sizeof(nodes));
|
memset(&nodes, 0, sizeof(nodes));
|
||||||
while (fread(&nodes, oldsize, 1, fin) == 1) {
|
while (fread(&nodes, oldsize, 1, fin) == 1) {
|
||||||
if (oldsize != sizeof(nodes)) {
|
if (oldsize != sizeof(nodes)) {
|
||||||
strcpy(nodes.Spasswd, nodes.Epasswd);
|
if (strlen(nodes.Spasswd) == 0)
|
||||||
|
strcpy(nodes.Spasswd, nodes.Epasswd);
|
||||||
|
if (nodes.Security.level == 0) {
|
||||||
|
/*
|
||||||
|
* Level is not used, here it is used to mark
|
||||||
|
* the upgrade to default.
|
||||||
|
*/
|
||||||
|
nodes.Security.level = 1;
|
||||||
|
nodes.Security.flags = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fwrite(&nodes, sizeof(nodes), 1, fout);
|
fwrite(&nodes, sizeof(nodes), 1, fout);
|
||||||
memset(&nodes, 0, sizeof(nodes));
|
memset(&nodes, 0, sizeof(nodes));
|
||||||
@ -293,6 +302,8 @@ int AppendNoderec(void)
|
|||||||
nodes.ARCmailCompat = TRUE;
|
nodes.ARCmailCompat = TRUE;
|
||||||
nodes.ARCmailAlpha = TRUE;
|
nodes.ARCmailAlpha = TRUE;
|
||||||
nodes.StartDate = time(NULL);
|
nodes.StartDate = time(NULL);
|
||||||
|
nodes.Security.level = 1;
|
||||||
|
nodes.Security.flags = 1;
|
||||||
fwrite(&nodes, sizeof(nodes), 1, fil);
|
fwrite(&nodes, sizeof(nodes), 1, fil);
|
||||||
memset(&group, 0, 13);
|
memset(&group, 0, 13);
|
||||||
for (i = 1; i <= CFG.tic_groups; i++)
|
for (i = 1; i <= CFG.tic_groups; i++)
|
||||||
@ -493,7 +504,7 @@ void S_Stat(void)
|
|||||||
|
|
||||||
clr_index();
|
clr_index();
|
||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 6, "7.9 NODE STATISTICS");
|
mvprintw( 5, 6, "7.10 NODE STATISTICS");
|
||||||
set_color(CYAN, BLACK);
|
set_color(CYAN, BLACK);
|
||||||
mvprintw( 8,18, " This week Last week This month Last month Total");
|
mvprintw( 8,18, " This week Last week This month Last month Total");
|
||||||
mvprintw( 9,18, "---------- ---------- ---------- ---------- ----------");
|
mvprintw( 9,18, "---------- ---------- ---------- ---------- ----------");
|
||||||
@ -1086,9 +1097,10 @@ int EditNodeRec(int Area)
|
|||||||
mvprintw(12, 6, "6. Files setup");
|
mvprintw(12, 6, "6. Files setup");
|
||||||
mvprintw(13, 6, "7. Files groups");
|
mvprintw(13, 6, "7. Files groups");
|
||||||
mvprintw(14, 6, "8. Directory session");
|
mvprintw(14, 6, "8. Directory session");
|
||||||
mvprintw(15, 6, "9. Statistics");
|
mvprintw(15, 6, "9. Security flags");
|
||||||
|
mvprintw(16, 6, "10. Statistics");
|
||||||
|
|
||||||
switch(select_menu(9)) {
|
switch(select_menu(10)) {
|
||||||
case 0: crc1 = 0xffffffff;
|
case 0: crc1 = 0xffffffff;
|
||||||
crc1 = upd_crc32((char *)&nodes, crc1, nodeshdr.recsize);
|
crc1 = upd_crc32((char *)&nodes, crc1, nodeshdr.recsize);
|
||||||
if ((crc != crc1) || GrpChanged) {
|
if ((crc != crc1) || GrpChanged) {
|
||||||
@ -1157,7 +1169,9 @@ int EditNodeRec(int Area)
|
|||||||
break;
|
break;
|
||||||
case 8: DirectoryEdit();
|
case 8: DirectoryEdit();
|
||||||
break;
|
break;
|
||||||
case 9: S_Stat();
|
case 9: nodes.Security = edit_asec(nodes.Security, (char *)"7.9 SECURITY FLAGS");
|
||||||
|
break;
|
||||||
|
case 10:S_Stat();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1474,7 +1488,8 @@ int node_doc(FILE *fp, FILE *toc, int page)
|
|||||||
fprintf(fp, " Advanced TIC %s", getboolean(nodes.AdvTic));
|
fprintf(fp, " Advanced TIC %s", getboolean(nodes.AdvTic));
|
||||||
fprintf(fp, " Billing %s", getboolean(nodes.Billing));
|
fprintf(fp, " Billing %s", getboolean(nodes.Billing));
|
||||||
fprintf(fp, " Bill direct %s\n", getboolean(nodes.BillDirect));
|
fprintf(fp, " Bill direct %s\n", getboolean(nodes.BillDirect));
|
||||||
fprintf(fp, " Uplink add + %s\n\n", getboolean(nodes.AddPlus));
|
fprintf(fp, " Uplink add + %s\n", getboolean(nodes.AddPlus));
|
||||||
|
fprintf(fp, " Security flags %s\n\n", getflag(nodes.Security.flags, nodes.Security.notflags));
|
||||||
|
|
||||||
fprintf(fp, " Outb session %s\n", get_sessiontype(nodes.Session_out));
|
fprintf(fp, " Outb session %s\n", get_sessiontype(nodes.Session_out));
|
||||||
if (nodes.Session_out == S_DIR) {
|
if (nodes.Session_out == S_DIR) {
|
||||||
|
@ -407,7 +407,7 @@ int main(int argc, char *argv[])
|
|||||||
*/
|
*/
|
||||||
config_check(getenv("MBSE_ROOT"));
|
config_check(getenv("MBSE_ROOT"));
|
||||||
config_read();
|
config_read();
|
||||||
InitClient(pw->pw_name, (char *)"mbsetup", CFG.location, CFG.logfile, 0x1f, CFG.error_log);
|
InitClient(pw->pw_name, (char *)"mbsetup", CFG.location, CFG.logfile, 0x1f, CFG.error_log, CFG.mgrlog);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup several signals so when the program terminate's it
|
* Setup several signals so when the program terminate's it
|
||||||
|
Reference in New Issue
Block a user