--- policy.orig/macros/program/apache_macros.te 2004-11-21 17:40:33.172772088 -0500 +++ policy/macros/program/apache_macros.te 2004-11-21 17:43:34.077270424 -0500 @@ -115,14 +115,20 @@ domain_auto_trans(httpd_t, httpdcontent, httpd_sys_script_t) domain_auto_trans(httpd_suexec_t, httpdcontent, httpd_sys_script_t) domain_auto_trans(sysadm_t, httpdcontent, httpd_sys_script_t) -create_dir_file(httpd_t, httpdcontent) ', ` -create_dir_file(httpd_$1_script_t, httpdcontent) can_exec(httpd_$1_script_t, httpdcontent ) domain_auto_trans($1_t, httpdcontent, httpd_$1_script_t) ') } +if(httpd_content_writable){ +ifelse($1,sys,` +create_dir_file(httpd_t,httpdcontent) +',` +create_dir_file(httpd_$1_script_t,httpdcontent) +') +} + ifelse($1, sys, ` # # If a user starts a script by hand it gets the proper context