Bug 513170 - Simple paged with sorting gives error message as "Server does not support sorting".
Summary: Simple paged with sorting gives error message as "Server does not support sor...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: Directory Server
Version: 9.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 434914 389_1.2.1
TreeView+ depends on / blocked
 
Reported: 2009-07-22 12:02 UTC by Sankar Ramalingam
Modified: 2016-05-06 14:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-06 14:38:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
git patch file for ldbm_search.c (2.19 KB, patch)
2009-07-22 18:40 UTC, Noriko Hosoi
no flags Details | Diff

Description Sankar Ramalingam 2009-07-22 12:02:52 UTC
Description of problem:
LDAP reports an error "Server does not support sorting", if no entries present in the Suffix DN.

How reproducible: Consistently


Steps to Reproduce:
1. Run a simple paged search for a suffix which doesn't have any entry or give a filter which doesn't match any of entry in the DN.
2. Observe the output of the paged search.
3. It shows "Server does not support sorting".
  
Expected results: Error message is misleading as Sorting is not implemented.

Comment 1 Noriko Hosoi 2009-07-22 18:33:20 UTC
Problem description:
It's a bug in server side sorting. If the search result candidate is NULL, sort control is not created.
ldapsearch -b "dc=test,dc=com" -x -S "cn" "(cn=*)" dn 
ldap_parse_sort_control: Requested LDAP control not found

Comment 2 Noriko Hosoi 2009-07-22 18:40:20 UTC
Created attachment 354770 [details]
git patch file for ldbm_search.c

File: ldap/servers/slapd/back-ldbm/ldbm_search.c

Fix description:  When sort request control is given, even if the search result is NULL, sort response control should be created and passed to the client.  This change fixes it.

Comment 3 Noriko Hosoi 2009-07-22 18:53:12 UTC
Reviewed by Rich (Thank you!!)

Pushed to master.

$ git merge paged
Updating fa2fd42..35a54ff
Fast forward
 ldap/servers/slapd/back-ldbm/ldbm_search.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
$ git push
Counting objects: 13, done.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 891 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   fa2fd42..35a54ff  master -> master

Comment 4 Jenny Severance 2010-05-17 19:25:44 UTC
verified - RHEL 4

version:


1. No users in subtree searched:

ldapsearch -x -h hostname.example.com -p 389 -D "cn=Directory Manager" -w Secret -b "ou=Special Users,dc=example,dc=com"
# extended LDIF
#
# LDAPv3
# base <ou=Special Users,dc=example,dc=com> with scope sub
# filter: (objectclass=*)
# requesting: ALL
#

# Special Users, example.com
dn: ou=Special Users,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: Special Users
description: Special Administrative Accounts

# search result
search: 2
result: 0 Success

# numResponses: 2


#perl ./ldapsearch.pl -x -pg 4 "(uid=*)" "dn sn"
# echo $?
0

Returns no error


Note You need to log in before you can comment on or make changes to this bug.