Skip to content
Snippets Groups Projects
Commit 8730368a authored by rswindell's avatar rswindell
Browse files

Added thread_up callback to handle setuid for child threads.

parent 8a4d2b46
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,14 @@ static void lputs(char *str)
pthread_mutex_unlock(&mutex);
}
static void thread_up(BOOL up)
{
if(up==TRUE) {
/* Add setuid code here */
;
}
}
/************************************************/
/* Truncates white-space chars off end of 'str' */
/************************************************/
......@@ -321,10 +329,10 @@ int main(int argc, char** argv)
bbs_startup.event_log=event_lputs;
bbs_startup.started=bbs_started;
bbs_startup.terminated=bbs_terminated;
bbs_startup.thread_up=thread_up;
/* These callbacks haven't been created yet
bbs_startup.status=bbs_status;
bbs_startup.clients=bbs_clients;
bbs_startup.thread_up=thread_up;
bbs_startup.client_on=client_on;
bbs_startup.socket_open=socket_open;
*/
......@@ -336,6 +344,7 @@ int main(int argc, char** argv)
ftp_startup.lputs=ftp_lputs;
ftp_startup.started=ftp_started;
ftp_startup.terminated=ftp_terminated;
ftp_startup.thread_up=thread_up;
ftp_startup.options=FTP_OPT_INDEX_FILE|FTP_OPT_ALLOW_QWK;
strcpy(ftp_startup.index_file_name,"00index");
strcpy(ftp_startup.ctrl_dir,ctrl_dir);
......@@ -346,6 +355,7 @@ int main(int argc, char** argv)
mail_startup.lputs=mail_lputs;
mail_startup.started=mail_started;
mail_startup.terminated=mail_terminated;
mail_startup.thread_up=thread_up;
mail_startup.options|=MAIL_OPT_ALLOW_POP3;
/* Spam filtering */
mail_startup.options|=MAIL_OPT_USE_RBL; /* Realtime Blackhole List */
......@@ -384,6 +394,7 @@ int main(int argc, char** argv)
services_startup.lputs=services_lputs;
services_startup.started=services_started;
services_startup.terminated=services_terminated;
services_startup.thread_up=thread_up;
strcpy(services_startup.ctrl_dir,ctrl_dir);
/* Process arguments */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment