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

Respect uidattr when writing out matching group #151

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

achernya
Copy link
Contributor

The uidattr feature was not considered when writing out the matching
group for a particular user. This change adds this missing feature to
the group logic.

Fixed: #150

The `uidattr` feature was not considered when writing out the matching
group for a particular user. This change adds this missing feature to
the group logic.

Fixed: google#150
@jaqx0r
Copy link
Contributor

jaqx0r commented Jul 25, 2022

Can you add a unit test please?

@achernya
Copy link
Contributor Author

I could use a pointer on how to unit test this properly. I've tried adding (what I thought should catch this) in ldapsource_test.py by cloning testGetGroupMapAsUser, changing uid and adding a name attr as well as uidattr, but it seems to work without my fix. However, empirically, when I run without the fix, /etc/group.cache contains the wrong value. So clearly I'm not understanding something about how the mocking is working.

@jaqx0r
Copy link
Contributor

jaqx0r commented Jul 25, 2022 via email

@achernya
Copy link
Contributor Author

Yeah, I've tested this empirically with a local checkout. I'm happy to continue working on a unit test, but definitely would appreciate this being merged so I can also ask debian to do a cherry pick

@jaqx0r jaqx0r merged commit 31a11f5 into google:main Jul 26, 2022
@github-actions
Copy link
Contributor

Unit Test Results

    1 files  ±0      1 suites  ±0   3s ⏱️ -1s
318 tests ±0  306 ✔️ ±0  12 💤 ±0  0 ❌ ±0 

Results for commit 31a11f5. ± Comparison against base commit 8348f88.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uidattr ignored when writing out groups
2 participants