-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
adding missing GID value when fetching Hostuser #48245
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
integration/hostuser_test.go
Outdated
t.Cleanup(func() { cleanupUsersAndGroups([]string{testuser}, []string{types.TeleportKeepGroup}) }) | ||
|
||
users := srv.NewHostUsers(context.Background(), presence, "host_uuid") | ||
expectedHome := filepath.Join("/home", testuser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use a temp dir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually shouldn't be creating a directory at all, this was left over from the test I coped as a base for this one 😅 There's a few tests in here that rely on creating directories in /home
that probably need to be updated, so I'll make a note to fix those in a separate PR once I'm finished with v17 testing 👍
90c42c0
to
0a2c5a6
Compare
Fixes #48243
This fixes a regression that breaks migrating existing, unmanaged host users to Teleport. The missing value for
GID
when fetching aHostUser
causes an error while trying to conver to an int for home directory creation. The migration flow is covered by unit tests, but since this only manifests in the linux backend it wasn't caught. I added a new host user integration test to cover this regression going forward.changelog: Fixed an issue preventing migration of unmanaged users to Teleport host users when including
teleport-keep
in a role'shost_groups
.