Skip to content
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
maandree:homeless-users-and-nonusers
Open

Support unexpected events when trying to get the user's home directory#73
maandree wants to merge 2 commits intosharpbracket:masterfrom
maandree:homeless-users-and-nonusers

Conversation

@maandree
Copy link
Copy Markdown
Contributor

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.

Comment thread src/config-ini.c Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a very useful error message.

@maandree
Copy link
Copy Markdown
Contributor Author

maandree commented May 7, 2014

I have made the messages more explicatory. I have also added to missing \n:s.

maandree added 2 commits May 5, 2015 20:56
…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>
@maandree maandree force-pushed the homeless-users-and-nonusers branch from 27f786d to 356be0d Compare May 5, 2015 18:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants