fix: use group id instead of names for compaudit#20
Open
mikegeeves wants to merge 1 commit into
Open
Conversation
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.
We use "cattle" GCP VMs as remote development environments, so persist e.g. $HOME but not the root OS -> trying zsh-bin
In this case, the user's group is not present in
/etc/group.getentis able to look it up via nss (there's a GCPosloginmodule), but zsh-bin is not.When running
compauditit fails:Setting
ZSH_DISABLE_COMPFIX=truedidn't seem to help.This patches
compauditto use the numeric group id (which has been retrieved already anyway) instead of the name. I think in the context of "being portable" this makes sense.I would think it's unlikely to be possible for
getentto be able to retrieve the name but not the id, so I don't think there would be a downside, or it be worth additional validation to ensure the id is non-empty etc. Tested with abuildandinstallon the target environment which has solved the issue for me (some issues encountered initially with the busybox patch silently failing at IDE-removed-trailing-whitespace).