Skip to content

Commit

Permalink
Merge "Drop systemd support from nsswitch.conf on RHEL-based distros"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Jul 6, 2020
2 parents 70ffba8 + dc2ddfa commit 22d7ffa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ RUN apt-get update \
{% endif %}

{% if base_distro == 'centos' or base_distro == 'rhel' %}
RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth
RUN sed -ri '/-session(\s+)optional(\s+)pam_systemd.so/d' /etc/pam.d/system-auth \
&& sed -ri '/^[^#]/ s/systemd//g' /etc/nsswitch.conf
{% endif %}

COPY set_configs.py /usr/local/bin/kolla_set_configs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
Drop systemd support from nsswitch.conf on RHEL-based distros. This avoids
unneeded systemd nss lookups inside containers and it also avoids possible
selinux denials when a container bind mounts /run and makes the dbus socket
available inside the container only to be denied by selinux on the host.

0 comments on commit 22d7ffa

Please sign in to comment.