This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Support unexpected events when trying to get the user's home directory#73
Open
maandree wants to merge 2 commits intosharpbracket:masterfrom
Open
Support unexpected events when trying to get the user's home directory#73maandree wants to merge 2 commits intosharpbracket:masterfrom
maandree wants to merge 2 commits intosharpbracket:masterfrom
Conversation
Collaborator
There was a problem hiding this comment.
I don't think this is a very useful error message.
Contributor
Author
|
I have made the messages more explicatory. I have also added to missing |
…ome set in the passwd entry. Also, getpwent can fail: handle that. Signed-off-by: Mattias Andrée <maandree@operamail.com>
…y cannot be determine Signed-off-by: Mattias Andrée <maandree@operamail.com>
27f786d to
356be0d
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This patch makes sure that the program does not segfault
if it failes to read the passwd file or if the user does not have
an entry in the passwd file. It also not try to construct a pathname
with the user's home directory if missing from the passwd file,
i.e. null or empty.