Skip to content
Snippets Groups Projects
Commit 52a812f6 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Don't assume response control is a paged results response.

(Should loop through response controls and do something, anything
(e.g., include message in output) for each.  ldap_find_control(3)
should be avoided.)
parent 41a341ab
No related branches found
No related tags found
No related merge requests found
...@@ -1552,7 +1552,12 @@ parse_page_control( ...@@ -1552,7 +1552,12 @@ parse_page_control(
fprintf( stderr, "%s (%d)\n", ldap_err2string(err), err ); fprintf( stderr, "%s (%d)\n", ldap_err2string(err), err );
} }
if( ctrl ) { if ( ctrl ) {
/* There might be others, e.g. ppolicy... */
ctrlp = ldap_find_control( LDAP_CONTROL_PAGEDRESULTS, ctrl );
}
if ( ctrlp ) {
/* Parse the control value /* Parse the control value
* searchResult ::= SEQUENCE { * searchResult ::= SEQUENCE {
* size INTEGER (0..maxInt), * size INTEGER (0..maxInt),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment