Skip to content

Commit

Permalink
Enable script_security in keepalived
Browse files Browse the repository at this point in the history
When `enable_script_security` is not present in keepalived.conf,
the daemon will print a warning in the journal:

    SECURITY VIOLATION - scripts are being executed but
    script_security not enabled.

This patch enables script security which ensures that a non-root
user cannot maliciously alter a script that keepalived may be running
as root.

This fixes Launchpad bug 1742487:

  https://bugs.launchpad.net/openstack-ansible/+bug/1742487
  • Loading branch information
major committed Jan 18, 2018
1 parent e38bcf0 commit d9f1f21
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ cache_timeout: 600
keepalived_instances: []
keepalived_sync_groups: {}
keepalived_bind_on_non_local: False

# This list of strings will appear in the global_defs section of the
# keepalived configuration file.
keepalived_global_defs: []
8 changes: 8 additions & 0 deletions templates/keepalived.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

{% if keepalived_global_defs is defined %}
global_defs {
{% for def in keepalived_global_defs %}
{{ def }}
{% endfor %}
}
{% endif %}

{% for name, sync_group in keepalived_sync_groups.items() %}
vrrp_sync_group {{ name }} {
group {
Expand Down

0 comments on commit d9f1f21

Please sign in to comment.