Changes from HEAD for beta

This commit is contained in:
Kurt Zeilenga 2003-09-18 17:43:21 +00:00
parent 588be01590
commit 4fce207ca5
336 changed files with 16367 additions and 7610 deletions

View file

@ -95,9 +95,6 @@
#if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
#define LDAP_TEST
#endif
#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
#define LDAP_DEBUG
#endif
#endif
#ifdef HAVE_EBCDIC

View file

@ -1206,9 +1206,7 @@ AC_DEFUN([OL_SASL_COMPAT],
#endif
/* require 2.1.3 or later */
#if SASL_VERSION_MAJOR == 1 && SASL_VERSION_MINOR >= 5
char *__sasl_compat = "1.5.x okay";
#elif SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR > 1
#if SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR > 1
__sasl_compat "2.2+ or better okay (we guess)";
#elif SASL_VERSION_MAJOR == 2 && SASL_VERSION_MINOR == 1 \
&& SASL_VERSION_STEP >=3

View file

@ -7,7 +7,7 @@
ol_package=OpenLDAP
ol_major=2
ol_minor=2
ol_patch=0alpha
ol_patch=X
ol_api_inc=20200
ol_api_lib=2:200:0
ol_release_date="05/31/2003"

View file

@ -18,6 +18,8 @@
#include <ldap.h>
#include "lutil_ldap.h"
#include "ldap_defaults.h"
#include "ldap_pvt.h"
#include "common.h"
@ -40,9 +42,15 @@ char *sasl_secprops = NULL;
#endif
int use_tls = 0;
int assertctl;
char *assertion = NULL;
char *authzid = NULL;
int manageDSAit = 0;
int noop = 0;
int preread = 0;
char *preread_attrs = NULL;
int postread = 0;
char *postread_attrs = NULL;
int not = 0;
int want_bindpw = 0;
@ -59,9 +67,9 @@ char *prog = NULL;
void
tool_init( void )
{
setlocale(LC_MESSAGES,"");
bindtextdomain(OPENLDAP_PACKAGE, LDAP_LOCALEDIR);
textdomain(OPENLDAP_PACKAGE);
ldap_pvt_setlocale(LC_MESSAGES, "");
ldap_pvt_bindtextdomain(OPENLDAP_PACKAGE, LDAP_LOCALEDIR);
ldap_pvt_textdomain(OPENLDAP_PACKAGE);
}
void
@ -73,9 +81,12 @@ N_(" -C chase referrals\n"),
N_(" -d level set LDAP debugging level to `level'\n"),
N_(" -D binddn bind DN\n"),
N_(" -e [!]<ctrl>[=<ctrlparam>] general controls (! indicates criticality)\n")
N_(" [!]authzid=<authzid> (\"dn:<dn>\" or \"u:<user>\")\n")
N_(" [!]manageDSAit (alternate form, see -M)\n")
N_(" [!]assert=<filter> (an RFC 2254 Filter)\n")
N_(" [!]authzid=<authzid> (\"dn:<dn>\" or \"u:<user>\")\n")
N_(" [!]manageDSAit\n")
N_(" [!]noop\n"),
N_(" [!]postread[=<attrs>] (a comma-separated attribute list)\n"),
N_(" [!]preread[=<attrs>] (a comma-separated attribute list)\n"),
N_(" -f file read operations from `file'\n"),
N_(" -h host LDAP server\n"),
N_(" -H URI LDAP Uniform Resource Indentifier(s)\n"),
@ -154,7 +165,22 @@ tool_args( int argc, char **argv )
*cvalue++ = '\0';
}
if ( strcasecmp( control, "authzid" ) == 0 ) {
if ( strcasecmp( control, "assert" ) == 0 ) {
if( assertctl ) {
fprintf( stderr, "assert control previously specified\n");
exit( EXIT_FAILURE );
}
if( cvalue == NULL ) {
fprintf( stderr, "assert: control value expected\n" );
usage();
}
assertctl = 1 + crit;
assert( assertion == NULL );
assertion = cvalue;
} else if ( strcasecmp( control, "authzid" ) == 0 ) {
if( authzid != NULL ) {
fprintf( stderr, "authzid control previously specified\n");
exit( EXIT_FAILURE );
@ -197,6 +223,24 @@ tool_args( int argc, char **argv )
noop = 1 + crit;
} else if ( strcasecmp( control, "preread" ) == 0 ) {
if( preread ) {
fprintf( stderr, "preread control previously specified\n");
exit( EXIT_FAILURE );
}
preread = 1 + crit;
preread_attrs = cvalue;
} else if ( strcasecmp( control, "postread" ) == 0 ) {
if( postread ) {
fprintf( stderr, "postread control previously specified\n");
exit( EXIT_FAILURE );
}
postread = 1 + crit;
postread_attrs = cvalue;
} else {
fprintf( stderr, "Invalid general control name: %s\n",
control );
@ -709,7 +753,7 @@ void
tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
{
int i = 0, j, crit = 0, err;
LDAPControl c[3], **ctrls;
LDAPControl c[6], **ctrls;
ctrls = (LDAPControl**) malloc(sizeof(c) + (count+1)*sizeof(LDAPControl*));
if ( ctrls == NULL ) {
@ -717,6 +761,35 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
exit( EXIT_FAILURE );
}
if ( assertctl ) {
char berbuf[LBER_ELEMENT_SIZEOF];
BerElement *ber = (BerElement *)berbuf;
if( assertion == NULL || *assertion == '\0' ) {
fprintf( stderr, "Assertion=<empty>\n" );
exit( EXIT_FAILURE );
}
ber_init2( ber, NULL, LBER_USE_DER );
err = ldap_pvt_put_filter( ber, assertion );
if( err < 0 ) {
fprintf( stderr, "assertion encode failed (%d)\n", err );
exit( EXIT_FAILURE );
}
err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
if( err < 0 ) {
fprintf( stderr, "assertion flatten failed (%d)\n", err );
exit( EXIT_FAILURE );
}
c[i].ldctl_oid = LDAP_CONTROL_ASSERT;
c[i].ldctl_iscritical = assertctl > 1;
ctrls[i] = &c[i];
i++;
}
if ( authzid ) {
c[i].ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
c[i].ldctl_value.bv_val = authzid;
@ -744,6 +817,66 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
i++;
}
if ( preread ) {
char berbuf[LBER_ELEMENT_SIZEOF];
BerElement *ber = (BerElement *)berbuf;
char **attrs;
if( preread_attrs ) {
attrs = ldap_str2charray( preread_attrs, "," );
}
ber_init2( ber, NULL, LBER_USE_DER );
if( ber_printf( ber, "{v}", attrs ) == -1 ) {
fprintf( stderr, "preread attrs encode failed.\n" );
exit( EXIT_FAILURE );
}
err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
if( err < 0 ) {
fprintf( stderr, "preread flatten failed (%d)\n", err );
exit( EXIT_FAILURE );
}
c[i].ldctl_oid = LDAP_CONTROL_PRE_READ;
c[i].ldctl_iscritical = preread > 1;
ctrls[i] = &c[i];
i++;
if( attrs ) ldap_charray_free( attrs );
}
if ( postread ) {
char berbuf[LBER_ELEMENT_SIZEOF];
BerElement *ber = (BerElement *)berbuf;
char **attrs;
if( postread_attrs ) {
attrs = ldap_str2charray( postread_attrs, "," );
}
ber_init2( ber, NULL, LBER_USE_DER );
if( ber_printf( ber, "{v}", attrs ) == -1 ) {
fprintf( stderr, "postread attrs encode failed.\n" );
exit( EXIT_FAILURE );
}
err = ber_flatten2( ber, &c[i].ldctl_value, 0 );
if( err < 0 ) {
fprintf( stderr, "postread flatten failed (%d)\n", err );
exit( EXIT_FAILURE );
}
c[i].ldctl_oid = LDAP_CONTROL_POST_READ;
c[i].ldctl_iscritical = postread > 1;
ctrls[i] = &c[i];
i++;
if( attrs ) ldap_charray_free( attrs );
}
while ( count-- ) {
ctrls[i++] = extra_c++;
}

View file

@ -29,9 +29,11 @@ extern char *sasl_secprops;
#endif
extern int use_tls;
extern char *assertion;
extern char *authzid;
extern int manageDSAit;
extern int noop;
extern int preread, postread;
extern int not;
extern int want_bindpw;

View file

@ -172,8 +172,9 @@ main( int argc, char **argv )
tool_bind( ld );
if ( authzid || manageDSAit || noop )
if ( assertion || authzid || manageDSAit || noop ) {
tool_server_controls( ld, NULL, 0 );
}
if ( verbose ) {
fprintf( stderr, _("DN:%s, attr:%s, value:%s\n"),

View file

@ -143,8 +143,9 @@ main( int argc, char **argv )
tool_bind( ld );
if ( authzid || manageDSAit || noop )
if ( assertion || authzid || manageDSAit || noop ) {
tool_server_controls( ld, NULL, 0 );
}
retval = rc = 0;

View file

@ -58,6 +58,7 @@ static LDAP *ld = NULL;
#define T_MODOPADDSTR "add"
#define T_MODOPREPLACESTR "replace"
#define T_MODOPDELETESTR "delete"
#define T_MODOPINCREMENTSTR "increment"
#define T_MODSEPSTR "-"
#define T_NEWRDNSTR "newrdn"
#define T_DELETEOLDRDNSTR "deleteoldrdn"
@ -168,123 +169,123 @@ handle_private_option( int i )
int
main( int argc, char **argv )
{
char *rbuf, *start, *rejbuf = NULL;
FILE *fp, *rejfp;
char *rbuf, *start, *rejbuf = NULL;
FILE *fp, *rejfp;
char *matched_msg, *error_msg;
int rc, retval;
int count, len;
tool_init();
prog = lutil_progname( "ldapmodify", argc, argv );
tool_init();
prog = lutil_progname( "ldapmodify", argc, argv );
/* strncmp instead of strcmp since NT binaries carry .exe extension */
ldapadd = ( strncasecmp( prog, "ldapadd", sizeof("ldapadd")-1 ) == 0 );
ldapadd = ( strncasecmp( prog, "ldapadd", sizeof("ldapadd")-1 ) == 0 );
/* Print usage when no parameters */
if( argc < 2 ) usage();
/* Print usage when no parameters */
if( argc < 2 ) usage();
tool_args( argc, argv );
if ( argc != optind )
usage();
if ( argc != optind ) usage();
if ( rejfile != NULL ) {
if (( rejfp = fopen( rejfile, "w" )) == NULL ) {
perror( rejfile );
return( EXIT_FAILURE );
if ( rejfile != NULL ) {
if (( rejfp = fopen( rejfile, "w" )) == NULL ) {
perror( rejfile );
return( EXIT_FAILURE );
}
} else {
rejfp = NULL;
}
} else {
rejfp = NULL;
}
if ( infile != NULL ) {
if (( fp = fopen( infile, "r" )) == NULL ) {
perror( infile );
return( EXIT_FAILURE );
if ( infile != NULL ) {
if (( fp = fopen( infile, "r" )) == NULL ) {
perror( infile );
return( EXIT_FAILURE );
}
} else {
fp = stdin;
}
} else {
fp = stdin;
}
if ( debug )
ldif_debug = debug;
if ( debug ) ldif_debug = debug;
ld = tool_conn_setup( not, 0 );
if ( !not ) {
if ( pw_file || want_bindpw ) {
if ( pw_file ) {
rc = lutil_get_filed_password( pw_file, &passwd );
if( rc ) return EXIT_FAILURE;
} else {
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
if ( !not ) {
if ( pw_file || want_bindpw ) {
if ( pw_file ) {
rc = lutil_get_filed_password( pw_file, &passwd );
if( rc ) return EXIT_FAILURE;
} else {
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
}
tool_bind( ld );
}
tool_bind( ld );
}
rc = 0;
if ( authzid || manageDSAit || noop )
if ( assertion || authzid || manageDSAit || noop || preread || postread ) {
tool_server_controls( ld, NULL, 0 );
}
count = 0;
retval = 0;
while (( rc == 0 || contoper ) &&
( rbuf = read_one_record( fp )) != NULL ) {
count++;
while (( rc == 0 || contoper ) &&
( rbuf = read_one_record( fp )) != NULL )
{
count++;
start = rbuf;
start = rbuf;
if ( rejfp ) {
len = strlen( rbuf );
if (( rejbuf = (char *)ber_memalloc( len+1 )) == NULL ) {
perror( "malloc" );
exit( EXIT_FAILURE );
}
memcpy( rejbuf, rbuf, len+1 );
}
rc = process_ldif_rec( start, count );
if ( rc )
retval = rc;
if ( rc && rejfp ) {
fprintf(rejfp, _("# Error: %s (%d)"), ldap_err2string(rc), rc);
matched_msg = NULL;
ldap_get_option(ld, LDAP_OPT_MATCHED_DN, &matched_msg);
if ( matched_msg != NULL ) {
if ( *matched_msg != '\0' )
fprintf( rejfp, _(", matched DN: %s"), matched_msg );
ldap_memfree( matched_msg );
if ( rejfp ) {
len = strlen( rbuf );
if (( rejbuf = (char *)ber_memalloc( len+1 )) == NULL ) {
perror( "malloc" );
exit( EXIT_FAILURE );
}
memcpy( rejbuf, rbuf, len+1 );
}
error_msg = NULL;
ldap_get_option(ld, LDAP_OPT_ERROR_STRING, &error_msg);
if ( error_msg != NULL ) {
if ( *error_msg != '\0' )
fprintf( rejfp, _(", additional info: %s"), error_msg );
ldap_memfree( error_msg );
rc = process_ldif_rec( start, count );
if ( rc ) retval = rc;
if ( rc && rejfp ) {
fprintf(rejfp, _("# Error: %s (%d)"), ldap_err2string(rc), rc);
matched_msg = NULL;
ldap_get_option(ld, LDAP_OPT_MATCHED_DN, &matched_msg);
if ( matched_msg != NULL ) {
if ( *matched_msg != '\0' ) {
fprintf( rejfp, _(", matched DN: %s"), matched_msg );
}
ldap_memfree( matched_msg );
}
error_msg = NULL;
ldap_get_option(ld, LDAP_OPT_ERROR_STRING, &error_msg);
if ( error_msg != NULL ) {
if ( *error_msg != '\0' ) {
fprintf( rejfp, _(", additional info: %s"), error_msg );
}
ldap_memfree( error_msg );
}
fprintf( rejfp, "\n%s\n", rejbuf );
}
fprintf( rejfp, "\n%s\n", rejbuf );
}
if (rejfp)
free( rejbuf );
if (rejfp) free( rejbuf );
free( rbuf );
}
}
if ( !not ) {
if ( !not ) {
ldap_unbind( ld );
}
}
if ( rejfp != NULL ) {
fclose( rejfp );
}
if ( rejfp != NULL ) {
fclose( rejfp );
}
return( retval );
return( retval );
}
@ -461,6 +462,10 @@ process_ldif_rec( char *rbuf, int count )
modop = LDAP_MOD_DELETE;
addmodifyop( &pmods, modop, val.bv_val, NULL );
goto end_line;
} else if ( strcasecmp( type, T_MODOPINCREMENTSTR ) == 0 ) {
modop = LDAP_MOD_INCREMENT;
addmodifyop( &pmods, modop, val.bv_val, NULL );
goto end_line;
} else { /* no modify op: use default */
modop = ldapadd ? LDAP_MOD_ADD : LDAP_MOD_REPLACE;
}
@ -809,6 +814,11 @@ domodify(
int i, j, k, notascii, op;
struct berval *bvp;
if ( dn == NULL ) {
fprintf( stderr, _("%s: no DN specified\n"), prog );
return( LDAP_PARAM_ERROR );
}
if ( pmods == NULL ) {
fprintf( stderr, _("%s: no attributes to change or add (entry=\"%s\")\n"),
prog, dn );
@ -829,8 +839,11 @@ domodify(
for ( i = 0; pmods[ i ] != NULL; ++i ) {
op = pmods[ i ]->mod_op & ~LDAP_MOD_BVALUES;
printf( "%s %s:\n",
op == LDAP_MOD_REPLACE ? _("replace") : op == LDAP_MOD_ADD
? _("add") : _("delete"),
op == LDAP_MOD_REPLACE ? _("replace") :
op == LDAP_MOD_ADD ? _("add") :
op == LDAP_MOD_INCREMENT ? _("increment") :
op == LDAP_MOD_DELETE ? _("delete") :
_("unknown"),
pmods[ i ]->mod_type );
if ( pmods[ i ]->mod_bvalues != NULL ) {
for ( j = 0; pmods[ i ]->mod_bvalues[ j ] != NULL; ++j ) {

View file

@ -171,8 +171,9 @@ main(int argc, char **argv)
tool_bind( ld );
if ( authzid || manageDSAit || noop )
if ( assertion || authzid || manageDSAit || noop ) {
tool_server_controls( ld, NULL, 0 );
}
retval = rc = 0;
if (havedn)

View file

@ -166,7 +166,7 @@ main( int argc, char *argv[] )
}
if( oldpwfile ) {
rc = lutil_get_filed_password( prog, &oldpw );
rc = lutil_get_filed_password( oldpwfile, &oldpw );
if( rc ) return EXIT_FAILURE;
}
@ -187,7 +187,7 @@ main( int argc, char *argv[] )
}
if( newpwfile ) {
rc = lutil_get_filed_password( prog, &newpw );
rc = lutil_get_filed_password( newpwfile, &newpw );
if( rc ) return EXIT_FAILURE;
}
@ -207,22 +207,22 @@ main( int argc, char *argv[] )
newpw.bv_len = strlen( newpw.bv_val );
}
if( want_bindpw && passwd.bv_val == NULL ) {
if ( pw_file ) {
rc = lutil_get_filed_password( pw_file, &passwd );
if( rc ) return EXIT_FAILURE;
} else {
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
if ( pw_file ) {
rc = lutil_get_filed_password( pw_file, &passwd );
if( rc ) return EXIT_FAILURE;
} else if ( want_bindpw ) {
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
passwd.bv_len = passwd.bv_val ? strlen( passwd.bv_val ) : 0;
}
ld = tool_conn_setup( 0, 0 );
tool_bind( ld );
if ( authzid || manageDSAit || noop )
if ( assertion || authzid || manageDSAit || noop ) {
tool_server_controls( ld, NULL, 0 );
}
if( user != NULL || oldpw.bv_val != NULL || newpw.bv_val != NULL ) {
/* build change password control */

View file

@ -75,17 +75,8 @@ usage( void )
#ifdef LDAP_CONTROL_SUBENTRIES
fprintf( stderr, _(" [!]subentries[=true|false] (subentries)\n"));
#endif
#ifdef LDAP_CLIENT_UPDATE
fprintf( stderr, _(" [!]lcup=p/<cint>/<cookie>/<slimit> (LDAP client update)\n"));
/*
* " s/<cint>/<cookie> (LDAP client update)\n"
* " sp/<cint>/<cookie>/<slimit>\n"
* */
#endif
#ifdef LDAP_SYNC
fprintf( stderr, _(" [!]sync=ro[/<cookie>] (LDAP Sync refreshOnly)\n"));
fprintf( stderr, _(" rp[/<cookie>][/<slimit>] (LDAP Sync refreshAndPersist)\n"));
#endif
fprintf( stderr, _(" -F prefix URL prefix for files (default: %s)\n"), def_urlpre);
fprintf( stderr, _(" -l limit time limit (in seconds) for search\n"));
fprintf( stderr, _(" -L print responses in LDIFv1 format\n"));
@ -160,21 +151,9 @@ static char *vrFilter = NULL;
static int domainScope = 0;
#endif
#if defined(LDAP_CLIENT_UPDATE) || defined(LDAP_SYNC)
static int lcup = 0;
static int ldapsync = 0;
#endif
#ifdef LDAP_CLIENT_UPDATE
static int lcup_cint = 0;
static struct berval lcup_cookie = { 0, NULL };
static int lcup_slimit = -1;
#endif
#ifdef LDAP_SYNC
static struct berval sync_cookie = { 0, NULL };
static int sync_slimit = -1;
#endif
#ifdef LDAP_CONTROL_PAGEDRESULTS
static int pagedResults = 0;
@ -330,67 +309,6 @@ handle_private_option( int i )
if( crit ) subentries *= -1;
#endif
#ifdef LDAP_CLIENT_UPDATE
} else if ( strcasecmp( control, "lcup" ) == 0 ) {
char *cookiep;
char *slimitp;
if ( lcup ) {
fprintf( stderr, _("client update control previously specified\n"));
exit( EXIT_FAILURE );
}
if ( ldapsync != -1 ) {
fprintf( stderr, _("ldap sync control previously specified\n"));
exit( EXIT_FAILURE );
}
if ( cvalue == NULL ) {
fprintf( stderr,
_("missing specification of client update control\n"));
exit( EXIT_FAILURE );
}
if ( strncasecmp( cvalue, "p", 1 ) == 0 ) {
lcup = LDAP_CUP_PERSIST_ONLY;
cvalue = strchr( cvalue, '/' );
cvalue++;
cookiep = strchr( cvalue, '/' );
*cookiep++ = '\0';
lcup_cint = atoi( cvalue );
cvalue = cookiep;
slimitp = strchr( cvalue, '/' );
*slimitp++ = '\0';
while ( isspace( (unsigned char) *cookiep ) )
cookiep++;
ber_str2bv( cookiep, 0, 0, &lcup_cookie );
lcup_slimit = atoi( slimitp );
/*
} else if ( strncasecmp( cvalue, "s", 1 ) == 0 ) {
lcup = LDAP_CUP_SYNC_ONLY;
cvalue += 2;
cookiep = strchr( cvalue, '/' );
*cookiep++ = '\0';
lcup_cint = atoi( cvalue );
ber_str2bv( cookiep, 0, 0, &lcup_cookie );
} else if ( strncasecmp( cvalue, "sp", 2 ) == 0 ) {
lcup = LDAP_CUP_SYNC_AND_PERSIST;
cvalue += 3;
cookiep = strchr( cvalue, '/' );
*cookiep++ = '\0';
lcup_cint = atoi( cvalue );
cvalue = cookiep;
slimitp = strchr( cvalue, '/' );
*slimitp++ = '\0';
ber_str2bv( cookiep, 0, 0, &lcup_cookie );
lcup_slimit = atoi( slimitp );
*/
} else {
fprintf( stderr,
_("client update control value \"%s\" invalid\n"),
cvalue );
exit( EXIT_FAILURE );
}
if ( crit ) lcup *= -1;
#endif
#ifdef LDAP_SYNC
} else if ( strcasecmp( control, "sync" ) == 0 ) {
char *cookiep;
char *slimitp;
@ -398,10 +316,6 @@ handle_private_option( int i )
fprintf( stderr, _("ldap sync control previously specified\n") );
exit( EXIT_FAILURE );
}
if ( lcup ) {
fprintf( stderr, _("client update control previously specified\n") );
exit( EXIT_FAILURE );
}
if ( cvalue == NULL ) {
fprintf( stderr,
_("missing specification of ldap sync control\n"));
@ -438,7 +352,6 @@ handle_private_option( int i )
exit( EXIT_FAILURE );
}
if ( crit ) ldapsync *= -1;
#endif
} else {
fprintf( stderr, _("Invalid control name: %s\n"), control );
@ -527,15 +440,9 @@ main( int argc, char **argv )
int rc, i, first;
LDAP *ld = NULL;
BerElement *seber = NULL, *vrber = NULL, *prber = NULL;
#ifdef LDAP_CLIENT_UPDATE
BerElement *cuber = NULL;
struct berval *cubvalp = NULL;
#endif
#ifdef LDAP_SYNC
BerElement *syncber = NULL;
struct berval *syncbvalp = NULL;
#endif
tool_init();
@ -633,20 +540,16 @@ main( int argc, char **argv )
tool_bind( ld );
getNextPage:
if ( manageDSAit || noop || subentries || valuesReturnFilter
if ( assertion || authzid || manageDSAit || noop
#ifdef LDAP_CONTROL_X_DOMAIN_SCOPE
|| domainScope
|| domainScope
#endif
#ifdef LDAP_CONTROL_PAGEDRESULTS
|| pageSize
|| pageSize
#endif
#ifdef LDAP_CLIENT_UPDATE
|| lcup
#endif
#ifdef LDAP_SYNC
|| ldapsync
#endif
) {
|| ldapsync
|| subentries || valuesReturnFilter )
{
int err;
int i=0;
LDAPControl c[6];
@ -684,37 +587,6 @@ getNextPage:
}
#endif
#ifdef LDAP_CLIENT_UPDATE
if ( lcup ) {
if (( cuber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
return EXIT_FAILURE;
}
if ( lcup_cookie.bv_len == 0 ) {
err = ber_printf( cuber, "{ei}", abs(lcup), lcup_cint );
} else {
err = ber_printf( cuber, "{ei{sO}}", abs(lcup), lcup_cint,
LDAP_CUP_COOKIE_OID, &lcup_cookie );
}
if ( err == LBER_ERROR ) {
ber_free( cuber, 1 );
fprintf( stderr, _("client update control encoding error!\n") );
return EXIT_FAILURE;
}
if ( ber_flatten( cuber, &cubvalp ) == LBER_ERROR ) {
return EXIT_FAILURE;
}
c[i].ldctl_oid = LDAP_CONTROL_CLIENT_UPDATE;
c[i].ldctl_value = (*cubvalp);
c[i].ldctl_iscritical = lcup < 0;
i++;
}
#endif
#ifdef LDAP_SYNC
if ( ldapsync ) {
if (( syncber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
return EXIT_FAILURE;
@ -742,7 +614,6 @@ getNextPage:
c[i].ldctl_iscritical = ldapsync < 0;
i++;
}
#endif
if ( valuesReturnFilter ) {
if (( vrber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
@ -948,12 +819,10 @@ static int dosearch(
int npartial;
LDAPMessage *res, *msg;
ber_int_t msgid;
#ifdef LDAP_SYNC
char *retoid = NULL;
struct berval *retdata = NULL;
int nresponses_psearch = -1;
int cancel_msgid = -1;
#endif
if( filtpatt != NULL ) {
filter = malloc( strlen( filtpatt ) + strlen( value ) );
@ -1011,10 +880,8 @@ static int dosearch(
msg = ldap_next_message( ld, msg ) )
{
if ( nresponses++ ) putchar('\n');
#if LDAP_SYNC
if ( nresponses_psearch >= 0 )
nresponses_psearch++;
#endif
switch( ldap_msgtype( msg ) ) {
case LDAP_RES_SEARCH_ENTRY:
@ -1036,14 +903,12 @@ static int dosearch(
goto done;
}
#ifdef LDAP_SYNC
if ( cancel_msgid != -1 &&
cancel_msgid == ldap_msgid( msg ) ) {
printf(_("Cancelled \n"));
printf(_("cancel_msgid = %d\n"), cancel_msgid);
goto done;
}
#endif
break;
case LDAP_RES_SEARCH_RESULT:
@ -1054,28 +919,14 @@ static int dosearch(
}
#endif
#ifdef LDAP_CLIENT_UPDATE
if ( lcup == LDAP_CUP_PERSIST_ONLY ||
lcup == LDAP_CUP_SYNC_AND_PERSIST ) {
break;
}
#endif
#if defined(LDAP_CLIENT_UPDATE) && defined(LDAP_SYNC)
else
#endif
#ifdef LDAP_SYNC
if ( ldapsync == LDAP_SYNC_REFRESH_AND_PERSIST ) {
break;
}
#endif
goto done;
case LDAP_RES_INTERMEDIATE:
npartial++;
#ifndef LDAP_SYNC
print_partial( ld, msg );
#else
ldap_parse_intermediate( ld, msg,
&retoid, &retdata, NULL, 0 );
@ -1092,16 +943,8 @@ static int dosearch(
ldap_memfree( retoid );
ber_bvfree( retdata );
goto done;
#endif
}
#ifdef LDAP_CLIENT_UPDATE
if ( lcup && lcup_slimit != -1 && nresponses >= lcup_slimit ) {
ldap_abandon (ld, ldap_msgid(msg));
goto done;
}
#endif
#ifdef LDAP_SYNC
if ( ldapsync && sync_slimit != -1 &&
nresponses_psearch >= sync_slimit ) {
BerElement *msgidber = NULL;
@ -1113,8 +956,6 @@ static int dosearch(
msgidvalp, NULL, NULL, &cancel_msgid);
nresponses_psearch = -1;
}
#endif
}
ldap_msgfree( res );

View file

@ -124,8 +124,9 @@ main( int argc, char *argv[] )
goto skip;
}
if ( authzid || manageDSAit || noop )
if ( assertion || authzid || manageDSAit || noop ) {
tool_server_controls( ld, NULL, 0 );
}
rc = ldap_whoami_s( ld, &retdata, NULL, NULL );

1751
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -529,6 +529,7 @@ BUILD_LDAP=no
BUILD_LDBM=no
BUILD_META=no
BUILD_MONITOR=no
BUILD_CACHE=no
BUILD_NULL=no
BUILD_PASSWD=no
BUILD_PERL=no
@ -2295,6 +2296,16 @@ fi
dnl ----------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for long long
AC_CACHE_CHECK([long long], ol_cv_type_long_long, [
AC_TRY_COMPILE([], [long long x;],
[ol_cv_type_long_long=yes],
[ol_cv_type_long_long=no])])
if test $ol_cv_type_long_long = yes; then
AC_DEFINE(HAVE_LONG_LONG, 1, [define if you have `long long'])
fi
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
@ -2607,8 +2618,11 @@ if test "$ol_enable_meta" != no ; then
AC_DEFINE(SLAPD_META,1,[define to support LDAP Metadirectory backend])
BUILD_SLAPD=yes
BUILD_META=yes
BUILD_LDAP=yes
BUILD_REWRITE=yes
if test $ol_enable_ldbm = yes -o \
$ol_enable_bdb = yes ; then
BUILD_CACHE=yes
fi
if test "$ol_with_meta_module" != static ; then
AC_DEFINE(SLAPD_META_DYNAMIC,1,
[define to support dynamic LDAP Metadirectory backend])
@ -2763,6 +2777,7 @@ AC_SUBST(BUILD_SLAPD)
AC_SUBST(BUILD_LDBM)
AC_SUBST(BUILD_META)
AC_SUBST(BUILD_MONITOR)
AC_SUBST(BUILD_CACHE)
AC_SUBST(BUILD_NULL)
AC_SUBST(BUILD_PASSWD)
AC_SUBST(BUILD_PERL)

View file

@ -1,8 +1,8 @@
##
# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
# Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
EXTRA_DIST = BUGS
SUBDIRS = src
SUBDIRS = src examples

View file

@ -1,6 +1,8 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Makefile.in generated by automake 1.7.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -10,133 +12,167 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
@SET_MAKE@
# Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
DLLTOOL = @DLLTOOL@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
EXTRA_DIST = BUGS
SUBDIRS = src
SUBDIRS = src examples
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ./src/config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = README AUTHORS Makefile.am Makefile.in TODO acconfig.h \
aclocal.m4 config.guess config.sub configure configure.in install-sh \
ltmain.sh missing mkinstalldirs src/config.h.in src/stamp-h.in
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = README AUTHORS Makefile.am Makefile.in TODO acconfig.h \
aclocal.m4 config.guess config.sub configure configure.in \
depcomp install-sh ltmain.sh missing mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
src/config.h: src/stamp-h
@if test ! -f $@; then \
rm -f src/stamp-h; \
$(MAKE) src/stamp-h; \
else :; fi
src/stamp-h: $(srcdir)/src/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=src/config.h \
$(SHELL) ./config.status
@echo timestamp > src/stamp-h 2> /dev/null
$(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/src/stamp-h.in; \
$(MAKE) $(srcdir)/src/stamp-h.in; \
else :; fi
$(srcdir)/src/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/src/stamp-h.in 2> /dev/null
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
mostlyclean-hdr:
mostlyclean-libtool:
-rm -f *.lo
clean-hdr:
clean-libtool:
-rm -rf .libs _libs
distclean-hdr:
-rm -f src/config.h
maintainer-clean-hdr:
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@ -144,13 +180,8 @@ maintainer-clean-hdr:
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -170,13 +201,18 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" != "." || dot_seen=yes; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
@ -192,175 +228,289 @@ tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
mostlyclean-tags:
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
clean-tags:
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
install-exec-am:
install-exec: install-exec-recursive
install-data-am:
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am:
uninstall: uninstall-recursive
all-am: Makefile
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf autom4te.cache
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
clean: clean-recursive
pdf: pdf-recursive
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
-rm -f libtool
pdf-am:
distclean: distclean-recursive
-rm -f config.status
ps: ps-recursive
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
ps-am:
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
uninstall-am: uninstall-info-am
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
install-data-recursive uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-libtool clean-recursive ctags \
ctags-recursive dist dist-all dist-gzip distcheck distclean \
distclean-generic distclean-libtool distclean-recursive \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am dvi-recursive info info-am info-recursive install \
install-am install-data install-data-am install-data-recursive \
install-exec install-exec-am install-exec-recursive \
install-info install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
installdirs installdirs-am installdirs-recursive \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
pdf-recursive ps ps-am ps-recursive tags tags-recursive \
uninstall uninstall-am uninstall-info-am \
uninstall-info-recursive uninstall-recursive
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
dnl Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
dnl Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
dnl COPYING RESTRICTIONS APPLY, see COPYRIGHT file
@ -8,7 +8,7 @@ dnl disable config.cache
dnl define([AC_CACHE_LOAD], )
dnl define([AC_CACHE_SAVE], )
AC_INIT(src/main.cpp)
AC_INIT(examples/main.cpp)
AM_INIT_AUTOMAKE(main, 0.0.1)
AM_CONFIG_HEADER(src/config.h)
@ -91,4 +91,4 @@ dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_OUTPUT(Makefile src/Makefile)
AC_OUTPUT(Makefile src/Makefile examples/Makefile)

423
contrib/ldapc++/depcomp Executable file
View file

@ -0,0 +1,423 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory.
# Also, the AIX compiler puts `$object:' at the start of each line;
# $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'. We will use -o /dev/null later,
# however we can't do the remplacement now because
# `-o $object' might simply not be used
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
-*)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

View file

@ -0,0 +1,8 @@
##
# Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
noinst_PROGRAMS = main
main_SOURCES = main.cpp
main_LDADD = ../src/libldapcpp.la

View file

@ -0,0 +1,410 @@
# Makefile.in generated by automake 1.7.2 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
# Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
noinst_PROGRAMS = main
main_SOURCES = main.cpp
main_LDADD = ../src/libldapcpp.la
subdir = examples
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
noinst_PROGRAMS = main$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am_main_OBJECTS = main.$(OBJEXT)
main_OBJECTS = $(am_main_OBJECTS)
main_DEPENDENCIES = ../src/libldapcpp.la
main_LDFLAGS =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/main.Po
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(main_SOURCES)
DIST_COMMON = Makefile.am Makefile.in
SOURCES = $(main_SOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign examples/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES)
@rm -f main$(EXEEXT)
$(CXXLINK) $(main_LDFLAGS) $(main_OBJECTS) $(main_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
distclean-depend:
-rm -rf ./$(DEPDIR)
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
.cpp.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
.cpp.lo:
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-depend distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am info \
info-am install install-am install-data install-data-am \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -37,8 +37,6 @@ LDAPAddRequest::LDAPAddRequest(const LDAPEntry* entry,
LDAPAddRequest::~LDAPAddRequest(){
DEBUG(LDAP_DEBUG_DESTROY, "LDAPAddRequest::~LDAPAddRequest()" << endl);
delete m_entry;
// flush the cache, as the add may affect searches
m_connection->flush_cache();
}
LDAPMessageQueue* LDAPAddRequest::sendRequest(){

View file

@ -39,9 +39,6 @@ LDAPAsynConnection::LDAPAsynConnection(const string& hostname, int port,
LDAPAsynConnection::~LDAPAsynConnection(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPAsynConnection::~LDAPAsynConnection()" << endl);
if (cur_session){
ldap_destroy_cache(cur_session);
}
unbind();
//delete m_constr;
}
@ -295,26 +292,3 @@ LDAPAsynConnection* LDAPAsynConnection::referralConnect(
return 0;
}
int LDAPAsynConnection::enableCache(long timeout, long maxmem){
int retval = ldap_enable_cache(cur_session, timeout, maxmem);
if (!retval)
m_cacheEnabled = true;
return retval;
}
void LDAPAsynConnection::disableCache(){
ldap_disable_cache(cur_session);
m_cacheEnabled = false;
}
void LDAPAsynConnection::uncache_entry(string &dn){
if (m_cacheEnabled){
ldap_uncache_entry(cur_session, dn.c_str());
}
}
void LDAPAsynConnection::flush_cache(){
if (m_cacheEnabled){
ldap_flush_cache(cur_session);
}
}

View file

@ -286,22 +286,6 @@ class LDAPAsynConnection{
LDAPUrlList::const_iterator& usedUrl,
const LDAPConstraints* cons) const;
/**
* Turn on caching, maxmem is in MB and timeout is in seconds.
* maxmem can be zero if you want to restrict caching by timeout only.
*/
int enableCache(long timeout, long maxmem);
/// disable caching.
void disableCache();
/// is cacheEnabled?
bool getCacheEnabled() { return m_cacheEnabled;};
/// uncache a specific dn. Used internally by methods that write.
void uncache_entry(std::string &dn);
/// used to clear the cache. Probably should be used after creating
/// an object that a cached search should find.
void flush_cache();
private :
/**
* Private copy constructor. So nobody can call it.

View file

@ -0,0 +1,95 @@
/*
* Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "debug.h"
#include "LDAPAttrType.h"
LDAPAttrType::LDAPAttrType(){
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPAttrType::LDAPAttrType( )" << endl);
oid = string ();
desc = string ();
names = StringList ();
single = false;
}
LDAPAttrType::LDAPAttrType (const LDAPAttrType &at){
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPAttrType::LDAPAttrType( )" << endl);
oid = at.oid;
desc = at.desc;
names = at.names;
single = at.single;
}
LDAPAttrType::LDAPAttrType (string at_item) {
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPAttrType::LDAPAttrType( )" << endl);
LDAPAttributeType *a;
int ret;
const char *errp;
a = ldap_str2attributetype (at_item.c_str(), &ret, &errp,SCHEMA_PARSE_FLAG);
if (a) {
this->setNames (a->at_names);
this->setDesc (a->at_desc);
this->setOid (a->at_oid);
this->setSingle (a->at_single_value);
}
// else? -> error
}
LDAPAttrType::~LDAPAttrType() {
DEBUG(LDAP_DEBUG_DESTROY,"LDAPAttrType::~LDAPAttrType()" << endl);
}
void LDAPAttrType::setSingle (int at_single) {
single = (at_single == 1);
}
void LDAPAttrType::setNames (char **at_names) {
names = StringList (at_names);
}
void LDAPAttrType::setDesc (char *at_desc) {
desc = string ();
if (at_desc)
desc = at_desc;
}
void LDAPAttrType::setOid (char *at_oid) {
oid = string ();
if (at_oid)
oid = at_oid;
}
bool LDAPAttrType::isSingle () {
return single;
}
string LDAPAttrType::getOid () {
return oid;
}
string LDAPAttrType::getDesc () {
return desc;
}
StringList LDAPAttrType::getNames () {
return names;
}
string LDAPAttrType::getName () {
if (names.empty())
return "";
else
return *(names.begin());
}

View file

@ -0,0 +1,88 @@
/*
* Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef LDAP_ATTRTYPE_H
#define LDAP_ATTRTYPE_H
#include <ldap_schema.h>
#include <string>
#include "StringList.h"
#define SCHEMA_PARSE_FLAG 0x03
using namespace std;
/**
* Represents the Attribute Type (from LDAP schema)
*/
class LDAPAttrType{
private :
StringList names;
string desc, oid;
bool single;
public :
/**
* Constructor
*/
LDAPAttrType();
/**
* Copy constructor
*/
LDAPAttrType (const LDAPAttrType& oc);
/**
* Constructs new object and fills the data structure by parsing the
* argument.
* @param at_item description of attribute type is string returned
* by the search command. It is in the form:
* "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
* EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
*/
LDAPAttrType (string at_item);
/**
* Destructor
*/
virtual ~LDAPAttrType();
/**
* Returns attribute description
*/
string getDesc ();
/**
* Returns attribute oid
*/
string getOid ();
/**
* Returns attribute name (first one if there are more of them)
*/
string getName ();
/**
* Returns all attribute names
*/
StringList getNames();
/**
* Returns true if attribute type hllows only single value
*/
bool isSingle();
void setNames (char **at_names);
void setDesc (char *at_desc);
void setOid (char *at_oid);
void setSingle (int at_single_value);
};
#endif // LDAP_ATTRTYPE_H

View file

@ -334,26 +334,3 @@ void LDAPConnection::setConstraints(LDAPConstraints* cons){
const LDAPConstraints* LDAPConnection::getConstraints() const{
return LDAPAsynConnection::getConstraints();
}
int LDAPConnection::enableCache(long timeout, long maxmem) {
return LDAPAsynConnection::enableCache(timeout, maxmem);
}
void LDAPConnection::disableCache() {
LDAPAsynConnection::disableCache();
}
bool LDAPConnection::getCacheEnabled() {
return LDAPAsynConnection::getCacheEnabled();
}
void LDAPConnection::uncache_entry(string &dn) {
LDAPAsynConnection::uncache_entry(dn);
}
void LDAPConnection::flush_cache()
{
LDAPAsynConnection::flush_cache();
}

View file

@ -229,22 +229,6 @@ class LDAPConnection : private LDAPAsynConnection {
void setConstraints(LDAPConstraints *cons);
const LDAPConstraints* getConstraints() const ;
/**
* Turn on caching, maxmem is in MB and timeout is in seconds.
* maxmem can be zero if you want to restrict caching by timeout only.
*/
int enableCache(long timeout, long maxmem);
/// disable caching.
void disableCache();
/// is cacheEnabled?
bool getCacheEnabled();
/// uncache a specific dn. Used internally by methods that write.
void uncache_entry(std::string &dn);
/// used to clear the cache. Probably should be used after creating
/// an object that a cached search should find.
void flush_cache();
};
#endif //LDAP_CONNECTION_H

View file

@ -35,10 +35,6 @@ LDAPDeleteRequest::LDAPDeleteRequest(const string& dn,
LDAPDeleteRequest::~LDAPDeleteRequest(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPDeleteRequest::~LDAPDeleteRequest()" << endl);
// TODO -- flush the entire cache here? or does this invalidate
// cached searches that may have found the deleted entry.
// m_connection->uncache_entry(m_dn);
m_connection->flush_cache();
}
LDAPMessageQueue* LDAPDeleteRequest::sendRequest(){

View file

@ -44,9 +44,6 @@ LDAPModDNRequest::LDAPModDNRequest(const string& dn, const string& newRDN,
LDAPModDNRequest::~LDAPModDNRequest(){
DEBUG(LDAP_DEBUG_DESTROY, "LDAPModDNRequest::~LDAPModDNRequest()" << endl);
// flush entries from the cache.
m_connection->uncache_entry(m_dn);
m_connection->uncache_entry(m_newRDN);
}
LDAPMessageQueue* LDAPModDNRequest::sendRequest(){

View file

@ -39,10 +39,6 @@ LDAPModifyRequest::~LDAPModifyRequest(){
DEBUG(LDAP_DEBUG_DESTROY,
"LDAPModifyRequest::~LDAPModifyRequest()" << endl);
delete m_modList;
// flush this entry from cache.
//m_connection->uncache_entry(m_dn);
// I think we need to do this... (j.costlow)
m_connection->flush_cache();
}
LDAPMessageQueue* LDAPModifyRequest::sendRequest(){

View file

@ -0,0 +1,123 @@
/*
* Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "debug.h"
#include "LDAPObjClass.h"
LDAPObjClass::LDAPObjClass(){
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPObjClass::LDAPObjClass( )" << endl);
oid = string ();
desc = string ();
names = StringList ();
must = StringList();
may = StringList();
sup = StringList();
}
LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPObjClass::LDAPObjClass( )" << endl);
oid = oc.oid;
desc = oc.desc;
names = oc.names;
must = oc.must;
may = oc.may;
kind = oc.kind;
sup = oc.sup;
}
LDAPObjClass::LDAPObjClass (string oc_item) {
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPObjClass::LDAPObjClass( )" << endl);
LDAPObjectClass *o;
int ret;
const char *errp;
o = ldap_str2objectclass ( oc_item.c_str(), &ret, &errp, SCHEMA_PARSE_FLAG);
if (o) {
this->setNames (o->oc_names);
this->setDesc (o->oc_desc);
this->setOid (o->oc_oid);
this->setKind (o->oc_kind);
this->setMust (o->oc_at_oids_must);
this->setMay (o->oc_at_oids_may);
this->setSup (o->oc_sup_oids);
}
// else? -> error
}
LDAPObjClass::~LDAPObjClass() {
DEBUG(LDAP_DEBUG_DESTROY,"LDAPObjClass::~LDAPObjClass()" << endl);
}
void LDAPObjClass::setKind (int oc_kind) {
kind = oc_kind;
}
void LDAPObjClass::setNames (char **oc_names) {
names = StringList (oc_names);
}
void LDAPObjClass::setMust (char **oc_must) {
must = StringList (oc_must);
}
void LDAPObjClass::setMay (char **oc_may) {
may = StringList (oc_may);
}
void LDAPObjClass::setSup (char **oc_sup) {
sup = StringList (oc_sup);
}
void LDAPObjClass::setDesc (char *oc_desc) {
desc = string ();
if (oc_desc)
desc = oc_desc;
}
void LDAPObjClass::setOid (char *oc_oid) {
oid = string ();
if (oc_oid)
oid = oc_oid;
}
string LDAPObjClass::getOid () {
return oid;
}
string LDAPObjClass::getDesc () {
return desc;
}
StringList LDAPObjClass::getNames () {
return names;
}
StringList LDAPObjClass::getMust () {
return must;
}
StringList LDAPObjClass::getMay () {
return may;
}
StringList LDAPObjClass::getSup () {
return sup;
}
string LDAPObjClass::getName () {
if (names.empty())
return "";
else
return *(names.begin());
}

View file

@ -0,0 +1,100 @@
/*
* Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef LDAP_OBJCLASS_H
#define LDAP_OBJCLASS_H
#include <ldap_schema.h>
#include <string>
#include "StringList.h"
#define SCHEMA_PARSE_FLAG 0x03
using namespace std;
/**
* Represents the Object Class (from LDAP schema)
*/
class LDAPObjClass{
private :
StringList names, must, may, sup;
string desc, oid;
int kind;
public :
/**
* Constructs an empty object.
*/
LDAPObjClass();
/**
* Copy constructor
*/
LDAPObjClass (const LDAPObjClass& oc);
/**
* Constructs new object and fills the data structure by parsing the
* argument.
* @param oc_item description of object class is string returned
* by the search command. It is in the form:
* "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
* DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
*/
LDAPObjClass (string oc_item);
/**
* Destructor
*/
virtual ~LDAPObjClass();
/**
* Returns object class description
*/
string getDesc ();
/**
* Returns object class oid
*/
string getOid ();
/**
* Returns object class name (first one if there are more of them)
*/
string getName ();
/**
* Returns all object class names
*/
StringList getNames();
/**
* Returns list of required attributes
*/
StringList getMust();
/**
* Returns list of allowed (and not required) attributes
*/
StringList getMay();
/**
* Returns list of the OIDs of the superior ObjectClasses
*/
StringList getSup();
void setNames (char **oc_names);
void setMay (char **oc_may);
void setMust (char **oc_must);
void setDesc (char *oc_desc);
void setOid (char *oc_oid);
void setKind (int oc_kind);
void setSup (char **oc_sup);
};
#endif // LDAP_OBJCLASS_H

View file

@ -0,0 +1,59 @@
/*
* Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "debug.h"
#include "StringList.h"
#include "LDAPSchema.h"
using namespace std;
LDAPSchema::LDAPSchema(){
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPSchema::LDAPSchema( )" << endl);
}
LDAPSchema::~LDAPSchema() {
DEBUG(LDAP_DEBUG_DESTROY,"LDAPSchema::~LDAPSchema()" << endl);
}
void LDAPSchema::setObjectClasses (const StringList &ocs) {
DEBUG(LDAP_DEBUG_TRACE,"LDAPSchema::setObjectClasses()" << endl);
// parse the stringlist and save it to global map...
StringList::const_iterator i,j;
for (i = ocs.begin(); i != ocs.end(); i++) {
LDAPObjClass oc ( (*i) );
StringList names = oc.getNames();
// there could be more names for one object...
for (j = names.begin(); j != names.end(); j++) {
object_classes [(*j)] = LDAPObjClass (oc);
}
}
}
void LDAPSchema::setAttributeTypes (const StringList &ats) {
DEBUG(LDAP_DEBUG_TRACE,"LDAPSchema::setAttributeTypes()" << endl);
// parse the stringlist and save it to global map...
StringList::const_iterator i,j;
for (i = ats.begin(); i != ats.end(); i++) {
LDAPAttrType at ( (*i) );
StringList names = at.getNames();
// there could be more names for one object...
for (j = names.begin(); j != names.end(); j++) {
attr_types [(*j)] = LDAPAttrType (at);
}
}
}
LDAPObjClass LDAPSchema::getObjectClassByName (string name) {
return object_classes [name];
}
LDAPAttrType LDAPSchema::getAttributeTypeByName (string name) {
return attr_types [name];
}

View file

@ -0,0 +1,73 @@
/*
* Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#ifndef LDAP_SCHEMA_H
#define LDAP_SCHEMA_H
#include <ldap.h>
#include <string>
#include <map>
#include "LDAPObjClass.h"
#include "LDAPAttrType.h"
/**
* Represents the LDAP schema
*/
class LDAPSchema{
private :
/**
* map of object classes: index is name, value is LDAPObjClass object
*/
map <string, LDAPObjClass> object_classes;
/**
* map of attribute types: index is name, value is LDAPAttrType object
*/
map <string, LDAPAttrType> attr_types;
public :
/**
* Constructs an empty object
*/
LDAPSchema();
/**
* Destructor
*/
virtual ~LDAPSchema();
/**
* Fill the object_classes map
* @param oc description of one objectclass (string returned by search
* command), in form:
* "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
* DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
*/
void setObjectClasses (const StringList &oc);
/**
* Fill the attr_types map
* @param at description of one attribute type
* (string returned by search command), in form:
* "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
* EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
*/
void setAttributeTypes (const StringList &at);
/**
* Returns object class object with given name
*/
LDAPObjClass getObjectClassByName (std::string name);
/**
* Returns attribute type object with given name
*/
LDAPAttrType getAttributeTypeByName (string name);
};
#endif // LDAP_SCHEMA_H

View file

@ -6,48 +6,52 @@
lib_LTLIBRARIES = libldapcpp.la
libldapcpp_la_SOURCES = LDAPAddRequest.cpp \
LDAPAsynConnection.cpp \
LDAPAttribute.cpp \
LDAPAttributeList.cpp \
LDAPBindRequest.cpp \
LDAPCompareRequest.cpp \
LDAPConnection.cpp \
LDAPConstraints.cpp \
LDAPControl.cpp \
LDAPControlSet.cpp \
LDAPDeleteRequest.cpp \
LDAPEntry.cpp \
LDAPEntryList.cpp \
LDAPException.cpp \
LDAPExtRequest.cpp \
LDAPExtResult.cpp \
LDAPMessage.cpp \
LDAPMessageQueue.cpp \
LDAPModDNRequest.cpp \
LDAPModification.cpp \
LDAPModifyRequest.cpp \
LDAPModList.cpp \
LDAPRebind.cpp \
LDAPRebindAuth.cpp \
LDAPReferralException.cpp \
LDAPReferenceList.cpp \
LDAPRequest.cpp \
LDAPResult.cpp \
LDAPSearchReference.cpp \
LDAPSearchRequest.cpp \
LDAPSearchResult.cpp \
LDAPSearchResults.cpp \
LDAPUrl.cpp \
LDAPUrlList.cpp \
StringList.cpp
LDAPAsynConnection.cpp \
LDAPAttribute.cpp \
LDAPAttributeList.cpp \
LDAPAttrType.cpp \
LDAPBindRequest.cpp \
LDAPCompareRequest.cpp \
LDAPConnection.cpp \
LDAPConstraints.cpp \
LDAPControl.cpp \
LDAPControlSet.cpp \
LDAPDeleteRequest.cpp \
LDAPEntry.cpp \
LDAPEntryList.cpp \
LDAPException.cpp \
LDAPExtRequest.cpp \
LDAPExtResult.cpp \
LDAPMessage.cpp \
LDAPMessageQueue.cpp \
LDAPModDNRequest.cpp \
LDAPModification.cpp \
LDAPModifyRequest.cpp \
LDAPModList.cpp \
LDAPObjClass.cpp \
LDAPRebind.cpp \
LDAPRebindAuth.cpp \
LDAPReferralException.cpp \
LDAPReferenceList.cpp \
LDAPRequest.cpp \
LDAPResult.cpp \
LDAPSchema.cpp \
LDAPSearchReference.cpp \
LDAPSearchRequest.cpp \
LDAPSearchResult.cpp \
LDAPSearchResults.cpp \
LDAPUrl.cpp \
LDAPUrlList.cpp \
StringList.cpp
include_HEADERS = LDAPAsynConnection.h \
LDAPAttribute.h \
LDAPAttributeList.h \
LDAPAttrType.h \
LDAPConnection.h \
LDAPConstraints.h \
LDAPControl.h \
LDAPControlSet.h \
LDAPControlSet.h \
LDAPEntry.h \
LDAPEntryList.h \
LDAPException.h \
@ -56,11 +60,13 @@ include_HEADERS = LDAPAsynConnection.h \
LDAPMessageQueue.h \
LDAPModification.h \
LDAPModList.h \
LDAPObjClass.h \
LDAPRebind.h \
LDAPRebindAuth.h \
LDAPReferralException.h \
LDAPReferenceList.h \
LDAPResult.h \
LDAPSchema.h \
LDAPSearchReference.h \
LDAPSearchResult.h \
LDAPSearchResults.h \
@ -80,10 +86,4 @@ noinst_HEADERS = LDAPAddRequest.h \
libldapcpp_la_LIBADD = -lldap -llber
libldapcpp_la_LDFLAGS = -version-info 0:1:0
noinst_PROGRAMS = main
main_SOURCES = main.cpp
main_LDADD = ./libldapcpp.la

View file

@ -1,6 +1,8 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Makefile.in generated by automake 1.7.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -10,241 +12,421 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
DLLTOOL = @DLLTOOL@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
lib_LTLIBRARIES = libldapcpp.la
libldapcpp_la_SOURCES = LDAPAddRequest.cpp LDAPAsynConnection.cpp LDAPAttribute.cpp LDAPAttributeList.cpp LDAPBindRequest.cpp LDAPCompareRequest.cpp LDAPConnection.cpp LDAPConstraints.cpp LDAPControl.cpp LDAPControlSet.cpp LDAPDeleteRequest.cpp LDAPEntry.cpp LDAPEntryList.cpp LDAPException.cpp LDAPExtRequest.cpp LDAPExtResult.cpp LDAPMessage.cpp LDAPMessageQueue.cpp LDAPModDNRequest.cpp LDAPModification.cpp LDAPModifyRequest.cpp LDAPModList.cpp LDAPRebind.cpp LDAPRebindAuth.cpp LDAPReferralException.cpp LDAPReferenceList.cpp LDAPRequest.cpp LDAPResult.cpp LDAPSearchReference.cpp LDAPSearchRequest.cpp LDAPSearchResult.cpp LDAPSearchResults.cpp LDAPUrl.cpp LDAPUrlList.cpp StringList.cpp
libldapcpp_la_SOURCES = LDAPAddRequest.cpp \
LDAPAsynConnection.cpp \
LDAPAttribute.cpp \
LDAPAttributeList.cpp \
LDAPAttrType.cpp \
LDAPBindRequest.cpp \
LDAPCompareRequest.cpp \
LDAPConnection.cpp \
LDAPConstraints.cpp \
LDAPControl.cpp \
LDAPControlSet.cpp \
LDAPDeleteRequest.cpp \
LDAPEntry.cpp \
LDAPEntryList.cpp \
LDAPException.cpp \
LDAPExtRequest.cpp \
LDAPExtResult.cpp \
LDAPMessage.cpp \
LDAPMessageQueue.cpp \
LDAPModDNRequest.cpp \
LDAPModification.cpp \
LDAPModifyRequest.cpp \
LDAPModList.cpp \
LDAPObjClass.cpp \
LDAPRebind.cpp \
LDAPRebindAuth.cpp \
LDAPReferralException.cpp \
LDAPReferenceList.cpp \
LDAPRequest.cpp \
LDAPResult.cpp \
LDAPSchema.cpp \
LDAPSearchReference.cpp \
LDAPSearchRequest.cpp \
LDAPSearchResult.cpp \
LDAPSearchResults.cpp \
LDAPUrl.cpp \
LDAPUrlList.cpp \
StringList.cpp
include_HEADERS = LDAPAsynConnection.h LDAPAttribute.h LDAPAttributeList.h LDAPConnection.h LDAPConstraints.h LDAPControl.h LDAPControlSet.h LDAPEntry.h LDAPEntryList.h LDAPException.h LDAPExtResult.h LDAPMessage.h LDAPMessageQueue.h LDAPModification.h LDAPModList.h LDAPRebind.h LDAPRebindAuth.h LDAPReferralException.h LDAPReferenceList.h LDAPResult.h LDAPSearchReference.h LDAPSearchResult.h LDAPSearchResults.h LDAPUrl.h LDAPUrlList.h StringList.h
include_HEADERS = LDAPAsynConnection.h \
LDAPAttribute.h \
LDAPAttributeList.h \
LDAPAttrType.h \
LDAPConnection.h \
LDAPConstraints.h \
LDAPControl.h \
LDAPControlSet.h \
LDAPEntry.h \
LDAPEntryList.h \
LDAPException.h \
LDAPExtResult.h \
LDAPMessage.h \
LDAPMessageQueue.h \
LDAPModification.h \
LDAPModList.h \
LDAPObjClass.h \
LDAPRebind.h \
LDAPRebindAuth.h \
LDAPReferralException.h \
LDAPReferenceList.h \
LDAPResult.h \
LDAPSchema.h \
LDAPSearchReference.h \
LDAPSearchResult.h \
LDAPSearchResults.h \
LDAPUrl.h \
LDAPUrlList.h \
StringList.h
noinst_HEADERS = LDAPAddRequest.h LDAPBindRequest.h LDAPCompareRequest.h LDAPDeleteRequest.h LDAPExtRequest.h LDAPModDNRequest.h LDAPModifyRequest.h LDAPRequest.h LDAPSearchRequest.h
noinst_HEADERS = LDAPAddRequest.h \
LDAPBindRequest.h \
LDAPCompareRequest.h \
LDAPDeleteRequest.h \
LDAPExtRequest.h \
LDAPModDNRequest.h \
LDAPModifyRequest.h \
LDAPRequest.h \
LDAPSearchRequest.h
libldapcpp_la_LIBADD = -lldap -llber
libldapcpp_la_LDFLAGS = -version-info 0:1:0
noinst_PROGRAMS = main
main_SOURCES = main.cpp
main_LDADD = ./libldapcpp.la
subdir = src
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(lib_LTLIBRARIES)
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(lib_LTLIBRARIES)
libldapcpp_la_DEPENDENCIES =
am_libldapcpp_la_OBJECTS = LDAPAddRequest.lo LDAPAsynConnection.lo \
LDAPAttribute.lo LDAPAttributeList.lo LDAPAttrType.lo \
LDAPBindRequest.lo LDAPCompareRequest.lo LDAPConnection.lo \
LDAPConstraints.lo LDAPControl.lo LDAPControlSet.lo \
LDAPDeleteRequest.lo LDAPEntry.lo LDAPEntryList.lo \
LDAPException.lo LDAPExtRequest.lo LDAPExtResult.lo \
LDAPMessage.lo LDAPMessageQueue.lo LDAPModDNRequest.lo \
LDAPModification.lo LDAPModifyRequest.lo LDAPModList.lo \
LDAPObjClass.lo LDAPRebind.lo LDAPRebindAuth.lo \
LDAPReferralException.lo LDAPReferenceList.lo LDAPRequest.lo \
LDAPResult.lo LDAPSchema.lo LDAPSearchReference.lo \
LDAPSearchRequest.lo LDAPSearchResult.lo LDAPSearchResults.lo \
LDAPUrl.lo LDAPUrlList.lo StringList.lo
libldapcpp_la_OBJECTS = $(am_libldapcpp_la_OBJECTS)
DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libldapcpp_la_DEPENDENCIES =
libldapcpp_la_OBJECTS = LDAPAddRequest.lo LDAPAsynConnection.lo \
LDAPAttribute.lo LDAPAttributeList.lo LDAPBindRequest.lo \
LDAPCompareRequest.lo LDAPConnection.lo LDAPConstraints.lo \
LDAPControl.lo LDAPControlSet.lo LDAPDeleteRequest.lo LDAPEntry.lo \
LDAPEntryList.lo LDAPException.lo LDAPExtRequest.lo LDAPExtResult.lo \
LDAPMessage.lo LDAPMessageQueue.lo LDAPModDNRequest.lo \
LDAPModification.lo LDAPModifyRequest.lo LDAPModList.lo LDAPRebind.lo \
LDAPRebindAuth.lo LDAPReferralException.lo LDAPReferenceList.lo \
LDAPRequest.lo LDAPResult.lo LDAPSearchReference.lo \
LDAPSearchRequest.lo LDAPSearchResult.lo LDAPSearchResults.lo \
LDAPUrl.lo LDAPUrlList.lo StringList.lo
noinst_PROGRAMS = main$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
main_OBJECTS = main.$(OBJEXT)
main_DEPENDENCIES = ./libldapcpp.la
main_LDFLAGS =
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/LDAPAddRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPAsynConnection.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPAttrType.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPAttribute.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPAttributeList.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPBindRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPCompareRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPConnection.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPConstraints.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPControl.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPControlSet.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPDeleteRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPEntry.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPEntryList.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPException.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPExtRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPExtResult.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPMessage.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPMessageQueue.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPModDNRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPModList.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPModification.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPModifyRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPObjClass.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPRebind.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPRebindAuth.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPReferenceList.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPReferralException.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPResult.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPSchema.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPSearchReference.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPSearchRequest.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPSearchResult.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPSearchResults.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/LDAPUrl.Plo ./$(DEPDIR)/LDAPUrlList.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/StringList.Plo
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
HEADERS = $(include_HEADERS) $(noinst_HEADERS)
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libldapcpp_la_SOURCES)
HEADERS = $(include_HEADERS) $(noinst_HEADERS)
DIST_COMMON = ./stamp-h.in Makefile.am Makefile.in config.h.in
DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) Makefile.am \
Makefile.in config.h.in
SOURCES = $(libldapcpp_la_SOURCES)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/LDAPAddRequest.P .deps/LDAPAsynConnection.P \
.deps/LDAPAttribute.P .deps/LDAPAttributeList.P .deps/LDAPBindRequest.P \
.deps/LDAPCompareRequest.P .deps/LDAPConnection.P \
.deps/LDAPConstraints.P .deps/LDAPControl.P .deps/LDAPControlSet.P \
.deps/LDAPDeleteRequest.P .deps/LDAPEntry.P .deps/LDAPEntryList.P \
.deps/LDAPException.P .deps/LDAPExtRequest.P .deps/LDAPExtResult.P \
.deps/LDAPMessage.P .deps/LDAPMessageQueue.P .deps/LDAPModDNRequest.P \
.deps/LDAPModList.P .deps/LDAPModification.P .deps/LDAPModifyRequest.P \
.deps/LDAPRebind.P .deps/LDAPRebindAuth.P .deps/LDAPReferenceList.P \
.deps/LDAPReferralException.P .deps/LDAPRequest.P .deps/LDAPResult.P \
.deps/LDAPSearchReference.P .deps/LDAPSearchRequest.P \
.deps/LDAPSearchResult.P .deps/LDAPSearchResults.P .deps/LDAPUrl.P \
.deps/LDAPUrlList.P .deps/StringList.P .deps/main.P
SOURCES = $(libldapcpp_la_SOURCES) $(main_SOURCES)
OBJECTS = $(libldapcpp_la_OBJECTS) $(main_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .cpp .lo .o .obj .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile
.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
config.h: stamp-h
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=src/config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h 2> /dev/null
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \
else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status src/config.h
$(srcdir)/config.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
clean-hdr:
touch $(srcdir)/config.h.in
distclean-hdr:
-rm -f config.h
maintainer-clean-hdr:
mostlyclean-libLTLIBRARIES:
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
distclean-libLTLIBRARIES:
maintainer-clean-libLTLIBRARIES:
-rm -f config.h stamp-h1
libLTLIBRARIES_INSTALL = $(INSTALL)
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
# FIXME: We should only use cygpath when building on Windows,
# and only if it is available.
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" = "$$p" && dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libldapcpp.la: $(libldapcpp_la_OBJECTS) $(libldapcpp_la_DEPENDENCIES)
$(CXXLINK) -rpath $(libdir) $(libldapcpp_la_LDFLAGS) $(libldapcpp_la_OBJECTS) $(libldapcpp_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.o core *.core
-rm -f *.$(OBJEXT)
clean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAddRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAsynConnection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAttrType.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAttribute.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPAttributeList.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPBindRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPCompareRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPConnection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPConstraints.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPControl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPControlSet.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPDeleteRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPEntry.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPEntryList.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPException.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPExtRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPExtResult.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPMessage.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPMessageQueue.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModDNRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModList.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModification.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPModifyRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPObjClass.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRebind.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRebindAuth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPReferenceList.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPReferralException.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPResult.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSchema.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchReference.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchRequest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchResult.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPSearchResults.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPUrl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPUrlList.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringList.Plo@am__quote@
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
distclean-depend:
-rm -rf ./$(DEPDIR)
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
.cpp.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
.cpp.lo:
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCXX_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
mostlyclean-libtool:
-rm -f *.lo
@ -253,235 +435,205 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
libldapcpp.la: $(libldapcpp_la_OBJECTS) $(libldapcpp_la_DEPENDENCIES)
$(CXXLINK) -rpath $(libdir) $(libldapcpp_la_LDFLAGS) $(libldapcpp_la_OBJECTS) $(libldapcpp_la_LIBADD) $(LIBS)
mostlyclean-noinstPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
distclean-noinstPROGRAMS:
maintainer-clean-noinstPROGRAMS:
main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES)
@rm -f main$(EXEEXT)
$(CXXLINK) $(main_LDFLAGS) $(main_OBJECTS) $(main_LDADD) $(LIBS)
.cpp.o:
$(CXXCOMPILE) -c $<
.cpp.obj:
$(CXXCOMPILE) -c `cygpath -w $<`
.cpp.lo:
$(LTCXXCOMPILE) -c $<
-rm -f libtool
uninstall-info-am:
includeHEADERS_INSTALL = $(INSTALL_HEADER)
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(includedir)
@list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
$(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
list='$(include_HEADERS)'; for p in $$list; do \
rm -f $(DESTDIR)$(includedir)/$$p; \
@list='$(include_HEADERS)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
rm -f $(DESTDIR)$(includedir)/$$f; \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
mostlyclean-tags:
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
clean-tags:
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src
top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign src/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
%.o: %.cpp
@echo '$(CXXCOMPILE) -c $<'; \
$(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.cpp
@echo '$(LTCXXCOMPILE) -c $<'; \
$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
install-exec-am: install-libLTLIBRARIES
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
install: install-am
install-exec: install-exec-am
install-data-am: install-includeHEADERS
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-libLTLIBRARIES uninstall-includeHEADERS
uninstall: uninstall-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) config.h
all-redirect: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-noinstPROGRAMS mostlyclean-tags \
mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \
clean-noinstPROGRAMS clean-tags clean-depend \
clean-generic mostlyclean-am
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
distclean-am: distclean-hdr distclean-libLTLIBRARIES distclean-compile \
distclean-libtool distclean-noinstPROGRAMS \
distclean-tags distclean-depend distclean-generic \
clean-am
-rm -f libtool
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-hdr \
maintainer-clean-libLTLIBRARIES \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
distclean-am: clean-am distclean-compile distclean-depend \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am: install-includeHEADERS
install-exec-am: install-libLTLIBRARIES
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool mostlyclean-noinstPROGRAMS \
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
maintainer-clean-noinstPROGRAMS uninstall-includeHEADERS \
install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
check-am installcheck-am installcheck all-recursive-am install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-info-am \
uninstall-libLTLIBRARIES
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-depend distclean-generic \
distclean-hdr distclean-libtool distclean-tags distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am \
install-includeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-includeHEADERS \
uninstall-info-am uninstall-libLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -1,17 +1,62 @@
/* src/config.h.in. Generated automatically from configure.in by autoheader. */
/* src/config.h.in. Generated from configure.in by autoheader. */
#undef WITH_DEBUG
/* Define if you have the <dlfcn.h> header file. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the `resolv' library (-lresolv). */
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define if you can safely include both <sys/time.h> and <time.h>. */
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */

View file

@ -204,6 +204,7 @@ static int ldapdb_auxprop_plug_init(const sasl_utils_t *utils,
{
ldapctx tmp, *p;
const char *s;
unsigned len;
if(!out_version || !plug) return SASL_BADPARAM;
@ -213,13 +214,27 @@ static int ldapdb_auxprop_plug_init(const sasl_utils_t *utils,
if(!tmp.uri) return SASL_BADPARAM;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_id",
(const char **)&tmp.id.bv_val, (unsigned *)&tmp.id.bv_len);
(const char **)&tmp.id.bv_val, &len);
tmp.id.bv_len = len;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_pw",
(const char **)&tmp.pw.bv_val, (unsigned *)&tmp.pw.bv_len);
(const char **)&tmp.pw.bv_val, &len);
tmp.pw.bv_len = len;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_mech",
(const char **)&tmp.mech.bv_val, (unsigned *)&tmp.mech.bv_len);
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_rc", &s, NULL);
if(s && setenv("LDAPRC", s, 1)) return SASL_BADPARAM;
(const char **)&tmp.mech.bv_val, &len);
tmp.mech.bv_len = len;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_rc", &s, &len);
if (s)
{
char *str = utils->malloc(sizeof("LDAPRC=")+len);
if (!str) return SASL_NOMEM;
strcpy( str, "LDAPRC=" );
strcpy( str + sizeof("LDAPRC=")-1, s );
if (putenv(str))
{
utils->free(str);
return SASL_NOMEM;
}
}
p = utils->malloc(sizeof(ldapctx));
if (!p) return SASL_NOMEM;

View file

@ -40,7 +40,6 @@ Medium projects
---------------
Implement authPassword (RFC 3112)
Implement DIT Structure Rules and Name Forms
Implement LDAP Assertion Control
Implement LDAP Transactions extension
Redesign slapd memory allocation fault handling
Localize tools

View file

@ -197,7 +197,7 @@ file compares.
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -210,7 +210,7 @@ status and a diagnostic message being written to standard error.
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -295,7 +295,7 @@ exists and has the contents:
dn: cn=Modify Me,dc=example,dc=com
changetype: modify
replace: mail
mail: modme@OpenLDAP.org
mail: modme@example.com
-
add: title
title: Grand Poobah
@ -381,7 +381,7 @@ exit status and a diagnostic message being written to standard error.
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -231,7 +231,7 @@ status and a diagnostic message being written to standard error.
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -183,7 +183,7 @@ the command will require the operation to be successful
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -281,15 +281,15 @@ output in LDAP Data Interchange Format or
.BR ldif (5):
.LP
.nf
version: 1
version: 1
# bjensen, example, net
dn: uid=bjensen,dc=example,dc=net
objectClass: person
objectClass: dcObject
uid: bjensen
cn: Barbara Jensen
sn: Jensen
# bjensen, example, net
dn: uid=bjensen,dc=example,dc=net
objectClass: person
objectClass: dcObject
uid: bjensen
cn: Barbara Jensen
sn: Jensen
...
.fi
.LP
@ -313,20 +313,20 @@ The output might look something like this if two entries are found:
.LP
.nf
dn: uid=jts,dc=example,dc=com
cn: John Smith
cn: John T. Smith
sn: Smith
sn;lang-en: Smith
sn;lang-de: Schmidt
telephoneNumber: 1 555 123-4567
cn: John Smith
cn: John T. Smith
sn: Smith
sn;lang-en: Smith
sn;lang-de: Schmidt
telephoneNumber: 1 555 123-4567
dn: uid=sss,dc=example,dc=com
cn: Steve Smith
cn: Steve S. Smith
sn: Smith
sn;lang-en: Smith
sn;lang-de: Schmidt
telephoneNumber: 1 555 765-4321
dn: uid=sss,dc=example,dc=com
cn: Steve Smith
cn: Steve S. Smith
sn: Smith
sn;lang-en: Smith
sn;lang-de: Schmidt
telephoneNumber: 1 555 765-4321
.fi
.LP
The command:
@ -401,7 +401,7 @@ a diagnostic message being written to standard error.
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -146,7 +146,7 @@ Issue StartTLS (Transport Layer Security) extended operation. If you use
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -350,7 +350,7 @@ which must be freed by the caller using supplied deallocation routines.
.BR lber-sockbuf (3),
.BR lber-types (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -244,7 +244,7 @@ can be achieved like so:
ber = ber_alloc_t( LBER_USE_DER );
if ( ber == NULL ) {
/* error */
/* error */
}
rc = ber_printf( ber, "{siiiib{v}}", dn, scope, ali,
@ -269,7 +269,7 @@ The return values for all of these functions are declared in the
.BR lber-sockbuf (3),
.BR lber-types (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -46,7 +46,7 @@ arbitrary dynamically allocated objects.
.BR lber-types (3)
.LP
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -164,7 +164,7 @@ does nothing. If \fIfreebuf\fP is zero, the internal buffer is not freed.
.BR lber-memory (3)
.LP
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -283,9 +283,9 @@ case insensitive string comparison
.BR slapd (8),
.BR draft-ietf-ldapext-ldap-c-api-xx.txt \ <http://www.ietf.org>
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.
.LP
These API manual pages are based upon descriptions provided in the

View file

@ -62,7 +62,7 @@ for details.
.BR ldap_result (3),
.BR ldap_error (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -84,7 +84,7 @@ also directly return LDAP error codes.
.BR ldap (3),
.BR ldap_modify (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -221,7 +221,7 @@ for more information.
.B Cyrus SASL
(http://asg.web.cmu.edu/sasl/)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -54,7 +54,7 @@ There is no way to compare binary values, but there should be.
.BR ldap (3),
.BR ldap_error (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -51,7 +51,7 @@ non-negative message id of the request if things went ok.
.BR ldap (3),
.BR ldap_error (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -28,8 +28,9 @@ is accessible using
and
.BR ldap_set_option (3)
with the
.B LDAP_OPT_ERROR_NUMBER
option.
.B LDAP_OPT_RESULT_CODE
option (previously called
.BR LDAP_OPT_ERROR_NUMBER ).
.LP
The
.B ldap_result2error()
@ -205,7 +206,7 @@ library routine.
.BR ldap (3),
.BR perror (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -70,7 +70,7 @@ return dynamically allocated memory that must be freed by the caller via
.BR ldap_get_values (3),
.BR ldap_error (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -77,7 +77,7 @@ for a description of possible error codes.
.BR ldap_get_values (3),
.BR ldap_get_dn (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -80,7 +80,7 @@ NULL is returned. If an error occurs in
.BR ldap_first_entry (3),
.BR ldap_first_reference (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -69,7 +69,7 @@ NULL is returned. If an error occurs in
.BR ldap_search (3),
.BR ldap_parse_reference (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -234,7 +234,7 @@ These routines dynamically allocate memory that the caller must free.
.BR ldap_memfree (3),
.BR ldap_value_free (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -99,7 +99,7 @@ using the supplied routines.
.BR ldap_first_attribute (3),
.BR ldap_error (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -48,8 +48,8 @@ defined below.
int mod_op;
char *mod_type;
union {
char **modv_strvals;
struct berval **modv_bvals;
char **modv_strvals;
struct berval **modv_bvals;
} mod_vals;
struct ldapmod *mod_next;
} LDAPMod;
@ -116,7 +116,7 @@ field of \fIld\fP.
.BR ldap_error (3),
.BR ldap_add (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -78,7 +78,7 @@ for more details.
.BR ldap (3),
.BR ldap_error (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -70,7 +70,7 @@ for more details.
char *ld_matched;
int ld_refhoplimit;
unsigned long ld_options;
#define LDAP_OPT_REFERRALS 0x00000002 /* set by default */
#define LDAP_OPT_REFERRALS 0x00000002 /* set by default */
#define LDAP_OPT_RESTART 0x00000004
/* ... other stuff you should not mess with ... */
} LDAP;
@ -116,7 +116,7 @@ in the LDAP structure.
.BR ldap_bind (3),
.BR errno (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -13,7 +13,8 @@ OpenLDAP LDAP (libldap, -lldap)
.LP
.ft B
int ldap_parse_reference( LDAP *ld, LDAPMessage *reference,
char ***referralsp, LDAPControl ***serverctrlsp, int freeit )
char ***referralsp, LDAPControl ***serverctrlsp,
int freeit )
.SH DESCRIPTION
.LP
The
@ -57,7 +58,7 @@ Upon success LDAP_SUCCESS is returned. Otherwise the values of the
.BR ldap_get_values (3),
.BR ldap_controls_free (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -14,7 +14,8 @@ OpenLDAP LDAP (libldap, -lldap)
.ft B
int ldap_parse_result( LDAP *ld, LDAPMessage *result,
int *errcodep, char **matcheddnp, char **errmsgp,
char ***referralsp, LDAPControl ***serverctrlsp, int freeit )
char ***referralsp, LDAPControl ***serverctrlsp,
int freeit )
.LP
.ft B
int ldap_parse_sasl_bind_result( LDAP *ld, LDAPMessage *result,
@ -102,7 +103,7 @@ result parameters are undefined.
.BR ldap_controls_free (3),
.BR lber-types (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -96,13 +96,14 @@ The possible result types returned are:
The
.B ldap_msgfree()
routine is used to free the memory allocated for
a result by
result(s) by
.B ldap_result()
or
.BR ldap_search_s (3)
and friends. It takes
a pointer to the result to be freed and returns the type of the
message it freed.
and friends.
It takes a pointer to the result or result chain to be freed and returns
the type of the last message in the chain.
If the parameter is NULL, the function does nothing and returns zero.
.LP
The
.B ldap_msgtype()
@ -125,7 +126,7 @@ return -1 on error.
.BR ldap_first_message (3),
.BR select (2)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -324,8 +324,8 @@ Unexpected end of data.
.SH SEE ALSO
.BR ldap (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -127,7 +127,7 @@ in <ldap.h>.
.BR ldap_getfilter (3),
.BR ldap_error (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -77,10 +77,14 @@ For example:
LDAP *ld;
LDAPMessage *res;
/* ... call to ldap_search_s(), fill in res, retrieve sn attr ... */
/*
* ... call to ldap_search_s(), fill in res,
* retrieve sn attr ...
*/
/* now sort the entries on surname attribute */
if ( ldap_sort_entries( ld, &res, "sn", ldap_sort_strcasecmp ) != 0 )
if ( ldap_sort_entries( ld, &res, "sn",
ldap_sort_strcasecmp ) != 0 )
ldap_perror( ld, "ldap_sort_entries" );
.ft
.fi
@ -106,7 +110,7 @@ deallocation routines.
.BR ldap_result (3),
.BR qsort (3)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -278,7 +278,7 @@ local ldap configuration file
.SH AUTHOR
Kurt Zeilenga, The OpenLDAP Project
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -16,12 +16,12 @@ The basic form of an LDIF entry is:
.LP
.nf
.ft tt
dn: <distinguished name>
<attrdesc>: <attrvalue>
<attrdesc>: <attrvalue>
<attrdesc>:: <base64-encoded-value>
<attrdesc>:< <URL>
...
dn: <distinguished name>
<attrdesc>: <attrvalue>
<attrdesc>: <attrvalue>
<attrdesc>:: <base64-encoded-value>
<attrdesc>:< <URL>
...
.ft
.fi
.LP
@ -33,8 +33,8 @@ or tab, e.g.,
.LP
.nf
.ft tt
dn: cn=Barbara J Jensen,dc=exam
ple,dc=com
dn: cn=Barbara J Jensen,dc=exam
ple,dc=com
.ft
.fi
.LP
@ -44,8 +44,8 @@ Multiple attribute values are specified on separate lines, e.g.,
.LP
.nf
.ft tt
cn: Barbara J Jensen
cn: Babs Jensen
cn: Barbara J Jensen
cn: Babs Jensen
.ft
.fi
.LP
@ -56,7 +56,7 @@ the value " begins with a space" would be encoded like this:
.LP
.nf
.ft tt
cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
.ft
.fi
.LP
@ -66,7 +66,7 @@ in the file /tmp/value would be listed like this:
.LP
.nf
.ft tt
cn:< file:///tmp/value
cn:< file:///tmp/value
.ft
.fi
Other URI schemes (ftp,http) may be supported as well.
@ -78,28 +78,28 @@ Here is an example of an LDIF file containing three entries.
.LP
.nf
.ft tt
dn: cn=Barbara J Jensen,dc=example,dc=com
cn: Barbara J Jensen
cn: Babs Jensen
objectclass: person
description:< file://tmp/babs
sn: Jensen
dn: cn=Barbara J Jensen,dc=example,dc=com
cn: Barbara J Jensen
cn: Babs Jensen
objectclass: person
description:< file://tmp/babs
sn: Jensen
dn: cn=Bjorn J Jensen,dc=example,dc=com
cn: Bjorn J Jensen
cn: Bjorn Jensen
objectclass: person
sn: Jensen
dn: cn=Bjorn J Jensen,dc=example,dc=com
cn: Bjorn J Jensen
cn: Bjorn Jensen
objectclass: person
sn: Jensen
dn: cn=Jennifer J Jensen,dc=example,dc=com
cn: Jennifer J Jensen
cn: Jennifer Jensen
objectclass: person
sn: Jensen
jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
...
dn: cn=Jennifer J Jensen,dc=example,dc=com
cn: Jennifer J Jensen
cn: Jennifer Jensen
objectclass: person
sn: Jensen
jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
...
.ft
.fi
.LP
@ -113,7 +113,7 @@ Jensen's entry is encoded using base 64.
.LP
"LDAP Data Interchange Format," Good, G., RFC 2849.
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -10,9 +10,11 @@ ETCDIR/slapd.conf
The BDB backend to
.BR slapd (8)
is the recommended backend for a normal slapd database.
However, it takes more care than with the LDBM backend to configure
it properly.
It uses the Sleepycat Berkeley DB (BDB) package to store data.
It makes extensive use of indexing and caching to speed data access.
.TP
.LP
It is noted that these options are intended to complement
Berkeley DB configuration options set in the environment's
.B DB_CONFIG
@ -130,4 +132,4 @@ Berkeley DB configuration file
.BR slapadd (8),
.BR slapcat (8),
.BR slapindex (8),
.BR Berkeley DB documentation .
Berkeley DB documentation.

View file

@ -9,8 +9,10 @@ ETCDIR/slapd.conf
.SH DESCRIPTION
The LDBM backend to
.BR slapd (8)
is a database which uses one of BerkeleyDB, GNU DBM, MDBM or NDBM to
store data.
is the database backend which is easiest to configure.
However, it does not offer the data durability features of the BDB
backend.
It uses Berkeley DB or GDBM to store data.
It makes extensive use of indexing and caching to speed data access.
.SH CONFIGURATION
These
@ -102,8 +104,11 @@ can be decomposed into
.B subfinal
indices.
The special type
.B nolang
may be specified to disallow use of this index by language subtypes.
.B notags
(or
.BR nolang )
may be specified to disallow use of this index by subtypes with tagging
options (such as language options).
The special type
.B nosubtypes
may be specified to disallow use of this index by named subtypes.

View file

@ -679,6 +679,61 @@ been written:
.fi
.LP
with the advantage of saving one rewrite pass ...)
.SH PROXY CACHE EXTENSION
The proxy cache extension to
.B meta
backend allows caching of LDAP search requests (queries). For an incoming query, the
proxy cache determines its corresponding \fBtemplate\fP. If the template was
specified as cacheable using the \fBaddtemplate\fP directive and the request is
contained in a cached request, it is answered from the proxy cache. Otherwise,
the proxy cache obtains and caches results from target(s) specified by the
\fBuri\fP directive.
.LP
A template is defined by a filter string and an index identifying a set of
attributes. The \fBtemplate string\fP for a query can be obtained by
removing assertion values from the RFC 2254 representation of its search
filter. A query belongs to a template if its template string and set of
projected attributes correspond to a cacheable template. Examples of template strings are (mail=), (|(sn=)(cn=)), (&(sn=)(givenName=)).
.LP
The following cache specific directives can be used to configure the proxy
cache:
.TP
.B cacheparams <lo_thresh> <hi_thresh> <numattrsets> <max_entries> <cc_period>
The directive enables proxy caching in the \fBmeta\fP backend and sets general
cache parameters. Cache replacement is invoked when the cache size crosses the
<hi_thresh> bytes and continues till the cache size is greater than <lo_thresh>
bytes. <numattrsets> should be equal to the number of following \fBattrset\fP
directives. Queries are cached only if they correspond to a cacheable template
(specified by the \fBaddtemplate\fP directive) and the number of entries
returned is less than <max_entries>. Consistency check is performed every
<cc_period> duration (specified in secs). In each cycle queries with expired
"time to live(\fBTTL\fP)" are removed. A sample cache configuration is:
.LP
.RS
cacheparams \fB10000 150000 1 50 100\fP
.RE
.TP
.B attrset <index> <attrs...>
Used to associate a set of attributes <attrs..> with an <index>. Each attribute
set is associated with an integer from 0 to <numattrsets>-1. These indices are
used by the \fBaddtemplate\fP directive to define cacheable templates.
.TP
.B addtemplate <template_string> <attrset_index> <ttl>
Specifies a cacheable template and "time to live" (in sec) <ttl> of queries
belonging to the template.
.LP
The following adds a template with filter string (&sn=)(givenName=)) and attributes mail, postaladdress, telephonenumber and a TTL of 1 hour.
.LP
.RS
.nf
attrset \fB0 mail postaladdress telephonenumber\fP
addtemplate \fB(&(sn=)(givenName=)) 0 3600\fP
.fi
.RE
.SH FILES
.TP
ETCDIR/slapd.conf

View file

@ -42,7 +42,7 @@ directive.
.LP
The following directives can be used:
.TP
.B l <locality>
.B l <locality>
The
.B <locality>
string is added to the "\fIcn=Monitor\fP" entry as value of the
@ -69,7 +69,7 @@ file:
.LP
.RS
.nf
database monitor
database monitor
.fi
.RE
.TP

View file

@ -16,9 +16,9 @@ front-end.
.LP
This backend is is primarily intended to be used in prototypes.
.SH WARNING
.B "This backend's calling conventions have changed since OpenLDAP 2.0."
The abandon operation now gets a new "pid:" line.
The "msgid:" lines will be removed in a future version.
The
.B abandon
shell command has been removed since OpenLDAP 2.1.
.SH CONFIGURATION
These
.B slapd.conf
@ -33,14 +33,6 @@ These options specify the pathname and arguments of the program to
execute in response to the given LDAP operation.
Each option is followed by the input lines that the program receives:
.TP
.B abandon <pathname> <argument>...
.nf
ABANDON
msgid: <message ID of operation to abandon>
<repeat { "suffix:" <database suffix DN> }>
pid: <process ID of operation to abandon>
.fi
.TP
.B add <pathname> <argument>...
.nf
ADD
@ -129,7 +121,7 @@ want the backend to handle.
Operations for which a command is not supplied will be refused with an
"unwilling to perform" error.
.LP
The commands - except \fBabandon\fP and \fBunbind\fP - should output:
The commands - except \fBunbind\fP - should output:
.RS
.nf
RESULT

View file

@ -35,7 +35,7 @@ is as follows:
# comment - these options apply to every database
<global configuration options>
# first database definition & configuration options
database <backend 1 type>
database <backend 1 type>
<configuration options specific to backend 1>
# subsequent database definitions & configuration options
...
@ -629,8 +629,10 @@ Used to specify the fully qualified domain name used for SASL processing.
Specify SASL realm. Default is empty.
.TP
.B sasl-regexp <match> <replace>
Used by the SASL authorization mechanism to convert a SASL authenticated
username to an LDAP DN. When an authorization request is received, the SASL
Used by the SASL mechanism to convert a SASL authenticated
username to an LDAP DN used for authorization purposes. Note that
the resultant DN need not refer to an existing entry to be considered
valid. When an authorization request is received, the SASL
.B USERNAME, REALM,
and
.B MECHANISM
@ -639,7 +641,7 @@ form
.RS
.RS
.TP
.B uid=<username>[,cn=<realm>],cn=<mechanism>,cn=auth
.B UID=<username>[[,CN=<realm>],CN=<mechanism>,]CN=auth
.RE
This SASL name is then compared against the
@ -651,11 +653,9 @@ string. If there are wildcard strings in the
.B match
regular expression that are enclosed in parenthesis, e.g.
.RS
.RS
.TP
.B uid=(.*),cn=.*
.B UID=([^,]*),CN=.*
.RE
.RE
then the portion of the SASL name that matched the wildcard will be stored
in the numbered placeholder variable $1. If there are other wildcard strings
@ -664,15 +664,20 @@ placeholders can then be used in the
.B replace
string, e.g.
.RS
.RS
.TP
.B cn=$1,ou=Accounts,dc=$2,dc=$4.
.B UID=$1,OU=Accounts,DC=example,DC=com
.RE
The replaced SASL name can be either a DN or an LDAP URI. If the
latter, the server will use the URI to search its own database(s)
and, if the search returns exactly one entry, the SASL name is
replaced by the DN of that entry. The LDAP URI must have no
hostport, attrs, or extensions components, e.g.
.RS
.TP
.B ldap:///OU=Accounts,DC=example,DC=com??one?(UID=$1)
.RE
The replaced SASL name can be either a DN or an LDAP URI. If the latter, the slapd
server will use the URI to search its own database, and if the search returns
exactly one entry, the SASL name is replaced by the DN of that entry.
Multiple
.B sasl-regexp
options can be given in the configuration file to allow for multiple matching
@ -820,7 +825,7 @@ for an explanation of the different flags.
.TP
.B ucdata-path <path>
Specify the path to the directory containing the Unicode character
tables. The default path is LOCALSTATEDIR/ucdata.
tables. The default path is DATADIR/ucdata.
.SH TLS OPTIONS
If
.B slapd
@ -966,7 +971,8 @@ This option puts the database into "read-only" mode. Any attempts to
modify the database will return an "unwilling to perform" error. By
default, readonly is off.
.HP
.B replica host=<hostname>[:port] [tls=yes|critical]
.B replica uri=ldap[s]://<hostname>[:port]|host=<hostname>[:port]
.B [starttls=yes|critical]
.B [suffix=<suffix> [...]]
.B bindmethod=simple|sasl [binddn=<simple DN>] [credentials=<simple password>]
.B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
@ -979,7 +985,14 @@ Administrator's Guide" for detailed information on setting up a replicated
directory service. Zero or more
.B suffix
instances can be used to select the subtrees that will be replicated
(defaults to all the database). A
(defaults to all the database).
.B host
is deprecated in favor of the
.B uri
option.
.B uri
allows the replica LDAP server to be specified as an LDAP URI.
A
.B bindmethod
of
.B simple
@ -1088,11 +1101,172 @@ Specify the referral to pass back when
.BR slapd (8)
is asked to modify a replicated local database.
If specified multiple times, each url is provided.
.HP
.B syncrepl id=<replica ID>
.B provider=ldap[s]://<hostname>[:port]
.B [updatedn=<dn>]
.B [binddn=<dn>]
.B [bindmethod=simple|sasl] [binddn=<simple DN>] [credentials=<simple passwd>]
.B [saslmech=<SASL mech>] [secprops=<properties>] [realm=<realm>]
.B [authcId=<authentication ID>] [authzId=<authorization ID>]
.B [searchbase=<base DN>]
.B [filter=<filter str>]
.B [attrs=<attr list>]
.B [schemachecking=on|off]
.B [scope=sub|one|base]
.B [type=refreshOnly|refreshAndPersist]
.B [interval=dd:hh:mm]
.RS
Specify an LDAP Sync replication session between the specified replication provider
site and this database (a replication consumer).
The replication consumer communicates with the replication provider to perform
an initial population and the following periodic or persistent synchronizations.
The LDAP Sync replication engine is based on the LDAP Content Sync protocol :
a stateful, pull, incremental, and partial synchronization protocol which
supports both polling and listening modes of operations.
It currently supports entry-level synchronization.
A directory server wide
.B id
uniquely identifies this LDAP Sync replication specification
in the directory server instance. The specification of an LDAP Sync replication
session is based on the search specification which defines the replica content.
The replicated entries are those directory entries of the subtree under the
.B searchbase
with the
.B scope
that match the
.B filter.
Only the attributes specified in the
.B attrs
are included in the replica content.
There are two synchronization modes depending on the incremental
synchronization semantics after the intial content population.
The incremental synchronization is performed periodically with
the
.B interval
when the sync
.B type
is
.B refreshOnly.
Alternatively, the provider sends synchronization messages to the consumer
upon updates to the replicated contents when the sync
.B type
is
.B refreshAndPersist.
The replication provider site is specified by
.B provider
as an LDAP URI.
If
.B schemachecking
is
.B on,
every replicated entry will be checked for its schema
when it is stored in the consumer replica.
The consumer slapd should retrieve attributes of an entry
that are required by the schema definition.
If
.B schemachecking
is
.B off,
entries will be stored without checking the schema conformance.
A
.B bindmethod
of
.B simple
requires the options
.B binddn
and
.B credentials
and should only be used when adequate security services (e.g. TLS or IPSEC) are in place.
A
.B bindmethod
of
.B sasl
requires the option
.B saslmech.
Specific security properties (as with the
.B sasl secprops
keyword above) for a SASL bind can be set with the
.B secprops
option. A non default SASL realm can be set with the
.B realm
option.
If the
.B mechanism
will use Kerberos, a kerberos instance should be given in
.B authcId.
.B updatedn
specifies the DN used to update (subject to access controls) the
replica at the consumer replica.
.SH DATABASE-SPECIFIC OPTIONS
Each database may allow specific configuration options; they are
documented separately in the
documented separately in the backends' manual pages.
.SH BACKENDS
The following backends can be compiled into slapd.
They are documented in the
.BR slapd-<backend> (5)
manual pages.
.TP
.B bdb
This is the recommended backend for a normal slapd database.
However, it takes more care than with the LDBM backend to configure
it properly.
It uses the Sleepycat Berkeley DB (BDB) package to store data.
.TP
.B ldbm
This is the database backend which is easiest to configure.
However, it does not offer the data durability features of the BDB
backend.
It uses Berkeley DB or GDBM to store data.
.TP
.B dnssrv
This backend is experimental.
It serves up referrals based upon SRV resource records held in the
Domain Name System.
.TP
.B ldap
This backend acts as a proxy to forward incoming requests to another
LDAP server.
.TP
.B meta
This backend performs basic LDAP proxying with respect to a set of
remote LDAP servers. It is an enhancement of the ldap backend. The
proxy cache extension of meta backend provides answering of search
requests from the proxy using results of previously cached requests.
.TP
.B monitor
This backend provides information about the running status of the slapd
daemon.
.TP
.B null
Operations in this backend succeed but do nothing.
.TP
.B passwd
This backend is provided for demonstration purposes only.
It serves up user account information from the system
.BR passwd (5)
file.
.TP
.B perl
This backend embeds a
.BR perl (1)
interpreter into slapd.
It runs Perl subroutines to implement LDAP operations.
.TP
.B shell
This backend executes external programs to implement LDAP operations.
It is is primarily intended to be used in prototypes.
.TP
.B sql
This backend is experimental.
It services LDAP requests from an SQL database.
.TP
.B tcl
This backend is experimental.
It embeds a
.BR Tcl (3tcl)
interpreter into slapd.
It runs Tcl commands to implement LDAP operations.
.SH EXAMPLES
.LP
Here is a short example of a configuration file:
@ -1112,7 +1286,7 @@ database bdb
suffix "dc=our-domain,dc=com"
# The database directory MUST exist prior to
# running slapd AND should only be accessible
# by the slapd/tools. Mode 700 recommended.
# by the slapd/tools. Mode 0700 recommended.
directory LOCALSTATEDIR/openldap-data
# Indices to maintain
index objectClass eq
@ -1141,6 +1315,7 @@ default slapd configuration file
.BR slapd-ldap (5),
.BR slapd-ldbm (5),
.BR slapd-meta (5),
.BR slapd-monitor (5),
.BR slapd-null (5),
.BR slapd-passwd (5),
.BR slapd-perl (5),
@ -1149,7 +1324,6 @@ default slapd configuration file
.BR slapd-tcl (5),
.BR slapd.replog (5),
.BR slapd.access (5),
.BR locale (5),
.BR slapd (8),
.BR slapadd (8),
.BR slapcat (8),
@ -1159,7 +1333,7 @@ default slapd configuration file
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -164,7 +164,7 @@ lockfile for slapd.replog
.BR slapd (8),
.BR slurpd (8)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -105,7 +105,7 @@ database give the command:
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -99,7 +99,7 @@ give the command:
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -30,15 +30,14 @@ If configured in
.BR ETCDIR/slapd.conf ,
the
.B slapd
process will print its process ID ( see
.BR getpid (2)
) to a
process will print its process ID (see
.BR getpid (2))
to a
.B .pid
file, as well as the command line options during invocation to an
.B .args
file ( see
.BR slapd.conf (5)
).
file (see
.BR slapd.conf (5)).
If the
.B \-d
flag is given, even with a zero argument,
@ -212,7 +211,7 @@ To test whether the configuration file is correct or not, type:
.SH BUGS
See http://www.openldap.org/its/
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -79,7 +79,7 @@ To reindex your SLAPD database, give the command:
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -166,7 +166,7 @@ on voluminous debugging which will be printed on standard error, type:
.LP
"OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
.SH ACKNOWLEDGEMENTS
.B OpenLDAP
.B OpenLDAP
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
.B OpenLDAP
.B OpenLDAP
is derived from University of Michigan LDAP 3.3 Release.

View file

@ -15,6 +15,7 @@
#define _AC_LOCALIZE_H
#ifdef LDAP_LOCALIZE
# include <locale.h>
# include <libintl.h>
@ -22,15 +23,18 @@
# define gettext_noop(s) s
# define _(s) gettext(s)
# define N_(s) gettext_noop(s)
# define ldap_pvt_setlocale(c,l) ((void) setlocale(c, l))
# define ldap_pvt_textdomain(d) ((void) textdomain(d))
# define ldap_pvt_bindtextdomain(p,d) ((void) bindtextdomain(p, d))
#else
/* disable i18n/l10n */
# define setlocale(c,l) /* empty */
/* disable i18n/l10n */
# define _(s) s
# define N_(s) s
# define textdomain(d) /* empty */
# define bindtextdomain(p,d) /* empty */
# define ldap_pvt_setlocale(c,l) ((void) 0)
# define ldap_pvt_textdomain(d) ((void) 0)
# define ldap_pvt_bindtextdomain(p,d) ((void) 0)
#endif

View file

@ -149,7 +149,8 @@ typedef struct lber_memory_fns {
#define LBER_OPT_SOCKBUF_DEBUG 0x1002
/* on/off values */
#define LBER_OPT_ON ((void *) 1)
extern char ber_pvt_opt_on;
#define LBER_OPT_ON ((void *) &ber_pvt_opt_on)
#define LBER_OPT_OFF ((void *) 0)
#define LBER_OPT_SUCCESS (0)
@ -531,9 +532,7 @@ LBER_V( Sockbuf_IO ) ber_sockbuf_io_tcp;
LBER_V( Sockbuf_IO ) ber_sockbuf_io_readahead;
LBER_V( Sockbuf_IO ) ber_sockbuf_io_fd;
LBER_V( Sockbuf_IO ) ber_sockbuf_io_debug;
#ifdef LDAP_CONNECTIONLESS
LBER_V( Sockbuf_IO ) ber_sockbuf_io_udp;
#endif
/*
* LBER memory.c

View file

@ -95,7 +95,8 @@ LDAP_BEGIN_DECL
/* 0x16 - 0x2f not defined by current draft */
#define LDAP_OPT_HOST_NAME 0x0030
#define LDAP_OPT_ERROR_NUMBER 0x0031
#define LDAP_OPT_RESULT_CODE 0x0031
#define LDAP_OPT_ERROR_NUMBER LDAP_OPT_RESULT_CODE
#define LDAP_OPT_ERROR_STRING 0x0032
#define LDAP_OPT_MATCHED_DN 0x0033
@ -144,7 +145,7 @@ LDAP_BEGIN_DECL
#define LDAP_OPT_X_SASL_MAXBUFSIZE 0x6109
/* on/off values */
#define LDAP_OPT_ON ((void *) 1)
#define LDAP_OPT_ON ((void *) &ber_pvt_opt_on)
#define LDAP_OPT_OFF ((void *) 0)
/*
@ -180,11 +181,16 @@ typedef struct ldapcontrol {
} LDAPControl;
/* LDAP Controls */
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
#define LDAP_CONTROL_ASSERT "1.3.6.1.4.1.4203.666.5.9"
#define LDAP_CONTROL_PRE_READ "1.3.6.1.4.1.4203.666.5.10.1"
#define LDAP_CONTROL_POST_READ "1.3.6.1.4.1.4203.666.5.10.2"
#define LDAP_CONTROL_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.5.11"
#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1"
#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.1.10.2"
#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2"
#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
#if 0
#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
@ -193,31 +199,26 @@ typedef struct ldapcontrol {
#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
#endif
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319"
#ifdef LDAP_CLIENT_UPDATE
#define LDAP_CONTROL_CLIENT_UPDATE "1.3.6.1.4.1.4203.666.5.3"
#define LDAP_CONTROL_ENTRY_UPDATE "1.3.6.1.4.1.4203.666.5.4"
#define LDAP_CONTROL_CLIENT_UPDATE_DONE "1.3.6.1.4.1.4203.666.5.5"
#define LDAP_CUP_COOKIE_OID "1.3.6.1.4.1.4203.666.10.1"
#endif
#define LDAP_SYNC 2
#ifdef LDAP_SYNC
#define LDAP_SYNCREPL 1
#define LDAP_CONTROL_SYNC "1.3.6.1.4.1.4203.666.5.6"
#define LDAP_CONTROL_SYNC_STATE "1.3.6.1.4.1.4203.666.5.7"
#define LDAP_CONTROL_SYNC_DONE "1.3.6.1.4.1.4203.666.5.8"
#define LDAP_SYNC_INFO "1.3.6.1.4.1.4203.666.10.2"
#define LDAP_SYNC_REFRESH_DONE 0
#define LDAP_SYNC_NEW_COOKIE 1
#define LDAP_SYNC_NEW_COOKIE 0
#define LDAP_SYNC_STATE_MODE_DONE 1
#define LDAP_SYNC_LOG_MODE_DONE 2
#define LDAP_SYNC_REFRESH_DONE 3
#define LDAP_SYNC_STATE_MODE 0
#define LDAP_SYNC_LOG_MODE 1
#define LDAP_SYNC_PERSIST_MODE 2
#define LDAP_SYNC_PRESENT 0
#define LDAP_SYNC_ADD 1
#define LDAP_SYNC_MODIFY 2
#define LDAP_SYNC_DELETE 3
#endif
#define LDAP_CONTROL_SORTREQUEST "1.2.840.113556.1.4.473"
#define LDAP_CONTROL_SORTRESPONSE "1.2.840.113556.1.4.474"
@ -250,6 +251,7 @@ typedef struct ldapcontrol {
#define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3" /* (&) (|) */
#define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
#define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.5.6"
/*
* specific LDAP instantiations of BER types we know about
@ -291,14 +293,7 @@ typedef struct ldapcontrol {
#define LDAP_TAG_SASL_RES_CREDS ((ber_tag_t) 0x87U) /* context specific + primitive */
#ifdef LDAP_CLIENT_UPDATE
#define LDAP_CUP_TAG_INTERVAL ((ber_tag_t) 0x02U) /* integer */
#define LDAP_CUP_TAG_COOKIE ((ber_tag_t) 0x30U) /* sequence */
#endif
#ifdef LDAP_SYNC
#define LDAP_SYNC_TAG_COOKIE ((ber_tag_t) 0x04U) /* octet string */
#endif
/* possible operations a client can invoke */
@ -475,15 +470,14 @@ typedef struct ldapcontrol {
#define LDAP_CLIENT_LOOP 0x60 /* draft-ietf-ldap-c-api-xx */
#define LDAP_REFERRAL_LIMIT_EXCEEDED 0x61 /* draft-ietf-ldap-c-api-xx */
#ifdef LDAP_CLIENT_UPDATE
/* resultCode for LCUP */
#define LDAP_CUP_RESOURCES_EXHAUSTED 0x100
#define LDAP_CUP_SECURITY_VIOLATION 0x101
#define LDAP_CUP_INVALID_COOKIE 0x102
#define LDAP_CUP_UNSUPPORTED_SCHEME 0x103
#define LDAP_CUP_CLIENT_DISCONNECT 0x104
#define LDAP_CUP_RELOAD_REQUIRED 0x105
#endif
#define LDAP_SYNC_RESOURCES_EXHAUSTED 0x100
#define LDAP_SYNC_SECURITY_VIOLATION 0x101
#define LDAP_SYNC_INVALID_COOKIE 0x102
#define LDAP_SYNC_UNSUPPORTED_SCHEME 0x103
#define LDAP_SYNC_CLIENT_DISCONNECT 0x104
#define LDAP_SYNC_RELOAD_REQUIRED 0x105
#define LDAP_ASSERTION_FAILED 0x10f
#ifdef LDAP_EXOP_X_CANCEL
/* resultCode for Cancel Response */
@ -493,23 +487,10 @@ typedef struct ldapcontrol {
#define LDAP_CANNOT_CANCEL 0x113
#endif
#ifdef LDAP_CLIENT_UPDATE
/* LCUP update type */
#define LDAP_CUP_NONE 0x00
#define LDAP_CUP_SYNC_ONLY 0x01
#define LDAP_CUP_PERSIST_ONLY 0x02
#define LDAP_CUP_SYNC_AND_PERSIST 0x03
/* LCUP default cookie interval */
#define LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL 0x01
#endif /* LDAP_CLIENT_UPDATE */
/* LDAP SYNC request type */
#ifdef LDAP_SYNC
#define LDAP_SYNC_NONE 0x00
#define LDAP_SYNC_REFRESH_ONLY 0x01
#define LDAP_SYNC_REFRESH_AND_PERSIST 0x03
#endif
/*
* This structure represents both ldap messages and ldap responses.
@ -523,9 +504,11 @@ typedef struct ldapmsg LDAPMessage;
typedef struct ldapmod {
int mod_op;
#define LDAP_MOD_OP (0x0007)
#define LDAP_MOD_ADD (0x0000)
#define LDAP_MOD_DELETE (0x0001)
#define LDAP_MOD_REPLACE (0x0002)
#define LDAP_MOD_INCREMENT (0x0003)
#define LDAP_MOD_BVALUES (0x0080)
/* IMPORTANT: do not use code 0x1000 (or above),
* it is used internally by the backends!

View file

@ -72,7 +72,7 @@
*/
/* location of the default slapd config file */
#define SLAPD_DEFAULT_CONFIGFILE LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf"
#define SLAPD_DEFAULT_DB_DIR LDAP_DATADIR LDAP_DIRSEP "openldap-data"
#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "openldap-data"
#define SLAPD_DEFAULT_DB_MODE 0600
#define SLAPD_DEFAULT_UCDATA LDAP_DATADIR LDAP_DIRSEP "ucdata"
/* default max deref depth for aliases */

View file

@ -139,6 +139,9 @@ LDAP_BEGIN_DECL
#ifdef NEW_LOGGING
extern int ldap_loglevels[LDAP_SUBSYS_NUM];
#ifdef LDAP_DEBUG
#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3) do {\
if (ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)\
@ -150,10 +153,13 @@ extern int ldap_loglevels[LDAP_SUBSYS_NUM];
(ldap_loglevels[LDAP_SUBSYS_##a] >= LDAP_LEVEL_##b || \
ldap_loglevels[LDAP_SUBSYS_GLOBAL] >= LDAP_LEVEL_##b)
#endif /* LDAP_LOG */
#endif /* LDAP_DEBUG */
#endif /* NEW_LOGGING */
#ifndef LDAP_LOG
#define LDAP_LOG(a, b, fmt, arg1, arg2, arg3)
#define LDAP_LOGS_TEST(a, b) 0
#endif
LDAP_LUTIL_F(int) lutil_mnem2level LDAP_P(( const char *level ));

View file

@ -361,7 +361,7 @@ struct { \
#define LDAP_TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
#define LDAP_TAILQ_FOREACH(var, head, field) \
for (var = LDAP_TAILQ_FIRST(head); var; var = TAILQ_NEXT(var, field))
for (var = LDAP_TAILQ_FIRST(head); var; var = LDAP_TAILQ_NEXT(var, field))
#define LDAP_TAILQ_FOREACH_REVERSE(var, head, type, field) \
for ((var) = LDAP_TAILQ_LAST((head), type, field); \

View file

@ -815,6 +815,9 @@
/* define if you have -lslp */
#undef HAVE_SLP
/* define if you have `long long' */
#undef HAVE_LONG_LONG
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
@ -1040,9 +1043,6 @@
#if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
#define LDAP_TEST
#endif
#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
#define LDAP_DEBUG
#endif
#endif
#ifdef HAVE_EBCDIC

View file

@ -816,6 +816,9 @@
/* define if you have -lslp */
/* #undef HAVE_SLP */
/* define if you have `long long' */
#define HAVE_LONG_LONG 1
/* Define to `int' if <sys/types.h> does not define. */
#define mode_t int
@ -1050,9 +1053,6 @@ typedef signed int ssize_t;
#if defined(LDAP_DEVEL) && !defined(LDAP_TEST)
#define LDAP_TEST
#endif
#if defined(LDAP_TEST) && !defined(LDAP_DEBUG)
#define LDAP_DEBUG
#endif
#include "ldap_cdefs.h"
#include "ldap_features.h"

View file

@ -243,6 +243,35 @@ int compute_rewrite_search_filter(Slapi_PBlock *pb);
int compute_evaluator(computed_attr_context *c, char *type, Slapi_Entry *e, slapi_compute_output_t outputfn);
int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
/* ACL plugins; only SLAPI_PLUGIN_ACL_ALLOW_ACCESS supported now */
typedef int (*slapi_acl_callback_t)(Slapi_PBlock *pb,
Slapi_Entry *e,
const char *attr,
struct berval *berval,
int access,
void *state);
/* object extensions */
typedef void *(*slapi_extension_constructor_fnptr)(void *object, void *parent);
typedef void (*slapi_extension_destructor_fnptr)(void *extension,
void *object, void *parent);
int slapi_register_object_extension( const char *pluginname,
const char *objectname, slapi_extension_constructor_fnptr constructor,
slapi_extension_destructor_fnptr destructor, int *objecttype,
int *extensionhandle);
#define SLAPI_EXT_CONNECTION "Connection"
#define SLAPI_EXT_OPERATION "Operation"
#define SLAPI_EXT_ENTRY "Entry"
#define SLAPI_EXT_MTNODE "Mapping Tree Node"
void *slapi_get_object_extension(int objecttype, void *object,
int extensionhandle);
void slapi_set_object_extension(int objecttype, void *object,
int extensionhandle, void *extension);
/* parameters currently supported */
/*
@ -305,6 +334,8 @@ int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
#define SLAPI_X_CONN_CLIENTPATH 1300
#define SLAPI_X_CONN_SERVERPATH 1301
#define SLAPI_X_CONN_IS_UDP 1302
#define SLAPI_X_CONN_SSF 1303
#define SLAPI_X_CONN_SASL_CONTEXT 1304
/* Authentication types */
#define SLAPD_AUTH_NONE "none"
@ -438,6 +469,12 @@ int slapi_x_compute_get_pblock(computed_attr_context *c, Slapi_PBlock **pb);
#define SLAPI_PLUGIN_SYNTAX_FLAG_ORKEYS 1
#define SLAPI_PLUGIN_SYNTAX_FLAG_ORDERING 2
#define SLAPI_PLUGIN_ACL_INIT 730
#define SLAPI_PLUGIN_ACL_SYNTAX_CHECK 731
#define SLAPI_PLUGIN_ACL_ALLOW_ACCESS 732
#define SLAPI_PLUGIN_ACL_MODS_ALLOWED 733
#define SLAPI_PLUGIN_ACL_MODS_UPDATE 734
#define SLAPI_OPERATION_AUTHTYPE 741
#define SLAPI_OPERATION_ID 742
#define SLAPI_CONN_CERT 743

View file

@ -75,31 +75,30 @@ int ber_pvt_log_output(
const char *fmt,
... )
{
char buf[ 1024 ];
char buf[1024];
va_list vl;
va_start( vl, fmt );
if ( ber_int_log_proc != NULL )
{
if ( ber_int_log_proc != NULL ) {
ber_int_log_proc( ber_pvt_err_file, subsystem, level, fmt, vl );
}
else
{
int level;
ber_get_option( NULL, LBER_OPT_BER_DEBUG, &level );
buf[sizeof(buf) - 1] = '\0';
vsnprintf( buf, sizeof(buf)-1, fmt, vl );
if ( ber_log_check( LDAP_DEBUG_BER, level ) )
(*ber_pvt_log_print)( buf );
}
va_end(vl);
} else {
int level;
ber_get_option( NULL, LBER_OPT_BER_DEBUG, &level );
buf[sizeof(buf) - 1] = '\0';
vsnprintf( buf, sizeof(buf)-1, fmt, vl );
if ( ber_log_check( LDAP_DEBUG_BER, level ) ) {
(*ber_pvt_log_print)( buf );
}
}
va_end(vl);
return 1;
}
int ber_pvt_log_printf( int errlvl, int loglvl, const char *fmt, ... )
{
char buf[ 1024 ];
char buf[1024];
va_list ap;
assert( fmt != NULL );
@ -158,11 +157,11 @@ ber_bprint(
LDAP_CONST char *data,
ber_len_t len )
{
static const char hexdig[] = "0123456789abcdef";
static const char hexdig[] = "0123456789abcdef";
#define BP_OFFSET 9
#define BP_GRAPH 60
#define BP_LEN 80
char line[ BP_LEN ];
char line[BP_LEN];
ber_len_t i;
assert( data != NULL );
@ -183,23 +182,23 @@ ber_bprint(
off = i % 0x0ffffU;
line[ 2 ] = hexdig[ 0x0f & (off >> 12) ];
line[ 3 ] = hexdig[ 0x0f & (off >> 8) ];
line[ 4 ] = hexdig[ 0x0f & (off >> 4) ];
line[ 5 ] = hexdig[ 0x0f & off ];
line[ 6 ] = ':';
line[2] = hexdig[0x0f & (off >> 12)];
line[3] = hexdig[0x0f & (off >> 8)];
line[4] = hexdig[0x0f & (off >> 4)];
line[5] = hexdig[0x0f & off];
line[6] = ':';
}
off = BP_OFFSET + n*3 + ((n >= 8)?1:0);
line[ off ] = hexdig[ 0x0f & ( data[i] >> 4 ) ];
line[ off+1 ] = hexdig[ 0x0f & data[i] ];
line[off] = hexdig[0x0f & ( data[i] >> 4 )];
line[off+1] = hexdig[0x0f & data[i]];
off = BP_GRAPH + n + ((n >= 8)?1:0);
if ( isprint( (unsigned char) data[i] )) {
line[ BP_GRAPH + n ] = data[i];
line[BP_GRAPH + n] = data[i];
} else {
line[ BP_GRAPH + n ] = '.';
line[BP_GRAPH + n] = '.';
}
}
@ -258,23 +257,23 @@ int ber_output_dump(
off = i % 0x0ffffU;
line[ 2 ] = hexdig[ 0x0f & (off >> 12) ];
line[ 3 ] = hexdig[ 0x0f & (off >> 8) ];
line[ 4 ] = hexdig[ 0x0f & (off >> 4) ];
line[ 5 ] = hexdig[ 0x0f & off ];
line[ 6 ] = ':';
line[2] = hexdig[0x0f & (off >> 12)];
line[3] = hexdig[0x0f & (off >> 8)];
line[4] = hexdig[0x0f & (off >> 4)];
line[5] = hexdig[0x0f & off ];
line[6] = ':';
}
off = BP_OFFSET + n*3 + ((n >= 8)?1:0);
line[ off ] = hexdig[ 0x0f & ( data[i] >> 4 ) ];
line[ off+1 ] = hexdig[ 0x0f & data[i] ];
line[off] = hexdig[ 0x0f & ( data[i] >> 4 ) ];
line[off+1] = hexdig[ 0x0f & data[i] ];
off = BP_GRAPH + n + ((n >= 8)?1:0);
if ( isprint( (unsigned char) data[i] )) {
line[ BP_GRAPH + n ] = data[i];
line[BP_GRAPH + n] = data[i];
} else {
line[ BP_GRAPH + n ] = '.';
line[BP_GRAPH + n] = '.';
}
}

View file

@ -39,84 +39,77 @@ static int use_syslog = 0;
static int debug2syslog(int l) {
switch (l) {
case LDAP_LEVEL_EMERG: return LOG_EMERG;
case LDAP_LEVEL_ALERT: return LOG_ALERT;
case LDAP_LEVEL_CRIT: return LOG_CRIT;
case LDAP_LEVEL_ERR: return LOG_ERR;
case LDAP_LEVEL_WARNING: return LOG_WARNING;
case LDAP_LEVEL_NOTICE: return LOG_NOTICE;
case LDAP_LEVEL_INFO: return LOG_INFO;
case LDAP_LEVEL_EMERG: return LOG_EMERG;
case LDAP_LEVEL_ALERT: return LOG_ALERT;
case LDAP_LEVEL_CRIT: return LOG_CRIT;
case LDAP_LEVEL_ERR: return LOG_ERR;
case LDAP_LEVEL_WARNING: return LOG_WARNING;
case LDAP_LEVEL_NOTICE: return LOG_NOTICE;
case LDAP_LEVEL_INFO: return LOG_INFO;
}
return LOG_DEBUG;
}
#endif
static char *lutil_levels[] = {"emergency", "alert", "critical",
"error", "warning", "notice",
"information", "entry", "args",
"results", "detail1", "detail2",
NULL};
static char *lutil_levels[] = {
"emergency", "alert", "critical",
"error", "warning", "notice",
"information", "entry", "args",
"results", "detail1", "detail2",
NULL };
static char *lutil_subsys[LDAP_SUBSYS_NUM] = {"global","operation", "transport",
"connection", "filter", "ber",
"config", "acl", "cache", "index",
"ldif", "tools", "slapd", "slurpd",
"backend", "back_bdb", "back_ldbm",
"back_ldap", "back_meta", "back_mon" };
static char *lutil_subsys[LDAP_SUBSYS_NUM] = {
"global","operation", "transport",
"connection", "filter", "ber",
"config", "acl", "cache", "index",
"ldif", "tools", "slapd", "slurpd",
"backend", "back_bdb", "back_ldbm",
"back_ldap", "back_meta", "back_mon" };
int lutil_mnem2subsys( const char *subsys )
{
int i;
for( i = 0; i < LDAP_SUBSYS_NUM; i++ )
{
if ( !strcasecmp( subsys, lutil_subsys[i] ) )
{
return i;
int i;
for( i = 0; i < LDAP_SUBSYS_NUM; i++ ) {
if ( !strcasecmp( subsys, lutil_subsys[i] ) ) {
return i;
}
}
return -1;
}
return -1;
}
void lutil_set_all_backends( int level )
{
int i;
int i;
for( i = 0; i < LDAP_SUBSYS_NUM; i++ )
{
if ( !strncasecmp( "back_", lutil_subsys[i], strlen("back_") ) )
{
for( i = 0; i < LDAP_SUBSYS_NUM; i++ ) {
if ( !strncasecmp( "back_", lutil_subsys[i], strlen("back_") ) ) {
ldap_loglevels[i] = level;
}
}
}
}
int lutil_mnem2level( const char *level )
{
int i;
for( i = 0; lutil_levels[i] != NULL; i++ )
{
if ( !strcasecmp( level, lutil_levels[i] ) )
{
return i;
int i;
for( i = 0; lutil_levels[i] != NULL; i++ ) {
if ( !strcasecmp( level, lutil_levels[i] ) ) {
return i;
}
}
}
return -1;
return -1;
}
static int addSubsys( const char *subsys, int level )
{
int subsys_num;
if ( !strcasecmp( subsys, "backend" ) )
{
if ( !strcasecmp( subsys, "backend" ) ) {
lutil_set_all_backends( level );
return level;
}
else
{
} else {
subsys_num = lutil_mnem2subsys(subsys);
if(subsys_num < 0)
{
if(subsys_num < 0) {
fprintf(stderr, _("Unknown Subsystem name [ %s ] - Discarded\n"),
subsys);
fflush(stderr);
@ -131,7 +124,7 @@ static int addSubsys( const char *subsys, int level )
int lutil_set_debug_level( const char* subsys, int level )
{
return( addSubsys( subsys, level ) );
return( addSubsys( subsys, level ) );
}
int lutil_debug_file( FILE *file )
@ -157,8 +150,9 @@ void lutil_log_int(
t_subsys = strdup(subsys);
for(tmp = t_subsys, i = 0; i < strlen(t_subsys); i++, tmp++)
for(tmp = t_subsys, i = 0; i < strlen(t_subsys); i++, tmp++) {
*tmp = TOUPPER( (unsigned char) *tmp );
}
#ifdef LDAP_SYSLOG
/* we're configured to use syslog */
@ -179,11 +173,10 @@ void lutil_log_int(
if( log_file == NULL ) {
log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "openldap.log", "w" );
if ( log_file == NULL )
if ( log_file == NULL ) {
log_file = fopen( "openldap.log", "w" );
if ( log_file == NULL )
return;
if ( log_file == NULL ) return;
}
ber_set_option( NULL, LBER_OPT_LOG_PRINT_FILE, log_file );
}
@ -203,7 +196,7 @@ void lutil_log_int(
* Stick the time in the buffer to output when using Winsock
* as NT can't pipe to a timestamp program like Unix can.
* This, of course, makes some logs hard to read.
*/
*/
time( &now );
today = localtime( &now );
fprintf( file, "%4d%02d%02d:%02d:%02d:%02d ",
@ -238,53 +231,50 @@ void lutil_log( const int subsys, int level, const char *fmt, ... )
void lutil_log_initialize(int argc, char **argv)
{
int i;
/*
* Start by setting the hook for the libraries to use this logging
* routine.
*/
ber_set_option( NULL, LBER_OPT_LOG_PROC, (void*)lutil_log_int );
int i;
/*
* Start by setting the hook for the libraries to use this logging
* routine.
*/
ber_set_option( NULL, LBER_OPT_LOG_PROC, (void*)lutil_log_int );
if ( argc == 0 ) return;
/*
* Now go through the command line options to set the debugging
* levels
*/
for( i = 0; i < argc; i++ )
{
if ( argc == 0 ) return;
/*
* Now go through the command line options to set the debugging
* levels
*/
for( i = 0; i < argc; i++ ) {
char *next = argv[i];
if ( i < argc-1 && next[0] == '-' && next[1] == 'd' )
{
char subsys[64];
int level;
char *optarg = argv[i+1];
char *index = strchr( optarg, '=' );
if ( index != NULL )
{
if ( i < argc-1 && next[0] == '-' && next[1] == 'd' ) {
char subsys[64];
int level;
char *optarg = argv[i+1];
char *index = strchr( optarg, '=' );
if ( index != NULL ) {
*index = 0;
strcpy ( subsys, optarg );
level = atoi( index+1 );
if ( level <= 0 ) level = lutil_mnem2level( index + 1 );
lutil_set_debug_level( subsys, level );
*index = '=';
}
else
{
} else {
global_level = atoi( optarg );
ldap_loglevels[0] = global_level;
/*
* if a negative number was used, make the global level the
* maximum sane level.
*/
if ( global_level < 0 )
{
if ( global_level < 0 ) {
global_level = 65535;
ldap_loglevels[0] = 65535;
}
}
}
}
}
}
}
}
void (lutil_debug)( int debug, int level, const char *fmt, ... )
@ -292,18 +282,16 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
char buffer[4096];
va_list vl;
if ( !(level & debug ) )
return;
if ( !(level & debug ) ) return;
#ifdef HAVE_WINSOCK
if( log_file == NULL ) {
log_file = fopen( LDAP_RUNDIR LDAP_DIRSEP "openldap.log", "w" );
if ( log_file == NULL )
if ( log_file == NULL ) {
log_file = fopen( "openldap.log", "w" );
if ( log_file == NULL )
return;
if ( log_file == NULL ) return;
}
ber_set_option( NULL, LBER_OPT_LOG_PRINT_FILE, log_file );
}

Some files were not shown because too many files have changed in this diff Show more