Bug 1276957 - SELinux is preventing /usr/bin/env from search access on the directory /.
SELinux is preventing /usr/bin/env from search access on the directory /.
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
7.1
All Linux
unspecified Severity urgent
: rc
: ---
Assigned To: Lukas Vrabec
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-01 13:11 EST by Brian J. Murrell
Modified: 2016-03-17 07:57 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-17 07:57:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Brian J. Murrell 2015-11-01 13:11:46 EST
SELinux is preventing /usr/bin/env from search access on the directory /.

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

If you believe that env should be allowed search access on the  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 prosodyctl /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:prosody_t:s0
Target Context                system_u:object_r:autofs_t:s0
Target Objects                / [ dir ]
Source                        prosodyctl
Source Path                   /usr/bin/env
Port                          <Unknown>
Host                          server.interlinx.bc.ca
Source RPM Packages           coreutils-8.22-11.el7.x86_64
Target RPM Packages           filesystem-3.2-18.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-23.el7_1.17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     server.interlinx.bc.ca
Platform                      Linux server.interlinx.bc.ca
                              3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6
                              01:06:18 UTC 2015 x86_64 x86_64
Alert Count                   47
First Seen                    2015-11-01 08:52:03 EST
Last Seen                     2015-11-01 10:56:53 EST
Local ID                      17051d3f-be91-4ef6-8cec-e0b689075c61

Raw Audit Messages
type=AVC msg=audit(1446393413.31:33624): avc:  denied  { search } for  pid=17716 comm="prosodyctl" name="/" dev="autofs" ino=397913687 scontext=system_u:system_r:prosody_t:s0 tcontext=system_u:object_r:autofs_t:s0 tclass=dir


type=SYSCALL msg=audit(1446393413.31:33624): arch=x86_64 syscall=execve success=no exit=EACCES a0=7ffd192c6663 a1=7ffd192c6850 a2=7ffd192c6870 a3=7ffd192c64a0 items=0 ppid=1 pid=17716 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=prosodyctl exe=/usr/bin/env subj=system_u:system_r:prosody_t:s0 key=(null)

Hash: prosodyctl,prosody_t,autofs_t,dir,search
Comment 2 Miroslav Grepl 2015-11-02 02:48:28 EST
Brian,
could you try to add the following local policy to see if it works?

$ cat myprosody.te
policy_module(myprosody,1.0)

require{
 type prosody_t;
}

fs_search_auto_mountpoints(prosody_t)


and run

# make -f /usr/share/selinux/devel/Makefile myprosody.pp
# semodule -i myprosody.pp

Thank you.
Comment 3 Brian J. Murrell 2015-11-02 07:31:54 EST
Actually, TBH, I gave up on Prosody and went back to Jabberd so I don't have anywhere to test that fix.

Unless somebody else wants to follow up on that, or if I change my mind in the future and go back to Prosody, you can close this.
Comment 4 Lukas Vrabec 2016-03-17 07:57:45 EDT
I cannot reproduce this issue. 
Closing this as insufficient data.

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