-
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
mod_authz_unixgroup: Use getgrouplist #55
Conversation
I took a look at these and I can see why some auth providers (especially ones that might connect to remote LDAP like sssd) would want to avoid making copies of the entire membership of any given group, and thus might feel justified in breaking POSIX standards by leaving gr_mem null. I am somewhat concerned about compatibility issues with this new solution, though, since the critical getgrouplist function and especially the gid_from_group function are not in POSIX and the latter appears to be mostly BSD-only. @pbiering, are you still using mod_authz_unixgroup? Do you have any thoughts on this? I don't use this module personally and don't have a way to effectively test it. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
db40ce8
to
95fc762
Compare
I think that should be fine, since the distros that package mod_authz_unixgroup all package libbsd as well, from what I can tell. Please add the relevant link flag to mod_authz_unixgroup's INSTALL file, e.g. on the Once it is ready, I will probably wait a week or so before merging to give @pbiering a chance to weigh in. |
95fc762
to
cb7f136
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Please make a release too. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I think this PR looks good. If there are no comments by next week, I will merge it and make a new release. |
Thanks for your contribution! |
This comment was marked as resolved.
This comment was marked as resolved.
cb7f136
to
a4fff82
Compare
just a small typo in INSTALL file fixed |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
3f1951b
to
904d513
Compare
f323515
to
7b2536c
Compare
…mpatibility Some services, like sssd, can optimize away grp->gr_mem which makes this module fail group lookup. Use getgrouplist(3) instead and gid_from_group(3bsd) which uses libbsd, link with -lbsd. This avoids the problematic getgrgid()/getgrnam() functions.
After a great deal of probably unnecessary pain (do we even really need to support macOS anyway?), we now have this PR building on all platforms! 🎉 Thanks again @joakim-tjernlund for your contribution! |
Thank you! :) |
Some services, like sssd, can optimize away grp->gr_mem which makes this module fail group lookup.
Use getgrouplist(3) instead and gid_from_group(3bsd) which uses libbsd, link with -lbsd.
This avoids the problematic getgrgid()/getgrnam() functions.
This replaces #54