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

Hard-code a remaining case of Prog. #962

Merged
merged 2 commits into from
Mar 8, 2024

Conversation

alejandro-colomar
Copy link
Collaborator

Link: #959
Link: #960
Cc: @skyler-ferrante
Cc: @hallyn
Cc: @karelzak
Cc: @ikerexxe
Cc: @brauner

Since we're checking for "vigr", it makes more sense to name the
variable accordingly.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This avoids using argv[0], which is controlled by the user,
and might inject arbitrary text in stderr and the logs.

Link: <shadow-maint#959>
Link: <shadow-maint#960>
Cc: "Skyler Ferrante (RIT Student)" <sjf5462@rit.edu>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Karel Zak <kzak@redhat.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Christian Brauner <christian@brauner.io>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
@alejandro-colomar alejandro-colomar marked this pull request as ready for review March 7, 2024 22:46
This was referenced Mar 7, 2024
@hallyn hallyn merged commit 89c4da4 into shadow-maint:master Mar 8, 2024
9 checks passed
alejandro-colomar added a commit that referenced this pull request Mar 8, 2024
Since we're checking for "vigr", it makes more sense to name the
variable accordingly.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
Cherry-picked-from: 0ab893a ("src/vipw.c: Reverse logic and variable name")
Link: <#962>
[alx: This is needed by 89c4da4 ("src/vipw.c: Use string literals to initialize 'Prog'")
Cc: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
alejandro-colomar added a commit that referenced this pull request Mar 8, 2024
This avoids using argv[0], which is controlled by the user,
and might inject arbitrary text in stderr and the logs.

Link: <#959>
Link: <#960>
Cc: "Skyler Ferrante (RIT Student)" <sjf5462@rit.edu>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Karel Zak <kzak@redhat.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Christian Brauner <christian@brauner.io>
Cherry-picked-from: 89c4da4 ("src/vipw.c: Use string literals to initialize 'Prog'")
Link: <#962>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
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