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 1251526 - ipa-client/server-install should not execute daemons directly
Summary: ipa-client/server-install should not execute daemons directly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks: 1251212
TreeView+ depends on / blocked
 
Reported: 2015-08-07 15:05 UTC by Jiri Jaburek
Modified: 2020-09-01 11:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-01 11:01:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1251212 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1251212

Description Jiri Jaburek 2015-08-07 15:05:17 UTC
Description of problem:

The ipa-client-install seems to execute at least ntpd and sshd directly - in the case of ntpd, it's on a custom config file in /tmp, in case of sshd, it's to check "dynamically loading authorized user keys" support.

This causes various issues with selinux - not only it doesn't work under the MLS policy (sysadm_r role), it has a potential to break things in the targeted policy as well - ie. by creating pid/lock/log files as unconfined_t.

The only supported (AFAIK) way to run daemons is via sysvinit / systemd where the daemon is executed with correct context according to appropriate selinux transition rules. Anything else (even a simple daemon --help) can cause issues.

Therefore please modify the ipa-*-install scripts to only interact with services/daemons using service(8) or systemctl(1).

Example alternatives covering the use cases currently used by ipa-client-install:

- ntpd: modify /etc/ntpd.conf directly, if you need to do only one-time synchronization, use ntpdate, if you need to just check if a NTP server is working, use 'ntpdate -q'

- sshd: modify /etc/ssh/ssh(d)_config directly, restart sshd and see if it fails on missing support - the live ssh sessions won't be killed on sshd restart

I've also noticed ipa-client-install has 'services' and 'services.knownservices' classes - these also need to use service(8)/systemctl(1) if they aren't using it already.


Version-Release number of selected component (if applicable):
ipa-client-4.1.0-18.el7

How reproducible:
always

Steps to Reproduce:
1. switch the system to selinux-policy-mls (see RH knowledgebase, RHEL7 / "SELinux User's and Administrator's Guide", section 4.11.2)
2. semodule -d sysadm_secadm
3. login under the sysadm_r role
4. try ipa-client-install

Actual results:
ipa-*-install executes services/daemons directly

Expected results:
ipa-*-install uses service(8) or systemctl(1) to launch daemons

Additional info:
Upgrading to ipa-4.2.0-3.el7 still shows the same issue.

Comment 1 Petr Vobornik 2015-08-11 14:34:24 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/5203

Comment 2 Petr Vobornik 2017-04-06 16:21:14 UTC
IdM team doesn't have capacity to fix this bug for RHEL 7.4. Moving to next RHEL version. Fixing the bug there will depend on capacity of FreeIPA upstream. Without sufficient  justification there is a chance that it will be moved again later.

Comment 6 Alexander Bokovoy 2020-09-01 11:01:24 UTC
RHEL 8 includes FreeIPA 4.8 which has already rewritten NTP configuration management and now addresses all services through `systemctl ..` commands.
This bug is therefore already fixed.


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