}
}
- if ( manageDSAit || valuesReturnFilter ) {
+ if ( manageDSAit || noop || valuesReturnFilter ) {
int err;
int i=0;
- LDAPControl c1,c2;
- LDAPControl *ctrls[3];
+ LDAPControl c1,c2,c3;
+ LDAPControl *ctrls[4];
if ( manageDSAit ) {
ctrls[i++]=&c1;
c1.ldctl_iscritical = manageDSAit > 1;
}
+ if ( noop ) {
+ ctrls[i++] = &c2;
+ ctrls[i] = NULL;
+
+ c2.ldctl_oid = LDAP_CONTROL_NOOP;
+ c2.ldctl_value.bv_val = NULL;
+ c2.ldctl_value.bv_len = 0;
+ c2.ldctl_iscritical = noop > 1;
+ }
+
if ( valuesReturnFilter ) {
- ctrls[i++]=&c2;
+ ctrls[i++]=&c3;
ctrls[i] = NULL;
- c2.ldctl_oid = LDAP_CONTROL_VALUESRETURNFILTER;
- c2.ldctl_iscritical = valuesReturnFilter > 1;
+ c3.ldctl_oid = LDAP_CONTROL_VALUESRETURNFILTER;
+ c3.ldctl_iscritical = valuesReturnFilter > 1;
if (( ber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
return EXIT_FAILURE;
return EXIT_FAILURE;
}
- c2.ldctl_value=(*bvalp);
+ c3.ldctl_value=(*bvalp);
}
err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
}
}
}
-
+
if ( verbose ) {
fprintf( stderr, "filter%s: %s\nrequesting: ",
infile != NULL ? " pattern" : "",