* setup: only attempt to create the admin user when running in self-contained auth...
authorArt Cancro <ajc@citadel.org>
Thu, 8 Oct 2009 17:41:23 +0000 (17:41 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 8 Oct 2009 17:41:23 +0000 (17:41 +0000)
citadel/setup.c

index 408fc8394c265c299f1a6a8b63546a5fa6be90c8..a1127aadd8aba5f4c79a9be4873087c6090949fa 100644 (file)
@@ -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",