struct passwd pw, *pwp = NULL;
char pwbuf[SIZ];
int drop_root_perms = 1;
- size_t size;
int relh=0;
int home=0;
int dbg=0;
- int have_log=0;
char relhome[PATH_MAX]="";
char ctdldir[PATH_MAX]=CTDLDIR;
int syslog_facility = LOG_DAEMON;
// eCrashSymbolTable symbol_table;
#endif
- /* initialise semaphores here. Patch by Matt and davew
- * its called here as they are needed by syslog for thread safety
- */
- InitialiseSemaphores();
-
/* initialize the master context */
InitializeMasterCC();
+ InitializeMasterTSD();
/* parse command-line arguments */
for (a=1; a<argc; ++a) {
strerror(errno));
exit(1);
}
- have_log = 1;
}
else if (!strncmp(argv[a], "-D", 2)) {
#endif
/* Tell 'em who's in da house */
- syslog(LOG_NOTICE, "\n");
- syslog(LOG_NOTICE, "\n");
+ syslog(LOG_NOTICE, " ");
+ syslog(LOG_NOTICE, " ");
syslog(LOG_NOTICE,
- "*** Citadel server engine v%d.%02d (build %s) ***\n",
+ "*** Citadel server engine v%d.%02d (build %s) ***",
(REV_LEVEL/100), (REV_LEVEL%100), svn_revision());
- syslog(LOG_NOTICE, "Copyright (C) 1987-2010 by the Citadel development team.\n");
+ syslog(LOG_NOTICE, "Copyright (C) 1987-2011 by the Citadel development team.");
syslog(LOG_NOTICE, "This program is distributed under the terms of the GNU "
- "General Public License.\n");
- syslog(LOG_NOTICE, "\n");
- syslog(LOG_DEBUG, "Called as: %s\n", argv[0]);
- syslog(LOG_INFO, "%s\n", libcitadel_version_string());
+ "General Public License.");
+ syslog(LOG_NOTICE, " ");
+ syslog(LOG_DEBUG, "Called as: %s", argv[0]);
+ syslog(LOG_INFO, "%s", libcitadel_version_string());
/* Load site-specific parameters, and set the ipgm secret */
- syslog(LOG_INFO, "Loading citadel.config\n");
+ syslog(LOG_INFO, "Loading citadel.config");
get_config();
config.c_ipgm_secret = rand();
/* get_control() MUST MUST MUST be called BEFORE the databases are opened!! */
- syslog(LOG_INFO, "Acquiring control record\n");
+ syslog(LOG_INFO, "Acquiring control record");
get_control();
put_config();
/*
* Run any upgrade entry points
*/
- syslog(LOG_INFO, "Upgrading modules.\n");
+ 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 */
+ /* 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 */
+ CtdlGetUser(&masterCC.user, "SYS_Citadel"); /* Just to be safe */
}
/*
* Load any server-side extensions available here.
*/
syslog(LOG_INFO, "Initializing server extensions\n");
- size = strlen(ctdl_home_directory) + 9;
initialise_modules(0);
-
-
/*
* If we need host auth, start our chkpwd daemon.