-
Notifications
You must be signed in to change notification settings - Fork 14
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
Varied fixes #19
Closed
Closed
Varied fixes #19
Conversation
This file contains 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
There was a macro for PW_LEN already; the literal value was correct, so this is only a style fix.
dlclose is a noop on musl, so this being there isn't an actual issue, but it's still not supposed to be there: since we are using functions from the DSO, it should remain open. The mod_passwd block above doesn't dloclose its DSO.
- use sizeof(object) instead of repeating a computation - make a non exported function static - add comments for the buffer memory handling
The outer if block was only entered if ret == ERANGE, so ret can't be EAGAIN.
The swap variable was never being set to 1, so the functions to answer requests would never swap integers. Add a comment explaning the conditional.
the-maldridge
requested changes
Jun 28, 2021
int retval = NSS_STATUS_UNAVAIL; | ||
struct initgroups_res *initgroups_res; | ||
|
||
if(ISPWREQ(reqtype)) assert(mod_passwd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a comment above it explaining that this is for debugging only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment now.
Instead of having to cast the void *fn pointer, simply pass the mod_{passwd,group} structs to nss_getkey and allow it to find the function it needs. Add assertions to guarantee the function is being used correctly. Simplifying this function and its usage is important because it allows us to call nss_getkey directly with less setup around it.
We are tracking if the request uses mod_passwd or mod_group in different ways across functions in this file; create a variable to track it explicitly.
the-maldridge
approved these changes
Jun 30, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Each one should be explained clearly in the commit message, can be improved if necessary. Initial clean up from things noticed while gearing up to implement caching.