Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1772211 - avc denied { mounton } for pid=1 comm="systemd" path="/etc/machine-id"
Summary: avc denied { mounton } for pid=1 comm="systemd" path="/etc/machine-id"
Status: CLOSED DUPLICATE of bug 1754471
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: armhfp
OS: Linux
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
Reported: 2019-11-13 22:11 UTC by Paul Whalen
Modified: 2019-11-21 16:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-11-21 16:53:59 UTC
Type: Bug

Attachments (Terms of Use)

Description Paul Whalen 2019-11-13 22:11:17 UTC
Description of problem:
ARM and AArch64 disk images have the /etc/machine-id stripped after image creation to ensure each machine has a unique id. 

On first boot this gets recreated by systemd-machine-id-commit, but the selinux context is incorrect and there is a denial:

Oct 10 12:56:40 localhost.localdomain systemd[1]: Installed transient /etc/machine-id file.
Oct 10 12:56:34 localhost.localdomain audit[1]: AVC avc:  denied  { mounton } for  pid=1 comm="systemd" path="/etc/machine-id" dev="mmcblk0p3" ino=7753 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file permissive=1

Version-Release number of selected component (if applicable):

How reproducible:
Everytime, after relabel system boots as expected.

Actual results:
ls -l -Z /etc/machine-id
-rw-r--r--. 1 root root system_u:object_r:etc_t:s0 33 Oct 10 12:56 /etc/machine-id

Expected results:
ls -l -Z /etc/machine-id
-rw-r--r--. 1 root root system_u:object_r:machineid_t:s0 33 Oct 10 12:56 /etc/machine-id

Comment 1 Zdenek Pytela 2019-11-21 16:53:59 UTC
The issue turned out to be different, closing DUPLICATE of bz 1754471 where the picture is more complete.

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

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