Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437222 - sec-policy/selinux-postgresql-2.20120725-r5: postgresql_stream_connect doesn't give access to /run/postgresql
Summary: sec-policy/selinux-postgresql-2.20120725-r5: postgresql_stream_connect doesn'...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard: sec-policy r6
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-04 18:25 UTC by Vincent Brillault
Modified: 2012-12-13 10:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Brillault 2012-10-04 18:25:02 UTC
The current postgresql_stream_connect interface doesn't seem to give the right to go through /run/postgresql (system_u:object_r:postgresql_var_run_t), where the socket is.

AVC example:
Sep 27 21:58:31 *** kernel: [429002.515051] type=1400 audit(1348775911.015:593): avc:  denied  { search } for  pid=26462 comm="php-fpm" name="postgresql" dev="tmpfs" ino=4852 scontext=system_u:system_r:phpfpm_t tcontext=system_u:object_r:postgresql_var_run_t tclass=dir


I've fixed this on my server by adding individual rules per domains that need it:
allow $1 postgresql_var_run_t:dir search;
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2012-10-06 21:04:46 UTC
Submitted upstream [1], if there's no quick action on it nor specific feedback, I'll apply to our repository and hope it'll get applied later ;)

[1] http://oss.tresys.com/pipermail/refpolicy/2012-October/005804.html
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2012-10-10 19:54:44 UTC
Accepted and committed upstream, and our repository is now sync'ed as well. Will also be part of the r6 release
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2012-11-03 17:35:59 UTC
In hardened-dev, r6 release
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2012-11-18 15:25:46 UTC
In main tree, ~arch'ed
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2012-12-13 10:09:20 UTC
r8 is now stable