Remove non-posix fgetpwent to fix FreeBSD#13
Remove non-posix fgetpwent to fix FreeBSD#13helen-fornazier wants to merge 1 commit intoGoogleCloudPlatform:masterfrom
Conversation
fgetpwent is not part of POSIX and it is not available in FreeBSD. Also, getpwent() already reads from the local database, use it instead and remove fgetpwent()
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: helen-fornazier The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @helen-fornazier. Thanks for your PR. I'm waiting for a GoogleCloudPlatform member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
on linux at least, getpwent will resolve through the passwd database - meaning whatever you have configured in nsswitch.conf. It is not the same as |
|
I see. So maybe we should implement fgetpwent() under |
The first option will work, but it may be a somewhat lengthy implementation. What function does the existing files implementation in FreeBSD use? We want to match the normal lookup behavior. This second option I think will not work. This function is invoked by nss, so we would have a kind of recursive lookup, then. The purpose of this check is to find out whether this is a 'local' user by isolating our search to the files DB, whereas the NSS methods are meant to return the results of all configured databases. |
fgetpwent is not part of POSIX and it is not available in FreeBSD.
Also, getpwent() already reads from the local database, use it instead
and remove fgetpwent()