Project

General

Profile

Actions

Bug #26497

open

user_secondary_groups reporting can conflict with itself when used in foreach loop

Added by Félix DALLIDET 6 days ago. Updated 5 days ago.

Status:
Pending release
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

The methods promisers are not unique and some states or sub method calls can be non-reevaluated between each method call.
The following techniques will report too many reports for the user_secondary_groups method if not patched:

id: testing_nested_things
name: Testing nested things
version: '1.0'
category: ncf_techniques
items:
  - id: 86add1ca-e0d3-4c03-b8ad-03a2041d8870
    name: Configure Users
    reporting:
      mode: weighted
    items:
      - id: 58d49423-5920-49c4-92d5-764bb6c1a7db
        name: ''
        method: user_present
        params:
          login: ${user.login}
      - id: 5a612551-1f98-407e-8008-fe40fb8f6a8e
        name: ''
        method: user_shell
        params:
          login: ${user.login}
          shell: ${user.shell}
      - id: f0168020-afc1-46bf-a34a-3aad338686ae
        name: ''
        method: user_secondary_groups
        params:
          login: ${user.login}
          groups: ${item.groups}
          force: 'false'
        foreach:
          - groups: wheel
          - groups: sudo
        foreach_name: item
    foreach:
      - login: bob
        shell: /bin/bash
      - login: alice
        shell: /bin/zsh
    foreach_name: user

Actions

Also available in: Atom PDF