c2.ldctl_oid = LDAP_CONTROL_VALUESRETURNFILTER;
c2.ldctl_iscritical = valuesReturnFilter > 1;
- if (( ber = ber_alloc_t(LBER_USE_DER)) == NULL )
- exit( EXIT_FAILURE );
+ if (( ber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
+ return EXIT_FAILURE;
+ }
- if ( err = put_vrFilter(ber, vrFilter)==-1 ) {
+ if ( err = ldap_put_vrFilter(ber, vrFilter)==-1 ) {
ber_free( ber, 1 );
fprintf( stderr, "Bad ValuesReturnFilter: %s\n", vrFilter );
- exit( EXIT_FAILURE );
+ return EXIT_FAILURE;
}
- if ( ber_flatten( ber, &bvalp ) == LBER_ERROR )
- return LDAP_NO_MEMORY;
+ if ( ber_flatten( ber, &bvalp ) == LBER_ERROR ) {
+ return EXIT_FAILURE;
+ }
c2.ldctl_value=(*bvalp);
-
}
err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
(c1.ldctl_iscritical || c2.ldctl_iscritical)
? "critical " : "" );
if( c1.ldctl_iscritical && c2.ldctl_iscritical ) {
- exit( EXIT_FAILURE );
+ return EXIT_FAILURE;
}
}
}
Small projects
--------------
Populate matchingRuleUse attribute in the subschema
-Implement -E/-e extensions options
Implement -V version options
Implement Proxy Authorization Control extension
Complete Simple Paged Results Control
ldap_getnextfilter LDAP_P(( /* deprecated */
LDAPFiltDesc *lfdp ));
+LDAP_F( int )
+ldap_put_vrFilter LDAP_P((
+ BerElement *ber,
+ const char *vrf ));
/*
* in free.c
*/
/*
- * structure for virtul list.
+ * structure for virtual list.
*/
typedef struct ldapvlvinfo {
int ldvlv_version;
return 0;
}
-int
-ldap_pvt_put_vrFilter( BerElement *ber, const char *str_in )
+static int
+put_vrFilter( BerElement *ber, const char *str_in )
{
int rc;
char *freeme;
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "ldap_pvt_put_vrFilter: \"%s\"\n",
+ LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "put_vrFilter: \"%s\"\n",
str_in ));
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: \"%s\"\n", str_in, 0, 0 );
default:
#ifdef NEW_LOGGING
LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_vrFilter: simple\n" ));
+ "put_vrFilter: simple\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: simple\n",
0, 0, 0 );
}
int
-put_vrFilter( BerElement *ber, const char *str_in )
+ldap_put_vrFilter( BerElement *ber, const char *str_in )
{
int rc =0;
rc = -1;
}
- rc = ldap_pvt_put_vrFilter( ber, str_in );
+ rc = put_vrFilter( ber, str_in );
if ( ber_printf( ber, /*"{"*/ "N}" ) == -1 ) {
rc = -1;
/* now we have "(filter)" with str pointing to it */
*next = '\0';
- if ( ldap_pvt_put_vrFilter( ber, str ) == -1 ) return -1;
+ if ( put_vrFilter( ber, str ) == -1 ) return -1;
*next = save;
str = next;
}