From 0526fe52327b7b7c24eaf436f3437b524ec3b75b Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 21 Sep 2007 16:25:34 +0000 Subject: [PATCH] The 'master user' account and password may now be configured using either the text mode client or WebCit. The 'check RBLs upon connect' option wasn't configured in WebCit, this has been fixed. --- citadel/modules/pop3/serv_pop3.c | 7 +++++- citadel/routines2.c | 38 ++++++++++++++++++++++++++------ webcit/siteconfig.c | 26 ++++++++++++++++++++++ 3 files changed, 63 insertions(+), 8 deletions(-) diff --git a/citadel/modules/pop3/serv_pop3.c b/citadel/modules/pop3/serv_pop3.c index 74b3255c9..e8f975c4d 100644 --- a/citadel/modules/pop3/serv_pop3.c +++ b/citadel/modules/pop3/serv_pop3.c @@ -98,9 +98,14 @@ void pop3_greeting(void) { */ void pop3s_greeting(void) { CtdlModuleStartCryptoMsgs(NULL, NULL, NULL); + +/* kill session if no crypto */ #ifdef HAVE_OPENSSL - if (!CC->redirect_ssl) CC->kill_me = 1; /* kill session if no crypto */ + if (!CC->redirect_ssl) CC->kill_me = 1; +#else + CC->kill_me = 1; #endif + pop3_greeting(); } diff --git a/citadel/routines2.c b/citadel/routines2.c index 93c1814e5..346b3ea62 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -649,7 +649,7 @@ void read_bio(CtdlIPC *ipc) void do_system_configuration(CtdlIPC *ipc) { -#define NUM_CONFIGS 58 +#define NUM_CONFIGS 60 char buf[256]; char sc[NUM_CONFIGS][256]; @@ -780,7 +780,7 @@ void do_system_configuration(CtdlIPC *ipc) if (ipc->ServInfo.supports_ldap) { a = strlen(&sc[32][0]); a = (a ? 1 : 0); /* Set only to 1 or 0 */ - a = boolprompt("Connect this Citadel to an LDAP directory", a); + a = boolprompt("Connect this Citadel to an external LDAP directory", a); if (a) { strprompt("Host name of LDAP server", &sc[32][0], 127); @@ -870,11 +870,35 @@ void do_system_configuration(CtdlIPC *ipc) } /* Funambol push stuff */ - strprompt("Funambol server (blank to disable)", &sc[53][0], 63); - strprompt("Funambol server port", &sc[54][0], 5); - strprompt("Funambol sync source", &sc[55][0], 63); - strprompt("Funambol authentication details (user:pass in Base64)", &sc[56][0],63); - + int yes_funambol = 0; + if (strlen(sc[53]) > 0) yes_funambol = 1; + yes_funambol = boolprompt("Connect to an external Funambol sync server", yes_funambol); + if (yes_funambol) { + strprompt("Funambol server (blank to disable)", &sc[53][0], 63); + strprompt("Funambol server port", &sc[54][0], 5); + strprompt("Funambol sync source", &sc[55][0], 63); + strprompt("Funambol authentication details (user:pass in Base64)", &sc[56][0],63); + } + else { + sc[53][0] = 0; + sc[54][0] = 0; + sc[55][0] = 0; + sc[56][0] = 0; + } + + /* Master user account */ + int yes_muacct = 0; + if (strlen(sc[58]) > 0) yes_muacct = 1; + yes_muacct = boolprompt("Enable a 'master user' account", yes_muacct); + if (yes_muacct) { + strprompt("Master user name", &sc[58][0], 31); + strprompt("Master user password", &sc[59][0], -31); + } + else { + strcpy(&sc[58][0], ""); + strcpy(&sc[59][0], "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); + } + /* Save it */ scr_printf("Save this configuration? "); if (yesno()) { diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index 1198fd056..236e93194 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -561,6 +561,29 @@ void display_siteconfig(void) sprintf(&funambol[strlen(funambol)], "", buf); sprintf(&funambol[strlen(funambol)], "\n"); break; + case 57: + sprintf(&network[strlen(network)], ""); + sprintf(&network[strlen(network)], _("Perform RBL checks upon connect instead of after RCPT")); + sprintf(&network[strlen(network)], ""); + sprintf(&network[strlen(network)], "", + ((atoi(buf) != 0) ? "CHECKED" : "")); + sprintf(&network[strlen(network)], "\n"); + break; + case 58: + sprintf(&access[strlen(access)], ""); + sprintf(&access[strlen(access)], _("Master user name (blank to disable)")); + sprintf(&access[strlen(access)], ""); + sprintf(&access[strlen(access)], "", buf); + sprintf(&access[strlen(access)], "\n"); + break; + case 59: + sprintf(&access[strlen(access)], ""); + sprintf(&access[strlen(access)], _("Master user password")); + sprintf(&access[strlen(access)], ""); + sprintf(&access[strlen(access)], "", + buf); + sprintf(&directory[strlen(directory)], "\n"); + break; } } @@ -732,6 +755,9 @@ void siteconfig(void) serv_printf("%s", bstr("c_funambol_port")); serv_printf("%s", bstr("c_funambol_source")); serv_printf("%s", bstr("c_funambol_auth")); + serv_printf("%s", bstr("c_rbl_at_greeting")); + serv_printf("%s", bstr("c_master_user")); + serv_printf("%s", bstr("c_master_pass")); serv_printf("000"); serv_printf("SPEX site|%d|%d", atoi(bstr("sitepolicy")), atoi(bstr("sitevalue"))); -- 2.30.2