Bug 592389
Summary: | Anonymous resource limits not set if no BIND is performed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Nathan Kinder <nkinder> | ||||
Component: | Directory Server | Assignee: | Nathan Kinder <nkinder> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.2.5 | CC: | andrey.ivanov, jgalipea, rmeggins | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-12-07 16:45:22 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 434914, 543590 | ||||||
Attachments: |
|
Description
Nathan Kinder
2010-05-14 18:23:05 UTC
So it turns out that this issue is occurring even when an anonymous BIND is performed. Some other code changes in bind.c must have broken the anonymous limits feature. I have a patch that makes anonymous limits take effect when an anonymous or unauthenticated BIND is performed. Dealing with the case where no BIND operation is performed is going to take a bit more surgery. The way the server currently works is that when a BIND is performed, the limits are set if any bind-based resource limits exist (for real users or anonymous with my patch). When a search is processed in a backend, it uses any bind based resource limits if they are set, otherwise the global limits for that backend are used. To have the anonymous limits work when no bind is performed, we would have to set the anonymous limits for all connections when they are created. We would then need to clear these limits at the beginning of the bind code and allow them to either be reset or left blank for the backend global settings to take effect. Created attachment 415519 [details]
Proposed Patch
The anonymous resource limits were not being properly set. This
patch ensures that the limits are set properly when an anonymous
or unauthenticated BIND operation is performed. It also sets the
anonymous limits when we do a read on a connection that has not
yet perfomed a BIND. These limits will be overwritten with any
default or user-based limits once a valid BIND is performed.
Thanks to Rich for his review! Pushed to master. Counting objects: 13, done. Delta compression using 2 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1.43 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git ecb1e8a..55489b8 master -> master verified - RHEL 4 version: redhat-ds-base-8.2.0-2010060304.el4dsrv 1. Global sizelimit: # ldapsearch -x -p 389 -h `hostname` -D "cn=Directory Manager" -w Secret123 -b "cn=config" | grep sizelimit nsslapd-sizelimit: 20 2. nsslapd-anonlimitsdn: # ldapsearch -x -p 389 -h `hostname` -D "cn=Directory Manager" -w Secret123 -b "cn=config" | grep anonlimit nsslapd-anonlimitsdn: uid=jgalipea,ou=people,dc=example,dc=com 3. Limit on User: # /usr/lib/mozldap6/ldapsearch -p 389 -h `hostname` -D "cn=Directory Manager" -w Secret123 -b "uid=jgalipea,ou=people,dc=example,dc=com" "(objectclass=*)" nssizelimit version: 1 dn: uid=jgalipea,ou=People,dc=example,dc=com nssizelimit: 5 4. anonymous bind search: # /usr/lib/mozldap6/ldapsearch -p 389 -h `hostname` -b "dc=example,dc=com" "(objectclass=*)" cnversion: 1 dn: dc=example,dc=com dn: cn=Directory Administrators,dc=example,dc=com cn: Directory Administrators dn: ou=Groups,dc=example,dc=com dn: ou=People,dc=example,dc=com dn: ou=Special Users,dc=example,dc=com ldap_search: Sizelimit exceeded |