fprintf( stderr, _(" [!]subentries[=true|false] (RFC 3672 subentries)\n"));
fprintf( stderr, _(" [!]sync=ro[/<cookie>] (RFC 4533 LDAP Sync refreshOnly)\n"));
fprintf( stderr, _(" rp[/<cookie>][/<slimit>] (refreshAndPersist)\n"));
+#ifdef LDAP_CONTROL_X_DEREF
+ fprintf( stderr, _(" [!]deref=derefAttr:attr[,...][;derefAttr:attr[,...][;...]]\n"));
+#endif
fprintf( stderr, _(" [!]<oid>=:<value> (generic control; no response handling)\n"));
fprintf( stderr, _(" -F prefix URL prefix for files (default: %s)\n"), def_urlpre);
fprintf( stderr, _(" -l limit time limit (in seconds, or \"none\" or \"max\") for search\n"));
ber_init2( ber, &bv, LBER_USE_DER );
ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
-#if 0
- rc = ber_printf( ber, "{" /*}*/ );
- for ( dr = drhead; dr != NULL; dr = dr->dr_next ) {
- rc = ber_printf( ber, "{{O{" /*}}}*/,
- &dr->dr_spec.ds_derefAttr->ad_cname );
- for ( i = 0; i < dr->dr_spec.ds_nattrs; i++ ) {
- rc = ber_printf( ber, "O",
- &dr->dr_spec.ds_attributes[ i ]->ad_cname );
- }
- rc = ber_printf( ber, /*{{*/ "}}{" /*}*/ );
- for ( i = 0; !BER_BVISNULL( &dr->dr_vals[ i ].dv_derefSpecVal ); i++ ) {
- int j;
-
- rc = ber_printf( ber, "{O{" /*}}*/ ,
- &dr->dr_vals[ i ].dv_derefSpecVal );
- for ( j = 0; j < dr->dr_spec.ds_nattrs; j++ ) {
- if ( dr->dr_vals[ i ].dv_attrVals[ j ] != NULL ) {
- rc = ber_printf( ber, "[W]", dr->dr_vals[ i ].dv_attrVals[ j ] );
- } else {
- rc = ber_printf( ber, "b", 0 );
- }
- }
- rc = ber_printf( ber, /*{{*/ "}}" );
- }
- rc = ber_printf( ber, /*{{*/ "}}" );
- }
- rc = ber_printf( ber, /*{*/ "}" );
-#endif
-
rc = ber_printf( ber, "{" /*}*/ );
for ( dr = drhead; dr != NULL; dr = dr->dr_next ) {
for ( i = 0; !BER_BVISNULL( &dr->dr_vals[ i ].dv_derefSpecVal ); i++ ) {
}
int
-deref_initialize()
+deref_initialize(void)
{
int rc;
Debug( LDAP_DEBUG_ANY,
"deref_init: Failed to register control (%d)\n",
rc, 0, 0 );
- return rc;
+ return -1;
}
deref.on_bi.bi_type = "deref";