This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2149967 - SELinux labeling for dirsrv files seen during ipa install/uninstall should be moved to DEBUG.
Summary: SELinux labeling for dirsrv files seen during ipa install/uninstall should be...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.10
Assignee: mreynolds
QA Contact: LDAP QA Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-01 13:32 UTC by Sudhir Menon
Modified: 2023-09-19 15:13 UTC (History)
8 users (show)

Fixed In Version: 389-ds-1.4-820230816162424-17499975
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-19 15:13:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker IDMDS-2995 0 None None None 2023-05-04 05:18:28 UTC
Red Hat Issue Tracker   RHEL-5143 0 None Migrated None 2023-09-19 15:13:02 UTC
Red Hat Issue Tracker RHELPLAN-141036 0 None None None 2022-12-01 13:41:02 UTC

Description Sudhir Menon 2022-12-01 13:32:15 UTC
Description of problem: SELinux labeling for dirsrv files seen during ipa install should be moved to DEBUG.

Version-Release number of selected component (if applicable):
ipa-server-4.9.10-8.module+el8.8.0+17351+9a3fb056.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install IPA server. Check the message displayed on the console.
2. Uninstall IPA server

Actual results:

---IPA Install---
Perform SELinux labeling ...
Setting label dirsrv_var_lib_t in seLinux file context /var/lib/dirsrv/slapd-TESTRELM-TEST/bak.
Setting label dirsrv_config_t in seLinux file context /etc/dirsrv/slapd-TESTRELM-TEST.
Setting label dirsrv_var_lib_t in seLinux file context /var/lib/dirsrv/slapd-TESTRELM-TEST/db.
Setting label dirsrv_var_lib_t in seLinux file context /var/lib/dirsrv/slapd-TESTRELM-TEST/ldif.
Setting label dirsrv_var_lock_t in seLinux file context /var/run/lock/dirsrv/slapd-TESTRELM-TEST.
Setting label dirsrv_var_log_t in seLinux file context /var/log/dirsrv/slapd-TESTRELM-TEST.
Setting label dirsrv_tmpfs_t in seLinux file context /dev/shm/slapd-TESTRELM-TEST.
Setting label dirsrv_var_run_t in seLinux file context /var/run/dirsrv.
Setting label dirsrv_config_t in seLinux file context /etc/dirsrv/slapd-TESTRELM-TEST/schema.

---IPA Uninstall---
Unconfiguring directory server
Removing seLinux file context /dev/shm/slapd-TESTRELM-TEST with label dirsrv_tmpfs_t.
Removing seLinux file context /etc/dirsrv/slapd-TESTRELM-TEST with label dirsrv_config_t.
Removing seLinux file context /etc/dirsrv/slapd-TESTRELM-TEST/schema with label dirsrv_config_t.
Removing seLinux file context /var/lib/dirsrv/slapd-TESTRELM-TEST/bak with label dirsrv_var_lib_t.
Removing seLinux file context /var/lib/dirsrv/slapd-TESTRELM-TEST/db with label dirsrv_var_lib_t.
Removing seLinux file context /var/lib/dirsrv/slapd-TESTRELM-TEST/ldif with label dirsrv_var_lib_t.
Removing seLinux file context /var/log/dirsrv/slapd-TESTRELM-TEST with label dirsrv_var_log_t.
Removing seLinux file context /var/run/dirsrv with label dirsrv_var_run_t.
Removing seLinux file context /var/run/lock/dirsrv/slapd-TESTRELM-TEST with label dirsrv_var_lock_t.

Expected results:
The above information should be part of DEBUG rather than INFO.

Additional info:

Comment 1 Alexander Bokovoy 2022-12-01 13:39:28 UTC
Any reason why it should be under 'debug'?

It is generated by the 389-ds code as a part of other operations. We have no control of the level here. If we'd move the whole output that 389-ds generates to DEBUG, it will apply to every single line, not just these ones.

I think it is either an invalid request or it should be moved to 389-ds.

Comment 2 Rob Crittenden 2022-12-01 13:49:32 UTC
Yes, seems like a side-effect of a change in 389-ds. Re-assigning component to see if there is a way to suppress this output.

Comment 3 Florence Blanc-Renaud 2022-12-01 13:52:35 UTC
The root cause is here:
https://github.com/389ds/389-ds-base/blob/389-ds-base-1.4.3/src/lib389/lib389/utils.py#L283-L312
            log.info(f"Setting label {label} in seLinux file context {path}.")

Note that in the main branch, the message is logged with debug level instead of info level:
https://github.com/389ds/389-ds-base/blob/main/src/lib389/lib389/utils.py#L288-L317
            log.debug(f"Setting label {label} in SELinux file context {path}.")

Comment 4 Viktor Ashirov 2023-07-19 14:21:40 UTC
This was fixed as part of https://github.com/389ds/389-ds-base/pull/5525, perhaps a separate backport just for log messages should be done.

Comment 5 Viktor Ashirov 2023-07-24 15:21:28 UTC
Mark, I'm still seeing this in 389-ds-base-1.4.3.36-1.module+el8.9.0+19111+92b42fe2.x86_64:

# grep -i log.info /usr/lib/python3.6/site-packages/lib389/utils.py | grep -i selinux
            log.info('selinux is disabled, will not relabel ports or files.' )
        log.info(f"Removing seLinux file context {path} with label {local[path]}.")
            log.info(f"Setting label {label} in seLinux file context {path}.")

Comment 9 Viktor Ashirov 2023-08-21 12:57:12 UTC
Build tested:
389-ds-base-1.4.3.37-1.module+el8.9.0+19689+7d653af8.x86_64

# grep -i log.info /usr/lib/python3.6/site-packages/lib389/utils.py | grep -i selinux
            log.info('selinux is disabled, will not relabel ports or files.' )
        log.info(f"Removing seLinux file context {path} with label {local[path]}.")
            log.info(f"Setting label {label} in seLinux file context {path}.")

Still seeing this during installation:

Setting label dirsrv_var_lib_t in seLinux file context /var/lib/dirsrv/slapd-localhost/bak.
Setting label dirsrv_config_t in seLinux file context /etc/dirsrv/slapd-localhost.
Setting label dirsrv_var_lib_t in seLinux file context /var/lib/dirsrv/slapd-localhost/db.
Setting label dirsrv_var_lib_t in seLinux file context /var/lib/dirsrv/slapd-localhost/ldif.
Setting label dirsrv_var_lock_t in seLinux file context /var/run/lock/dirsrv/slapd-localhost.
Setting label dirsrv_var_log_t in seLinux file context /var/log/dirsrv/slapd-localhost.
Setting label dirsrv_tmpfs_t in seLinux file context /dev/shm/slapd-localhost.
Setting label dirsrv_var_run_t in seLinux file context /var/run/dirsrv.
Setting label dirsrv_config_t in seLinux file context /etc/dirsrv/slapd-localhost/schema.

Moving to ASSIGNED.

Comment 10 RHEL Program Management 2023-09-19 15:12:22 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 11 RHEL Program Management 2023-09-19 15:13:02 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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