Description
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