Skip to content

Commit b3bb7d8

Browse files
authored
DLPX-86524 CIS: remove non-existent paths from the default PATH variable (#495)
* DLPX-86524 CIS: remove non-existent paths from the default PATH variable PR URL: https://www.github.com/delphix/delphix-platform/pull/495 * DLPX-86524 Update path in /etc/security/pam_env.conf
1 parent 85197a7 commit b3bb7d8

File tree

1 file changed

+20
-0
lines changed
  • files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks

1 file changed

+20
-0
lines changed

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,3 +718,23 @@
718718
name: "nullmailer"
719719
state: "stopped"
720720
when: not ansible_is_chroot
721+
722+
#
723+
# Add the correct path to /etc/security/pam_env.conf and remove any invalid
724+
# paths from /etc/environment to ensure that non-existent paths are not
725+
# included in the global PATH.
726+
#
727+
- lineinfile:
728+
path: /etc/security/pam_env.conf
729+
state: present
730+
regexp: '^\s*PATH\s+DEFAULT='
731+
line: 'PATH DEFAULT=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin'
732+
733+
#
734+
# MIN_UPGRADE_VERSION(28.0.0.0)
735+
# This can be removed once the minimum upgrade version is 28.0.0.0.
736+
#
737+
- lineinfile:
738+
path: /etc/environment
739+
state: absent
740+
regexp: '^\s*PATH\s*='

0 commit comments

Comments
 (0)