Skip to content

Fix privs in Node, regressions from #199 - #241

Merged
Chuck Lantz (Chuxel) merged 4 commits into
mainfrom
fix-privs-node
Oct 28, 2022
Merged

Fix privs in Node, regressions from #199#241
Chuck Lantz (Chuxel) merged 4 commits into
mainfrom
fix-privs-node

Conversation

@Chuxel

Copy link
Copy Markdown
Member

Privs in the node script are completely broken which prevents its use with Actions or any scenario where the user's UID/GID does not match what is in the container. There were serveral issues here:

  1. There was a bug in nvm that incorrectly set the user on installed node versions. Bumped to 0.39.2 to fix that and added an option to pick a node version while I was at it.

  2. Node: Fix nvm ownership #199 set the sticky bit in the wrong place which prevented group privs from going to the correct locations.

  3. The updates to add addtional versions sufffered from similar issues before Node: Fix nvm ownership #199 which was an attempt to fix it.

  4. The existing test was busted since Node 19 came out and it was looking for Node 18 with "latest". Switched to "lts" which is node 18 (and eventually 20... so an update will be needed.)

This required a bit of refactoring and I updated comments to explain the changes.

@Chuxel
Chuck Lantz (Chuxel) requested a review from a team as a code owner October 28, 2022 16:53

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. Approving with one suggestion.

Comment thread test/node/scenarios.json Outdated
Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome. Thanks 🚀

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.

2 participants