random boilerplate
[citadel.git] / citadel / config.c
index 2507abfee037e042aee267c0ca7fc7a4c0277738..326c82c02c61636406801a08a56f4f34ae66a6b2 100644 (file)
@@ -1,16 +1,11 @@
-/*
- * Read and write the citadel.config file
- *
- * Copyright (c) 1987-2017 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
+//
+// Read and write the citadel.config file
+//
+// Copyright (c) 1987-2021 by the citadel.org team
+//
+// This program is open source software.  Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License, version 3.
+// The program is distributed without any warranty, expressed or implied.
 
 #include "sysdep.h"
 #include <stdlib.h>
@@ -70,7 +65,6 @@ void validate_config(void) {
        config_warn_if_port_unset("c_pop3s_port",       995);
        config_warn_if_port_unset("c_imaps_port",       993);
        config_warn_if_port_unset("c_pftcpdict_port",   -1);
-       config_warn_if_port_unset("c_managesieve_port", 2020);
        config_warn_if_port_unset("c_xmpp_c2s_port",    5222);
        config_warn_if_port_unset("c_xmpp_s2s_port",    5269);
        config_warn_if_port_unset("c_nntp_port",        119);
@@ -129,7 +123,6 @@ void brand_new_installation_set_defaults(void) {
        CtdlSetConfigInt("c_pop3s_port",        995);
        CtdlSetConfigInt("c_imaps_port",        993);
        CtdlSetConfigInt("c_pftcpdict_port",    -1);
-       CtdlSetConfigInt("c_managesieve_port",  2020);
        CtdlSetConfigInt("c_xmpp_c2s_port",     5222);
        CtdlSetConfigInt("c_xmpp_s2s_port",     5269);
        CtdlSetConfigInt("c_nntp_port",         119);
@@ -202,7 +195,6 @@ void migrate_legacy_config(struct legacy_config *lconfig)
        CtdlSetConfigStr(       "c_journal_dest"        ,       lconfig->c_journal_dest         );
        CtdlSetConfigStr(       "c_default_cal_zone"    ,       lconfig->c_default_cal_zone     );
        CtdlSetConfigInt(       "c_pftcpdict_port"      ,       lconfig->c_pftcpdict_port       );
-       CtdlSetConfigInt(       "c_managesieve_port"    ,       lconfig->c_managesieve_port     );
        CtdlSetConfigInt(       "c_auth_mode"           ,       lconfig->c_auth_mode            );
        CtdlSetConfigInt(       "c_rbl_at_greeting"     ,       lconfig->c_rbl_at_greeting      );
        CtdlSetConfigStr(       "c_pager_program"       ,       lconfig->c_pager_program        );
@@ -235,15 +227,6 @@ void initialize_config_system(void) {
                exit(CTDLEXIT_LIBCITADEL);
        }
 
-       if (chdir(ctdl_bbsbase_dir) != 0) {
-               fprintf(stderr,
-                       "This program could not be started.\nUnable to change directory to %s\nError: %s\n",
-                       ctdl_bbsbase_dir,
-                       strerror(errno)
-               );
-               exit(CTDLEXIT_HOME);
-       }
-
        memset(&lconfig, 0, sizeof(struct legacy_config));
        cfp = fopen(file_citadel_config, "rb");
        if (cfp != NULL) {
@@ -488,7 +471,7 @@ char *CtdlGetSysConfig(char *sysconfname) {
                conf = NULL;
        }
        else {
-               msg = CtdlFetchMessage(msgnum, 1, 1);
+               msg = CtdlFetchMessage(msgnum, 1);
                if (msg != NULL) {
                        conf = strdup(msg->cm_fields[eMesageText]);
                        CM_Free(msg);