Skip to content
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

[BUG] regression for user.present on handling groups with dupe GIDs #64430

Closed
nicholasmhughes opened this issue Jun 6, 2023 · 0 comments · Fixed by #64431
Closed

[BUG] regression for user.present on handling groups with dupe GIDs #64430

nicholasmhughes opened this issue Jun 6, 2023 · 0 comments · Fixed by #64431
Assignees
Labels
Bug broken, incorrect, or confusing behavior Regression The issue is a bug that breaks functionality known to work in previous releases.

Comments

@nicholasmhughes
Copy link
Collaborator

Description
There are certain scenarios, such as the SLS shown below, prior to 3006.x (tested 3004.2) where membership in groups which happen to have duplicate GIDs with other group names would result in a "clean" run because membership in one of the duped GIDs was found. This seems to be broken while testing 3006.x in our operational environment.

An SLS file such as this:

susan:
  user.present:
    - name: susan
    - gid: 1000
    - home: /home/susan
    - groups:
      - sooooosan
    - allow_gid_change: true
    - allow_uid_change: false
    - optional_groups: []

in a scenario where duplicate group membership is as follows:

# grep ":1000:" /etc/group
debian:x:1000:
sooooosan:x:1000:susan

now results in an error message in 3006.x due to a change in how duplicate groups are checked. Further checking of duplicate group IDs will be necessary to fix this regression.

[ERROR   ] These values could not be changed: {'groups': ['sooooosan']}
local:
----------
          ID: susan
    Function: user.present
      Result: False
     Comment: These values could not be changed: {'groups': ['sooooosan']}
     Started: 18:11:46.418971
    Duration: 32.915 ms
     Changes:   

Summary for local
------------
Succeeded: 0
Failed:    1
------------

Expected behavior
Changes shouldn't be reported for duplicate groups in the checks performed, since the effective GID is appropriate for group membership.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3007.0+0na.692447e
 
Python Version:
        Python: 3.7.3 (default, Oct 31 2022, 14:04:00)
 
Dependency Versions:
          cffi: 1.15.1
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.2
       libgit2: Not Installed
  looseversion: 1.0.3
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.5
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.1
     pycparser: 2.21
      pycrypto: 2.6.1
  pycryptodome: 3.18.0
        pygit2: Not Installed
  python-gnupg: Not Installed
        PyYAML: 6.0
         PyZMQ: 25.0.2
        relenv: Not Installed
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: debian 10.13 buster
        locale: UTF-8
       machine: x86_64
       release: 4.19.0-24-amd64
        system: Linux
       version: Debian GNU/Linux 10.13 buster
@nicholasmhughes nicholasmhughes added Bug broken, incorrect, or confusing behavior Regression The issue is a bug that breaks functionality known to work in previous releases. labels Jun 6, 2023
@nicholasmhughes nicholasmhughes added this to the Sulfur v3006.2 milestone Jun 6, 2023
@nicholasmhughes nicholasmhughes self-assigned this Jun 6, 2023
nicholasmhughes added a commit to nicholasmhughes/salt that referenced this issue Jun 6, 2023
@Ch3LL Ch3LL closed this as completed in 2e4c57e Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Regression The issue is a bug that breaks functionality known to work in previous releases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant