From 371d11ec046fb4a1193a086476cde907d0088ced Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Jul 26 2007 19:48:40 +0000 Subject: trunk: add 3rd party interface for apache cgi. --- diff --git a/Changelog b/Changelog index 072d4ae..677f0c4 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,4 @@ +- Add third-party interface for Apache CGI. - Add getserv and shmemserv nscd permissions. - Add debian apcupsd binary location, from Stefan Schulze Frielinghaus. - Added modules: diff --git a/policy/modules/services/apache.if b/policy/modules/services/apache.if index 932386f..2c8a6b7 100644 --- a/policy/modules/services/apache.if +++ b/policy/modules/services/apache.if @@ -987,6 +987,24 @@ interface(`apache_read_sys_content',` ######################################## ## +## Search apache system CGI directories. +## +## +## +## Domain allowed access. +## +## +# +interface(`apache_search_sys_scripts',` + gen_require(` + type httpd_sys_content_t, httpd_sys_script_exec_t; + ') + + search_dirs_pattern($1, httpd_sys_content_t, httpd_sys_script_exec_t) +') + +######################################## +## ## Search system script state directory. ## ## @@ -1002,3 +1020,39 @@ interface(`apache_search_sys_script_state',` allow $1 httpd_sys_script_t:dir search_dir_perms; ') + +######################################## +## +## Execute CGI in the specified domain. +## +## +##

+## Execute CGI in the specified domain. +##

+##

+## This is an interface to support third party modules +## and its use is not allowed in upstream reference +## policy. +##

+##
+## +## +## Domain run the cgi script in. +## +## +## +## +## Type of the executable to enter the cgi domain. +## +## +# +interface(`apache_cgi_domain',` + gen_require(` + type httpd_t, httpd_sys_script_exec_t; + ') + + domtrans_pattern(httpd_t, $2, $1) + apache_search_sys_scripts($1) + + allow httpd_t $1:process signal; +') diff --git a/policy/modules/services/apache.te b/policy/modules/services/apache.te index d582fb6..a6395e9 100644 --- a/policy/modules/services/apache.te +++ b/policy/modules/services/apache.te @@ -1,5 +1,5 @@ -policy_module(apache,1.7.0) +policy_module(apache,1.7.1) # # NOTES: