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

Fix incorrect getgrnam error handling #50

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

nirs
Copy link
Member

@nirs nirs commented Sep 17, 2024

getgrent(3) says:

Note that programs must explicitly set errno to zero before calling any
of these functions if they need to distinguish between a non-existent
entry and an error.

We didn't so we could log the wrong error based on previous failed call and confuse the user.

getgrent(3) says:

    Note that programs must explicitly set errno to zero before calling any
    of these functions if they need to distinguish between a non-existent
    entry and an error.

We didn't so we could log the wrong error based on previous failed call
and confuse the user.

Signed-off-by: Nir Soffer <[email protected]>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@jandubois jandubois added this to the v1.1.5 milestone Sep 18, 2024
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks

@AkihiroSuda AkihiroSuda merged commit 3771e2b into lima-vm:master Sep 18, 2024
2 of 5 checks passed
@nirs nirs deleted the getgrnam branch September 23, 2024 22:20
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.

3 participants