+ * Check that the control record is correct and place sensible values if it isn't
+ */
+ check_control();
+
+ /*
+ * Run any upgrade entry points
+ */
+ syslog(LOG_INFO, "Upgrading modules.");
+ upgrade_modules();
+
+/*
+ * Load the user for the masterCC or create them if they don't exist
+ */
+ if (CtdlGetUser(&masterCC.user, "SYS_Citadel"))
+ {
+ /* User doesn't exist. We can't use create user here as the user number needs to be 0 */
+ strcpy (masterCC.user.fullname, "SYS_Citadel") ;
+ CtdlPutUser(&masterCC.user);
+ CtdlGetUser(&masterCC.user, "SYS_Citadel"); /* Just to be safe */
+ }
+
+ /*
+ * Bind the server to a Unix-domain socket (user client access)
+ */
+ CtdlRegisterServiceHook(0,
+ file_citadel_socket,
+ citproto_begin_session,
+ do_command_loop,
+ do_async_loop,
+ CitadelServiceUDS);
+
+ /*
+ * Bind the server to a Unix-domain socket (admin client access)