Fix privs in Node, regressions from #199 - #241
Merged
Merged
Conversation
Samruddhi Khandale (samruddhikhandale)
previously approved these changes
Oct 28, 2022
Samruddhi Khandale (samruddhikhandale)
left a comment
Member
There was a problem hiding this comment.
Looks good to me. Approving with one suggestion.
Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>
Samruddhi Khandale (samruddhikhandale)
approved these changes
Oct 28, 2022
Samruddhi Khandale (samruddhikhandale)
left a comment
Member
There was a problem hiding this comment.
Awesome. Thanks 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.
Node: Fix nvm ownership #199 set the sticky bit in the wrong place which prevented group privs from going to the correct locations.
The updates to add addtional versions sufffered from similar issues before Node: Fix nvm ownership #199 which was an attempt to fix it.
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.