Skip to content

Commit

Permalink
fixed VCLD-70-000013 ISSUE vmware#52 of main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
HerbBoy committed Dec 6, 2021
1 parent 3e844f7 commit af4f0df
Showing 1 changed file with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,17 @@

# Title: VAMI must remove all mappings to unused scripts.

- name: VCLD-70-000013 - VAMI must remove all mappings to unused scripts.
- name: VCLD-70-000013 - VAMI must remove all mappings to unused scripts - Part 1 of 2
lineinfile:
path: '{{ var_conf_path }}'
state: present
regexp: '^cgi.assign.*=.*$'
line: cgi.assign = ( ".py" => "/usr/bin/python",
firstmatch: yes
state: absent
regex: '{{ item }}'
with_items:
- 'cgi.assign = \( \".pl\" => \"/usr/bin/perl\",'
- '\".cgi\" => \"/usr/bin/perl\",'
- '\".rb\" => \"/usr/bin/ruby\",'
- '\".erb\" => \"/usr/bin/eruby\",'
- '\".py\" => \"/usr/bin/python\" \)'
tags:
- VCLD-70-000013
- conf
Expand All @@ -311,15 +315,17 @@
when:
- run_conf_set_cgi_assign | bool

- name: VCLD-70-000013 - VAMI must remove all mappings to unused scripts.
lineinfile:
- name: VCLD-70-000013 - VAMI must remove all mappings to unused scripts - Part 2 of 2
blockinfile:
path: '{{ var_conf_path }}'
state: present
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
insertafter: "{{ item.insertafter }}"
with_items:
- { line: ' ".cgi" =>"/usr/bin/python" )', regexp: '^ ".cgi" =>"/usr/bin/python" \)$', insertafter: '^cgi.assign.*=.*$' }
insertafter: "## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini."
block: |
cgi.assign = (
".py" => "/usr/bin/python",
".cgi" => "/usr/bin/python",
# 2
)
tags:
- VCLD-70-000013
- conf
Expand Down

0 comments on commit af4f0df

Please sign in to comment.