Bug 1480584 - SELinux is preventing chpasswd from using the 'sys_chroot' capabilities.
SELinux is preventing chpasswd from using the 'sys_chroot' capabilities.
Status: NEW
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-08-11 08:29 EDT by Jiri Konecny
Modified: 2017-08-11 08:29 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jiri Konecny 2017-08-11 08:29:05 EDT
Description of problem:
I'm getting this when I'm running Anaconda tests in mock chroot environment.


Steps to reproduce:
1) Clone Anaconda
2) cd anaconda && ./autogen.sh && ./configure
3) make isolated-ci

This will run tests in the mock environment. Nosetest in the mock environment causing this issue.
SELinux is preventing chpasswd from using the 'sys_chroot' capabilities.

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

If you believe that chpasswd should have the sys_chroot capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c 'chpasswd' --raw | audit2allow -M my-chpasswd
# semodule -X 300 -i my-chpasswd.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023
Target Context                unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023
Target Objects                Unknown [ capability ]
Source                        chpasswd
Source Path                   chpasswd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-260.3.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.11-300.fc26.x86_64 #1 SMP Mon
                              Jul 17 16:32:11 UTC 2017 x86_64 x86_64
Alert Count                   143
First Seen                    2017-07-12 09:51:33 CEST
Last Seen                     2017-08-11 14:17:48 CEST
Local ID                      525a6b45-207d-4ca5-b6e6-276dc4ff8fde

Raw Audit Messages
type=AVC msg=audit(1502453868.905:873): avc:  denied  { sys_chroot } for  pid=6406 comm="chage" capability=18  scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tclass=capability permissive=0

Hash: chpasswd,passwd_t,passwd_t,capability,sys_chroot

Version-Release number of selected component:

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.11-300.fc26.x86_64
type:           libreport

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