Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v1.14.7
  • v1.14.6
  • v1.14.5
  • v1.14.4
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.4
21 results

ipahbacrule.py

  • Rafael Guterres Jeffman's avatar
    cf54d139
    Fixes attempt to create rules with members when category is `all`. · cf54d139
    Rafael Guterres Jeffman authored
    Current implementation of hbacrule and sudorule allow for a new rule
    creation script to be partialy successful when a member is provided and
    the respective member category is set to `all` (either users, hosts,
    services, commands, and their group counterparts).
    
    Since the creation of the rule is independent of the adittion of members,
    the rule is succesfully created, but member addition fails, leaving with
    a created rule that has no members on it.
    
    This patch fixes both modules by verifying if user, host, service or
    commands (and groups of members) are being added if the corresponding
    category is set to `all`, when the state is `present` and the action is
    not `member`. If so, it fails before the rule is created.
    cf54d139
    History
    Fixes attempt to create rules with members when category is `all`.
    Rafael Guterres Jeffman authored
    Current implementation of hbacrule and sudorule allow for a new rule
    creation script to be partialy successful when a member is provided and
    the respective member category is set to `all` (either users, hosts,
    services, commands, and their group counterparts).
    
    Since the creation of the rule is independent of the adittion of members,
    the rule is succesfully created, but member addition fails, leaving with
    a created rule that has no members on it.
    
    This patch fixes both modules by verifying if user, host, service or
    commands (and groups of members) are being added if the corresponding
    category is set to `all`, when the state is `present` and the action is
    not `member`. If so, it fails before the rule is created.