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

fix(cache): Do not change homedir for user that already exists #399

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

denisonbarbosa
Copy link
Member

We used to update every part of the user information in the cache but this can create problems if the admin changes the homedir configuration on the broker side, since it would update the homedir parsing for the user resulting in PAM creating a new one for the user at login.

UDENG-3125

@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.31%. Comparing base (a92045c) to head (215739a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #399      +/-   ##
==========================================
+ Coverage   85.24%   85.31%   +0.07%     
==========================================
  Files          76       76              
  Lines        6161     6164       +3     
  Branches       75       75              
==========================================
+ Hits         5252     5259       +7     
+ Misses        644      642       -2     
+ Partials      265      263       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@denisonbarbosa denisonbarbosa marked this pull request as ready for review June 27, 2024 11:03
@denisonbarbosa denisonbarbosa requested a review from a team as a code owner June 27, 2024 11:03
Copy link
Member

@didrocks didrocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, however, I would still issue some warnings on the local system to log that this is not expected/supported.

internal/users/cache/update.go Show resolved Hide resolved
Copy link
Member

@didrocks didrocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

We used to update every part of the user information in cache, but this
can create problems if the admin changes the homedir configuration in
the broker side, since it would update the homedir parsing for the user
and, thus, "losing" access to the previous one.
@denisonbarbosa denisonbarbosa merged commit a44a3e4 into main Jun 27, 2024
6 checks passed
@denisonbarbosa denisonbarbosa deleted the prevent-homedir-change branch June 27, 2024 12:09
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.

4 participants