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

Correctly detect errors from getpwnam_r and getgrnam_r #1873

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

asomers
Copy link
Member

@asomers asomers commented Aug 25, 2020

Fixes #1872

err = getpwnam_r(user, &pwent, user_buffer, sizeof(user_buffer),
&result);
if (err != 0) {
warnc(err, "getpwnam_r");
Copy link
Member

Choose a reason for hiding this comment

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

you should use pkg_emit* and not warn* in the library, I will fix it after merge

@bapt bapt merged commit 3be70e6 into freebsd:master Aug 26, 2020
@asomers asomers deleted the getpwnam_r branch August 26, 2020 16:57
@asomers
Copy link
Member Author

asomers commented Aug 26, 2020

FYI, this change has exposed a bug in FreeBSD's libc:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248932

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.

pkg ignores errors from getpwnam_r and getgrnam_r
2 participants