Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/useradd.c: E_BAD_NAME: Use a different error code for bad login names #1141

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

alejandro-colomar
Copy link
Collaborator

@alejandro-colomar alejandro-colomar commented Dec 5, 2024

Wrappers like adduser(8) want to do their own stuff if the login name is
bad.  For that, they need to be able to differentiate such an error.

Closes: #1103
Suggested-by: @zeha
Cc: @Zugschlus


Revisions:

v1b
  • Rebase
$ git range-diff alx/master..gh/badname master..badname 
1:  4c084b1d = 1:  d288ade5 src/useradd.c: E_BAD_NAME: Use a different error code for bad login names
v1c
  • Rebase
$ git range-diff alx/master..gh/badname master..badname 
1:  d288ade5 = 1:  5b17bc41 src/useradd.c: E_BAD_NAME: Use a different error code for bad login names
v1d
  • Rebase
$ git range-diff master..gh/badname shadow/master..badname 
1:  5b17bc41 = 1:  f63fb09e src/useradd.c: E_BAD_NAME: Use a different error code for bad login names
v1e
$ git range-diff master gh/badname badname 
1:  f63fb09e ! 1:  01ddd7d8 src/useradd.c: E_BAD_NAME: Use a different error code for bad login names
    @@ Commit message
         Closes: <https://github.com/shadow-maint/shadow/issues/1103>
         Suggested-by: Chris Hofstaedtler <[email protected]>
         Cc: Marc 'Zugschlus' Haber <[email protected]>
    +    Reviewed-by: Serge Hallyn <[email protected]>
         Signed-off-by: Alejandro Colomar <[email protected]>
     
      ## src/useradd.c ##
v1f
  • Rebase
$ git range-diff master..gh/badname shadow/master..badname 
1:  01ddd7d8 = 1:  00ca2301 src/useradd.c: E_BAD_NAME: Use a different error code for bad login names

@alejandro-colomar alejandro-colomar changed the title src/useradd.c: E_BAD_NAME: Use a different error code for bad loginames src/useradd.c: E_BAD_NAME: Use a different error code for bad login names Dec 5, 2024
@alejandro-colomar alejandro-colomar force-pushed the badname branch 2 times, most recently from c290b35 to a015e91 Compare December 6, 2024 11:53
@alejandro-colomar alejandro-colomar marked this pull request as ready for review December 22, 2024 12:00
@alejandro-colomar alejandro-colomar marked this pull request as draft December 23, 2024 09:47
@alejandro-colomar alejandro-colomar force-pushed the badname branch 2 times, most recently from 5b17bc4 to f63fb09 Compare January 24, 2025 14:49
@hallyn
Copy link
Member

hallyn commented Feb 8, 2025

lgtm

@alejandro-colomar alejandro-colomar marked this pull request as ready for review February 8, 2025 10:12
@alejandro-colomar
Copy link
Collaborator Author

lgtm

Thanks! I've now formally opened for review. :)

…ames

Wrappers like adduser(8) want to do their own stuff if the login name is
bad.  For that, they need to be able to differentiate such an error.

Closes: <shadow-maint#1103>
Suggested-by: Chris Hofstaedtler <[email protected]>
Cc: Marc 'Zugschlus' Haber <[email protected]>
Reviewed-by: Serge Hallyn <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
@hallyn hallyn merged commit 2e47f4d into shadow-maint:master Feb 9, 2025
10 checks passed
@alejandro-colomar alejandro-colomar deleted the badname branch February 9, 2025 09:17
alejandro-colomar pushed a commit to alejandro-colomar/shadow that referenced this pull request Feb 9, 2025
Link: <shadow-maint#1103>
Link: <shadow-maint#1141>
Signed-off-by: Marc 'Zugschlus' Haber <[email protected]>
Cc: Chris Hofstaedtler <[email protected]>
Cc: Serge Hallyn <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
hallyn pushed a commit that referenced this pull request Feb 9, 2025
Link: <#1103>
Link: <#1141>
Signed-off-by: Marc 'Zugschlus' Haber <[email protected]>
Cc: Chris Hofstaedtler <[email protected]>
Cc: Serge Hallyn <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
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.

please consider giving a dedicated exit value for "invalid user name"
2 participants