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

Avoid trimming everything if the suffix length is zero #47

Merged
merged 1 commit into from
Jul 16, 2018

Conversation

georgebuckerfield
Copy link
Contributor

I think this should fix #44

At the moment, if iam_linux_user_suffix is not set, the code ends up effectively trimming the username like so:

user.name[:-0]

This removes the entire username. Fixed by changing the trim to:

user.name[:len(user.name)-len(iam_linux_user_suffix)

This should just remove the iam_linux_user_suffix. I've made this change manually on a couple of servers and it seems to have resolved the issue and users are now being added to groups.

Copy link
Owner

@kislyuk kislyuk left a comment

Choose a reason for hiding this comment

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

Thank you for finding and fixing this. Clearly I'm not very good at testing things :)

@kislyuk kislyuk merged commit 71c8a31 into kislyuk:master Jul 16, 2018
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.

Users are no longer added to existing groups since 1.0.4
2 participants