sous-chefs / users

Development repository for the users cookbook
https://supermarket.chef.io/cookbooks/users
Apache License 2.0
138 stars 218 forks source link

Fix uid validation multiple places #449

Closed frank-m closed 3 years ago

frank-m commented 3 years ago

Description

As described in #446 and #447 a breaking change was introduced in version 6.0.0:

When creating a user without specifying a uid/gid, the user's ~/.ssh directory is owned by root since user[:uid].to_i returns 0 (since nil.to_i is 0) in https://github.com/sous-chefs/users/blob/master/resources/manage.rb#L99-L100.

Although a separate pull request was already opened, there were more places where the same issue existed and that was not covered in that pull request.

I also added integration tests that prevent his bug from reappearing in the future.

Thanks @evandam for spotting it :)

Issues Resolved

446

447

Check List

bmhughes commented 3 years ago

LGTM, merge when ready.

kitchen-porter commented 3 years ago

Released as: 6.0.1