From edd8862e7bcf5755936827c4417e49cdd6b30efd Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 12 Jan 2000 03:56:27 +0000 Subject: [PATCH] * sysdep.c: start the housekeeping thread *after* dropping root perms. --- citadel/ChangeLog | 4 ++++ citadel/sysconfig.h | 4 ++-- citadel/sysdep.c | 23 +++++++++++++---------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 0fab92b44..e96322839 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 1.439 2000/01/12 03:56:27 ajc +* sysdep.c: start the housekeeping thread *after* dropping root perms. + Revision 1.438 2000/01/09 19:03:16 ajc * Removed the fifo-based protocol downloads and replaced it with a less elegant "download temporary file to client, then sx/sb/sz" because @@ -1532,3 +1535,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/sysconfig.h b/citadel/sysconfig.h index 3ce4597f8..198f7e557 100644 --- a/citadel/sysconfig.h +++ b/citadel/sysconfig.h @@ -83,8 +83,8 @@ * These define what port to listen on for various services. * FIX ... put this in a programmable config somewhere */ -#define POP3_PORT 1110 -#define SMTP_PORT 2525 +#define POP3_PORT 110 +#define SMTP_PORT 25 /* diff --git a/citadel/sysdep.c b/citadel/sysdep.c index add4867fe..0cd19053a 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -784,16 +784,6 @@ int main(int argc, char **argv) free(moddir); } - lprintf(7, "Starting housekeeper thread\n"); - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - if (pthread_create(&HousekeepingThread, &attr, - (void* (*)(void*)) housekeeping_loop, NULL) != 0) { - lprintf(1, "Can't create housekeeping thead: %s\n", - strerror(errno)); - } - - /* * The rescan pipe exists so that worker threads can be woken up and * told to re-scan the context list for fd's to listen on. This is @@ -857,6 +847,19 @@ int main(int argc, char **argv) } } + /* + * Create the housekeeper thread + */ + lprintf(7, "Starting housekeeper thread\n"); + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + if (pthread_create(&HousekeepingThread, &attr, + (void* (*)(void*)) housekeeping_loop, NULL) != 0) { + lprintf(1, "Can't create housekeeping thead: %s\n", + strerror(errno)); + } + + /* * Now create a bunch of worker threads. */ -- 2.30.2