src/newusers.c: A user/group name with a leading digit is valid#1475
Open
alejandro-colomar wants to merge 1 commit intoshadow-maint:masterfrom
Open
src/newusers.c: A user/group name with a leading digit is valid#1475alejandro-colomar wants to merge 1 commit intoshadow-maint:masterfrom
alejandro-colomar wants to merge 1 commit intoshadow-maint:masterfrom
Conversation
5c27e83 to
f26af1f
Compare
Only consider a string to be a UID/GID if it is all digits. Here's a reproducer of the bug: $ echo 'foo:p::1a::/tmp/nonexistent:/usr/bin/false' > x $ sudo newusers ./x newusers: invalid group ID '1a' newusers: line 1: can't create group Where the expected behavior would be the same as for a group name that doesn't start with a digit: $ echo 'foo:p::a1a::/tmp/nonexistent:/usr/bin/false' > x $ sudo newusers ./x $ tail -n1 /etc/group a1a:x:1004: $ tail -n1 /etc/passwd foo:x:1004:1004::/tmp/nonexistent:/usr/bin/false Closes: <shadow-maint#1474> Signed-off-by: Alejandro Colomar <alx@kernel.org>
f26af1f to
497cbf1
Compare
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.
Only consider a string to be a UID/GID if it is all digits.
Closes: #1474
Revisions:
v1b