Bug 1471392 - SELinux is preventing gsd-power from 'read' accesses on the lnk_file /var/lib/dbus/machine-id.
SELinux is preventing gsd-power from 'read' accesses on the lnk_file /var/lib...
Status: CLOSED DUPLICATE of bug 1467036
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
26
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:7cbd1a78bc1d6fb31a6969c14f8...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-15 11:08 EDT by Szőke Károly
Modified: 2017-07-25 08:52 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-16 07:09:02 EDT
Type: ---
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 Szőke Károly 2017-07-15 11:08:35 EDT
Description of problem:
1.) I created this docker-compose file:
version: '3'

services:
  mariadb:
    image: mariadb
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: xxx
      MYSQL_DATABASE: xxx
      MYSQL_USER: xxx
      MYSQL_PASSWORD: xxx
    volumes:
      - mariadb:/var/lib/mysql:Z
      - ./db:/docker-entrypoint-initdb.d:Z

volumes:
  mariadb:

2.) run this command:
docker-compose up

3.) result was:
...exited with code 139

When I switched off SELinux, the docker container started successfully.
SELinux is preventing gsd-power from 'read' accesses on the lnk_file /var/lib/dbus/machine-id.

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

If ha úgy érzi, hogy gsd-power számára engedélyezni kell read hozzáférést itt: machine-id lnk_file alapértelmezésben.
Then ezt jelentenie kell, mint hibát.
Hogy engedélyezze ezt a hozzáférést előállíthat egy helyi szabálymodult.
Do
allow this access for now by executing:
# ausearch -c 'gsd-power' --raw | audit2allow -M my-gsdpower
# semodule -X 300 -i my-gsdpower.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:system_dbusd_var_lib_t:s0
Target Objects                /var/lib/dbus/machine-id [ lnk_file ]
Source                        gsd-power
Source Path                   gsd-power
Port                          <Ismeretlen>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-259.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.9-300.fc26.x86_64 #1 SMP Wed
                              Jul 5 16:21:56 UTC 2017 x86_64 x86_64
Alert Count                   16
First Seen                    2017-07-15 11:00:47 CEST
Last Seen                     2017-07-15 16:46:40 CEST
Local ID                      3db7bae2-430c-4cca-88af-f1bd78228f3e

Raw Audit Messages
type=AVC msg=audit(1500130000.984:252): avc:  denied  { read } for  pid=1547 comm="ibus-x11" name="machine-id" dev="dm-0" ino=1444842 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:system_dbusd_var_lib_t:s0 tclass=lnk_file permissive=0


Hash: gsd-power,xdm_t,system_dbusd_var_lib_t,lnk_file,read

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

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

Potential duplicate: bug 1467515
Comment 1 René Harder Olsen 2017-07-15 19:30:31 EDT
Description of problem:
I shut the lit the computer and it went into suspend move after opening the computer resumed it work and came the selinux error.

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.9-300.fc26.x86_64
type:           libreport
Comment 2 Daniel Walsh 2017-07-16 07:09:02 EDT
THis avc has nothing to do with the docker-compose.  Totally different issue which is being worked on.
Comment 3 Geoff Ericksson 2017-07-19 06:32:38 EDT
Description of problem:
Plugged power cable into laptop

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.9-300.fc26.x86_64
type:           libreport
Comment 4 René Harder Olsen 2017-07-21 07:27:29 EDT
Description of problem:
I close the lit on my thinkpad T400 and when I open it again the selinux warnings pop up.

Version-Release number of selected component:
selinux-policy-3.13.1-260.1.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.10-300.fc26.x86_64
type:           libreport
Comment 5 Alexandre Fournier 2017-07-21 10:37:32 EDT
Description of problem:
I unplugged my laptop.

Version-Release number of selected component:
selinux-policy-3.13.1-260.1.fc26.noarch

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.10-300.fc26.x86_64
type:           libreport
Comment 6 Daniel Walsh 2017-07-25 08:52:17 EDT

*** This bug has been marked as a duplicate of bug 1467036 ***

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