Skip to contentSkip to conversation

Allow postgresql to connect to his unix_stream_socket

PATCH New Sven Vermeulen 2 participants 2 messages Mar 9, 2011 – Mar 22, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 13/15 Allow postgresql to connect to his unix_stream_socket

Required in order to start postgresql and test activities with psql command.

---
 policy/modules/services/postgresql.te |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
policy/modules/services/postgresql.te +1 -1
index 8ed5067..77e6ca2 100644
@@ -205,7 +205,7 @@ allow postgresql_t self:shm create_shm_perms;
 allow postgresql_t self:tcp_socket create_stream_socket_perms;
 allow postgresql_t self:udp_socket create_stream_socket_perms;
 allow postgresql_t self:unix_dgram_socket create_socket_perms;
-allow postgresql_t self:unix_stream_socket create_stream_socket_perms;
+allow postgresql_t self:unix_stream_socket { connectto create_stream_socket_perms };
 allow postgresql_t self:netlink_selinux_socket create_socket_perms;
 
 allow postgresql_t sepgsql_database_type:db_database *;
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 13/15 Allow postgresql to connect to his unix_stream_socket

Quoted 1 line · Sven Vermeulen

Required in order to start postgresql and test activities with psql command.

Sounds like psql needs its own domain. Especially in light of patch 14.

Quoted 18 lines
---
 policy/modules/services/postgresql.te |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
policy/modules/services/postgresql.te +1 -1
index 8ed5067..77e6ca2 100644
@@ -205,7 +205,7 @@ allow postgresql_t self:shm create_shm_perms;
 allow postgresql_t self:tcp_socket create_stream_socket_perms;
 allow postgresql_t self:udp_socket create_stream_socket_perms;
 allow postgresql_t self:unix_dgram_socket create_socket_perms;
-allow postgresql_t self:unix_stream_socket create_stream_socket_perms;
+allow postgresql_t self:unix_stream_socket { connectto create_stream_socket_perms };
 allow postgresql_t self:netlink_selinux_socket create_socket_perms;
 
 allow postgresql_t sepgsql_database_type:db_database *;
Signature · 3 lines
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com