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

LDAP fall back to slow search if memberof is missing #8491

Merged
merged 1 commit into from Mar 29, 2018

Conversation

Projects
None yet
4 participants
@murrant
Member

murrant commented Mar 29, 2018

OpenLDAP doesn't enable memberOf by default. So fallback to searching all users if we can't query memberOf.

See this for more info about memberOf:
https://www.openldap.org/doc/admin24/overlays.html#Reverse%20Group%20Membership%20Maintenance

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@murrant murrant added the Bug 🐞 label Mar 29, 2018

@davama

This comment has been minimized.

davama commented Mar 29, 2018

I can confirm it works

slapd -V
@(#) $OpenLDAP: slapd 2.4.44 (Aug  4 2017 14:23:27) $
	mockbuild@c1bm.rdu2.centos.org:/builddir/build/BUILD/openldap-2.4.44/openldap-2.4.44/servers/slapd
./script/auth_test.php -l
request done: ld 0x55720cf49bc0 msgid 533
res_errno: 5, res_error: <>, res_matched: <>
ldap_free_request (origid 533, msgid 533)
ldap_parse_result
ldap_msgfree
ldap_msgfree
Users: , config, dvmacias, etc, etc ...
Total users: 60
ldap_free_connection 1 1
ldap_send_unbind
ldap_free_connection: actually freed

Thank you very much @murrant

@scrutinizer-notifier

This comment has been minimized.

scrutinizer-notifier commented Mar 29, 2018

The inspection completed: 1 updated code elements

@laf

laf approved these changes Mar 29, 2018

Confirmed working by someone else.

@laf laf merged commit 1a26017 into librenms:master Mar 29, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@laf laf deleted the murrant:ldap_no_memberof branch Mar 29, 2018

TheMysteriousX added a commit to TheMysteriousX/librenms that referenced this pull request May 20, 2018

@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.