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 1978507 - systemd[1]: Failed to remove "/run/systemd/default-hostname": Permission denied
Summary: systemd[1]: Failed to remove "/run/systemd/default-hostname": Permission denied
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: beta
: 9.0 Beta
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-02 02:50 UTC by Frank Liang
Modified: 2021-12-07 21:37 UTC (History)
11 users (show)

Fixed In Version: selinux-policy-34.1.14-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 21:35:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1966492 1 medium CLOSED SELinux prevents systemd-hostnamed from removing the /run/systemd/default-hostname file 2023-05-27 08:17:56 UTC

Description Frank Liang 2021-07-02 02:50:27 UTC
Description of problem:
Fount below deny log in aws test RHEL-9.0.0-20210701.1(selinux-policy-34.1.9-1.el9.noarch) testing.

Jul 01 09:01:27 ip-10-22-1-103.us-west-2.compute.internal systemd[1]: Hostname set to <ip-10-22-1-103.us-west-2.compute.internal>.
Jul 01 09:01:27 ip-10-22-1-103.us-west-2.compute.internal systemd[1]: Failed to remove "/run/systemd/default-hostname": Permission denied
Jul 01 09:01:27 ip-10-22-1-103.us-west-2.compute.internal kernel: random: lvmconfig: uninitialized urandom read (4 bytes read)

Jul 01 08:58:46 ip-10-22-1-103.us-west-2.compute.internal audit: MAC_STATUS enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295 enabled=1 old-enabled=1 lsm=selinux res=1
Jul 01 08:58:46 ip-10-22-1-103.us-west-2.compute.internal audit: MAC_POLICY_LOAD auid=4294967295 ses=4294967295 lsm=selinux res=1
Jul 01 08:58:46 ip-10-22-1-103.us-west-2.compute.internal audit[1]: AVC avc:  denied  { unlink } for  pid=1 comm="systemd" name="default-hostname" dev="tmpfs" ino=12 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:hostname_etc_t:s0 tclass=file permissive=0

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

RHEL Version:
RHEL-9.0(5.13.0-0.rc7.51.el9.x86_64)

How reproducible:
100%

Steps to Reproduce:
1. start the latest RHEL-9 d3en.xlarge instance
2. check journal log
Actual results:
avd dennied log found

Expected results:
no such error

Additional info:
N/A

Comment 2 Martin Pitt 2021-08-07 05:32:14 UTC

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

Comment 3 Frank Liang 2021-08-09 03:20:28 UTC
bz1966492 was fixed and verified in selinux-policy-34.1.7-1.el9.
As my comments in bz1966492, this one is found in newer version and still exists in selinux-policy-34.1.10-1.el9.
So could you explain more about why they are the same? thanks

Comment 5 Martin Pitt 2021-08-09 05:08:18 UTC
Frank: Fair enough, sorry. Bug 1966492 has exactly the same file and operation in the title, but I see that in its comments it talks about a grab bag of related issues. I'll let the SELinux policy maintainers sort this out then.

Comment 7 Zdenek Pytela 2021-08-24 19:38:13 UTC
I've submitted a Fedora PR to address the issue:
https://github.com/fedora-selinux/selinux-policy/pull/848


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