Commit e1bea447 authored by rswindell's avatar rswindell
Browse files

Support the new global BinkP PlainAuthOnly (CRAM-MD5 auth disable) option.

parent e04f77fd
......@@ -93,6 +93,7 @@ void global_settings(void)
sprintf(opt[i++], "%-25s %lu", "BSO Lock Attempt Limit", cfg.bso_lock_attempts);
sprintf(opt[i++], "%-25s %s", "BinkP Capabilities", cfg.binkp_caps);
sprintf(opt[i++], "%-25s %s", "BinkP Sysop Name", cfg.binkp_sysop);
sprintf(opt[i++], "%-25s %s", "BinkP Authentication", cfg.binkp_plainAuthOnly ? "Plain Only" : "Plain or CRAM-MD5");
}
opt[i][0] = 0;
uifc.helpbuf=
......@@ -163,8 +164,13 @@ void global_settings(void)
" command). Default capabilities value is '115200,TCP,BINKP'\n"
"\n"
"`BinkP Sysop` may be used to over-ride the default BinkP sysop name\n"
" sent during a `BinkIT` mailer session (via the ZYZ comamnd).\n"
" sent during a `BinkIT` mailer session (via the ZYZ command).\n"
" Default sysop name is that set in `SCFG->System->Operator`\n"
"\n"
"`BinkP Authentication` may be set to `Plain Only` if you wish to disable\n"
" CRAM-MD5 authentication for both inbound and outbound sessions.\n"
" Note: CRAM-MD5 authentication is required for encrypted sessions.\n"
" Default: Plain or CRAM-MD5\n"
;
int key = uifc.list(WIN_BOT|WIN_L2R|WIN_ACT|WIN_SAV, 0, 0, 0, &global_opt,0, "Global Settings", opt);
......@@ -258,6 +264,24 @@ void global_settings(void)
uifc.input(WIN_MID|WIN_SAV,0,0
,"BinkP Sysop Name (BinkIT)", cfg.binkp_sysop, sizeof(cfg.binkp_sysop)-1, K_EDIT);
break;
case 13:
{
int k = !cfg.binkp_plainAuthOnly;
strcpy(opt[0], "Plain-Password Only");
strcpy(opt[1], "Plain-Password or CRAM-MD5");
opt[2][0] = 0;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"BinkP Authentication",opt)) {
case 0:
cfg.binkp_plainAuthOnly = true;
break;
case 1:
cfg.binkp_plainAuthOnly = false;
break;
}
break;
}
}
}
}
......@@ -350,7 +374,7 @@ void binkp_settings(nodecfg_t* node)
sprintf(opt[i++], "%-20s %s", "Poll", node->binkp_poll ? "Yes" : "No");
char* auth = "Plain Only";
char* crypt = "Unsupported";
if(!node->binkp_plainAuthOnly) {
if(!cfg.binkp_plainAuthOnly && !node->binkp_plainAuthOnly) {
crypt = node->binkp_allowPlainText ? "Supported" : "Required";
if(node->binkp_allowPlainAuth)
auth = "Plain or CRAM-MD5";
......@@ -381,6 +405,8 @@ void binkp_settings(nodecfg_t* node)
"`Authentication` determines what types of authentication will be supported\n"
" during both inbound and outbound sessions with this linked node.\n"
" The supported BinkP-auth methods are `Plain-Password` and `CRAM-MD5`.\n"
" Note: For `incoming` connections, CRAM-MD5 will be supported unless\n"
" CRAM-MD5 authentication has been `globally` disabled.\n"
"\n"
"`Encryption` determines whether unencrypted data transfers will be\n"
" supported or required when communicating with this linked node.\n"
......@@ -417,6 +443,10 @@ void binkp_settings(nodecfg_t* node)
}
break;
case 3:
if(cfg.binkp_plainAuthOnly) {
uifc.msg("CRAM-MD5 authentication/encryption has been disabled globally");
break;
}
k = node->binkp_plainAuthOnly ? 0 : (1 + !node->binkp_allowPlainAuth);
strcpy(opt[0], "Plain-Password Only");
strcpy(opt[1], "Plain-Password or CRAM-MD5");
......@@ -444,6 +474,10 @@ void binkp_settings(nodecfg_t* node)
}
break;
case 4:
if(cfg.binkp_plainAuthOnly) {
uifc.msg("CRAM-MD5 authentication/encryption has been disabled globally");
break;
}
k = !node->binkp_allowPlainText;
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&k,0
,"Allow Plain-Text (Unencrypted) Sessions",uifcYesNoOpts)) {
......
......@@ -311,6 +311,7 @@ bool sbbsecho_read_ini(sbbsecho_cfg_t* cfg)
/* BinkP options: */
SAFECOPY(cfg->binkp_caps, iniGetString(ini, "BinkP", "Capabilities", "", value));
SAFECOPY(cfg->binkp_sysop, iniGetString(ini, "BinkP", "Sysop", "", value));
cfg->binkp_plainAuthOnly = iniGetBool(ini, "BinkP", "PlainAuthOnly", FALSE);
/******************/
/* Archive Types: */
......@@ -546,6 +547,7 @@ bool sbbsecho_write_ini(sbbsecho_cfg_t* cfg)
/******************/
iniSetString(&ini, "BinkP" , "Capabilities" ,cfg->binkp_caps ,&style);
iniSetString(&ini, "BinkP" , "Sysop" ,cfg->binkp_sysop ,&style);
iniSetBool(&ini, "BinkP" , "PlainAuthOnly" ,cfg->binkp_plainAuthOnly ,&style);
/******************/
/* Archive Types: */
......
......@@ -221,6 +221,7 @@ typedef struct {
unsigned domain_count;
char binkp_caps[64];
char binkp_sysop[64];
bool binkp_plainAuthOnly;
} sbbsecho_cfg_t;
char* pktTypeStringList[PKT_TYPES_SUPPORTED+1];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment