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

Clarify doc for getgrgid/getgrnam/getpwuid/getpwnam when the group/user does not exist #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

madchrist
Copy link

The posix spec says that the C functions should return NULL and not change errno when the group/user does not exist.

The wrappers set errno to 0 before the call, so the current expected behavior when the group/user does not exist is to return a single nil
The doc has been updated to reflect that

The C functions are used in a few other places, but they treat a missing group/user and an error in the same way, so it's fine

The wrappers are not reused anywhere

The lua functions are only used in tests and there are already tests for this special case

Clarify the doc for getgrgid()/getgrnam() when the group does not exist
Clarify doc of getpwuid()/getpwnam() when the user does not exist
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.

None yet

1 participant