]> code.citadel.org Git - citadel.git/blobdiff - citadel/setup.c
Prepared some of the authmode stuff for the imminent addition
[citadel.git] / citadel / setup.c
index c2d4bf78c7ac17632092f27b28fe12f1cf04f0af..fc64eb78e0586e1c998bc9075dc2a4a1100c5324 100644 (file)
 #include <limits.h>
 #include <pwd.h>
 #include <time.h>
-
+#include <libcitadel.h>
 #include "citadel.h"
 #include "axdefs.h"
 #include "sysdep.h"
 #include "config.h"
-#include "tools.h"
 #include "citadel_dirs.h"
 
 #define MAXSETUP 5     /* How many setup questions to ask */
@@ -786,10 +785,10 @@ void edit_value(int curr)
                {
                        if (getenv("ENABLE_UNIX_AUTH")) {
                                if (!strcasecmp(getenv("ENABLE_UNIX_AUTH"), "yes")) {
-                                       config.c_auth_mode = 1;
+                                       config.c_auth_mode = AUTHMODE_HOST;
                                }
                                else {
-                                       config.c_auth_mode = 0;
+                                       config.c_auth_mode = AUTHMODE_NATIVE;
                                }
                        }
                }
@@ -1005,7 +1004,7 @@ int main(int argc, char *argv[])
                safestrncpy(relhome, ctdl_home_directory, sizeof relhome);
        }
 
-       calc_dirs_n_files(relh, home, relhome, ctdldir);
+       calc_dirs_n_files(relh, home, relhome, ctdldir, 0);
        
        enable_home=(relh|home);
 
@@ -1159,6 +1158,8 @@ int main(int argc, char *argv[])
        if (config.c_imaps_port == 0) config.c_imaps_port = 993;
        if (config.c_pftcpdict_port == 0) config.c_pftcpdict_port = -1;
        if (config.c_managesieve_port == 0) config.c_managesieve_port = 2020;
+       if (config.c_xmpp_c2s_port == 0) config.c_xmpp_c2s_port = 5222;
+       if (config.c_xmpp_s2s_port == 0) config.c_xmpp_s2s_port = 5269;
 
        /* Go through a series of dialogs prompting for config info */
        for (curr = 1; curr <= MAXSETUP; ++curr) {
@@ -1229,10 +1230,6 @@ NEW_INST:
        chmod(ctdl_netcfg_dir, 0700);
        chown(ctdl_netcfg_dir, config.c_ctdluid, -1);
 
-       mkdir(ctdl_uidlmap_dir, 0700);
-       chmod(ctdl_uidlmap_dir, 0700);
-       chown(ctdl_uidlmap_dir, config.c_ctdluid, -1);
-
        /* Delete files and directories used by older Citadel versions */
        system("exec /bin/rm -fr ./rooms ./chatpipes ./expressmsgs ./sessions 2>/dev/null");
        unlink("citadel.log");
@@ -1255,7 +1252,6 @@ NEW_INST:
        disable_other_mta("dovecot");
        disable_other_mta("exim");
        disable_other_mta("exim4");
-       disable_other_mta("hula");
        disable_other_mta("imapd");
        disable_other_mta("mta");
        disable_other_mta("pop3d");
@@ -1265,7 +1261,6 @@ NEW_INST:
        disable_other_mta("saslauthd");
        disable_other_mta("sendmail");
        disable_other_mta("vmailmgrd");
-       disable_other_mta("zimbra");
 #endif
 
        /* Check for the 'db' nss and offer to disable it */