Skip to content

BUGFIX: fix the UID update logic - #1290

Open
dwalter-bachmann wants to merge 1 commit into
devcontainers:mainfrom
dwalter-bachmann:fix-uid-remapping
Open

BUGFIX: fix the UID update logic#1290
dwalter-bachmann wants to merge 1 commit into
devcontainers:mainfrom
dwalter-bachmann:fix-uid-remapping

Conversation

@dwalter-bachmann

Copy link
Copy Markdown

The current logic matches wrongly matches usernames which only contain the string defined as the remote user. (eg: foo-admin matches for admin). This leads to duplicates UIDs being used unexpectedly.

Steps to reproduce the issue:

  • Add a user foo-admin using eg: RUN useradd -M foo-admin
  • Add a second user (the expected remote_user) called admin via RUN useradd admin
  • Set the remote_user to admin in your devcontainer.json
  • Before applying the fix both users will have the same updated UID.

The current logic matches wrongly matches usernames which only contain the
string defined as the remote user. (eg: foo-admin matches for admin).
This leads to duplicates UIDs being used unexpectedly.

Steps to reproduce the issue:
 - Add a user `foo-admin` using eg: `RUN useradd -M foo-admin`
 - Add a second user (the expected remote_user) called `admin` via `RUN
useradd admin`
 - Set the `remote_user` to `admin` in your devcontainer.json
 - Before applying the fix both users will have the same updated UID.
@dwalter-bachmann
dwalter-bachmann requested a review from a team as a code owner August 27, 2026 09:25
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.

1 participant