RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 994483 - SELinux is preventing /usr/bin/mkdir from 'create' accesses on the directory pluto.
Summary: SELinux is preventing /usr/bin/mkdir from 'create' accesses on the directory ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard: abrt_hash:e832823612792897f87af743825...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-07 11:23 UTC by Gerd Hoffmann
Modified: 2014-06-18 02:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:01:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gerd Hoffmann 2013-08-07 11:23:37 UTC
Description of problem:
try start ipsec vpn connection
SELinux is preventing /usr/bin/mkdir from 'create' accesses on the directory pluto.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that mkdir should be allowed create access on the pluto directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep mkdir /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:ipsec_mgmt_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                pluto [ dir ]
Source                        mkdir
Source Path                   /usr/bin/mkdir
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.21-11.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-56.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-6.el7.x86_64 #1 SMP Tue Aug
                              6 17:22:48 EDT 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-07 13:13:26 CEST
Last Seen                     2013-08-07 13:13:26 CEST
Local ID                      90a67b3a-bbac-4659-9474-72e7f2378355

Raw Audit Messages
type=AVC msg=audit(1375874006.489:497): avc:  denied  { create } for  pid=2921 comm="mkdir" name="pluto" scontext=system_u:system_r:ipsec_mgmt_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=dir


type=SYSCALL msg=audit(1375874006.489:497): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7fff98d4beb0 a1=1ed a2=1ed a3=3f363bacac items=0 ppid=2918 pid=2921 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=mkdir exe=/usr/bin/mkdir subj=system_u:system_r:ipsec_mgmt_t:s0 key=(null)

Hash: mkdir,ipsec_mgmt_t,var_run_t,dir,create

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.10.0-6.el7.x86_64
type:           libreport

Comment 2 Miroslav Grepl 2013-08-08 11:42:35 UTC
Could you test it with the latest policy builds.

Comment 3 Gerd Hoffmann 2013-08-08 12:30:05 UTC
Retested with selinux-policy-3.12.1-69.el7.noarch, still happens.

Comment 4 Miroslav Grepl 2013-08-08 13:15:00 UTC
If you switch to permissive and run

# ls -dZ /run/pluto

what does it show?

Comment 5 Gerd Hoffmann 2013-08-09 06:34:46 UTC
[root@nilsson ~]# ls -dZ /run/pluto
drwx------. root root system_u:object_r:var_run_t:s0   /run/pluto

Comment 6 Gerd Hoffmann 2013-08-09 06:39:57 UTC
Grabbed libreswan-3.5-1.el7.x86_64 (which will replace openswan in rhel7 according to tech-list) from brew, tried again, same result.

Comment 7 Miroslav Grepl 2013-08-19 10:22:01 UTC
# restorecon -R -v /run/pluto

will fix it.

commit d55febf21b41bb0b430dc1bcc81759e085aba9a9
Author: Miroslav Grepl <mgrepl>
Date:   Mon Aug 19 12:19:50 2013 +0200

    Make sure /run/pluto dir is created with correct labeling

Comment 9 Ludek Smid 2014-06-13 11:01:32 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.