Skip to contentSkip to conversation

CGI scripts/PostgreSQL stream connect

PATCH In review KaiGai Kohei 2 participants 2 messages Jun 23, 2008 – Jun 25, 2008 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CGI scripts/PostgreSQL stream connect

The attached patch allows CGI scripts to connect PostgreSQL via unix domain socket, as MySQL doing.

Please apply it.

Thanks,

Signature · 2 lines
OSS Platform Development Division, NEC
KaiGai Kohei <[email protected]>
policy/modules/services/apache.te +8 -0
Index: refpolicy/policy/modules/services/apache.te
===================================================================
@@ -559,6 +559,10 @@
 ')
 
 optional_policy(`
+	postgresql_stream_connect(httpd_php_t)
+')
+
+optional_policy(`
 	nis_use_ypbind(httpd_php_t)
 ')
 
@@ -703,6 +707,10 @@
 	mysql_rw_db_sockets(httpd_sys_script_t)
 ')
 
+optional_policy(`
+	postgresql_stream_connect(httpd_sys_script_t)
+')
+
 ########################################
 #
 # httpd_rotatelogs local policy
#1 lore raw
Quoted 2 lines · KaiGai Kohei

The attached patch allows CGI scripts to connect PostgreSQL via unix domain socket, as MySQL doing.

Merged.

Quoted 37 lines

differences
between files
attachment
(refpolicy-cgi-pgsql-stream.patch)

Index: refpolicy/policy/modules/services/apache.te
===================================================================

policy/modules/services/apache.te (working copy) renamed from policy/modules/services/apache.te (revision 2727) +8 -0
@@ -559,6 +559,10 @@
 ')
 
 optional_policy(`
+       postgresql_stream_connect(httpd_php_t)
+')
+
+optional_policy(`
        nis_use_ypbind(httpd_php_t)
 ')
 
@@ -703,6 +707,10 @@
        mysql_rw_db_sockets(httpd_sys_script_t)
 ')
 
+optional_policy(`
+       postgresql_stream_connect(httpd_sys_script_t)
+')
+
 ########################################
 #
 # httpd_rotatelogs local policy
Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.