From 310dd5b4d3c2fc3b4ea2114005bd9d2016cb8fcc Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 8 Oct 2009 17:41:23 +0000 Subject: [PATCH] * setup: only attempt to create the admin user when running in self-contained auth mode --- citadel/setup.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/citadel/setup.c b/citadel/setup.c index 408fc8394..a1127aadd 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -1465,20 +1465,23 @@ NEW_INST: char buf[SIZ]; int found_it = 0; - snprintf (admin_cmd, sizeof(admin_cmd), "%s/sendcommand \"CREU %s|%s\" 2>&1", - ctdl_sbin_dir, config.c_sysadm, admin_pass); - fp = popen(admin_cmd, "r"); - if (fp != NULL) { - while (fgets(buf, sizeof buf, fp) != NULL) - { - if ((atol(buf) == 574) || (atol(buf) == 200)) - ++found_it; + if (config.c_auth_mode == AUTHMODE_NATIVE) { + snprintf (admin_cmd, sizeof(admin_cmd), "%s/sendcommand \"CREU %s|%s\" 2>&1", + ctdl_sbin_dir, config.c_sysadm, admin_pass); + fp = popen(admin_cmd, "r"); + if (fp != NULL) { + while (fgets(buf, sizeof buf, fp) != NULL) + { + if ((atol(buf) == 574) || (atol(buf) == 200)) + ++found_it; + } + pclose(fp); + } + + if (found_it == 0) { + important_message("Error","Setup failed to create your admin user"); } - pclose(fp); } - - if (found_it == 0) - important_message("Error","Setup failed to create your admin user"); if (setup_type != UI_SILENT) important_message("Setup finished", -- 2.39.2