| Summary: | postgresql initdb problems with unconfined disabled | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Robin Powell <rlpowell> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | dominick.grift, dwalsh, mgrepl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-3.9.16-39.fc15 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-10-06 00:03:05 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Could you add me your output of grep mkdir /etc/init.d/postgresql Lets just change postgresql_manage_db to the following. # interface(`postgresql_manage_db',` gen_require(` type postgresql_db_t; ') manage_dirs_pattern($1, postgresql_db_t, postgresql_db_t) manage_files_pattern($1, postgresql_db_t, postgresql_db_t) manage_lnk_files_pattern($1, postgresql_db_t, postgresql_db_t) ') I checked this change into F16, should be back ported to RHEL6. I suppose it doesn't matter anymore, but since you asked:
rlpowell@morji> sudo grep mkdir /etc/init.d/postgresql
mkdir -p "$PGDATA" || return 1
mkdir "$PGDATA/pg_log"
-Robin
Robin, thanks. I will add a patch from F16 which Dan added. selinux-policy-3.9.16-39.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15 Package selinux-policy-3.9.16-39.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-39.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-39.fc15 then log in and leave karma (feedback). selinux-policy-3.9.16-39.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |
Running "sudo /etc/init.d/postgresql initdb" gives this: type=AVC msg=audit(1313902281.411:164863): avc: denied { create } for pid=28395 comm="mkdir" name="pg_log" scontext=staff_u:system_r:initrc_t:s0 tcontext=staff_u:object_r:postgresql_db_t:s0 tclass=dir type=AVC msg=audit(1313902281.424:164865): avc: denied { setattr } for pid=28396 comm="chown" name="pg_log" dev=vda2 ino=153795 scontext=staff_u:system_r:initrc_t:s0 tcontext=staff_u:object_r:postgresql_db_t:s0 tclass=dir -Robin