reducing capabilities of the threads to a minimum

proper flush of pending packets on daemon shutdown
adding local address as gateway address in dynamic route
This commit is contained in:
Martin Willi
2007-05-03 14:21:22 +00:00
parent 3d63b7639e
commit 66560f4267
11 changed files with 215 additions and 41 deletions
+4 -1
View File
@@ -57,7 +57,7 @@ struct private_thread_pool_t {
* Array of thread ids.
*/
pthread_t *threads;
} ;
};
/**
* Implementation of private_thread_pool_t.process_jobs.
@@ -73,6 +73,9 @@ static void process_jobs(private_thread_pool_t *this)
DBG1(DBG_JOB, "worker thread running, thread_ID: %06u",
(int)pthread_self());
/* drop threads capabilities, except CAP_NET_ADMIN */
charon->drop_capabilities(charon, TRUE, FALSE);
while (TRUE)
{
/* TODO: should be atomic, but is not mission critical */