Skip to content

DLPX-86524 CIS: remove non-existent paths from the default PATH variable #495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -718,3 +718,23 @@
name: "nullmailer"
state: "stopped"
when: not ansible_is_chroot

#
# Add the correct path to /etc/security/pam_env.conf and remove any invalid
# paths from /etc/environment to ensure that non-existent paths are not
# included in the global PATH.
#
- lineinfile:
path: /etc/security/pam_env.conf
state: present
regexp: '^\s*PATH\s+DEFAULT='
line: 'PATH DEFAULT=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin'

#
# MIN_UPGRADE_VERSION(28.0.0.0)
# This can be removed once the minimum upgrade version is 28.0.0.0.
#
- lineinfile:
path: /etc/environment
state: absent
regexp: '^\s*PATH\s*='
Loading