Bug 711906
Summary: | ns-slapd segfaults using suffix referrals | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] 389 | Reporter: | Diego Woitasen <diego> | ||||
Component: | Directory Server | Assignee: | Rich Megginson <rmeggins> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.2.8 | CC: | amsharma, jgalipea | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 712167 (view as bug list) | Environment: | |||||
Last Closed: | 2015-12-07 16:32:45 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: | 434915, 708096, 712167 | ||||||
Attachments: |
|
Description
Diego Woitasen
2011-06-08 23:10:02 UTC
Thanks. Looks like the fix is a one liner: --- a/ldap/servers/slapd/mapping_tree.c +++ b/ldap/servers/slapd/mapping_tree.c @@ -2905,7 +2905,7 @@ slapi_be_select( const Slapi_DN *sdn ) /* JCM - The name of this should change?? { Slapi_Backend *be; mapping_tree_node *node= slapi_get_mapping_tree_node_by_dn(sdn); - if(node!=NULL) + if((node!=NULL) && (node->mtn_be!=NULL)) be= node->mtn_be[0]; else be = NULL; Unfortunately, after the fix, the referral is not returned: ldapsearch -x -D "cn=directory manager" -w xxxxx -b dc=localdomain ... # referral, localdomain dn: ou=referral,dc=localdomain ou: referral description: Ingenieria objectClass: top objectClass: organizationalUnit # search result search: 2 result: 0 Success # numResponses: 11 # numEntries: 10 I guess because there is an actual entry, it uses it rather than see if there is a suffix referral. If you need ou=referral,dc=localdomain to be a referral, either remove the real entry, or use a smart referral instead (objectclass: ref) - will investigate some more. Created attachment 503925 [details]
0001-Bug-711906-ns-slapd-segfaults-using-suffix-referrals.patch
To ssh://git.fedorahosted.org/git/389/ds.git f290f80..fb9b444 master -> master commit fb9b444fc620a9ccae03d578c7c4b8ed56b82465 Author: Rich Megginson <rmeggins> Date: Thu Jun 9 09:39:08 2011 -0600 Reviewed by: nkinder (Thanks!) Branch: master Fix Description: Check node->mtn_be for NULL before dereferencing it Platforms tested: RHEL6 x86_64 Flag Day: no Doc impact: no Comment on attachment 503925 [details]
0001-Bug-711906-ns-slapd-segfaults-using-suffix-referrals.patch
Works for me!
ldapadd -x -h localhost -p 1389 -D "cn=directory manager" -w Secret123 << EOF dn: ou=referral1,dc=example,dc=com ou: referral description: Ingenieria objectClass: top objectClass: organizationalUnit dn: cn=ou\3Dreferral1\2Cdc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config objectclass: extensibleObject objectclass: nsMappingTree nsslapd-state: referral nsslapd-referral: ldap://10.65.201.213:1389/ou=People,dc=example,dc=com EOF ldapsearch -x -h localhost -p 1389 -D "cn=Directory Manager" -w Secret123 -b "ou=referral1,dc=example,dc=com" Server did not crash, hence marking bug as VERIFIED. |