static void * APR_THREAD_FUNC process_security_thread_handler(apr_thread_t *thread, void *data) { request_rec *r = (request_rec *) data; int result; thread_on = 1; if (process_security_set_cap(r) < 0) apr_thread_exit(thread, HTTP_INTERNAL_SERVER_ERROR); result = ap_run_handler(r); if (result == DECLINED) result = HTTP_INTERNAL_SERVER_ERROR; apr_thread_exit(thread, result); return NULL; }
static void * APR_THREAD_FUNC selinux_worker_handler(apr_thread_t *thread, void *data) { request_rec *r = (request_rec *) data; int result; /* marks as the current context is worker thread */ am_worker = 1; /* set security context */ if (selinux_set_domain(r) < 0) apr_thread_exit(thread, HTTP_INTERNAL_SERVER_ERROR); /* invoke content handler */ result = ap_run_handler(r); if (result == DECLINED) result = HTTP_INTERNAL_SERVER_ERROR; apr_thread_exit(thread, result); return NULL; }