mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Initial round of changes for 2.3 beta
This commit is contained in:
parent
2ace030ccd
commit
04391a9ec6
280 changed files with 45722 additions and 15484 deletions
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ echo "Rolling up $OL_STRING ..."
|
|||
tar cf $RELNAME.tar $RELNAME
|
||||
gzip -9 -c $RELNAME.tar > $RELNAME.tgz
|
||||
md5 $RELNAME.tgz > $RELNAME.md5
|
||||
sha1 $RELNAME.tgz > $RELNAME.sha1
|
||||
rm -f $RELNAME.tar
|
||||
|
||||
ls -l $RELNAME.*
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -247,6 +247,75 @@ fi
|
|||
])
|
||||
dnl
|
||||
dnl ====================================================================
|
||||
dnl DNS resolver macros
|
||||
AC_DEFUN([OL_RESOLVER_TRY],
|
||||
[if test $ol_cv_lib_resolver = no ; then
|
||||
AC_CACHE_CHECK([for resolver link (]ifelse($2,,default,$2)[)],[$1],
|
||||
[
|
||||
ol_RESOLVER_LIB=ifelse($2,,,$2)
|
||||
ol_LIBS=$LIBS
|
||||
LIBS="$ol_RESOLVER_LIB $LIBS"
|
||||
|
||||
AC_TRY_LINK([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#endif
|
||||
#ifdef HAVE_RESOLV_H
|
||||
# include <resolv.h>
|
||||
#endif
|
||||
],[{
|
||||
int len, status;
|
||||
char *request = NULL;
|
||||
unsigned char reply[64*1024];
|
||||
unsigned char host[64*1024];
|
||||
unsigned char *p;
|
||||
|
||||
#ifdef NS_HFIXEDSZ
|
||||
/* Bind 8/9 interface */
|
||||
len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
|
||||
#else
|
||||
/* Bind 4 interface */
|
||||
# ifndef T_SRV
|
||||
# define T_SRV 33
|
||||
# endif
|
||||
len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
|
||||
#endif
|
||||
p = reply;
|
||||
#ifdef NS_HFIXEDSZ
|
||||
/* Bind 8/9 interface */
|
||||
p += NS_HFIXEDSZ;
|
||||
#elif defined(HFIXEDSZ)
|
||||
/* Bind 4 interface w/ HFIXEDSZ */
|
||||
p += HFIXEDSZ;
|
||||
#else
|
||||
/* Bind 4 interface w/o HFIXEDSZ */
|
||||
p += sizeof(HEADER);
|
||||
#endif
|
||||
status = dn_expand( reply, reply+len, p, host, sizeof(host));
|
||||
}],[$1=yes],[$1=no])
|
||||
|
||||
LIBS="$ol_LIBS"
|
||||
])
|
||||
|
||||
if test $$1 = yes ; then
|
||||
ol_cv_lib_resolver=ifelse($2,,yes,$2)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl --------------------------------------------------------------------
|
||||
dnl Try to locate appropriate library
|
||||
AC_DEFUN([OL_RESOLVER_LINK],
|
||||
[ol_cv_lib_resolver=no
|
||||
OL_RESOLVER_TRY(ol_cv_resolver_none)
|
||||
OL_RESOLVER_TRY(ol_cv_resolver_resolv,[-lresolv])
|
||||
OL_RESOLVER_TRY(ol_cv_resolver_bind,[-lbind])
|
||||
])
|
||||
dnl
|
||||
dnl ====================================================================
|
||||
dnl Berkeley DB macros
|
||||
dnl
|
||||
dnl --------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2005 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
ol_package=OpenLDAP
|
||||
ol_major=2
|
||||
ol_minor=3
|
||||
ol_patch=2beta
|
||||
ol_patch=X
|
||||
ol_api_inc=20302
|
||||
ol_api_current=0
|
||||
ol_api_revision=2
|
||||
|
|
|
|||
|
|
@ -86,6 +86,15 @@ static int chainingResolve = -1;
|
|||
static int chainingContinuation = -1;
|
||||
#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
|
||||
|
||||
static int gotintr;
|
||||
static int abcan;
|
||||
|
||||
RETSIGTYPE
|
||||
do_sig( int sig )
|
||||
{
|
||||
gotintr = abcan;
|
||||
}
|
||||
|
||||
/* Set in main() */
|
||||
char *prog = NULL;
|
||||
|
||||
|
|
@ -97,6 +106,17 @@ tool_init( void )
|
|||
ldap_pvt_textdomain(OPENLDAP_PACKAGE);
|
||||
}
|
||||
|
||||
void
|
||||
tool_destroy( void )
|
||||
{
|
||||
#ifdef HAVE_CYRUS_SASL
|
||||
sasl_done();
|
||||
#endif
|
||||
#ifdef HAVE_TLS
|
||||
ldap_pvt_tls_destroy();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
tool_common_usage( void )
|
||||
{
|
||||
|
|
@ -108,18 +128,19 @@ N_(" -D binddn bind DN\n"),
|
|||
N_(" -e [!]<ext>[=<extparam>] general extensions (! indicates criticality)\n")
|
||||
N_(" [!]assert=<filter> (an RFC 2254 Filter)\n")
|
||||
N_(" [!]authzid=<authzid> (\"dn:<dn>\" or \"u:<user>\")\n")
|
||||
N_(" [!]manageDSAit\n")
|
||||
N_(" [!]noop\n")
|
||||
#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
|
||||
N_(" ppolicy\n")
|
||||
#endif
|
||||
#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
|
||||
N_(" [!]chaining[=<resolveBehavior>[/<continuationBehavior>]]\n")
|
||||
N_(" one of \"chainingPreferred\", \"chainingRequired\",\n")
|
||||
N_(" \"referralsPreferred\", \"referralsRequired\"\n")
|
||||
#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
|
||||
N_(" [!]manageDSAit\n")
|
||||
N_(" [!]noop\n")
|
||||
#ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
|
||||
N_(" ppolicy\n")
|
||||
#endif
|
||||
N_(" [!]postread[=<attrs>] (a comma-separated attribute list)\n")
|
||||
N_(" [!]preread[=<attrs>] (a comma-separated attribute list)\n"),
|
||||
N_(" abandon, cancel (SIGINT sends abandon/cancel (not really controls)\n")
|
||||
N_(" -f file read operations from `file'\n"),
|
||||
N_(" -h host LDAP server\n"),
|
||||
N_(" -H URI LDAP Uniform Resource Indentifier(s)\n"),
|
||||
|
|
@ -343,6 +364,13 @@ tool_args( int argc, char **argv )
|
|||
}
|
||||
#endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
|
||||
|
||||
/* this shouldn't go here, really; but it's a feature... */
|
||||
} else if ( strcasecmp( control, "abandon" ) == 0 ) {
|
||||
abcan = LDAP_REQ_ABANDON;
|
||||
|
||||
} else if ( strcasecmp( control, "cancel" ) == 0 ) {
|
||||
abcan = LDAP_REQ_EXTENDED;
|
||||
|
||||
} else {
|
||||
fprintf( stderr, "Invalid general control name: %s\n",
|
||||
control );
|
||||
|
|
@ -631,28 +659,28 @@ tool_args( int argc, char **argv )
|
|||
|
||||
if (api.ldapai_info_version != LDAP_API_INFO_VERSION) {
|
||||
fprintf( stderr, "LDAP APIInfo version mismatch: "
|
||||
"got %d, expected %d\n",
|
||||
"library %d, header %d\n",
|
||||
api.ldapai_info_version, LDAP_API_INFO_VERSION );
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
if( api.ldapai_api_version != LDAP_API_VERSION ) {
|
||||
fprintf( stderr, "LDAP API version mismatch: "
|
||||
"got %d, expected %d\n",
|
||||
"library %d, header %d\n",
|
||||
api.ldapai_api_version, LDAP_API_VERSION );
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
if( strcmp(api.ldapai_vendor_name, LDAP_VENDOR_NAME ) != 0 ) {
|
||||
fprintf( stderr, "LDAP vendor name mismatch: "
|
||||
"got %s, expected %s\n",
|
||||
"library %s, header %s\n",
|
||||
api.ldapai_vendor_name, LDAP_VENDOR_NAME );
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
if( api.ldapai_vendor_version != LDAP_VENDOR_VERSION ) {
|
||||
fprintf( stderr, "LDAP vendor version mismatch: "
|
||||
"got %d, expected %d\n",
|
||||
"library %d, header %d\n",
|
||||
api.ldapai_vendor_version, LDAP_VENDOR_VERSION );
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
|
@ -745,6 +773,10 @@ tool_conn_setup( int not, void (*private_setup)( LDAP * ) )
|
|||
(void) SIGNAL( SIGPIPE, SIG_IGN );
|
||||
#endif
|
||||
|
||||
if ( abcan ) {
|
||||
SIGNAL( SIGINT, do_sig );
|
||||
}
|
||||
|
||||
if ( !not ) {
|
||||
int rc;
|
||||
|
||||
|
|
@ -918,6 +950,18 @@ tool_bind( LDAP *ld )
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
tool_unbind( LDAP *ld )
|
||||
{
|
||||
int err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, NULL );
|
||||
|
||||
if ( err != LDAP_OPT_SUCCESS ) {
|
||||
fprintf( stderr, "Could not unset controls\n");
|
||||
}
|
||||
|
||||
(void) ldap_unbind_ext( ld, NULL, NULL );
|
||||
}
|
||||
|
||||
|
||||
/* Set server controls. Add controls extra_c[0..count-1], if set. */
|
||||
void
|
||||
|
|
@ -1112,3 +1156,26 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
|
|||
exit( EXIT_FAILURE );
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
tool_check_abandon( LDAP *ld, int msgid )
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch ( gotintr ) {
|
||||
case LDAP_REQ_EXTENDED:
|
||||
rc = ldap_cancel_s( ld, msgid, NULL, NULL );
|
||||
fprintf( stderr, "got interrupt, cancel got %d: %s\n",
|
||||
rc, ldap_err2string( rc ) );
|
||||
return -1;
|
||||
|
||||
case LDAP_REQ_ABANDON:
|
||||
rc = ldap_abandon( ld, msgid );
|
||||
fprintf( stderr, "got interrupt, abandon got %d: %s\n",
|
||||
rc, ldap_err2string( rc ) );
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,10 @@ void tool_common_usage LDAP_P(( void ));
|
|||
void tool_args LDAP_P(( int, char ** ));
|
||||
LDAP *tool_conn_setup LDAP_P(( int dont, void (*private_setup)( LDAP * ) ));
|
||||
void tool_bind LDAP_P(( LDAP * ));
|
||||
void tool_unbind LDAP_P(( LDAP * ));
|
||||
void tool_destroy LDAP_P(( void ));
|
||||
void tool_server_controls LDAP_P(( LDAP *, LDAPControl *, int ));
|
||||
int tool_check_abandon LDAP_P(( LDAP *ld, int msgid ));
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
|
|
|
|||
|
|
@ -217,8 +217,8 @@ main( int argc, char **argv )
|
|||
|
||||
free( bvalue.bv_val );
|
||||
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
|
||||
tool_unbind( ld );
|
||||
tool_destroy();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -232,27 +232,88 @@ static int docompare(
|
|||
LDAPControl **sctrls,
|
||||
LDAPControl **cctrls )
|
||||
{
|
||||
int rc;
|
||||
int rc, msgid, code;
|
||||
LDAPMessage *res;
|
||||
char *matcheddn;
|
||||
char *text;
|
||||
char **refs;
|
||||
|
||||
if ( not ) {
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
rc = ldap_compare_ext_s( ld, dn, attr, bvalue,
|
||||
sctrls, cctrls );
|
||||
rc = ldap_compare_ext( ld, dn, attr, bvalue,
|
||||
sctrls, cctrls, &msgid );
|
||||
if ( rc == -1 ) {
|
||||
return( rc );
|
||||
}
|
||||
|
||||
/* if we were told to be quiet, use the return value. */
|
||||
if ( !quiet ) {
|
||||
if ( rc == LDAP_COMPARE_TRUE ) {
|
||||
printf(_("TRUE\n"));
|
||||
} else if ( rc == LDAP_COMPARE_FALSE ) {
|
||||
printf(_("FALSE\n"));
|
||||
} else {
|
||||
printf(_("UNDEFINED\n"));
|
||||
ldap_perror( ld, "ldap_compare" );
|
||||
for ( ; ; ) {
|
||||
struct timeval tv;
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
|
||||
if ( tool_check_abandon( ld, msgid ) ) {
|
||||
return LDAP_CANCELLED;
|
||||
}
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldapcompare: ldap_result" );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( rc != 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return( rc );
|
||||
rc = ldap_parse_result( ld, res, &code, &matcheddn, &text, &refs, NULL, 1 );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
fprintf( stderr, "%s: ldap_parse_result: %s (%d)\n",
|
||||
prog, ldap_err2string( rc ), rc );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( !quiet && ( verbose || ( code != LDAP_SUCCESS && code != LDAP_COMPARE_TRUE && code != LDAP_COMPARE_FALSE )||
|
||||
(matcheddn && *matcheddn) || (text && *text) || (refs && *refs) ) )
|
||||
{
|
||||
printf( _("Compare Result: %s (%d)\n"),
|
||||
ldap_err2string( code ), code );
|
||||
|
||||
if( text && *text ) {
|
||||
printf( _("Additional info: %s\n"), text );
|
||||
}
|
||||
|
||||
if( matcheddn && *matcheddn ) {
|
||||
printf( _("Matched DN: %s\n"), matcheddn );
|
||||
}
|
||||
|
||||
if( refs ) {
|
||||
int i;
|
||||
for( i=0; refs[i]; i++ ) {
|
||||
printf(_("Referral: %s\n"), refs[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ber_memfree( text );
|
||||
ber_memfree( matcheddn );
|
||||
ber_memvfree( (void **) refs );
|
||||
|
||||
/* if we were told to be quiet, use the return value. */
|
||||
if ( !quiet ) {
|
||||
if ( code == LDAP_COMPARE_TRUE ) {
|
||||
printf(_("TRUE\n"));
|
||||
} else if ( code == LDAP_COMPARE_FALSE ) {
|
||||
printf(_("FALSE\n"));
|
||||
} else {
|
||||
printf(_("UNDEFINED\n"));
|
||||
}
|
||||
}
|
||||
|
||||
return( code );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include <ac/ctype.h>
|
||||
#include <ac/string.h>
|
||||
#include <ac/unistd.h>
|
||||
#include <ac/time.h>
|
||||
|
||||
#include <ldap.h>
|
||||
#include "lutil.h"
|
||||
|
|
@ -197,9 +198,9 @@ main( int argc, char **argv )
|
|||
}
|
||||
}
|
||||
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
|
||||
return( retval );
|
||||
tool_unbind( ld );
|
||||
tool_destroy();
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -233,10 +234,25 @@ static int dodelete(
|
|||
return rc;
|
||||
}
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, NULL, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldapdelete: ldap_result" );
|
||||
return rc;
|
||||
for ( ; ; ) {
|
||||
struct timeval tv;
|
||||
|
||||
if ( tool_check_abandon( ld, id ) ) {
|
||||
return LDAP_CANCELLED;
|
||||
}
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldapdelete: ldap_result" );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( rc != 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rc = ldap_parse_result( ld, res, &code, &matcheddn, &text, &refs, NULL, 1 );
|
||||
|
|
@ -250,7 +266,8 @@ static int dodelete(
|
|||
if( verbose || code != LDAP_SUCCESS ||
|
||||
(matcheddn && *matcheddn) || (text && *text) || (refs && *refs) )
|
||||
{
|
||||
printf( _("Delete Result: %s (%d)\n"), ldap_err2string( code ), code );
|
||||
printf( _("Delete Result: %s (%d)\n"),
|
||||
ldap_err2string( code ), code );
|
||||
|
||||
if( text && *text ) {
|
||||
printf( _("Additional info: %s\n"), text );
|
||||
|
|
|
|||
|
|
@ -405,13 +405,14 @@ main( int argc, char **argv )
|
|||
#endif
|
||||
|
||||
if ( !not ) {
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
tool_unbind( ld );
|
||||
}
|
||||
|
||||
if ( rejfp != NULL ) {
|
||||
fclose( rejfp );
|
||||
}
|
||||
|
||||
tool_destroy();
|
||||
return( retval );
|
||||
}
|
||||
|
||||
|
|
@ -1009,7 +1010,7 @@ domodify(
|
|||
}
|
||||
|
||||
if ( !not ) {
|
||||
int msgid;
|
||||
int msgid;
|
||||
if ( newentry ) {
|
||||
rc = ldap_add_ext( ld, dn, pmods, pctrls, NULL, &msgid );
|
||||
} else {
|
||||
|
|
@ -1113,21 +1114,37 @@ static int process_response(
|
|||
const char *opstr,
|
||||
const char *dn )
|
||||
{
|
||||
LDAPMessage *res;
|
||||
int rc = LDAP_OTHER;
|
||||
LDAPMessage *res;
|
||||
int rc = LDAP_OTHER;
|
||||
struct timeval tv = { 0 };
|
||||
|
||||
if( ldap_result( ld, msgid,
|
||||
for ( ; ; ) {
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
|
||||
rc = ldap_result( ld, msgid,
|
||||
#ifdef LDAP_GROUP_TRANSACTION
|
||||
txn ? 0 : 1,
|
||||
txn ? 0 : 1,
|
||||
#else
|
||||
1,
|
||||
1,
|
||||
#endif
|
||||
NULL, &res ) == -1 ) {
|
||||
ldap_get_option( ld, LDAP_OPT_ERROR_NUMBER, &rc );
|
||||
return rc;
|
||||
&tv, &res );
|
||||
if ( tool_check_abandon( ld, msgid ) ) {
|
||||
return LDAP_CANCELLED;
|
||||
}
|
||||
|
||||
if ( rc == -1 ) {
|
||||
ldap_get_option( ld, LDAP_OPT_ERROR_NUMBER, &rc );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( rc != 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( ldap_msgtype( res ) != LDAP_RES_INTERMEDIATE ) {
|
||||
done:;
|
||||
if ( ldap_msgtype( res ) != LDAP_RES_INTERMEDIATE ) {
|
||||
rc = ldap_result2error( ld, res, 1 );
|
||||
if( rc != LDAP_SUCCESS ) ldap_perror( ld, opstr );
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include <ac/ctype.h>
|
||||
#include <ac/string.h>
|
||||
#include <ac/unistd.h>
|
||||
#include <ac/time.h>
|
||||
|
||||
#include <ldap.h>
|
||||
#include "lutil.h"
|
||||
|
|
@ -227,8 +228,8 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
|
||||
tool_unbind( ld );
|
||||
tool_destroy();
|
||||
return( retval );
|
||||
}
|
||||
|
||||
|
|
@ -263,10 +264,25 @@ static int domodrdn(
|
|||
return rc;
|
||||
}
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, NULL, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldapmodrdn: ldap_result" );
|
||||
return rc;
|
||||
for ( ; ; ) {
|
||||
struct timeval tv = { 0 };
|
||||
|
||||
if ( tool_check_abandon( ld, id ) ) {
|
||||
return LDAP_CANCELLED;
|
||||
}
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldapmodrdn: ldap_result" );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( rc != 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rc = ldap_parse_result( ld, res, &code, &matcheddn, &text, &refs, NULL, 1 );
|
||||
|
|
|
|||
|
|
@ -196,7 +196,10 @@ main( int argc, char *argv[] )
|
|||
|
||||
if( oldpwfile ) {
|
||||
rc = lutil_get_filed_password( oldpwfile, &oldpw );
|
||||
if( rc ) return EXIT_FAILURE;
|
||||
if( rc ) {
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if( want_oldpw && oldpw.bv_val == NULL ) {
|
||||
|
|
@ -209,7 +212,8 @@ main( int argc, char *argv[] )
|
|||
strcmp( oldpw.bv_val, ckoldpw ))
|
||||
{
|
||||
fprintf( stderr, _("passwords do not match\n") );
|
||||
return EXIT_FAILURE;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
oldpw.bv_len = strlen( oldpw.bv_val );
|
||||
|
|
@ -217,7 +221,10 @@ main( int argc, char *argv[] )
|
|||
|
||||
if( newpwfile ) {
|
||||
rc = lutil_get_filed_password( newpwfile, &newpw );
|
||||
if( rc ) return EXIT_FAILURE;
|
||||
if( rc ) {
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if( want_newpw && newpw.bv_val == NULL ) {
|
||||
|
|
@ -230,7 +237,8 @@ main( int argc, char *argv[] )
|
|||
strcmp( newpw.bv_val, cknewpw ))
|
||||
{
|
||||
fprintf( stderr, _("passwords do not match\n") );
|
||||
return EXIT_FAILURE;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
newpw.bv_len = strlen( newpw.bv_val );
|
||||
|
|
@ -238,7 +246,10 @@ main( int argc, char *argv[] )
|
|||
|
||||
if ( pw_file ) {
|
||||
rc = lutil_get_filed_password( pw_file, &passwd );
|
||||
if( rc ) return EXIT_FAILURE;
|
||||
if( rc ) {
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
} else if ( want_bindpw ) {
|
||||
passwd.bv_val = getpassphrase( _("Enter LDAP Password: ") );
|
||||
|
|
@ -259,8 +270,8 @@ main( int argc, char *argv[] )
|
|||
|
||||
if( ber == NULL ) {
|
||||
perror( "ber_alloc_t" );
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
return EXIT_FAILURE;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
ber_printf( ber, "{" /*}*/ );
|
||||
|
|
@ -289,14 +300,14 @@ main( int argc, char *argv[] )
|
|||
|
||||
if( rc < 0 ) {
|
||||
perror( "ber_flatten2" );
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
return EXIT_FAILURE;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if ( not ) {
|
||||
rc = LDAP_SUCCESS;
|
||||
goto skip;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rc = ldap_extended_operation( ld,
|
||||
|
|
@ -307,14 +318,29 @@ main( int argc, char *argv[] )
|
|||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_extended_operation" );
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
return EXIT_FAILURE;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, NULL, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldappasswd: ldap_result" );
|
||||
return rc;
|
||||
for ( ; ; ) {
|
||||
struct timeval tv;
|
||||
|
||||
if ( tool_check_abandon( ld, id ) ) {
|
||||
return LDAP_CANCELLED;
|
||||
}
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldappasswd: ldap_result" );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( rc != 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rc = ldap_parse_result( ld, res,
|
||||
|
|
@ -322,14 +348,16 @@ main( int argc, char *argv[] )
|
|||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_parse_result" );
|
||||
return rc;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 1 );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_parse_result" );
|
||||
return rc;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if( retdata != NULL ) {
|
||||
|
|
@ -339,8 +367,8 @@ main( int argc, char *argv[] )
|
|||
|
||||
if( ber == NULL ) {
|
||||
perror( "ber_init" );
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
return EXIT_FAILURE;
|
||||
rc = EXIT_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* we should check the tag */
|
||||
|
|
@ -381,9 +409,11 @@ main( int argc, char *argv[] )
|
|||
ber_memfree( retoid );
|
||||
ber_bvfree( retdata );
|
||||
|
||||
skip:
|
||||
/* disconnect from server */
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
rc = ( code == LDAP_SUCCESS ) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
|
||||
return code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
done:
|
||||
/* disconnect from server */
|
||||
tool_unbind( ld );
|
||||
tool_destroy();
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,7 @@
|
|||
#include <ac/errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
|
||||
#include <ac/signal.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
|
|
@ -234,7 +232,7 @@ urlize(char *url)
|
|||
}
|
||||
|
||||
|
||||
const char options[] = "a:Ab:E:F:l:Ls:S:tT:uz:"
|
||||
const char options[] = "a:Ab:cE:F:l:Ls:S:tT:uz:"
|
||||
"Cd:D:e:f:h:H:IkKMnO:p:P:QR:U:vVw:WxX:y:Y:Z";
|
||||
|
||||
int
|
||||
|
|
@ -363,6 +361,7 @@ handle_private_option( int i )
|
|||
|
||||
domainScope = 1 + crit;
|
||||
#endif
|
||||
|
||||
#ifdef LDAP_CONTROL_SUBENTRIES
|
||||
} else if ( strcasecmp( control, "subentries" ) == 0 ) {
|
||||
if( subentries ) {
|
||||
|
|
@ -554,16 +553,6 @@ private_conn_setup( LDAP *ld )
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
|
||||
static int gotintr;
|
||||
|
||||
RETSIGTYPE
|
||||
do_sig( int sig )
|
||||
{
|
||||
gotintr = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
|
|
@ -622,10 +611,6 @@ main( int argc, char **argv )
|
|||
attrs = &argv[optind];
|
||||
}
|
||||
|
||||
#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
|
||||
SIGNAL( SIGINT, do_sig );
|
||||
#endif
|
||||
|
||||
if ( infile != NULL ) {
|
||||
if ( infile[0] == '-' && infile[1] == '\0' ) {
|
||||
fp = stdin;
|
||||
|
|
@ -708,7 +693,7 @@ getNextPage:
|
|||
}
|
||||
|
||||
err = ber_printf( seber, "b", abs(subentries) == 1 ? 0 : 1 );
|
||||
if ( err == -1 ) {
|
||||
if ( err == -1 ) {
|
||||
ber_free( seber, 1 );
|
||||
fprintf( stderr, _("Subentries control encoding error!\n") );
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -942,13 +927,8 @@ getNextPage:
|
|||
}
|
||||
#endif
|
||||
|
||||
ldap_unbind_ext( ld, NULL, NULL );
|
||||
#ifdef HAVE_CYRUS_SASL
|
||||
sasl_done();
|
||||
#endif
|
||||
#ifdef HAVE_TLS
|
||||
ldap_pvt_tls_destroy();
|
||||
#endif
|
||||
tool_unbind( ld );
|
||||
tool_destroy();
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
|
@ -1026,6 +1006,11 @@ static int dosearch(
|
|||
sortattr ? LDAP_MSG_ALL : LDAP_MSG_ONE,
|
||||
NULL, &res )) > 0 )
|
||||
{
|
||||
rc = tool_check_abandon( ld, msgid );
|
||||
if ( rc ) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
if( sortattr ) {
|
||||
(void) ldap_sort_entries( ld, &res,
|
||||
( *sortattr == '\0' ) ? NULL : sortattr, strcasecmp );
|
||||
|
|
@ -1122,27 +1107,13 @@ static int dosearch(
|
|||
|
||||
ldap_msgfree( res );
|
||||
}
|
||||
#if defined(TEST_ABANDON) || defined(TEST_CANCEL)
|
||||
if ( gotintr ) {
|
||||
#ifdef TEST_CANCEL
|
||||
rc = ldap_cancel_s( ld, msgid, NULL, NULL );
|
||||
fprintf( stderr, "got interrupt, cancel got %d\n", rc );
|
||||
return -1;
|
||||
#endif
|
||||
#ifdef TEST_ABANDON
|
||||
rc = ldap_abandon( ld, msgid );
|
||||
fprintf( stderr, "got interrupt, abandon got %d\n", rc );
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
done:
|
||||
if ( rc == -1 ) {
|
||||
ldap_perror( ld, "ldap_result" );
|
||||
return( rc );
|
||||
}
|
||||
|
||||
done:
|
||||
ldap_msgfree( res );
|
||||
#ifdef LDAP_CONTROL_PAGEDRESULTS
|
||||
if ( pagedResults ) {
|
||||
|
|
|
|||
|
|
@ -108,16 +108,18 @@ handle_private_option( int i )
|
|||
int
|
||||
main( int argc, char *argv[] )
|
||||
{
|
||||
int rc;
|
||||
char *user = NULL;
|
||||
int rc;
|
||||
char *user = NULL;
|
||||
|
||||
LDAP *ld = NULL;
|
||||
LDAP *ld = NULL;
|
||||
|
||||
char *matcheddn = NULL, *text = NULL, **refs = NULL;
|
||||
char *retoid = NULL;
|
||||
struct berval *retdata = NULL;
|
||||
char *matcheddn = NULL, *text = NULL, **refs = NULL;
|
||||
char *retoid = NULL;
|
||||
struct berval *retdata = NULL;
|
||||
int id, code;
|
||||
LDAPMessage *res;
|
||||
|
||||
tool_init();
|
||||
tool_init();
|
||||
prog = lutil_progname( "ldapwhoami", argc, argv );
|
||||
|
||||
/* LDAPv3 only */
|
||||
|
|
@ -156,7 +158,51 @@ main( int argc, char *argv[] )
|
|||
tool_server_controls( ld, NULL, 0 );
|
||||
}
|
||||
|
||||
rc = ldap_whoami_s( ld, &retdata, NULL, NULL );
|
||||
rc = ldap_whoami( ld, NULL, NULL, &id );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_extended_operation" );
|
||||
rc = EXIT_FAILURE;
|
||||
goto skip;
|
||||
}
|
||||
|
||||
for ( ; ; ) {
|
||||
struct timeval tv;
|
||||
|
||||
if ( tool_check_abandon( ld, id ) ) {
|
||||
return LDAP_CANCELLED;
|
||||
}
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100000;
|
||||
|
||||
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, &tv, &res );
|
||||
if ( rc < 0 ) {
|
||||
ldap_perror( ld, "ldapwhoami: ldap_result" );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( rc != 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rc = ldap_parse_result( ld, res,
|
||||
&code, &matcheddn, &text, &refs, NULL, 0 );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_parse_result" );
|
||||
rc = EXIT_FAILURE;
|
||||
goto skip;
|
||||
}
|
||||
|
||||
rc = ldap_parse_extended_result( ld, res, &retoid, &retdata, 1 );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ldap_perror( ld, "ldap_parse_result" );
|
||||
rc = EXIT_FAILURE;
|
||||
goto skip;
|
||||
}
|
||||
|
||||
if( retdata != NULL ) {
|
||||
if( retdata->bv_len == 0 ) {
|
||||
|
|
@ -166,8 +212,8 @@ main( int argc, char *argv[] )
|
|||
}
|
||||
}
|
||||
|
||||
if( verbose || ( rc != LDAP_SUCCESS ) || matcheddn || text || refs ) {
|
||||
printf( _("Result: %s (%d)\n"), ldap_err2string( rc ), rc );
|
||||
if( verbose || ( code != LDAP_SUCCESS ) || matcheddn || text || refs ) {
|
||||
printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code );
|
||||
|
||||
if( text && *text ) {
|
||||
printf( _("Additional info: %s\n"), text );
|
||||
|
|
@ -193,7 +239,8 @@ main( int argc, char *argv[] )
|
|||
|
||||
skip:
|
||||
/* disconnect from server */
|
||||
ldap_unbind (ld);
|
||||
tool_unbind( ld );
|
||||
tool_destroy();
|
||||
|
||||
return rc == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
return code == LDAP_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
|
|
|||
75
configure.in
75
configure.in
|
|
@ -242,8 +242,8 @@ OL_ARG_ENABLE(sql,[ --enable-sql enable sql backend no|yes|mod],
|
|||
|
||||
dnl ----------------------------------------------------------------
|
||||
dnl SLAPD Overlay Options
|
||||
Overlays="denyop dyngroup glue lastmod ppolicy proxycache rwm \
|
||||
refint syncprov translucent unique"
|
||||
Overlays="denyop dyngroup dynlist glue lastmod ppolicy proxycache \
|
||||
refint rwm syncprov translucent unique"
|
||||
|
||||
AC_ARG_WITH(xxslapoverlays,[
|
||||
SLAPD Overlay Options:])
|
||||
|
|
@ -254,6 +254,8 @@ OL_ARG_ENABLE(denyop,[ --enable-denyop Deny Operation overlay no|yes|mod]
|
|||
no, [no yes mod])
|
||||
OL_ARG_ENABLE(dyngroup,[ --enable-dyngroup Dynamic Group overlay no|yes|mod],
|
||||
no, [no yes mod])
|
||||
OL_ARG_ENABLE(dynlist,[ --enable-dynlist Dynamic List overlay no|yes|mod],
|
||||
no, [no yes mod])
|
||||
OL_ARG_ENABLE(glue,[ --enable-glue Backend Glue overlay no|yes|mod],
|
||||
yes, [no yes mod])
|
||||
OL_ARG_ENABLE(lastmod,[ --enable-lastmod Last Modification overlay no|yes|mod],
|
||||
|
|
@ -523,6 +525,7 @@ BUILD_SQL=no
|
|||
BUILD_CHAIN=no
|
||||
BUILD_DENYOP=no
|
||||
BUILD_DYNGROUP=no
|
||||
BUILD_DYNLIST=no
|
||||
BUILD_GLUE=no
|
||||
BUILD_LASTMOD=no
|
||||
BUILD_PPOLICY=no
|
||||
|
|
@ -968,51 +971,28 @@ fi
|
|||
|
||||
dnl ----------------------------------------------------------------
|
||||
dnl Check for resolver routines
|
||||
dnl need to check for both res_query and __res_query
|
||||
dnl need to check -lc, -lbind, and -lresolv
|
||||
OL_RESOLVER_LINK
|
||||
|
||||
ol_link_dnssrv=no
|
||||
AC_CHECK_FUNC(res_query,:)
|
||||
if test $ac_cv_func_res_query = no ; then
|
||||
AC_CHECK_FUNC(__res_query,:)
|
||||
ac_cv_func_res_query=$ac_cv_func___res_query
|
||||
fi
|
||||
|
||||
if test $ac_cv_func_res_query = no ; then
|
||||
AC_CHECK_LIB(bind, res_query)
|
||||
ac_cv_func_res_query=$ac_cv_lib_bind_res_query
|
||||
fi
|
||||
|
||||
if test $ac_cv_func_res_query = no ; then
|
||||
AC_CHECK_LIB(bind, __res_query)
|
||||
ac_cv_func_res_query=$ac_cv_lib_bind___res_query
|
||||
fi
|
||||
|
||||
if test $ac_cv_func_res_query = no ; then
|
||||
AC_CHECK_LIB(resolv, res_query)
|
||||
ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
|
||||
fi
|
||||
|
||||
if test $ac_cv_func_res_query = no ; then
|
||||
AC_CHECK_LIB(resolv, __res_query)
|
||||
ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
|
||||
fi
|
||||
|
||||
if test $ac_cv_func_res_query = no ; then
|
||||
AC_CHECK_LIB(resolv, _res_9_query)
|
||||
ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
|
||||
fi
|
||||
|
||||
if test "$ac_cv_func_res_query" = yes ; then
|
||||
if test "$ol_cv_lib_resolver" != no ; then
|
||||
AC_DEFINE(HAVE_RES_QUERY,1,
|
||||
[define if you have res_query()])
|
||||
|
||||
if test $ol_enable_dnssrv != no ; then
|
||||
if test "$ol_enable_dnssrv" != no ; then
|
||||
ol_link_dnssrv=yes
|
||||
fi
|
||||
|
||||
if test "$ol_cv_lib_resolver" != yes ; then
|
||||
LIBS="$ol_cv_lib_resolver $LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
|
||||
AC_MSG_ERROR([DNSSRV requires res_query()])
|
||||
if test "$ol_enable_dnssrv" = yes -o "$ol_enable_dnssrv" = mod ; then
|
||||
if test "$ol_link_dnssrv" = no ; then
|
||||
AC_MSG_ERROR([DNSSRV requires res_query()])
|
||||
fi
|
||||
else
|
||||
ol_enable_dnssrv=no
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS( hstrerror )
|
||||
|
|
@ -2094,6 +2074,9 @@ if test $ol_enable_sql != no ; then
|
|||
AC_MSG_ERROR([could not locate SQL headers])
|
||||
])
|
||||
|
||||
sql_LIBS="$LIBS"
|
||||
LIBS="$LTHREAD_LIBS"
|
||||
|
||||
AC_CHECK_LIB(iodbc,SQLDriverConnect,[have_iodbc=yes],[have_iodbc=no])
|
||||
if test $have_iodbc = yes ; then
|
||||
ol_link_sql="-liodbc"
|
||||
|
|
@ -2104,6 +2087,8 @@ if test $ol_enable_sql != no ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
LIBS="$sql_LIBS"
|
||||
|
||||
if test $ol_link_sql != no ; then
|
||||
SLAPD_SQL_LIBS="$ol_link_sql"
|
||||
|
||||
|
|
@ -2801,6 +2786,17 @@ if test "$ol_enable_dyngroup" != no ; then
|
|||
AC_DEFINE_UNQUOTED(SLAPD_OVER_DYNGROUP,$MFLAG,[define for Dynamic Group overlay])
|
||||
fi
|
||||
|
||||
if test "$ol_enable_dynlist" != no ; then
|
||||
BUILD_DYNLIST=$ol_enable_dynlist
|
||||
if test "$ol_enable_dynlist" = mod ; then
|
||||
MFLAG=SLAPD_MOD_DYNAMIC
|
||||
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
|
||||
else
|
||||
MFLAG=SLAPD_MOD_STATIC
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(SLAPD_OVER_DYNLIST,$MFLAG,[define for Dynamic List overlay])
|
||||
fi
|
||||
|
||||
if test "$ol_enable_glue" != no ; then
|
||||
BUILD_GLUE=$ol_enable_glue
|
||||
if test "$ol_enable_glue" = mod ; then
|
||||
|
|
@ -2960,6 +2956,7 @@ dnl overlays
|
|||
AC_SUBST(BUILD_CHAIN)
|
||||
AC_SUBST(BUILD_DENYOP)
|
||||
AC_SUBST(BUILD_DYNGROUP)
|
||||
AC_SUBST(BUILD_DYNLIST)
|
||||
AC_SUBST(BUILD_GLUE)
|
||||
AC_SUBST(BUILD_LASTMOD)
|
||||
AC_SUBST(BUILD_PPOLICY)
|
||||
|
|
|
|||
|
|
@ -11,12 +11,6 @@ Current contributions:
|
|||
LDAP C++ API
|
||||
Contributed by SuSE Gmbh.
|
||||
|
||||
ldapsasl
|
||||
LDAP SASL auxprop plugin
|
||||
Contributed by Symas Corp.
|
||||
Note: this module is now part of Cyrus SASL
|
||||
and no longer included here.
|
||||
|
||||
slapd-modules
|
||||
Native modules
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Makefile.in generated by automake 1.7.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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.
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
# Copyright 2000-2003, OpenLDAP Foundation, All Rights Reserved.
|
||||
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
|
@ -24,7 +23,6 @@ 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
|
||||
|
|
@ -38,11 +36,49 @@ POST_INSTALL = :
|
|||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS TODO \
|
||||
acconfig.h config.guess config.sub depcomp install-sh \
|
||||
ltmain.sh missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
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); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
|
|
@ -53,6 +89,7 @@ CFLAGS = @CFLAGS@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
@ -64,6 +101,8 @@ ECHO_N = @ECHO_N@
|
|||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
|
@ -88,8 +127,10 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
|
|
@ -97,7 +138,10 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
|||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
|
|
@ -118,6 +162,7 @@ libdir = @libdir@
|
|||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
|
|
@ -125,43 +170,43 @@ sbindir = @sbindir@
|
|||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
|
||||
EXTRA_DIST = BUGS
|
||||
SUBDIRS = src examples
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
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
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
$(ACLOCAL_M4): configure.in
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
mostlyclean-libtool:
|
||||
|
|
@ -181,7 +226,13 @@ uninstall-info-am:
|
|||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
|
|
@ -193,7 +244,7 @@ $(RECURSIVE_TARGETS):
|
|||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
|
|
@ -201,7 +252,13 @@ $(RECURSIVE_TARGETS):
|
|||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
|
|
@ -222,7 +279,7 @@ maintainer-clean-recursive:
|
|||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
|
|
@ -233,14 +290,6 @@ ctags-recursive:
|
|||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
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 \
|
||||
|
|
@ -249,14 +298,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
|
|
@ -265,10 +323,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
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
|
||||
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
@ -291,19 +350,6 @@ GTAGS:
|
|||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = .
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
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)
|
||||
|
|
@ -319,7 +365,7 @@ distdir: $(DISTFILES)
|
|||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
|
|
@ -334,15 +380,17 @@ distdir: $(DISTFILES)
|
|||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" \
|
||||
distdir=../$(distdir)/$$subdir \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
|
|
@ -353,26 +401,53 @@ distdir: $(DISTFILES)
|
|||
! -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
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
tardir=$(distdir) && $(am__tar) | 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
|
||||
$(am__remove_distdir)
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/=build \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
|
|
@ -385,21 +460,22 @@ distcheck: dist
|
|||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
|
||||
(cd ../.. && umask 077 && mkdir "$$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) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
cd $(distuninstallcheck_dir) \
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
|
|
@ -408,11 +484,11 @@ distuninstallcheck:
|
|||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
if test '$(srcdir)' = . ; then \
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
|
|
@ -421,7 +497,6 @@ check: check-recursive
|
|||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
|
|
@ -433,7 +508,7 @@ install-am: all-am
|
|||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
|
@ -441,7 +516,7 @@ mostlyclean-generic:
|
|||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
|
|
@ -452,6 +527,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
|
|||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
|
|
@ -459,6 +535,8 @@ dvi: dvi-recursive
|
|||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
|
@ -475,7 +553,8 @@ installcheck-am:
|
|||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf autom4te.cache
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
|
@ -494,23 +573,20 @@ uninstall-am: uninstall-info-am
|
|||
|
||||
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 \
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip 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 \
|
||||
dvi-am html html-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 installdirs-am \
|
||||
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
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive 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.
|
||||
|
|
|
|||
9062
contrib/ldapc++/aclocal.m4
vendored
9062
contrib/ldapc++/aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
611
contrib/ldapc++/config.guess
vendored
611
contrib/ldapc++/config.guess
vendored
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-07-12'
|
||||
timestamp='2005-02-10'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
|
@ -24,8 +24,9 @@ timestamp='2001-07-12'
|
|||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
# Originally written by Per Bothner <per@bothner.com>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
|
|
@ -52,7 +53,7 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
|
|
@ -87,30 +88,42 @@ if test $# != 0; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
trap 'exit 1' 1 2 15
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||
# compiler to aid in system detection is discouraged as it requires
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
# headache to deal with in a portable fashion.
|
||||
|
||||
# CC_FOR_BUILD -- compiler used by this script.
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c ;
|
||||
for c in cc gcc c89 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
||||
if test $? = 0 ; then
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > $dummy.c ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
rm -f $dummy.c $dummy.o $dummy.rel ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac'
|
||||
esac ;'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
|
|
@ -131,35 +144,36 @@ case "${UNAME_MACHINE}" in
|
|||
test -z "$VENDOR" && VENDOR=unknown
|
||||
;;
|
||||
esac
|
||||
test -e /etc/SuSE-release && VENDOR=suse
|
||||
test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# Netbsd (nbsd) targets should (where applicable) match one or
|
||||
# NetBSD (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
#
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
armeb) machine=armeb-unknown ;;
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
|
|
@ -176,71 +190,123 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
;;
|
||||
esac
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
# kernel version information, so it can be replaced with a
|
||||
# suitable tag, in the style of linux-gnu.
|
||||
case "${UNAME_VERSION}" in
|
||||
Debian*)
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit 0 ;;
|
||||
amd64:OpenBSD:*:*)
|
||||
echo x86_64-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
cats:OpenBSD:*:*)
|
||||
echo arm-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
luna88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:OpenBSD:*:*)
|
||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvmeppc:OpenBSD:*:*)
|
||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips64-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:MirBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
case $UNAME_RELEASE in
|
||||
*4.0)
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
fi
|
||||
;;
|
||||
*5.*)
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||
;;
|
||||
esac
|
||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
||||
# covers most systems running today. This code pipes the CPU
|
||||
# types through head -n 1, so we only detect the type of CPU 0.
|
||||
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
||||
case "$ALPHA_CPU_TYPE" in
|
||||
"EV4 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"EV4.5 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"LCA4 (21066/21068)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"EV5 (21164)")
|
||||
UNAME_MACHINE="alphaev5" ;;
|
||||
"EV5.6 (21164A)")
|
||||
UNAME_MACHINE="alphaev56" ;;
|
||||
"EV5.6 (21164PC)")
|
||||
UNAME_MACHINE="alphapca56" ;;
|
||||
"EV5.7 (21164PC)")
|
||||
UNAME_MACHINE="alphapca57" ;;
|
||||
"EV6 (21264)")
|
||||
UNAME_MACHINE="alphaev6" ;;
|
||||
"EV6.7 (21264A)")
|
||||
UNAME_MACHINE="alphaev67" ;;
|
||||
"EV6.8CB (21264C)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.8AL (21264B)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.8CX (21264D)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.9A (21264/EV69A)")
|
||||
UNAME_MACHINE="alphaev69" ;;
|
||||
"EV7 (21364)")
|
||||
UNAME_MACHINE="alphaev7" ;;
|
||||
"EV7.9 (21364A)")
|
||||
UNAME_MACHINE="alphaev79" ;;
|
||||
esac
|
||||
# A Pn.n version is a patched version.
|
||||
# A Vn.n version is a released version.
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
1-0)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
1-1)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
1-101)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
2-303)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
|
|
@ -254,33 +320,21 @@ EOF
|
|||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-unknown-sysv4
|
||||
exit 0;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
*:[Mm]orph[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-morphos
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
exit 0 ;;
|
||||
*:z/VM:*:*)
|
||||
echo s390-ibm-zvmoe
|
||||
exit 0 ;;
|
||||
*:OS400:*:*)
|
||||
echo powerpc-ibm-os400
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
|
|
@ -298,6 +352,13 @@ EOF
|
|||
NILE*:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
DRS?6000:unix:4.0:6*)
|
||||
echo sparc-icl-nx6
|
||||
exit 0 ;;
|
||||
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
|
||||
case `/usr/bin/uname -p` in
|
||||
sparc) echo sparc-icl-nx7 && exit 0 ;;
|
||||
esac ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
|
|
@ -326,7 +387,7 @@ EOF
|
|||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
|
|
@ -340,9 +401,6 @@ EOF
|
|||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
|
|
@ -369,17 +427,8 @@ EOF
|
|||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
m68k:machten:*:*)
|
||||
echo m68k-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
|
|
@ -397,6 +446,7 @@ EOF
|
|||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
|
|
@ -418,16 +468,20 @@ EOF
|
|||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c \
|
||||
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& exit 0
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
echo powerpc-motorola-powermax
|
||||
exit 0 ;;
|
||||
Motorola:*:4.3:PL8-*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
|
|
@ -488,6 +542,7 @@ EOF
|
|||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
|
|
@ -499,9 +554,7 @@ EOF
|
|||
exit(0);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
|
|
@ -510,7 +563,7 @@ EOF
|
|||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:[45])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
|
|
@ -550,10 +603,8 @@ EOF
|
|||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
case "${HPUX_REV}" in
|
||||
11.[0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
|
|
@ -562,12 +613,13 @@ EOF
|
|||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
fi ;;
|
||||
esac
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
|
|
@ -600,12 +652,21 @@ EOF
|
|||
exit (0);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
then
|
||||
# avoid double evaluation of $set_cc_for_build
|
||||
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
|
|
@ -613,6 +674,7 @@ EOF
|
|||
echo ia64-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
|
|
@ -638,9 +700,7 @@ EOF
|
|||
exit (0);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
|
|
@ -668,9 +728,6 @@ EOF
|
|||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
hppa*:OpenBSD:*:*)
|
||||
echo hppa-unknown-openbsd
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
|
|
@ -689,9 +746,6 @@ EOF
|
|||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
|
|
@ -704,26 +758,25 @@ EOF
|
|||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
*:UNICOS/mp:*:*)
|
||||
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
5000:UNIX_System_V:4.*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
|
|
@ -737,9 +790,6 @@ EOF
|
|||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit 0 ;;
|
||||
|
|
@ -749,15 +799,24 @@ EOF
|
|||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:[34]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit 0 ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i386-pc-interix
|
||||
echo i586-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
exit 0 ;;
|
||||
amd64:CYGWIN*:*:*)
|
||||
echo x86_64-unknown-cygwin
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin
|
||||
exit 0 ;;
|
||||
|
|
@ -765,29 +824,81 @@ EOF
|
|||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
# the GNU system
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:GNU/*:*:*)
|
||||
# other systems with GNU libc and userland
|
||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
||||
exit 0 ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit 0 ;;
|
||||
arm*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux
|
||||
exit 0 ;;
|
||||
crisv32:Linux:*:*)
|
||||
echo crisv32-axis-linux
|
||||
exit 0 ;;
|
||||
frv:Linux:*:*)
|
||||
echo frv-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
m32r*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
m68*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
|
||||
big) echo mips-${VENDOR}-linux && exit 0 ;;
|
||||
little) echo mipsel-${VENDOR}-linux && exit 0 ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*|ppc64:Linux:*:*)
|
||||
mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mips64el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
|
|
@ -796,10 +907,10 @@ EOF
|
|||
PCA57) UNAME_MACHINE=alphapca56 ;;
|
||||
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||
EV68*) UNAME_MACHINE=alphaev67 ;;
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
|
||||
exit 0 ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
|
|
@ -816,6 +927,9 @@ EOF
|
|||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit 0 ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
|
|
@ -829,7 +943,8 @@ EOF
|
|||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_targets=`cd /; ld --help 2>&1 \
|
||||
# Set LC_ALL=C to ensure ld outputs messages in English.
|
||||
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported targets: *//
|
||||
|
|
@ -841,7 +956,7 @@ EOF
|
|||
;;
|
||||
a.out-i386-linux)
|
||||
echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
coff-i386)
|
||||
echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
|
||||
exit 0 ;;
|
||||
|
|
@ -852,33 +967,32 @@ EOF
|
|||
exit 0 ;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-${VENDOR}-linuxaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __dietlibc__
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
|
|
@ -895,6 +1009,26 @@ EOF
|
|||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
i*86:syllable:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-syllable
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
|
|
@ -916,22 +1050,19 @@ EOF
|
|||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
|
||||
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
|
|
@ -955,9 +1086,15 @@ EOF
|
|||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
mc68k:UNIX:SYSTEM5:3.51m)
|
||||
echo m68k-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680?0:D-NIX:5.3:*)
|
||||
echo m68k-diab-dnix
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[5678]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
|
|
@ -974,9 +1111,6 @@ EOF
|
|||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
|
@ -1003,8 +1137,8 @@ EOF
|
|||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit 0 ;;
|
||||
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
|
|
@ -1016,6 +1150,10 @@ EOF
|
|||
# From seanf@swdc.stratus.com.
|
||||
echo i860-stratus-sysv4
|
||||
exit 0 ;;
|
||||
*:VOS:*:*)
|
||||
# From Paul.Green@stratus.com.
|
||||
echo hppa1.1-stratus-vos
|
||||
exit 0 ;;
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
|
@ -1044,6 +1182,9 @@ EOF
|
|||
SX-5:SUPER-UX:*:*)
|
||||
echo sx5-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SX-6:SUPER-UX:*:*)
|
||||
echo sx6-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
|
|
@ -1051,18 +1192,28 @@ EOF
|
|||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
UNAME_PROCESSOR=i386
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
NSE-?:NONSTOP_KERNEL:*:*)
|
||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
NSR-?:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
|
|
@ -1085,11 +1236,6 @@ EOF
|
|||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
|
|
@ -1108,11 +1254,28 @@ EOF
|
|||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:DragonFly:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:*VMS:*:*)
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
case "${UNAME_MACHINE}" in
|
||||
A*) echo alpha-dec-vms && exit 0 ;;
|
||||
I*) echo ia64-dec-vms && exit 0 ;;
|
||||
V*) echo vax-dec-vms && exit 0 ;;
|
||||
esac ;;
|
||||
*:XENIX:*:SysV)
|
||||
echo i386-pc-xenix
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
|
|
@ -1227,9 +1390,7 @@ main ()
|
|||
}
|
||||
EOF
|
||||
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
|
|
|||
434
contrib/ldapc++/config.sub
vendored
434
contrib/ldapc++/config.sub
vendored
|
|
@ -1,9 +1,9 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-06-08'
|
||||
timestamp='2005-02-10'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
|
|
@ -29,7 +29,8 @@ timestamp='2001-06-08'
|
|||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
|
|
@ -69,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
|
|
@ -117,7 +118,8 @@ esac
|
|||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
|
||||
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
|
|
@ -143,7 +145,7 @@ case $os in
|
|||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis)
|
||||
-apple | -axis | -knuth | -cray)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
|
|
@ -223,26 +225,50 @@ esac
|
|||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
|
||||
| arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
|
||||
| pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| hppa64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
|
||||
| alphaev6[78] \
|
||||
| we32k | ns16k | clipper | i370 | sh | sh[34] \
|
||||
| powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp10 | pdp11 \
|
||||
| mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
|
||||
| v850 | c4x \
|
||||
| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
|
||||
| pj | pjl | h8500 | z8k)
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64r2 | mipsisa64r2el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
|
|
@ -265,31 +291,62 @@ case $basic_machine in
|
|||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
# FIXME: clean up the formatting here.
|
||||
vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| hppa2.0n-* | hppa64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| alphaev6[78]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
| clipper-* | orion-* \
|
||||
| sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \
|
||||
| powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
|
||||
| mips16-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
|
||||
| [cjt]90-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
|
||||
| bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64r2-* | mipsisa64r2el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
|
|
@ -307,6 +364,9 @@ case $basic_machine in
|
|||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
abacus)
|
||||
basic_machine=abacus-unknown
|
||||
;;
|
||||
adobe68k)
|
||||
basic_machine=m68010-adobe
|
||||
os=-scout
|
||||
|
|
@ -321,6 +381,12 @@ case $basic_machine in
|
|||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amd64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amd64-*)
|
||||
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
|
|
@ -352,6 +418,10 @@ case $basic_machine in
|
|||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
|
|
@ -372,30 +442,45 @@ case $basic_machine in
|
|||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
cray | j90)
|
||||
basic_machine=j90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
craynv)
|
||||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
[cjt]90)
|
||||
basic_machine=${basic_machine}-cray
|
||||
os=-unicos
|
||||
cr16c)
|
||||
basic_machine=cr16c-unknown
|
||||
os=-elf
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
crisv32 | crisv32-* | etraxfs*)
|
||||
basic_machine=crisv32-axis
|
||||
;;
|
||||
cris | cris-* | etrax*)
|
||||
basic_machine=cris-axis
|
||||
;;
|
||||
crx)
|
||||
basic_machine=crx-unknown
|
||||
os=-elf
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
decsystem10* | dec10*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops10
|
||||
;;
|
||||
decsystem20* | dec20*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops20
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
|
|
@ -404,6 +489,10 @@ case $basic_machine in
|
|||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
djgpp)
|
||||
basic_machine=i586-pc
|
||||
os=-msdosdjgpp
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
|
|
@ -576,26 +665,20 @@ case $basic_machine in
|
|||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
mmix*)
|
||||
basic_machine=mmix-knuth
|
||||
os=-mmixware
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
morphos)
|
||||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
|
|
@ -675,6 +758,14 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
os400)
|
||||
basic_machine=powerpc-ibm
|
||||
os=-os400
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
os=-ose
|
||||
|
|
@ -697,44 +788,58 @@ case $basic_machine in
|
|||
pbb)
|
||||
basic_machine=m68k-tti
|
||||
;;
|
||||
pc532 | pc532-*)
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen)
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
pentiumpro | p6 | 6x86 | athlon | athlon_*)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
pentiumii | pentium2 | pentiumiii | pentium3)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
pentium4)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium4-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc64) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64) basic_machine=powerpc64-unknown
|
||||
;;
|
||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||
basic_machine=powerpc64le-unknown
|
||||
;;
|
||||
ppc64le-* | powerpc64little-*)
|
||||
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
|
|
@ -752,10 +857,26 @@ case $basic_machine in
|
|||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
sb1)
|
||||
basic_machine=mipsisa64sb1-unknown
|
||||
;;
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
|
|
@ -763,7 +884,10 @@ case $basic_machine in
|
|||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sparclite-wrs)
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparclite-wrs | simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
|
|
@ -830,22 +954,42 @@ case $basic_machine in
|
|||
os=-dynix
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=t3e-cray
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t90)
|
||||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic55x | c55x*)
|
||||
basic_machine=tic55x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic6x | c6x*)
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
toad1)
|
||||
basic_machine=pdp10-xkl
|
||||
os=-tops20
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
tpf)
|
||||
basic_machine=s390x-ibm
|
||||
os=-tpf
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
|
|
@ -867,8 +1011,8 @@ case $basic_machine in
|
|||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=-vxworks
|
||||
|
|
@ -889,17 +1033,17 @@ case $basic_machine in
|
|||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
windows32)
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
xbox)
|
||||
basic_machine=i686-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
|
|
@ -920,19 +1064,12 @@ case $basic_machine in
|
|||
op60c)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
mips)
|
||||
case $os in
|
||||
linux*)
|
||||
basic_machine=mips-unknown
|
||||
;;
|
||||
*)
|
||||
basic_machine=mips-mips
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
mmix)
|
||||
basic_machine=mmix-knuth
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
|
|
@ -949,13 +1086,16 @@ case $basic_machine in
|
|||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4)
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
|
|
@ -970,10 +1110,6 @@ case $basic_machine in
|
|||
pmac | pmac-mpw)
|
||||
basic_machine=powerpc-apple
|
||||
;;
|
||||
c4x*)
|
||||
basic_machine=c4x-none
|
||||
os=-coff
|
||||
;;
|
||||
*-unknown)
|
||||
# Make sure to match an already-canonicalized machine name.
|
||||
;;
|
||||
|
|
@ -1029,16 +1165,20 @@ case $os in
|
|||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
|
|
@ -1050,8 +1190,10 @@ case $os in
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
-nto-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
|
|
@ -1060,6 +1202,9 @@ case $os in
|
|||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
-linux-dietlibc)
|
||||
os=-linux-dietlibc
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
|
|
@ -1069,6 +1214,9 @@ case $os in
|
|||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-os400*)
|
||||
os=-os400
|
||||
;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
|
|
@ -1087,14 +1235,23 @@ case $os in
|
|||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-syllable*)
|
||||
os=-syllable
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-nova*)
|
||||
os=-rtmk-nova
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk*)
|
||||
os=-nsk
|
||||
|
|
@ -1106,6 +1263,9 @@ case $os in
|
|||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-tpf*)
|
||||
os=-tpf
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
|
|
@ -1133,8 +1293,17 @@ case $os in
|
|||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
;;
|
||||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
|
|
@ -1167,10 +1336,14 @@ case $basic_machine in
|
|||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
pdp11-*)
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
*-dec | vax-*)
|
||||
|
|
@ -1197,6 +1370,9 @@ case $basic_machine in
|
|||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
or32-*)
|
||||
os=-coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
|
|
@ -1209,6 +1385,9 @@ case $basic_machine in
|
|||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-knuth)
|
||||
os=-mmixware
|
||||
;;
|
||||
*-wec)
|
||||
os=-proelf
|
||||
;;
|
||||
|
|
@ -1260,19 +1439,19 @@ case $basic_machine in
|
|||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
*-highlevel)
|
||||
*-highlevel)
|
||||
os=-bsd
|
||||
;;
|
||||
*-encore)
|
||||
os=-bsd
|
||||
;;
|
||||
*-sgi)
|
||||
*-sgi)
|
||||
os=-irix
|
||||
;;
|
||||
*-siemens)
|
||||
*-siemens)
|
||||
os=-sysv4
|
||||
;;
|
||||
*-masscomp)
|
||||
|
|
@ -1341,10 +1520,16 @@ case $basic_machine in
|
|||
-mvs* | -opened*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-os400*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks*)
|
||||
-tpf*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-vxsim* | -vxworks* | -windiss*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
|
|
@ -1359,6 +1544,9 @@ case $basic_machine in
|
|||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
vendor=atari
|
||||
;;
|
||||
-vos*)
|
||||
vendor=stratus
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
|
|
|
|||
16749
contrib/ldapc++/configure
vendored
16749
contrib/ldapc++/configure
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,10 @@
|
|||
# Copyright 2003, OpenLDAP Foundation, All Rights Reserved.
|
||||
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
##
|
||||
noinst_PROGRAMS = main
|
||||
noinst_PROGRAMS = main readSchema
|
||||
|
||||
main_SOURCES = main.cpp
|
||||
main_LDADD = ../src/libldapcpp.la
|
||||
|
||||
readSchema_SOURCES = readSchema.cpp
|
||||
readSchema_LDADD = ../src/libldapcpp.la
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Makefile.in generated by automake 1.7.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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.
|
||||
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
@SET_MAKE@
|
||||
|
||||
SOURCES = $(main_SOURCES) $(readSchema_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
|
@ -21,7 +23,6 @@ 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
|
||||
|
|
@ -35,11 +36,46 @@ POST_INSTALL = :
|
|||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
noinst_PROGRAMS = main$(EXEEXT) readSchema$(EXEEXT)
|
||||
subdir = examples
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_main_OBJECTS = main.$(OBJEXT)
|
||||
main_OBJECTS = $(am_main_OBJECTS)
|
||||
main_DEPENDENCIES = ../src/libldapcpp.la
|
||||
am_readSchema_OBJECTS = readSchema.$(OBJEXT)
|
||||
readSchema_OBJECTS = $(am_readSchema_OBJECTS)
|
||||
readSchema_DEPENDENCIES = ../src/libldapcpp.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(main_SOURCES) $(readSchema_SOURCES)
|
||||
DIST_SOURCES = $(main_SOURCES) $(readSchema_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
|
|
@ -50,6 +86,7 @@ CFLAGS = @CFLAGS@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
@ -61,6 +98,8 @@ ECHO_N = @ECHO_N@
|
|||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
|
@ -85,8 +124,10 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
|
|
@ -94,7 +135,10 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
|||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
|
|
@ -115,6 +159,7 @@ libdir = @libdir@
|
|||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
|
|
@ -122,50 +167,43 @@ 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)
|
||||
|
||||
readSchema_SOURCES = readSchema.cpp
|
||||
readSchema_LDADD = ../src/libldapcpp.la
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
|
||||
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)
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
|
|
@ -176,50 +214,39 @@ clean-noinstPROGRAMS:
|
|||
main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES)
|
||||
@rm -f main$(EXEEXT)
|
||||
$(CXXLINK) $(main_LDFLAGS) $(main_OBJECTS) $(main_LDADD) $(LIBS)
|
||||
readSchema$(EXEEXT): $(readSchema_OBJECTS) $(readSchema_DEPENDENCIES)
|
||||
@rm -f readSchema$(EXEEXT)
|
||||
$(CXXLINK) $(readSchema_LDFLAGS) $(readSchema_OBJECTS) $(readSchema_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf ./$(DEPDIR)
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readSchema.Po@am__quote@
|
||||
|
||||
.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
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; 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)/'`$<
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.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
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; 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`
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.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
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; 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)/'`$<
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
|
@ -231,14 +258,6 @@ 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 \
|
||||
|
|
@ -247,6 +266,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
@ -258,10 +278,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
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
|
||||
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
@ -284,10 +305,6 @@ GTAGS:
|
|||
|
||||
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'`; \
|
||||
|
|
@ -301,7 +318,7 @@ distdir: $(DISTFILES)
|
|||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
|
|
@ -319,9 +336,7 @@ distdir: $(DISTFILES)
|
|||
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
|
||||
|
|
@ -333,7 +348,7 @@ install-am: all-am
|
|||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
|
@ -341,7 +356,7 @@ mostlyclean-generic:
|
|||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
|
|
@ -352,14 +367,17 @@ 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
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
|
@ -375,7 +393,8 @@ install-man:
|
|||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
|
@ -395,15 +414,15 @@ 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
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-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.
|
||||
|
|
|
|||
68
contrib/ldapc++/examples/readSchema.cpp
Normal file
68
contrib/ldapc++/examples/readSchema.cpp
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
#include<iostream.h>
|
||||
#include<strstream>
|
||||
#include "LDAPConnection.h"
|
||||
#include "LDAPConstraints.h"
|
||||
#include "LDAPSearchReference.h"
|
||||
#include "LDAPSearchResults.h"
|
||||
#include "LDAPAttribute.h"
|
||||
#include "LDAPAttributeList.h"
|
||||
#include "LDAPEntry.h"
|
||||
#include "LDAPException.h"
|
||||
#include "LDAPModification.h"
|
||||
#include "LDAPReferralException.h"
|
||||
#include "LDAPSchema.h"
|
||||
|
||||
#include"debug.h"
|
||||
|
||||
int main(){
|
||||
LDAPConnection *lc=new LDAPConnection("192.168.3.128",389);
|
||||
cout << "----------------------doing bind...." << endl;
|
||||
try{
|
||||
lc->bind("uid=admin,dc=home,dc=local" , "secret");
|
||||
cout << lc->getHost() << endl;
|
||||
StringList tmp;
|
||||
tmp.add("subschemasubentry");
|
||||
LDAPSearchResults* entries = lc->search("",
|
||||
LDAPConnection::SEARCH_BASE,
|
||||
"(objectClass=*)",
|
||||
tmp );
|
||||
LDAPEntry* rootDse = entries->getNext();
|
||||
std::string schemabase="cn=subschema";
|
||||
|
||||
if(rootDse){
|
||||
const LDAPAttribute* schemaAttr = rootDse->getAttributes()->getAttributeByName("subschemaSubentry");
|
||||
schemabase = *(schemaAttr->getValues().begin());
|
||||
}
|
||||
StringList attrs;
|
||||
attrs.add("objectClasses");
|
||||
attrs.add("attributeTypes");
|
||||
entries = lc->search(schemabase, LDAPConnection::SEARCH_BASE, "(objectClass=*)",
|
||||
attrs);
|
||||
if (entries != 0){
|
||||
LDAPEntry* entry = entries->getNext();
|
||||
if(entry != 0){
|
||||
const LDAPAttribute* oc = entry->getAttributes()->getAttributeByName("objectClasses");
|
||||
LDAPSchema schema;
|
||||
schema.setObjectClasses((oc->getValues()));
|
||||
LDAPObjClass test = schema.getObjectClassByName("inetOrgPerson");
|
||||
cout << test.getDesc() << endl;
|
||||
// StringList mustAttr = test.getMay();
|
||||
// for( StringList::const_iterator i = mustAttr.begin(); i != mustAttr.end(); i++ ){
|
||||
// cout << *i << endl;
|
||||
// }
|
||||
StringList sup = test.getSup();
|
||||
for( StringList::const_iterator i = sup.begin(); i != sup.end(); i++ ){
|
||||
cout << *i << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lc->unbind();
|
||||
delete lc;
|
||||
}catch (LDAPException e){
|
||||
cout << "------------------------- caught Exception ---------"<< endl;
|
||||
cout << e << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -56,8 +56,11 @@ void LDAPAsynConnection::init(const string& hostname, int port){
|
|||
ldap_set_option(cur_session, LDAP_OPT_PROTOCOL_VERSION, &opt);
|
||||
}
|
||||
|
||||
int LDAPAsynConnection::start_tls(){
|
||||
return ldap_start_tls_s( cur_session, NULL, NULL );
|
||||
void LDAPAsynConnection::start_tls(){
|
||||
int resCode;
|
||||
if( ldap_start_tls_s( cur_session, NULL, NULL ) != LDAP_SUCCESS ) {
|
||||
throw LDAPException(this);
|
||||
}
|
||||
}
|
||||
|
||||
LDAPMessageQueue* LDAPAsynConnection::bind(const string& dn,
|
||||
|
|
|
|||
|
|
@ -92,10 +92,11 @@ class LDAPAsynConnection{
|
|||
/**
|
||||
* Start TLS on this connection. This isn't in the constructor,
|
||||
* because it could fail (i.e. server doesn't have SSL cert, client
|
||||
* api wasn't compiled against OpenSSL, etc.). If you need TLS,
|
||||
* then you should error if this call fails with an error code.
|
||||
* api wasn't compiled against OpenSSL, etc.).
|
||||
* @throws LDAPException if the TLS Layer could not be setup
|
||||
* correctly
|
||||
*/
|
||||
int start_tls();
|
||||
void start_tls();
|
||||
|
||||
/** Simple authentication to a LDAP-Server
|
||||
*
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ LDAPAttrType::LDAPAttrType(){
|
|||
|
||||
oid = string ();
|
||||
desc = string ();
|
||||
equality = string ();
|
||||
syntax = string ();
|
||||
names = StringList ();
|
||||
single = false;
|
||||
}
|
||||
|
|
@ -25,8 +23,6 @@ LDAPAttrType::LDAPAttrType (const LDAPAttrType &at){
|
|||
|
||||
oid = at.oid;
|
||||
desc = at.desc;
|
||||
equality = at.equality;
|
||||
syntax = at.syntax;
|
||||
names = at.names;
|
||||
single = at.single;
|
||||
}
|
||||
|
|
@ -44,8 +40,6 @@ LDAPAttrType::LDAPAttrType (string at_item) {
|
|||
if (a) {
|
||||
this->setNames (a->at_names);
|
||||
this->setDesc (a->at_desc);
|
||||
this->setEquality (a->at_equality_oid);
|
||||
this->setSyntax (a->at_syntax_oid);
|
||||
this->setOid (a->at_oid);
|
||||
this->setSingle (a->at_single_value);
|
||||
}
|
||||
|
|
@ -70,20 +64,6 @@ void LDAPAttrType::setDesc (char *at_desc) {
|
|||
desc = at_desc;
|
||||
}
|
||||
|
||||
void LDAPAttrType::setEquality (char *at_equality_oid) {
|
||||
equality = string ();
|
||||
if (at_equality_oid) {
|
||||
equality = at_equality_oid;
|
||||
}
|
||||
}
|
||||
|
||||
void LDAPAttrType::setSyntax (char *at_syntax_oid) {
|
||||
syntax = string ();
|
||||
if (at_syntax_oid) {
|
||||
syntax = at_syntax_oid;
|
||||
}
|
||||
}
|
||||
|
||||
void LDAPAttrType::setOid (char *at_oid) {
|
||||
oid = string ();
|
||||
if (at_oid)
|
||||
|
|
@ -102,14 +82,6 @@ string LDAPAttrType::getDesc () {
|
|||
return desc;
|
||||
}
|
||||
|
||||
string LDAPAttrType::getEquality () {
|
||||
return equality;
|
||||
}
|
||||
|
||||
string LDAPAttrType::getSyntax () {
|
||||
return syntax;
|
||||
}
|
||||
|
||||
StringList LDAPAttrType::getNames () {
|
||||
return names;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ using namespace std;
|
|||
class LDAPAttrType{
|
||||
private :
|
||||
StringList names;
|
||||
string desc, oid, equality, syntax;
|
||||
string desc, oid;
|
||||
bool single;
|
||||
|
||||
public :
|
||||
|
|
@ -63,16 +63,6 @@ class LDAPAttrType{
|
|||
*/
|
||||
string getOid ();
|
||||
|
||||
/**
|
||||
* Returns equality matching rule
|
||||
*/
|
||||
string getEquality ();
|
||||
|
||||
/**
|
||||
* Returns attribute syntax definition
|
||||
*/
|
||||
string getSyntax ();
|
||||
|
||||
/**
|
||||
* Returns attribute name (first one if there are more of them)
|
||||
*/
|
||||
|
|
@ -84,14 +74,12 @@ class LDAPAttrType{
|
|||
StringList getNames();
|
||||
|
||||
/**
|
||||
* Returns true if attribute type allows only single value
|
||||
* Returns true if attribute type hllows only single value
|
||||
*/
|
||||
bool isSingle();
|
||||
|
||||
void setNames (char **at_names);
|
||||
void setDesc (char *at_desc);
|
||||
void setEquality (char *at_equality_oid);
|
||||
void setSyntax (char *at_syntax_oid);
|
||||
void setOid (char *at_oid);
|
||||
void setSingle (int at_single_value);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ LDAPConnection::LDAPConnection(const string& hostname, int port,
|
|||
LDAPConnection::~LDAPConnection(){
|
||||
}
|
||||
|
||||
int LDAPConnection::start_tls(){
|
||||
return LDAPAsynConnection::start_tls();
|
||||
void LDAPConnection::start_tls(){
|
||||
LDAPAsynConnection::start_tls();
|
||||
}
|
||||
|
||||
void LDAPConnection::bind(const string& dn, const string& passwd,
|
||||
|
|
@ -50,9 +50,10 @@ void LDAPConnection::bind(const string& dn, const string& passwd,
|
|||
delete msg;
|
||||
throw LDAPReferralException(urls);
|
||||
}else{
|
||||
string srvMsg = res->getErrMsg();
|
||||
delete res;
|
||||
delete msg;
|
||||
throw LDAPException(resCode);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
}
|
||||
delete res;
|
||||
|
|
@ -97,9 +98,10 @@ bool LDAPConnection::compare(const string& dn, const LDAPAttribute& attr,
|
|||
}
|
||||
break;
|
||||
default :
|
||||
string srvMsg = res->getErrMsg();
|
||||
delete res;
|
||||
delete msg;
|
||||
throw LDAPException(resCode);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -130,9 +132,10 @@ void LDAPConnection::del(const string& dn, const LDAPConstraints* cons){
|
|||
}
|
||||
break;
|
||||
default :
|
||||
string srvMsg = res->getErrMsg();
|
||||
delete res;
|
||||
delete msg;
|
||||
throw LDAPException(resCode);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -164,9 +167,10 @@ void LDAPConnection::add(const LDAPEntry* le, const LDAPConstraints* cons){
|
|||
}
|
||||
break;
|
||||
default :
|
||||
string srvMsg = res->getErrMsg();
|
||||
delete res;
|
||||
delete msg;
|
||||
throw LDAPException(resCode);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -201,7 +205,7 @@ void LDAPConnection::modify(const string& dn, const LDAPModList* mods,
|
|||
string srvMsg = res->getErrMsg();
|
||||
delete res;
|
||||
delete msg;
|
||||
throw LDAPException(resCode,srvMsg);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -236,9 +240,10 @@ void LDAPConnection::rename(const string& dn, const string& newRDN,
|
|||
}
|
||||
break;
|
||||
default :
|
||||
string srvMsg = res->getErrMsg();
|
||||
delete res;
|
||||
delete msg;
|
||||
throw LDAPException(resCode);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -278,10 +283,11 @@ LDAPSearchResults* LDAPConnection::search(const string& base, int scope,
|
|||
}
|
||||
break;
|
||||
default :
|
||||
string srvMsg = res->getErrMsg();
|
||||
delete results; // memcheck
|
||||
delete res;
|
||||
delete msgq;
|
||||
throw LDAPException(resCode);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -314,9 +320,10 @@ LDAPExtResult* LDAPConnection::extOperation(const string& oid,
|
|||
}
|
||||
break;
|
||||
default :
|
||||
string srvMsg = res->getErrMsg();
|
||||
delete res;
|
||||
delete msg;
|
||||
throw LDAPException(resCode);
|
||||
throw LDAPException(resCode, srvMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,10 +71,11 @@ class LDAPConnection : private LDAPAsynConnection {
|
|||
/**
|
||||
* Start TLS on this connection. This isn't in the constructor,
|
||||
* because it could fail (i.e. server doesn't have SSL cert, client
|
||||
* api wasn't compiled against OpenSSL, etc.). If you need TLS,
|
||||
* then you should error if this call fails with an error code.
|
||||
* api wasn't compiled against OpenSSL, etc.).
|
||||
* @throws LDAPException if the TLS Layer could not be setup
|
||||
* correctly
|
||||
*/
|
||||
int start_tls();
|
||||
void start_tls();
|
||||
|
||||
/**
|
||||
* Performs a simple authentication with the server
|
||||
|
|
|
|||
|
|
@ -15,19 +15,19 @@
|
|||
using namespace std;
|
||||
|
||||
LDAPException::LDAPException(int res_code, const string& err_string){
|
||||
m_res_code=res_code;
|
||||
m_res_string=string(ldap_err2string(res_code));
|
||||
m_res_code=res_code;
|
||||
m_res_string=string(ldap_err2string(res_code));
|
||||
m_err_string=err_string;
|
||||
}
|
||||
|
||||
LDAPException::LDAPException(const LDAPAsynConnection *lc){
|
||||
m_err_string=string();
|
||||
m_res_string=string();
|
||||
LDAP *l = lc->getSessionHandle();
|
||||
ldap_get_option(l,LDAP_OPT_ERROR_NUMBER,&m_res_code);
|
||||
m_res_string=string(ldap_err2string(m_res_code));
|
||||
m_err_string=string();
|
||||
m_res_string=string();
|
||||
LDAP *l = lc->getSessionHandle();
|
||||
ldap_get_option(l,LDAP_OPT_ERROR_NUMBER,&m_res_code);
|
||||
m_res_string=string(ldap_err2string(m_res_code));
|
||||
char* err_string;
|
||||
ldap_get_option(l,LDAP_OPT_ERROR_STRING,&err_string);
|
||||
ldap_get_option(l,LDAP_OPT_ERROR_STRING,&err_string);
|
||||
m_err_string=string(err_string);
|
||||
}
|
||||
|
||||
|
|
@ -35,11 +35,11 @@ LDAPException::~LDAPException(){
|
|||
}
|
||||
|
||||
int LDAPException::getResultCode() const{
|
||||
return m_res_code;
|
||||
return m_res_code;
|
||||
}
|
||||
|
||||
const string& LDAPException::getResultMsg() const{
|
||||
return m_res_string;
|
||||
return m_res_string;
|
||||
}
|
||||
|
||||
const string& LDAPException::getServerMsg() const{
|
||||
|
|
|
|||
|
|
@ -85,5 +85,5 @@ noinst_HEADERS = LDAPAddRequest.h \
|
|||
LDAPSearchRequest.h
|
||||
|
||||
libldapcpp_la_LIBADD = -lldap -llber
|
||||
libldapcpp_la_LDFLAGS = -version-info 0:2:0
|
||||
libldapcpp_la_LDFLAGS = -version-info 0:3:0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Makefile.in generated by automake 1.7.2 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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.
|
||||
|
|
@ -17,6 +17,9 @@
|
|||
# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
|
||||
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
|
||||
|
||||
|
||||
SOURCES = $(libldapcpp_la_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
|
@ -24,7 +27,6 @@ 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
|
||||
|
|
@ -38,11 +40,66 @@ POST_INSTALL = :
|
|||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = src
|
||||
DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
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)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libldapcpp_la_SOURCES)
|
||||
DIST_SOURCES = $(libldapcpp_la_SOURCES)
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS) $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
|
|
@ -53,6 +110,7 @@ CFLAGS = @CFLAGS@
|
|||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
|
|
@ -64,6 +122,8 @@ ECHO_N = @ECHO_N@
|
|||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
|
@ -88,8 +148,10 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
|
|
@ -97,7 +159,10 @@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
|||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
|
|
@ -118,6 +183,7 @@ libdir = @libdir@
|
|||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
|
|
@ -125,9 +191,7 @@ sbindir = @sbindir@
|
|||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
|
||||
lib_LTLIBRARIES = libldapcpp.la
|
||||
|
||||
libldapcpp_la_SOURCES = LDAPAddRequest.cpp \
|
||||
LDAPAsynConnection.cpp \
|
||||
LDAPAttribute.cpp \
|
||||
|
|
@ -167,7 +231,6 @@ libldapcpp_la_SOURCES = LDAPAddRequest.cpp \
|
|||
LDAPUrlList.cpp \
|
||||
StringList.cpp
|
||||
|
||||
|
||||
include_HEADERS = LDAPAsynConnection.h \
|
||||
LDAPAttribute.h \
|
||||
LDAPAttributeList.h \
|
||||
|
|
@ -198,7 +261,6 @@ include_HEADERS = LDAPAsynConnection.h \
|
|||
LDAPUrlList.h \
|
||||
StringList.h
|
||||
|
||||
|
||||
noinst_HEADERS = LDAPAddRequest.h \
|
||||
LDAPBindRequest.h \
|
||||
LDAPCompareRequest.h \
|
||||
|
|
@ -209,96 +271,42 @@ noinst_HEADERS = LDAPAddRequest.h \
|
|||
LDAPRequest.h \
|
||||
LDAPSearchRequest.h
|
||||
|
||||
|
||||
libldapcpp_la_LIBADD = -lldap -llber
|
||||
libldapcpp_la_LDFLAGS = -version-info 0:1:0
|
||||
subdir = src
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
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)
|
||||
|
||||
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) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_SOURCES = $(libldapcpp_la_SOURCES)
|
||||
HEADERS = $(include_HEADERS) $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) Makefile.am \
|
||||
Makefile.in config.h.in
|
||||
SOURCES = $(libldapcpp_la_SOURCES)
|
||||
|
||||
libldapcpp_la_LDFLAGS = -version-info 0:3:0
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
|
||||
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)
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
|
|
@ -309,38 +317,37 @@ config.h: stamp-h1
|
|||
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
|
||||
$(srcdir)/config.h.in: $(am__configure_deps) $(top_srcdir)/acconfig.h
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
touch $(srcdir)/config.h.in
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
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; \
|
||||
f=$(am__strip_dir) \
|
||||
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 \
|
||||
p="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
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=.; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
|
|
@ -348,7 +355,7 @@ 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 *.$(OBJEXT) core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
|
@ -392,41 +399,26 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LDAPUrlList.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringList.Plo@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
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; 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)/'`$<
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.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
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; 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`
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.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
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; 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)/'`$<
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
|
@ -437,33 +429,24 @@ clean-libtool:
|
|||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(includedir)
|
||||
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
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; \
|
||||
f=$(am__strip_dir) \
|
||||
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 \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(includedir)/$$f; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
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 \
|
||||
|
|
@ -472,6 +455,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
@ -483,10 +467,11 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||
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
|
||||
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
@ -509,10 +494,6 @@ GTAGS:
|
|||
|
||||
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'`; \
|
||||
|
|
@ -526,7 +507,7 @@ distdir: $(DISTFILES)
|
|||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
|
|
@ -544,10 +525,10 @@ distdir: $(DISTFILES)
|
|||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
|
||||
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
|
|
@ -559,7 +540,7 @@ install-am: all-am
|
|||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
|
@ -567,7 +548,7 @@ mostlyclean-generic:
|
|||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
|
|
@ -578,15 +559,17 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
|||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
distclean-am: clean-am distclean-compile distclean-depend \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
|
@ -602,7 +585,8 @@ install-man:
|
|||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
|
@ -623,9 +607,9 @@ uninstall-am: uninstall-includeHEADERS uninstall-info-am \
|
|||
|
||||
.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 \
|
||||
distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-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 \
|
||||
|
|
|
|||
|
|
@ -18,18 +18,19 @@
|
|||
topbuilddir = ../../../../build
|
||||
topsrcdir = ../../..
|
||||
snaccdir = /usr/local/snacc
|
||||
openssldir = /usr/local/include/openssl
|
||||
|
||||
LIBTOOL=$(topsrcdir)/libtool
|
||||
LIBTOOL=$(topbuilddir)/libtool
|
||||
OPT=-g -O2 -DLDAP_COMPONENT
|
||||
CC=gcc
|
||||
|
||||
SNACC_INC=-I$(snaccdir) -I$(snaccdir)/c-lib/inc
|
||||
|
||||
LDAP_INC=-I$(topsrcdir)/include -I$(topsrcdir)/servers/slapd -I$(topbuilddir)/include
|
||||
INCS=$(LDAP_INC) $(SNACC_INC)
|
||||
OPENSSL_INC=-I$(openssldir)
|
||||
INCS=$(LDAP_INC) $(SNACC_INC) $(OPENSSL_INC)
|
||||
|
||||
SNACC_LIB=$(snaccdir)/c-lib/libcasn1.a
|
||||
SSL_LIB=-lcrypto
|
||||
SSL_LIB=/usr/local/lib/lcrypto
|
||||
#LDAP_LIB=-lldap_r -llber
|
||||
LIBS=$(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB)
|
||||
|
||||
|
|
@ -42,6 +43,9 @@ componentlib.lo: componentlib.c
|
|||
certificate.lo: certificate.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
|
||||
|
||||
crl.lo: crl.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
|
||||
|
||||
authorityKeyIdentifier.lo: authorityKeyIdentifier.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
|
||||
|
||||
|
|
@ -51,13 +55,13 @@ asn_to_syn_mr.lo: asn_to_syn_mr.c
|
|||
init.lo: init.c
|
||||
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
|
||||
|
||||
compmatch.la: componentlib.lo init.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo
|
||||
compmatch.la: componentlib.lo init.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo
|
||||
$(LIBTOOL) --mode=link $(CC) $(OPT) $(LIBS) -version-info 0:0:0 \
|
||||
-rpath /usr/local/libexec/openldap -module -o $@ $? $(LIBS)
|
||||
|
||||
clean:
|
||||
\rm compmatch.la componentlib.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo\
|
||||
init.o init.lo componentlib.o certificate.o asn_to_syn_mr.o authorityKeyIdentifier.o
|
||||
\rm compmatch.la componentlib.lo certificate.lo asn_to_syn_mr.lo authorityKeyIdentifier.lo crl.lo\
|
||||
init.o init.lo componentlib.o certificate.o asn_to_syn_mr.o authorityKeyIdentifier.o crl.o
|
||||
install:
|
||||
cp -r .libs $(topsrcdir)/tests/data/comp_libs
|
||||
cp compmatch.la $(topsrcdir)/tests/data/comp_libs
|
||||
|
|
|
|||
1294
contrib/slapd-modules/comp_match/crl.c
Normal file
1294
contrib/slapd-modules/comp_match/crl.c
Normal file
File diff suppressed because it is too large
Load diff
359
contrib/slapd-modules/comp_match/crl.h
Normal file
359
contrib/slapd-modules/comp_match/crl.h
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
|
||||
#include "asn-incl.h"
|
||||
/*
|
||||
* crl.h
|
||||
* "CertificateRevokationList" ASN.1 module encode/decode/extracting/matching/free C src.
|
||||
* This file was generated by modified eSMACC compiler Fri Jan 21 11:25:24 2005
|
||||
* The generated files are strongly encouraged to be
|
||||
* compiled as a module for OpenLDAP Software
|
||||
*/
|
||||
|
||||
#ifndef _crl_h_
|
||||
#define _crl_h_
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4101 )
|
||||
#endif
|
||||
#include "componentlib.h"
|
||||
|
||||
#define V1 0
|
||||
#define V2 1
|
||||
#define V3 2
|
||||
|
||||
typedef ComponentInt ComponentVersion; /* INTEGER { V1 (0), V2 (1), V3 (2) } */
|
||||
|
||||
#define MatchingComponentVersion MatchingComponentInt
|
||||
|
||||
#define ExtractingComponentVersion ExtractingComponentInt
|
||||
|
||||
#define BDecComponentVersion BDecComponentInt
|
||||
|
||||
#define GDecComponentVersion GDecComponentInt
|
||||
|
||||
|
||||
typedef ComponentInt ComponentCertificateSerialNumber; /* INTEGER */
|
||||
|
||||
#define MatchingComponentCertificateSerialNumber MatchingComponentInt
|
||||
|
||||
#define ExtractingComponentCertificateSerialNumber ExtractingComponentInt
|
||||
|
||||
#define BDecComponentCertificateSerialNumber BDecComponentInt
|
||||
|
||||
#define GDecComponentCertificateSerialNumber GDecComponentInt
|
||||
|
||||
|
||||
typedef ComponentOid ComponentAttributeType; /* OBJECT IDENTIFIER */
|
||||
|
||||
#define MatchingComponentAttributeType MatchingComponentOid
|
||||
|
||||
#define ExtractingComponentAttributeType ExtractingComponentOid
|
||||
|
||||
#define BDecComponentAttributeType BDecComponentOid
|
||||
|
||||
#define GDecComponentAttributeType GDecComponentOid
|
||||
|
||||
|
||||
typedef struct AlgorithmIdentifier /* SEQUENCE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
ComponentOid algorithm; /* OBJECT IDENTIFIER */
|
||||
ComponentAnyDefinedBy parameters; /* ANY DEFINED BY algorithm OPTIONAL */
|
||||
} ComponentAlgorithmIdentifier;
|
||||
|
||||
int MatchingComponentAlgorithmIdentifier PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentAlgorithmIdentifier PROTO (( void* mem_op, ComponentReference *cr, ComponentAlgorithmIdentifier *comp ));
|
||||
|
||||
|
||||
int BDecComponentAlgorithmIdentifier PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentAlgorithmIdentifier PROTO (( void* mem_op, GenBuf * b, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct Time /* CHOICE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
enum TimeChoiceId
|
||||
{
|
||||
TIME_UTCTIME,
|
||||
TIME_GENERALIZEDTIME
|
||||
} choiceId;
|
||||
union TimeChoiceUnion
|
||||
{
|
||||
ComponentUTCTime* utcTime; /* < unknown type id ?! > */
|
||||
ComponentGeneralizedTime* generalizedTime; /* < unknown type id ?! > */
|
||||
} a;
|
||||
} ComponentTime;
|
||||
|
||||
int MatchingComponentTime PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentTime PROTO (( void* mem_op, ComponentReference *cr, ComponentTime *comp ));
|
||||
|
||||
|
||||
int BDecComponentTime PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTime **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentTime PROTO (( void* mem_op, GenBuf * b, ComponentTime **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct Extension /* SEQUENCE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
ComponentOid extnID; /* OBJECT IDENTIFIER */
|
||||
ComponentBool* critical; /* BOOLEAN DEFAULT FALSE */
|
||||
ComponentOcts extnValue; /* OCTET STRING */
|
||||
} ComponentExtension;
|
||||
|
||||
int MatchingComponentExtension PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentExtension PROTO (( void* mem_op, ComponentReference *cr, ComponentExtension *comp ));
|
||||
|
||||
|
||||
int BDecComponentExtension PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentExtension PROTO (( void* mem_op, GenBuf * b, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct AttributeTypeAndValue /* SEQUENCE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
ComponentAttributeType type; /* AttributeType */
|
||||
ComponentAnyDefinedBy value; /* ANY DEFINED BY type */
|
||||
} ComponentAttributeTypeAndValue;
|
||||
|
||||
int MatchingComponentAttributeTypeAndValue PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentAttributeTypeAndValue PROTO (( void* mem_op, ComponentReference *cr, ComponentAttributeTypeAndValue *comp ));
|
||||
|
||||
|
||||
int BDecComponentAttributeTypeAndValue PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentAttributeTypeAndValue PROTO (( void* mem_op, GenBuf * b, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef ComponentList ComponentExtensions; /* SEQUENCE SIZE 1..MAX OF Extension */
|
||||
|
||||
int MatchingComponentExtensions PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentExtensions PROTO (( void* mem_op, ComponentReference *cr, ComponentExtensions *comp ));
|
||||
|
||||
|
||||
int BDecComponentExtensions PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentExtensions PROTO (( void* mem_op, GenBuf * b, ComponentExtensions **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct TBSCertListSeqOfSeq /* SEQUENCE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
ComponentCertificateSerialNumber userCertificate; /* CertificateSerialNumber */
|
||||
ComponentTime* revocationDate; /* Time */
|
||||
ComponentExtensions* crlEntryExtensions; /* Extensions OPTIONAL */
|
||||
} ComponentTBSCertListSeqOfSeq;
|
||||
|
||||
int MatchingComponentTBSCertListSeqOfSeq PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentTBSCertListSeqOfSeq PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertListSeqOfSeq *comp ));
|
||||
|
||||
|
||||
int BDecComponentTBSCertListSeqOfSeq PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertListSeqOfSeq **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentTBSCertListSeqOfSeq PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertListSeqOfSeq **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef ComponentList ComponentTBSCertListSeqOf; /* SEQUENCE OF TBSCertListSeqOfSeq */
|
||||
|
||||
int MatchingComponentTBSCertListSeqOf PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentTBSCertListSeqOf PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertListSeqOf *comp ));
|
||||
|
||||
|
||||
int BDecComponentTBSCertListSeqOf PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertListSeqOf **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentTBSCertListSeqOf PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertListSeqOf **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef ComponentList ComponentRelativeDistinguishedName; /* SET OF AttributeTypeAndValue */
|
||||
|
||||
int MatchingComponentRelativeDistinguishedName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentRelativeDistinguishedName PROTO (( void* mem_op, ComponentReference *cr, ComponentRelativeDistinguishedName *comp ));
|
||||
|
||||
|
||||
int BDecComponentRelativeDistinguishedName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentRelativeDistinguishedName PROTO (( void* mem_op, GenBuf * b, ComponentRelativeDistinguishedName **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef ComponentList ComponentRDNSequence; /* SEQUENCE OF RelativeDistinguishedName */
|
||||
|
||||
int MatchingComponentRDNSequence PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentRDNSequence PROTO (( void* mem_op, ComponentReference *cr, ComponentRDNSequence *comp ));
|
||||
|
||||
|
||||
int BDecComponentRDNSequence PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentRDNSequence PROTO (( void* mem_op, GenBuf * b, ComponentRDNSequence **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct Name /* CHOICE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
enum NameChoiceId
|
||||
{
|
||||
NAME_RDNSEQUENCE
|
||||
} choiceId;
|
||||
union NameChoiceUnion
|
||||
{
|
||||
ComponentRDNSequence* rdnSequence; /* RDNSequence */
|
||||
} a;
|
||||
} ComponentName;
|
||||
|
||||
int MatchingComponentName PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentName PROTO (( void* mem_op, ComponentReference *cr, ComponentName *comp ));
|
||||
|
||||
|
||||
int BDecComponentName PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentName **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentName PROTO (( void* mem_op, GenBuf * b, ComponentName **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct TBSCertList /* SEQUENCE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
ComponentVersion* version; /* Version OPTIONAL */
|
||||
ComponentAlgorithmIdentifier* signature; /* AlgorithmIdentifier */
|
||||
ComponentName* issuer; /* Name */
|
||||
ComponentTime* thisUpdate; /* Time */
|
||||
ComponentTime* nextUpdate; /* Time OPTIONAL */
|
||||
ComponentTBSCertListSeqOf* revokedCertificates; /* TBSCertListSeqOf */
|
||||
ComponentExtensions* crlExtensions; /* [0] EXPLICIT Extensions OPTIONAL */
|
||||
} ComponentTBSCertList;
|
||||
|
||||
int MatchingComponentTBSCertList PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentTBSCertList PROTO (( void* mem_op, ComponentReference *cr, ComponentTBSCertList *comp ));
|
||||
|
||||
|
||||
int BDecComponentTBSCertList PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTBSCertList **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentTBSCertList PROTO (( void* mem_op, GenBuf * b, ComponentTBSCertList **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct CertificateList /* SEQUENCE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
ComponentTBSCertList* tbsCertList; /* TBSCertList */
|
||||
ComponentAlgorithmIdentifier* signatureAlgorithm; /* AlgorithmIdentifier */
|
||||
ComponentBits signature; /* BIT STRING */
|
||||
} ComponentCertificateList;
|
||||
|
||||
int MatchingComponentCertificateList PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentCertificateList PROTO (( void* mem_op, ComponentReference *cr, ComponentCertificateList *comp ));
|
||||
|
||||
|
||||
int BDecComponentCertificateList PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentCertificateList **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentCertificateList PROTO (( void* mem_op, GenBuf * b, ComponentCertificateList **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
typedef struct Validity /* SEQUENCE */
|
||||
{
|
||||
Syntax* syntax;
|
||||
ComponentDesc* comp_desc;
|
||||
struct berval identifier;
|
||||
char id_buf[MAX_IDENTIFIER_LEN];
|
||||
ComponentTime* notBefore; /* Time */
|
||||
ComponentTime* notAfter; /* Time */
|
||||
} ComponentValidity;
|
||||
|
||||
int MatchingComponentValidity PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
|
||||
|
||||
|
||||
void* ExtractingComponentValidity PROTO (( void* mem_op, ComponentReference *cr, ComponentValidity *comp ));
|
||||
|
||||
|
||||
int BDecComponentValidity PROTO ((void* mem_op, GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
int GDecComponentValidity PROTO (( void* mem_op, GenBuf * b, ComponentValidity **v, AsnLen *bytesDecoded, int mode));
|
||||
|
||||
|
||||
|
||||
/* ========== Object Declarations ========== */
|
||||
|
||||
|
||||
/* ========== Object Set Declarations ========== */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#endif /* conditional include of crl.h */
|
||||
|
|
@ -70,20 +70,20 @@ static const char hex[] = "0123456789abcdef";
|
|||
|
||||
/* From liblutil/passwd.c... */
|
||||
static void lmPasswd_to_key(
|
||||
const unsigned char *lmPasswd,
|
||||
des_cblock *key)
|
||||
const unsigned char *lmPasswd,
|
||||
des_cblock *key)
|
||||
{
|
||||
/* make room for parity bits */
|
||||
((char *)key)[0] = lmPasswd[0];
|
||||
((char *)key)[1] = ((lmPasswd[0]&0x01)<<7) | (lmPasswd[1]>>1);
|
||||
((char *)key)[2] = ((lmPasswd[1]&0x03)<<6) | (lmPasswd[2]>>2);
|
||||
((char *)key)[3] = ((lmPasswd[2]&0x07)<<5) | (lmPasswd[3]>>3);
|
||||
((char *)key)[4] = ((lmPasswd[3]&0x0F)<<4) | (lmPasswd[4]>>4);
|
||||
((char *)key)[5] = ((lmPasswd[4]&0x1F)<<3) | (lmPasswd[5]>>5);
|
||||
((char *)key)[6] = ((lmPasswd[5]&0x3F)<<2) | (lmPasswd[6]>>6);
|
||||
((char *)key)[7] = ((lmPasswd[6]&0x7F)<<1);
|
||||
/* make room for parity bits */
|
||||
((char *)key)[0] = lmPasswd[0];
|
||||
((char *)key)[1] = ((lmPasswd[0]&0x01)<<7) | (lmPasswd[1]>>1);
|
||||
((char *)key)[2] = ((lmPasswd[1]&0x03)<<6) | (lmPasswd[2]>>2);
|
||||
((char *)key)[3] = ((lmPasswd[2]&0x07)<<5) | (lmPasswd[3]>>3);
|
||||
((char *)key)[4] = ((lmPasswd[3]&0x0F)<<4) | (lmPasswd[4]>>4);
|
||||
((char *)key)[5] = ((lmPasswd[4]&0x1F)<<3) | (lmPasswd[5]>>5);
|
||||
((char *)key)[6] = ((lmPasswd[5]&0x3F)<<2) | (lmPasswd[6]>>6);
|
||||
((char *)key)[7] = ((lmPasswd[6]&0x7F)<<1);
|
||||
|
||||
des_set_odd_parity( key );
|
||||
des_set_odd_parity( key );
|
||||
}
|
||||
|
||||
#define MAX_PWLEN 256
|
||||
|
|
@ -115,23 +115,23 @@ static void lmhash(
|
|||
struct berval *hash
|
||||
)
|
||||
{
|
||||
char UcasePassword[15];
|
||||
des_cblock key;
|
||||
des_key_schedule schedule;
|
||||
des_cblock StdText = "KGS!@#$%";
|
||||
char UcasePassword[15];
|
||||
des_cblock key;
|
||||
des_key_schedule schedule;
|
||||
des_cblock StdText = "KGS!@#$%";
|
||||
des_cblock hbuf[2];
|
||||
|
||||
strncpy( UcasePassword, passwd->bv_val, 14 );
|
||||
UcasePassword[14] = '\0';
|
||||
ldap_pvt_str2upper( UcasePassword );
|
||||
strncpy( UcasePassword, passwd->bv_val, 14 );
|
||||
UcasePassword[14] = '\0';
|
||||
ldap_pvt_str2upper( UcasePassword );
|
||||
|
||||
lmPasswd_to_key( UcasePassword, &key );
|
||||
des_set_key_unchecked( &key, schedule );
|
||||
des_ecb_encrypt( &StdText, &hbuf[0], schedule , DES_ENCRYPT );
|
||||
lmPasswd_to_key( UcasePassword, &key );
|
||||
des_set_key_unchecked( &key, schedule );
|
||||
des_ecb_encrypt( &StdText, &hbuf[0], schedule , DES_ENCRYPT );
|
||||
|
||||
lmPasswd_to_key( &UcasePassword[7], &key );
|
||||
des_set_key_unchecked( &key, schedule );
|
||||
des_ecb_encrypt( &StdText, &hbuf[1], schedule , DES_ENCRYPT );
|
||||
lmPasswd_to_key( &UcasePassword[7], &key );
|
||||
des_set_key_unchecked( &key, schedule );
|
||||
des_ecb_encrypt( &StdText, &hbuf[1], schedule , DES_ENCRYPT );
|
||||
|
||||
hexify( (char *)hbuf, hash );
|
||||
}
|
||||
|
|
@ -141,20 +141,20 @@ static void nthash(
|
|||
struct berval *hash
|
||||
)
|
||||
{
|
||||
/* Windows currently only allows 14 character passwords, but
|
||||
* may support up to 256 in the future. We assume this means
|
||||
/* Windows currently only allows 14 character passwords, but
|
||||
* may support up to 256 in the future. We assume this means
|
||||
* 256 UCS2 characters, not 256 bytes...
|
||||
*/
|
||||
*/
|
||||
char hbuf[HASHLEN];
|
||||
int i;
|
||||
MD4_CTX ctx;
|
||||
int i;
|
||||
MD4_CTX ctx;
|
||||
|
||||
if (passwd->bv_len > MAX_PWLEN*2)
|
||||
passwd->bv_len = MAX_PWLEN*2;
|
||||
|
||||
MD4_Init( &ctx );
|
||||
MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
|
||||
MD4_Final( hbuf, &ctx );
|
||||
MD4_Init( &ctx );
|
||||
MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
|
||||
MD4_Final( hbuf, &ctx );
|
||||
|
||||
hexify( hbuf, hash );
|
||||
}
|
||||
|
|
@ -440,6 +440,8 @@ static int smbk5pwd_exop_passwd(
|
|||
*c++ = *d++;
|
||||
d++;
|
||||
}
|
||||
pwd.bv_len /= 2;
|
||||
pwd.bv_val[pwd.bv_len] = '\0';
|
||||
|
||||
ml = ch_malloc(sizeof(Modifications));
|
||||
ml->sml_next = qpw->rs_mods;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
Tools ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
ldapcompare * DE**HI*K M*OPQR UVWXYZ de *h**k *n*p* vwxyz
|
||||
ldapcompare * DE**HI*K M*OPQR UVWXYZ de *h**k *n*p* vwxyz
|
||||
ldapdelete *CDE**HI*K M*OPQR UVWXYZ cdef*h**k *n*p* vwxy
|
||||
ldapmodify *CDE**HI*K M*OPQRS UVWXYZabcde *h**k *n*p*r t vwxy
|
||||
ldapmodrdn *CDE**HI*K M*OPQR UVWXYZ cdef*h**k *n*p*rs vwxy
|
||||
ldappasswd A*CDE**HI* *O QRS UVWXYZa def*h** * * * s vwxy
|
||||
ldapsearch A*CDE**HI*KLM*OPQRSTUVWXYZab*def*h**kl*n*p* stuvwxyz
|
||||
ldapwhoami * DE**HI* *O QR UVWXYZ def*h** *n*p* vwxy
|
||||
ldapsearch A*CDE**HI*KLM*OPQRSTUVWXYZab def*h**kl*n*p* stuvwxyz
|
||||
ldapwhoami * DE**HI* *O QR UVWXYZ def*h** *n*p* vwxy
|
||||
|
||||
|
||||
* reserved
|
||||
|
|
|
|||
|
|
@ -37,22 +37,22 @@ Implement LDAP sorted search results control (RFC 2891)
|
|||
|
||||
Medium projects
|
||||
---------------
|
||||
Add DSML capabilities to command line tools
|
||||
Add syncrepl "turn" support
|
||||
Implement DIT Structure Rules and Name Forms
|
||||
Implement LDAPprep
|
||||
Implement native support for simple SASL mechanisms
|
||||
(e.g. EXTERNAL and PLAIN)
|
||||
Redesign slapd to use poll(2) instead of select(2)
|
||||
Redesign slapd memory allocation fault handling
|
||||
Localize tools
|
||||
|
||||
|
||||
Small projects
|
||||
--------------
|
||||
Implement authPassword (RFC 3112)
|
||||
Add DSML capabilities to command line tools
|
||||
Add LDIFv2 (XML) support to command line tools
|
||||
Implement LDAPprep and SASLprep
|
||||
Implement authPassword (RFC 3112)
|
||||
Implement SASLprep
|
||||
Implement additional matching rules (RFC 3698)
|
||||
Add syncrepl "turn" support
|
||||
Add dumpasn1 logging support
|
||||
Add tests to test suite
|
||||
Add jail(2) support
|
||||
|
|
|
|||
|
|
@ -125,7 +125,9 @@ Use complete contents of \fIpasswdfile\fP as the password for
|
|||
simple authentication.
|
||||
.TP
|
||||
.BI \-H \ ldapuri
|
||||
Specify URI(s) referring to the ldap server(s).
|
||||
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
||||
fields are allowed; a list of URI, separated by whitespace or commas
|
||||
is expected.
|
||||
.TP
|
||||
.BI \-h \ ldaphost
|
||||
Specify an alternate host on which the ldap server is running.
|
||||
|
|
|
|||
|
|
@ -133,7 +133,9 @@ Use complete contents of \fIpasswdfile\fP as the password for
|
|||
simple authentication.
|
||||
.TP
|
||||
.BI \-H \ ldapuri
|
||||
Specify URI(s) referring to the ldap server(s).
|
||||
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
||||
fields are allowed; a list of URI, separated by whitespace or commas
|
||||
is expected.
|
||||
.TP
|
||||
.BI \-h \ ldaphost
|
||||
Specify an alternate host on which the ldap server is running.
|
||||
|
|
|
|||
|
|
@ -204,7 +204,9 @@ Use complete contents of \fIpasswdfile\fP as the password for
|
|||
simple authentication.
|
||||
.TP
|
||||
.BI \-H \ ldapuri
|
||||
Specify URI(s) referring to the ldap server(s).
|
||||
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
||||
fields are allowed; a list of URI, separated by whitespace or commas
|
||||
is expected.
|
||||
.TP
|
||||
.BI \-h \ ldaphost
|
||||
Specify an alternate host on which the ldap server is running.
|
||||
|
|
|
|||
|
|
@ -134,7 +134,9 @@ Use complete contents of \fIpasswdfile\fP as the password for
|
|||
simple authentication.
|
||||
.TP
|
||||
.BI \-H \ ldapuri
|
||||
Specify URI(s) referring to the ldap server(s).
|
||||
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
||||
fields are allowed; a list of URI, separated by whitespace or commas
|
||||
is expected.
|
||||
.TP
|
||||
.BI \-h \ ldaphost
|
||||
Specify an alternate host on which the ldap server is running.
|
||||
|
|
|
|||
|
|
@ -103,7 +103,9 @@ Set the LDAP debugging level to \fIdebuglevel\fP.
|
|||
must be compiled with LDAP_DEBUG defined for this option to have any effect.
|
||||
.TP
|
||||
.BI \-H \ ldapuri
|
||||
Specify URI(s) referring to the ldap server(s).
|
||||
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
||||
fields are allowed; a list of URI, separated by whitespace or commas
|
||||
is expected.
|
||||
.TP
|
||||
.BI \-h \ ldaphost
|
||||
Specify an alternate host on which the ldap server is running.
|
||||
|
|
|
|||
|
|
@ -182,7 +182,9 @@ Use complete contents of \fIpasswdfile\fP as the password for
|
|||
simple authentication.
|
||||
.TP
|
||||
.BI \-H \ ldapuri
|
||||
Specify URI(s) referring to the ldap server(s).
|
||||
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
||||
fields are allowed; a list of URI, separated by whitespace or commas
|
||||
is expected.
|
||||
.TP
|
||||
.BI \-h \ ldaphost
|
||||
Specify an alternate host on which the ldap server is running.
|
||||
|
|
|
|||
|
|
@ -86,7 +86,9 @@ Use complete contents of \fIpasswdfile\fP as the password for
|
|||
simple authentication.
|
||||
.TP
|
||||
.BI \-H \ ldapuri
|
||||
Specify URI(s) referring to the ldap server(s).
|
||||
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
||||
fields are allowed; a list of URI, separated by whitespace or commas
|
||||
is expected.
|
||||
.TP
|
||||
.BI \-h \ ldaphost
|
||||
Specify an alternate host on which the ldap server is running.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||
.\" $OpenLDAP$
|
||||
.SH NAME
|
||||
slapd-bdb, slapd-hdb \- BDB backends to slapd
|
||||
slapd-bdb, slapd-hdb \- Berkeley DB backends to slapd
|
||||
.SH SYNOPSIS
|
||||
ETCDIR/slapd.conf
|
||||
.SH DESCRIPTION
|
||||
|
|
@ -54,6 +54,27 @@ the <min> argument is non-zero, an internal task will run every <min>
|
|||
minutes to perform the checkpoint.
|
||||
See the Berkeley DB reference guide for more details.
|
||||
.TP
|
||||
.B dbconfig <Berkeley DB setting>
|
||||
Specify a configuration directive to be placed in the
|
||||
.B DB_CONFIG
|
||||
file of the database directory. The
|
||||
.B dbconfig
|
||||
directive is just a convenience
|
||||
to allow all necessary configuration to be set in the
|
||||
.B slapd.conf
|
||||
file.
|
||||
The options set using this directive will only be written to the DB_CONFIG
|
||||
file if no such file existed at server startup time. This allows one
|
||||
to set initial values without overwriting/destroying a DB_CONFIG file
|
||||
that was already customized through other means. This directive may
|
||||
be specified multiple times, as needed. For example
|
||||
.RS
|
||||
.nf
|
||||
dbconfig set_cachesize 0 1048576 0
|
||||
dbconfig set_lg_bsize 2097152
|
||||
.fi
|
||||
.RE
|
||||
.TP
|
||||
.B dbnosync
|
||||
Specify that on-disk database contents should not be immediately
|
||||
synchronized with in memory changes.
|
||||
|
|
@ -154,7 +175,13 @@ Specify a key for a shared memory BDB environment. By default the
|
|||
BDB environment uses memory mapped files. If a non-zero value is
|
||||
specified, it will be used as the key to identify a shared memory
|
||||
region that will house the environment.
|
||||
.B
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B bdb
|
||||
and
|
||||
.B hdb
|
||||
backends honor access control semantics as indicated in
|
||||
.BR slapd.access (5).
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
|
|
|
|||
|
|
@ -17,6 +17,23 @@ This backend is experimental.
|
|||
The DNSSRV backend has no backend nor database specific options.
|
||||
It is configured simply by "database dnssrv" followed a suffix
|
||||
directive, e.g. suffix "".
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B dnssrv
|
||||
backend does not honor all ACL semantics as described in
|
||||
.BR slapd.access (5).
|
||||
In fact, this backend only implements the
|
||||
.B search
|
||||
operation when the
|
||||
.B manageDSAit
|
||||
control (RFC3296) is used, otherwise for every operation a referral,
|
||||
whenever appropriate, or an error is returned.
|
||||
Currently, there is no means to condition the returning of the referral
|
||||
by means of ACLs; no access control is implemented, except for
|
||||
.B read (=r)
|
||||
access to the returned entries, which is actually provided by the frontend.
|
||||
Note, however, that the information returned by this backend is collected
|
||||
through the DNS, so it is public by definition.
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
|
|
|
|||
|
|
@ -267,33 +267,6 @@ connection did.
|
|||
if start TLS failed.
|
||||
.RE
|
||||
|
||||
|
||||
|
||||
|
||||
.TP
|
||||
.\".B suffixmassage <suffix> <massaged (remote) suffix>
|
||||
.\"DNs ending with <suffix> in a request are changed to end with <remote
|
||||
.\"suffix> before sending the request to the remote server, and <remote
|
||||
.\"suffix> in the results are changed back to <suffix> before returning
|
||||
.\"them to the client.
|
||||
.\"The <suffix> field must be defined as a valid suffix
|
||||
.\"for the current database.
|
||||
.\".TP
|
||||
.\".B map "{attribute | objectclass} [<local name> | *] {<foreign name> | *}"
|
||||
.\"Map attribute names and object classes from the foreign server to
|
||||
.\"different values on the local slapd.
|
||||
.\"The reason is that some attributes might not be part of the local
|
||||
.\"slapd's schema, some attribute names might be different but serve the
|
||||
.\"same purpose, etc.
|
||||
.\"If local or foreign name is `*', the name is preserved.
|
||||
.\"If local name is omitted, the foreign name is removed.
|
||||
.\"Unmapped names are preseved if both local and foreign name are `*',
|
||||
.\"and removed if local name is omitted and foreign name is `*'.
|
||||
.\".TP
|
||||
.\".B rewrite*
|
||||
.\"The rewrite options are described in the "REWRITING" section of the
|
||||
.\".BR slapd-meta (5)
|
||||
.\"manual page.
|
||||
.TP
|
||||
.B suffixmassage, map, rewrite*
|
||||
These directives are no longer supported by back-ldap; their
|
||||
|
|
@ -307,35 +280,22 @@ recognizes them and automatically instantiates the
|
|||
.B rwm
|
||||
overlay if available and not instantiated yet.
|
||||
This behavior may change in the future.
|
||||
.\".SH EXAMPLES
|
||||
.\"The following directives map the object class `groupOfNames' to
|
||||
.\"the object class `groupOfUniqueNames' and the attribute type
|
||||
.\"`member' to the attribute type `uniqueMember':
|
||||
.\".LP
|
||||
.\".RS
|
||||
.\".nf
|
||||
.\"map objectclass groupOfNames groupOfUniqueNames
|
||||
.\"map attribute uniqueMember member
|
||||
.\".fi
|
||||
.\".RE
|
||||
.\".LP
|
||||
.\"This presents a limited attribute set from the foreign
|
||||
.\"server:
|
||||
.\".LP
|
||||
.\".RS
|
||||
.\".nf
|
||||
.\"map attribute cn *
|
||||
.\"map attribute sn *
|
||||
.\"map attribute manager *
|
||||
.\"map attribute description *
|
||||
.\"map attribute *
|
||||
.\".fi
|
||||
.\".RE
|
||||
.\".LP
|
||||
.\"These lines map cn, sn, manager, and description to themselves, and
|
||||
.\"any other attribute gets "removed" from the object before it is sent
|
||||
.\"to the client (or sent up to the LDAP server). This is obviously a
|
||||
.\"simplistic example, but you get the point.
|
||||
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B ldap
|
||||
backend does not honor all ACL semantics as described in
|
||||
.BR slapd.access (5).
|
||||
In general, access checking is delegated to the remote server(s).
|
||||
Only
|
||||
.B read (=r)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute and to the other attribute values of the entries
|
||||
returned by the
|
||||
.B search
|
||||
operation is honored, which is performed by the frontend.
|
||||
|
||||
.SH PROXY CACHE OVERLAY
|
||||
The proxy cache overlay
|
||||
allows caching of LDAP search requests (queries) in a local database.
|
||||
|
|
|
|||
|
|
@ -123,6 +123,11 @@ Note: changing index settings requires rebuilding indices, see
|
|||
Specify the file protection mode that newly created database
|
||||
index files should have.
|
||||
The default is 0600.
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B ldbm
|
||||
backend honors access control semantics as indicated in
|
||||
.BR slapd.access (5).
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
|
|
|
|||
53
doc/man/man5/slapd-ldif.5
Normal file
53
doc/man/man5/slapd-ldif.5
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
.TH SLAPD-LDIF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
|
||||
.\" Copyright 1998-2005 The OpenLDAP Foundation All Rights Reserved.
|
||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||
.\" $OpenLDAP$
|
||||
.SH NAME
|
||||
slapd-ldif \- LDIF backend to slapd
|
||||
.SH SYNOPSIS
|
||||
ETCDIR/slapd.conf
|
||||
.SH DESCRIPTION
|
||||
The LDIF backend to
|
||||
.BR slapd (8)
|
||||
is a basic storage backend that stores entries in text files in LDIF format,
|
||||
and exploits the filesystem to create the tree structure of the database.
|
||||
It is intended as a cheap, low performance easy to use backend, and it is
|
||||
exploited by higher-level internal structures to provide a permanent
|
||||
storage.
|
||||
.SH CONFIGURATION
|
||||
These
|
||||
.B slapd.conf
|
||||
options apply to the LDIF backend database.
|
||||
That is, they must follow a "database ldif" line and come before
|
||||
any subsequent "backend" or "database" lines.
|
||||
Other database options are described in the
|
||||
.BR slapd.conf (5)
|
||||
manual page.
|
||||
.TP
|
||||
.B directory <dir>
|
||||
Specify the directory where the database tree starts. The directory
|
||||
must exist and grant appropriate permissions (rwx) to the identity slapd
|
||||
is running with.
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B LDIF
|
||||
backend does not honor any of the access control semantics described in
|
||||
.BR slapd.access (5).
|
||||
Only
|
||||
.B read (=r)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute and to the other attribute values of the entries
|
||||
returned by the
|
||||
.B search
|
||||
operation is honored, which is performed by the frontend.
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
default slapd configuration file
|
||||
.SH SEE ALSO
|
||||
.BR slapd.conf (5),
|
||||
.BR slapd (8),
|
||||
.BR LDIF (5).
|
||||
.SH AUTHOR
|
||||
Eric Stokes
|
||||
|
|
@ -93,6 +93,14 @@ This caches the target that holds a given DN to speed up target
|
|||
selection in case multiple targets would result from an uncached
|
||||
search; forever means cache never expires; disabled means no DN
|
||||
caching; otherwise a valid ( > 0 ) ttl in seconds is required.
|
||||
.TP
|
||||
.B nretries {forever|never|<nretries>}
|
||||
This directive defines how many times a bind should be retried
|
||||
in case of temporary failure in contacting a target. If defined
|
||||
before any target specification, it applies to all targets (by default,
|
||||
.BR never );
|
||||
the global value can be overridden by redefinitions inside each target
|
||||
specification.
|
||||
.SH TARGET SPECIFICATION
|
||||
Target specification starts with a "uri" directive:
|
||||
.TP
|
||||
|
|
@ -740,6 +748,22 @@ been written:
|
|||
.fi
|
||||
.LP
|
||||
with the advantage of saving one rewrite pass ...)
|
||||
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B meta
|
||||
backend does not honor all ACL semantics as described in
|
||||
.BR slapd.access (5).
|
||||
In general, access checking is delegated to the remote server(s).
|
||||
Only
|
||||
.B read (=r)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute and to the other attribute values of the entries
|
||||
returned by the
|
||||
.B search
|
||||
operation is honored, which is performed by the frontend.
|
||||
|
||||
.SH PROXY CACHE OVERLAY
|
||||
The proxy cache overlay
|
||||
allows caching of LDAP search requests (queries) in a local database.
|
||||
|
|
|
|||
|
|
@ -89,6 +89,14 @@ access to dn.subtree="cn=Monitor"
|
|||
4) ensure that the \fBcore.schema\fP file is loaded.
|
||||
The monitor backend relies on some standard track attributeTypes
|
||||
that must be already defined when the backend is started.
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B monitor
|
||||
backend honors access control semantics as indicated in
|
||||
.BR slapd.access (5),
|
||||
including the
|
||||
.B disclose
|
||||
access privilege, on all currently implemented operations.
|
||||
.SH KNOWN LIMITATIONS
|
||||
The monitor backend does not honor size/time limits in search operations.
|
||||
.SH FILES
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ suffix "cn=Nothing"
|
|||
bind on
|
||||
.fi
|
||||
.RE
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B null
|
||||
backend does not honor any of the access control semantics described in
|
||||
.BR slapd.access (5).
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
|
|
|
|||
|
|
@ -29,6 +29,20 @@ manual page.
|
|||
Specifies an alternate passwd file to use.
|
||||
The default is
|
||||
.BR /etc/passwd .
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B passwd
|
||||
backend does not honor any of the access control semantics described in
|
||||
.BR slapd.access (5).
|
||||
Only
|
||||
.B read (=r)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute and to the other attribute values of the entries
|
||||
returned by the
|
||||
.B search
|
||||
operation is honored, which is performed by the frontend.
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
|
|
|
|||
|
|
@ -162,6 +162,20 @@ returned directly to the client.
|
|||
.SH EXAMPLE
|
||||
There is an example Perl module `SampleLDAP' in the slapd/back-perl/
|
||||
direcetory in the OpenLDAP source tree.
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B passwd
|
||||
backend does not honor any of the access control semantics described in
|
||||
.BR slapd.access (5);
|
||||
all access control is delegated to the underlying PERL scripting.
|
||||
Only
|
||||
.B read (=r)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute and to the other attribute values of the entries
|
||||
returned by the
|
||||
.B search
|
||||
operation is honored, which is performed by the frontend.
|
||||
.SH WARNING
|
||||
The interface of this backend to the perl module MAY change.
|
||||
Any suggestions would greatly be appreciated.
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ directives described in
|
|||
One important issue is that access rules are based on the identity
|
||||
that issued the operation.
|
||||
After massaging from the virtual to the real naming context, the
|
||||
frontend sees the operation as performed by the identty in the
|
||||
frontend sees the operation as performed by the identity in the
|
||||
real naming context.
|
||||
Moreover, since
|
||||
.B back-relay
|
||||
|
|
@ -110,8 +110,7 @@ that looks up the real naming context for each operation, use
|
|||
database relay
|
||||
suffix "dc=virtual,dc=naming,dc=context"
|
||||
overlay rwm
|
||||
suffixmassage "dc=virtual,dc=naming,dc=context"
|
||||
"dc=real,dc=naming,dc=context"
|
||||
suffixmassage "dc=real,dc=naming,dc=context"
|
||||
.fi
|
||||
.LP
|
||||
This is useful, for instance, to relay different databases that
|
||||
|
|
@ -176,6 +175,20 @@ clause) are in the
|
|||
and in the
|
||||
.BR "virtual naming context" ,
|
||||
respectively.
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B relay
|
||||
backend does not honor any of the access control semantics described in
|
||||
.BR slapd.access (5);
|
||||
all access control is delegated to the relayed database(s).
|
||||
Only
|
||||
.B read (=r)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute and to the other attribute values of the entries
|
||||
returned by the
|
||||
.B search
|
||||
operation is honored, which is performed by the frontend.
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
|
|
|
|||
|
|
@ -134,6 +134,89 @@ where only RESULT is mandatory.
|
|||
The \fBsearch\fP RESULT should be preceded by the entries in LDIF
|
||||
format, each entry followed by a blank line.
|
||||
Lines starting with `#' or `DEBUG:' are ignored.
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B shell
|
||||
backend does not honor all ACL semantics as described in
|
||||
.BR slapd.access (5).
|
||||
In general, access to objects is checked by using a dummy object
|
||||
that contains only the DN, so access rules that rely on the contents
|
||||
of the object are not honored.
|
||||
In detail:
|
||||
.LP
|
||||
The
|
||||
.B add
|
||||
operation does not require
|
||||
.B write (=w)
|
||||
access to the
|
||||
.B children
|
||||
pseudo-attribute of the parent entry.
|
||||
.LP
|
||||
The
|
||||
.B bind
|
||||
operation requires
|
||||
.B auth (=x)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute of the entry whose identity is being assessed;
|
||||
.B auth (=x)
|
||||
access to the credentials is not checked, but rather delegated
|
||||
to the underlying shell script.
|
||||
.LP
|
||||
The
|
||||
.B compare
|
||||
operation requires
|
||||
.B read (=r)
|
||||
access (FIXME: wouldn't
|
||||
.B compare (=c)
|
||||
be a more appropriate choice?)
|
||||
to the
|
||||
.B entry
|
||||
pseudo-attribute
|
||||
of the object whose value is being asserted;
|
||||
.B compare (=c)
|
||||
access to the attribute whose value is being asserted is not checked.
|
||||
.LP
|
||||
The
|
||||
.B delete
|
||||
operation does not require
|
||||
.B write (=w)
|
||||
access to the
|
||||
.B children
|
||||
pseudo-attribute of the parent entry.
|
||||
.LP
|
||||
The
|
||||
.B modify
|
||||
operation requires
|
||||
.B write (=w)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo-attribute;
|
||||
.B write (=w)
|
||||
access to the specific attributes that are modified is not checked.
|
||||
.LP
|
||||
The
|
||||
.B modrdn
|
||||
operation does not require
|
||||
.B write (=w)
|
||||
access to the
|
||||
.B children
|
||||
pseudo-attribute of the parent entry, nor to that of the new parent,
|
||||
if different;
|
||||
.B write (=w)
|
||||
access to the distinguished values of the naming attributes
|
||||
is not checked.
|
||||
.LP
|
||||
The
|
||||
.B search
|
||||
operation does not require
|
||||
.B search (=s)
|
||||
access to the
|
||||
.B entry
|
||||
pseudo_attribute of the searchBase;
|
||||
.B search (=s)
|
||||
access to the attributes and values used in the filter is not checked.
|
||||
|
||||
.SH EXAMPLE
|
||||
There is an example search script in the slapd/back-shell/ directory
|
||||
in the OpenLDAP source tree.
|
||||
|
|
|
|||
|
|
@ -649,6 +649,14 @@ for details.
|
|||
.SH EXAMPLES
|
||||
There are example SQL modules in the slapd/back-sql/rdbms_depend/
|
||||
directory in the OpenLDAP source tree.
|
||||
.SH ACCESS CONTROL
|
||||
The
|
||||
.B sql
|
||||
backend honors access control semantics as indicated in
|
||||
.BR slapd.access (5)
|
||||
(including the
|
||||
.B disclose
|
||||
access privilege when enabled at compile time).
|
||||
.SH FILES
|
||||
|
||||
.TP
|
||||
|
|
|
|||
|
|
@ -229,10 +229,18 @@ It can have the forms
|
|||
*
|
||||
anonymous
|
||||
users
|
||||
self
|
||||
self[.<selfstyle>]
|
||||
|
||||
dn[.<dnstyle>[,<modifier>]]=<DN>
|
||||
dnattr=<attrname>
|
||||
|
||||
realanonymous
|
||||
realusers
|
||||
realself[.<selfstyle>]
|
||||
|
||||
realdn[.<dnstyle>[,<modifier>]]=<DN>
|
||||
realdnattr=<attrname>
|
||||
|
||||
group[/<objectclass>[/<attrname>]]
|
||||
[.<groupstyle>]=<group>
|
||||
peername[.<peernamestyle>]=<peername>
|
||||
|
|
@ -246,15 +254,17 @@ It can have the forms
|
|||
tls_ssf=<n>
|
||||
sasl_ssf=<n>
|
||||
|
||||
aci=<attrname>
|
||||
aci[=<attrname>]
|
||||
dynacl/name[.<dynstyle>][=<pattern>]
|
||||
.fi
|
||||
.LP
|
||||
with
|
||||
.LP
|
||||
.nf
|
||||
<style>={exact|regex|expand}
|
||||
<selfstyle>={level{<n>}}
|
||||
<dnstyle>={{exact|base(object)}|regex
|
||||
|one(level)|sub(tree)|children}
|
||||
|one(level)|sub(tree)|children|level{<n>}}
|
||||
<groupstyle>={exact|expand}
|
||||
<peernamestyle>={<style>|ip|path}
|
||||
<domainstyle>={exact|regex|sub(tree)}
|
||||
|
|
@ -271,6 +281,11 @@ The wildcard
|
|||
.B *
|
||||
refers to everybody.
|
||||
.LP
|
||||
The keywords prefixed by
|
||||
.B real
|
||||
act as their counterparts without prefix; the checking respectively occurs
|
||||
with the \fIauthentication\fP DN and the \fIauthorization\fP DN.
|
||||
.LP
|
||||
The keyword
|
||||
.B anonymous
|
||||
means access is granted to unauthenticated clients; it is mostly used
|
||||
|
|
@ -286,6 +301,18 @@ The keyword
|
|||
.B self
|
||||
means access to an entry is allowed to the entry itself (e.g. the entry
|
||||
being accessed and the requesting entry must be the same).
|
||||
It allows the
|
||||
.B level{<n>}
|
||||
style, where \fI<n>\fP indicates what ancestor of the DN
|
||||
is to be used in matches.
|
||||
A positive value indicates that the <n>-th ancestor of the user's DN
|
||||
is to be considered; a negative value indicates that the <n>-th ancestor
|
||||
of the target is to be considered.
|
||||
For example, a "\fIby self.level{1} ...\fP" clause would match
|
||||
when the object "\fIdc=example,dc=com\fP" is accessed
|
||||
by "\fIcn=User,dc=example,dc=com\fP".
|
||||
A "\fIby self.level{-1} ...\fP" clause would match when the same user
|
||||
accesses the object "\fIou=Address Book,cn=User,dc=example,dc=com\fP".
|
||||
.LP
|
||||
The statement
|
||||
.B dn=<DN>
|
||||
|
|
@ -360,7 +387,7 @@ the
|
|||
the
|
||||
.BR one(level) ,
|
||||
and the
|
||||
.B children
|
||||
.BR children
|
||||
forms provide
|
||||
.B $0
|
||||
as the match of the entire string.
|
||||
|
|
@ -369,7 +396,7 @@ The
|
|||
the
|
||||
.BR one(level) ,
|
||||
and the
|
||||
.B children
|
||||
.BR children
|
||||
forms also provide
|
||||
.B $1
|
||||
as the match of the rightmost part of the DN as defined in the
|
||||
|
|
@ -387,6 +414,14 @@ which means that only access to entries that appear in the DN of the
|
|||
.B <by>
|
||||
clause is allowed.
|
||||
.LP
|
||||
The
|
||||
.BR level{<n>}
|
||||
form is an extension and a generalization of the
|
||||
.BR onelevel
|
||||
form, which matches all DNs whose <n>-th ancestor is the pattern.
|
||||
So, \fIlevel{1}\fP is equivalent to \fIonelevel\fP,
|
||||
and \fIlevel{0}\fP is equivalent to \fIbase\fP.
|
||||
.LP
|
||||
It is perfectly useless to give any access privileges to a DN
|
||||
that exactly matches the
|
||||
.B rootdn
|
||||
|
|
@ -413,6 +448,11 @@ The optional parameters
|
|||
and
|
||||
.B <attrname>
|
||||
define the objectClass and the member attributeType of the group entry.
|
||||
The defaults are
|
||||
.B groupOfNames
|
||||
and
|
||||
.BR member ,
|
||||
respectively.
|
||||
The optional style qualifier
|
||||
.B <style>
|
||||
can be
|
||||
|
|
@ -580,12 +620,39 @@ The statement
|
|||
is undocumented yet.
|
||||
.LP
|
||||
The statement
|
||||
.B aci=<attrname>
|
||||
.B aci[=<attrname>]
|
||||
means that the access control is determined by the values in the
|
||||
.B attrname
|
||||
of the entry itself.
|
||||
The optional
|
||||
.B <attrname>
|
||||
indicates what attributeType holds the ACI information in the entry.
|
||||
By default, the
|
||||
.B OpenLDAPaci
|
||||
operational attribute is used.
|
||||
ACIs are experimental; they must be enabled at compile time.
|
||||
.LP
|
||||
The statement
|
||||
.B dynacl/<name>[.<dynstyle>][=<pattern>]
|
||||
means that access checking is delegated to the admin-defined method
|
||||
indicated by
|
||||
.BR <name> ,
|
||||
which can be registered at run-time by means of the
|
||||
.B moduleload
|
||||
statement.
|
||||
The fields
|
||||
.B <dynstyle>
|
||||
and
|
||||
.B <pattern>
|
||||
are optional, and are directly passed to the registered parsing routine.
|
||||
Dynacl is experimental; it must be enabled at compile time.
|
||||
If dynacl and ACIs are both enabled, ACIs are cast into the dynacl scheme,
|
||||
where
|
||||
.B <name>=aci
|
||||
and, optionally,
|
||||
.BR <patten>=<attrname> .
|
||||
However, the original ACI syntax is preserved for backward compatibility.
|
||||
.LP
|
||||
The statements
|
||||
.BR ssf=<n> ,
|
||||
.BR transport_ssf=<n> ,
|
||||
|
|
@ -596,15 +663,15 @@ set the minimum required Security Strength Factor (ssf) needed
|
|||
to grant access. The value should be positive integer.
|
||||
.SH THE <ACCESS> FIELD
|
||||
The field
|
||||
.B <access> ::= [self]{<level>|<priv>}
|
||||
.B <access> ::= [[real]self]{<level>|<priv>}
|
||||
determines the access level or the specific access privileges the
|
||||
.B who
|
||||
field will have.
|
||||
Its component are defined as
|
||||
.LP
|
||||
.nf
|
||||
<level> ::= none|auth|compare|search|read|write
|
||||
<priv> ::= {=|+|-}{w|r|s|c|x|0}+
|
||||
<level> ::= none|disclose|auth|compare|search|read|write
|
||||
<priv> ::= {=|+|-}{w|r|s|c|x|d|0}+
|
||||
.fi
|
||||
.LP
|
||||
The modifier
|
||||
|
|
@ -612,7 +679,12 @@ The modifier
|
|||
allows special operations like having a certain access level or privilege
|
||||
only in case the operation involves the name of the user that's requesting
|
||||
the access.
|
||||
It implies the user that requests access is bound.
|
||||
It implies the user that requests access is authorized.
|
||||
The modifier
|
||||
.B realself
|
||||
refers to the authenticated DN as opposed to the authorized DN of the
|
||||
.B self
|
||||
modifier.
|
||||
An example is the
|
||||
.B selfwrite
|
||||
access to the member attribute of a group, which allows one to add/delete
|
||||
|
|
@ -624,6 +696,7 @@ access model relies on an incremental interpretation of the access
|
|||
privileges.
|
||||
The possible levels are
|
||||
.BR none ,
|
||||
.BR disclose ,
|
||||
.BR auth ,
|
||||
.BR compare ,
|
||||
.BR search ,
|
||||
|
|
@ -633,11 +706,18 @@ and
|
|||
Each access level implies all the preceding ones, thus
|
||||
.B write
|
||||
access will imply all accesses.
|
||||
While
|
||||
.B none
|
||||
is trivial,
|
||||
.LP
|
||||
The
|
||||
.B none
|
||||
access level disallows all access including disclosure on error.
|
||||
.LP
|
||||
The
|
||||
.B disclose
|
||||
access level allows disclosure of information on error.
|
||||
.LP
|
||||
The
|
||||
.B auth
|
||||
access means that one is allowed access to an attribute to perform
|
||||
access level means that one is allowed access to an attribute to perform
|
||||
authentication/authorization operations (e.g.
|
||||
.BR bind )
|
||||
with no other access.
|
||||
|
|
@ -665,9 +745,11 @@ for read,
|
|||
.B s
|
||||
for search,
|
||||
.B c
|
||||
for compare, and
|
||||
for compare,
|
||||
.B x
|
||||
for authentication.
|
||||
for authentication, and
|
||||
.B d
|
||||
for disclose.
|
||||
More than one of the above privileges can be added in one statement.
|
||||
.B 0
|
||||
indicates no privileges and is used only by itself (e.g., +0).
|
||||
|
|
@ -794,10 +876,15 @@ is set to 1.
|
|||
.LP
|
||||
The
|
||||
.B search
|
||||
operation, for each entry, requires
|
||||
operation, requires
|
||||
.B search (=s)
|
||||
privileges on the
|
||||
.B entry
|
||||
pseudo-attribute of the searchBase (NOTE: this was introduced with 2.3).
|
||||
Then, for each entry, it requires
|
||||
.B search (=s)
|
||||
privileges on the attributes that are defined in the filter.
|
||||
Then, the resulting entries are tested for
|
||||
The resulting entries are finally tested for
|
||||
.B read (=r)
|
||||
privileges on the pseudo-attribute
|
||||
.B entry
|
||||
|
|
@ -838,6 +925,23 @@ privileges are also required on the
|
|||
attribute of the authorizing identity and/or on the
|
||||
.B authzFrom
|
||||
attribute of the authorized identity.
|
||||
|
||||
.LP
|
||||
Access control to search entries is checked by the frontend,
|
||||
so it is fully honored by all backends; for all other operations
|
||||
and for the discovery phase of the search operation,
|
||||
full ACL semantics is only supported by the primary backends, i.e.
|
||||
.BR back-bdb (5),
|
||||
.BR back-hdb (5),
|
||||
and
|
||||
.BR back-ldbm (5).
|
||||
|
||||
Some other backend, like
|
||||
.BR back-sql (5),
|
||||
may fully support them; others may only support a portion of the
|
||||
described semantics, or even differ in some aspects.
|
||||
The relevant details are described in the backend-specific man pages.
|
||||
|
||||
.SH CAVEATS
|
||||
It is strongly recommended to explicitly use the most appropriate
|
||||
.B <dnstyle>
|
||||
|
|
@ -916,6 +1020,7 @@ ETCDIR/slapd.conf
|
|||
default slapd configuration file
|
||||
.SH SEE ALSO
|
||||
.BR slapd (8),
|
||||
.BR slapd-* (5),
|
||||
.BR slapacl (8),
|
||||
.BR regex (7),
|
||||
.BR re_format (7)
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ file is used).
|
|||
.LP
|
||||
If a line begins with white space, it is considered a continuation
|
||||
of the previous line. Blank lines and comment lines beginning with
|
||||
a `#' character are ignored. (Note: continuation lines are unwrapped
|
||||
before comment processing is applied.)
|
||||
a `#' character are ignored. Note: continuation lines are unwrapped
|
||||
before comment processing is applied.
|
||||
.LP
|
||||
Arguments on configuration lines are separated by white space. If an
|
||||
argument contains white space, the argument should be enclosed in
|
||||
|
|
@ -1679,7 +1679,6 @@ default slapd configuration file
|
|||
.BR slapd\-relay (5),
|
||||
.BR slapd\-shell (5),
|
||||
.BR slapd\-sql (5),
|
||||
.BR slapd\-tcl (5),
|
||||
.BR slapd.access (5),
|
||||
.BR slapd.plugin (5),
|
||||
.BR slapd.replog (5),
|
||||
|
|
|
|||
110
doc/man/man5/slapo-dynlist.5
Normal file
110
doc/man/man5/slapo-dynlist.5
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
.TH SLAPO-DYNLIST 5 "RELEASEDATE" "OpenLDAP LDVERSION"
|
||||
.\" Copyright 1998-2005 The OpenLDAP Foundation, All Rights Reserved.
|
||||
.\" Copying restrictions apply. See the COPYRIGHT file.
|
||||
.\" $OpenLDAP$
|
||||
.SH NAME
|
||||
slapo-dynlist \- dynnamic list overlay
|
||||
.SH SYNOPSIS
|
||||
ETCDIR/slapd.conf
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B dynlist
|
||||
overlay to
|
||||
.BR slapd (8)
|
||||
allows expansion of dynamic groups and more.
|
||||
Any time an entry with a specific objectClass is being returned,
|
||||
the LDAP URI-valued occurrences of a specific attribute are
|
||||
expanded into the corresponding entries, and the values
|
||||
of the attributes listed in the URI are added to the original
|
||||
entry.
|
||||
No recursion is currently allowed, to avoid potential infinite loops.
|
||||
|
||||
.SH CONFIGURATION
|
||||
The config directives that are specific to the
|
||||
.B dynlist
|
||||
overlay must be prefixed by
|
||||
.BR dynlist\- ,
|
||||
to avoid potential conflicts with directives specific to the underlying
|
||||
database or to other stacked overlays.
|
||||
|
||||
.TP
|
||||
.B overlay dynlist
|
||||
This directive adds the dynlist overlay to the current database,
|
||||
or to the frontend, if used before any database instantiation; see
|
||||
.BR slapd.conf (5)
|
||||
for details.
|
||||
|
||||
.LP
|
||||
These
|
||||
.B slapd.conf
|
||||
configuration options apply to the dynlist overlay. They must appear
|
||||
after the
|
||||
.B overlay
|
||||
directive.
|
||||
.TP
|
||||
.B dynlist-oc <objectClass>
|
||||
The name of the objectClass that triggers the dynamic expansion of the
|
||||
data. This statement is required.
|
||||
.TP
|
||||
.B dynlist-ad <attributeName>
|
||||
The name of the attributeDescription that holds the LDAP URI values that
|
||||
will expand; if none is present, no expansion occurs. If the intersection
|
||||
of the attributes requested by the search operation (or the asserted attribute
|
||||
for compares) and the attributes listed in the URI is empty, no expansion
|
||||
occurs for that specific URI. This statement is required.
|
||||
.TP
|
||||
.B dynlist-member-ad <attributeName>
|
||||
The name of the attributeDescription that will list the DN of the entries
|
||||
resulting from the internal search. This statement is optional and, if
|
||||
present, changes the behvior of the overlay into that of a dynamic group.
|
||||
The <attrs> portion of the URI is ignored, and the DNs of all the entries
|
||||
resulting from the expansion of the URI are listed as values of this
|
||||
attribute.
|
||||
|
||||
.LP
|
||||
The dynlist overlay may be used with any backend, but it is mainly
|
||||
intended for use with local storage backends.
|
||||
In case the URI expansion is very resource-intensive and occurs frequently
|
||||
with well-defined patterns, one should consider adding a proxycache
|
||||
later on in the overlay stack.
|
||||
|
||||
.SH EXAMPLE
|
||||
This example collects all the email addresses of a database into a single
|
||||
entry; first of all, make sure that slapd.conf contains the directives:
|
||||
|
||||
.LP
|
||||
.nf
|
||||
include /path/to/dyngroup.schema
|
||||
# ...
|
||||
|
||||
database <database>
|
||||
# ...
|
||||
|
||||
overlay dynlist
|
||||
dynlist-oc groupOfURLs
|
||||
dynlist-ad memberURL
|
||||
.fi
|
||||
.LP
|
||||
and that slapd loads dynlist.la, if compiled as a run-time module;
|
||||
then add to the database an entry like
|
||||
.LP
|
||||
.nf
|
||||
dn: cn=Dynamic List,ou=Groups,dc=example,dc=com
|
||||
objectClass: groupOfURLs
|
||||
cn: Dynamic List
|
||||
memberURL: ldap:///ou=People,dc=example,dc=com?mail?sub?(objectClass=person)
|
||||
.fi
|
||||
|
||||
If no <attrs> are provided in the URI, all (non-operational) attributes are
|
||||
collected.
|
||||
|
||||
|
||||
.SH FILES
|
||||
.TP
|
||||
ETCDIR/slapd.conf
|
||||
default slapd configuration file
|
||||
.SH SEE ALSO
|
||||
.BR slapd.conf (5),
|
||||
.BR slapd (8).
|
||||
.SH AUTHOR
|
||||
Originally implemented by Pierangelo Masarati.
|
||||
|
|
@ -78,6 +78,21 @@ used by the \fBproxytemplate\fP directive to define cacheable templates.
|
|||
Specifies a cacheable template and "time to live" (in sec) <ttl> of queries
|
||||
belonging to the template.
|
||||
|
||||
.TP
|
||||
.B response-callback { head | tail }
|
||||
Specifies whether the response callback should be placed at the
|
||||
.B tail
|
||||
(the default) or at the
|
||||
.B head
|
||||
(actually, wherever the stacking sequence would make it appear)
|
||||
of the callback list. This affects how the overlay interacts with other
|
||||
overlays, since the proxycache overlay should be executed as early
|
||||
as possible (and thus configured as late as possible), to get
|
||||
a chance to return the cached results; however, if executed early
|
||||
at response, it would cache entries that may be later "massaged"
|
||||
by other databases and thus returned \fIafter\fP massaging the first
|
||||
time, and \fIbefore\fP massaging when cached.
|
||||
|
||||
.LP
|
||||
The following adds a template with filter string \fB((&sn=)(givenName=))\fP
|
||||
and attributes mail, postaladdress, telephonenumber and a TTL of 1 hour.
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ object class. The definition of that class is as follows:
|
|||
MAY (
|
||||
pwdMinAge $ pwdMaxAge $ pwdInHistory $
|
||||
pwdCheckSyntax $ pwdMinLength $
|
||||
pwdExpireWarning $ pwdGraceLoginLimit $
|
||||
pwdExpireWarning $ pwdGraceAuthnLimit $
|
||||
pwdLockout $ pwdLockoutDuration $
|
||||
pwdMaxFailure $ pwdFailureCountInterval $
|
||||
pwdMustChange $ pwdAllowUserChange $
|
||||
|
|
@ -247,7 +247,7 @@ present, or if the value is zero (0), no warnings will be sent.
|
|||
SINGLE-VALUE )
|
||||
.RE
|
||||
|
||||
.B pwdGraceLoginLimit
|
||||
.B pwdGraceAuthnLimit
|
||||
.P
|
||||
This attribute contains the number of times that an expired password
|
||||
may be used to authenticate a user to the directory. If this
|
||||
|
|
@ -257,7 +257,7 @@ directory.
|
|||
.LP
|
||||
.RS 4
|
||||
( 1.3.6.1.4.1.42.2.27.8.1.8
|
||||
NAME 'pwdGraceLoginLimit'
|
||||
NAME 'pwdGraceAuthnLimit'
|
||||
EQUALITY integerMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
|
||||
SINGLE-VALUE )
|
||||
|
|
@ -560,28 +560,6 @@ and may only be unlocked by an administrator.
|
|||
USAGE directoryOperation)
|
||||
.RE
|
||||
|
||||
.B pwdExpirationWarned
|
||||
.P
|
||||
This attribute denotes the time when the first password
|
||||
expiration warning was sent to the client regarding this account.
|
||||
The amount of time between when this warning is sent and when
|
||||
the password actually expires is the amount of time stored in
|
||||
the
|
||||
.B pwdExpireWarning
|
||||
password policy attribute.
|
||||
.LP
|
||||
.RS 4
|
||||
( 1.3.6.1.4.1.42.2.27.8.1.18
|
||||
NAME 'pwdExpirationWarned'
|
||||
DESC 'The time the user was first warned about the
|
||||
coming expiration of their password'
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.24
|
||||
EQUALITY generalizedTimeMatch
|
||||
ORDERING generalizedTimeOrderingMatch
|
||||
SINGLE-VALUE
|
||||
USAGE directoryOperation )
|
||||
.RE
|
||||
|
||||
.B pwdFailureTime
|
||||
.P
|
||||
This attribute contains the timestamps of each of the consecutive
|
||||
|
|
@ -734,7 +712,7 @@ ppolicy_default "cn=Standard,ou=Policies,dc=example,dc=com"
|
|||
.LP
|
||||
IETF LDAP password policy proposal by P. Behera, L. Poitou and J.
|
||||
Sermersheim: documented in IETF document
|
||||
"draft-behera-ldap-password-policy-07.txt".
|
||||
"draft-behera-ldap-password-policy-08.txt".
|
||||
|
||||
.SH BUGS
|
||||
The LDAP Password Policy specification is not yet an approved standard,
|
||||
|
|
@ -753,8 +731,8 @@ IETF LDAP password policy proposal by P. Behera, L.
|
|||
Poitou and J. Sermersheim.
|
||||
The proposal is fully documented in
|
||||
the
|
||||
IETF document named draft-behera-ldap-password-policy-07.txt,
|
||||
written in February of 2004.
|
||||
IETF document named draft-behera-ldap-password-policy-08.txt,
|
||||
written in October of 2004.
|
||||
.P
|
||||
.B OpenLDAP
|
||||
is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ slapacl \- Check access to a list of attributes.
|
|||
.B [\-f slapd.conf]
|
||||
.B [\-D authcDN | \-U authcID]
|
||||
.B \-b DN
|
||||
.B [\-u]
|
||||
.B [\-X authzID | \-o authzDN=DN]
|
||||
.B [attr[/access][:value]] [...]
|
||||
.LP
|
||||
.SH DESCRIPTION
|
||||
|
|
@ -62,13 +64,59 @@ rules (see
|
|||
for details); mutually exclusive with
|
||||
.BR \-D .
|
||||
.TP
|
||||
.BI \-X " authzID"
|
||||
specify an authorization ID to be mapped to a
|
||||
.B DN
|
||||
as by means of
|
||||
.B authz-regexp
|
||||
or
|
||||
.B authz-rewrite
|
||||
rules (see
|
||||
.BR slapd.conf (5)
|
||||
for details); mutually exclusive with \fB\-o\fP \fIauthzDN=DN\fP.
|
||||
.TP
|
||||
.BI \-o " option[=value]"
|
||||
Specify an
|
||||
.BR option
|
||||
with a(n optional)
|
||||
.BR value .
|
||||
Possible options/values are:
|
||||
.LP
|
||||
.nf
|
||||
sockurl
|
||||
domain
|
||||
peername
|
||||
sockname
|
||||
ssf
|
||||
transport_ssf
|
||||
tls_ssf
|
||||
sasl_ssf
|
||||
authzDN
|
||||
.fi
|
||||
.TP
|
||||
.BI \-b " DN"
|
||||
specify the
|
||||
.B DN
|
||||
access to is requested; the corresponding entry is not fetched
|
||||
from the database, and thus it must not exist.
|
||||
However, a database must be selected to determine what rules
|
||||
apply; thus, it must be in the naming context of a configured database.
|
||||
which access is requested to; the corresponding entry is fetched
|
||||
from the database, and thus it must exist.
|
||||
The DN is also used to determine what rules apply; thus, it must be
|
||||
in the naming context of a configured database. See also
|
||||
.BR \-u .
|
||||
.TP
|
||||
.BI \-u
|
||||
do not fetch the entry from the database.
|
||||
In this case, if the entry does not exist, a fake entry with the DN
|
||||
given with the
|
||||
.B \-b
|
||||
option is used, with no attributes.
|
||||
As a consequence, those rules that depend on the contents
|
||||
of the target object will not behave as with the real object.
|
||||
The DN given with the
|
||||
.B \-b
|
||||
option is still used to select what rules apply; thus, it must be
|
||||
in the naming context of a configured database.
|
||||
See also
|
||||
.BR \-b .
|
||||
.SH EXAMPLES
|
||||
The command
|
||||
.LP
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ slapd \- Stand-alone LDAP Daemon
|
|||
.SH SYNOPSIS
|
||||
.B LIBEXECDIR/slapd
|
||||
.B [\-[4|6]]
|
||||
.B [\-T {add|auth|cat|dn|index|passwd|test}]
|
||||
.B [\-T {acl|add|auth|cat|dn|index|passwd|test}]
|
||||
.B [\-d debug\-level]
|
||||
.B [\-f slapd\-config\-file]
|
||||
.B [\-h URLs]
|
||||
|
|
@ -66,11 +66,16 @@ Listen on IPv6 addresses only.
|
|||
.TP
|
||||
.B \-T {a|c|d|i|p|t}
|
||||
Run in Tool mode. The additional argument selects whether to run as
|
||||
slapadd, slapcat, slapdn, slapindex, slappasswd, or slatest. This option
|
||||
should be the first option specified when it is used. Any remaining options
|
||||
will be interpreted by the corresponding slap tool program. Note that these
|
||||
tool programs will usually be symbolic links to slapd. This option is provided
|
||||
for situations where symbolic links are not provided or not usable.
|
||||
slapadd, slapcat, slapdn, slapindex, slappasswd, or slaptest
|
||||
(slapacl and slapauth need the entire "\fIacl\fP" and "\fIauth\fP"
|
||||
option value to be spelled out, as "\fIa\fP" is reserved to
|
||||
.BR slapadd ).
|
||||
This option should be the first option specified when it is used;
|
||||
any remaining options will be interpreted by the corresponding
|
||||
slap tool program, according to the respective man pages.
|
||||
Note that these tool programs will usually be symbolic links to slapd.
|
||||
This option is provided for situations where symbolic links
|
||||
are not provided or not usable.
|
||||
.TP
|
||||
.BI \-d " debug\-level"
|
||||
Turn on debugging as defined by
|
||||
|
|
@ -174,7 +179,7 @@ is also changed to this user's gid, unless the -g option is used to
|
|||
override. Note when used with
|
||||
.BR -r ,
|
||||
slapd will use the user database in the change root environment.
|
||||
.LP
|
||||
|
||||
Note that on some systems, running as a non-privileged user will prevent
|
||||
passwd back-ends from accessing the encrypted passwords. Note also that
|
||||
any shell back-ends will run as the specified non-privileged user.
|
||||
|
|
@ -189,23 +194,20 @@ slapd will use the group database in the change root environment.
|
|||
This option provides a cookie for the syncrepl replication consumer.
|
||||
The cookie is a comma separated list of name=value pairs.
|
||||
Currently supported syncrepl cookie fields are
|
||||
.B csn,
|
||||
.B sid,
|
||||
.B rid
|
||||
and
|
||||
.B rid.
|
||||
.B csn
|
||||
is the commit sequence number received by a previous synchronization
|
||||
and represents the state of the consumer replica content which the
|
||||
syncrepl engine will synchronize to the current provider content.
|
||||
.B sid
|
||||
is the identity of the per-scope session log with which the
|
||||
provider server can process this syncrepl request to reduce
|
||||
synchronization traffic.
|
||||
.B csn.
|
||||
.B rid
|
||||
identifies a replication thread within the consumer server
|
||||
and is used to find the syncrepl specification in
|
||||
.BR slapd.conf (5)
|
||||
having the matching replication identifier in its definition.
|
||||
having the matching replication identifier in its definition. The
|
||||
.B rid
|
||||
must be provided in order for any other specified values to be used.
|
||||
.B csn
|
||||
is the commit sequence number received by a previous synchronization
|
||||
and represents the state of the consumer replica content which the
|
||||
syncrepl engine will synchronize to the current provider content.
|
||||
.SH EXAMPLES
|
||||
To start
|
||||
.I slapd
|
||||
|
|
@ -241,7 +243,9 @@ To test whether the configuration file is correct or not, type:
|
|||
.BR ldap (3),
|
||||
.BR slapd.conf (5),
|
||||
.BR slapd.access (5),
|
||||
.BR slapacl (8),
|
||||
.BR slapadd (8),
|
||||
.BR slapauth (8),
|
||||
.BR slapcat (8),
|
||||
.BR slapdn (8),
|
||||
.BR slapindex (8),
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ slapdn \- Check a list of string-represented DNs based on schema syntax.
|
|||
.B [\-v]
|
||||
.B [\-d level]
|
||||
.B [\-f slapd.conf]
|
||||
.B [\-F confdir]
|
||||
.B [\-N | \-P]
|
||||
.B DN [...]
|
||||
.LP
|
||||
.SH DESCRIPTION
|
||||
|
|
@ -38,6 +40,16 @@ enable debugging messages as defined by the specified
|
|||
specify an alternative
|
||||
.BR slapd.conf (5)
|
||||
file.
|
||||
.TP
|
||||
.BI \-N
|
||||
only output a normalized form of the DN, suitable to be used
|
||||
in a normalization tool; incompatible with
|
||||
.BR \-P .
|
||||
.TP
|
||||
.BI \-P
|
||||
only output a prettified form of the DN, suitable to be used
|
||||
in a check and beautification tool; incompatible with
|
||||
.BR \-N .
|
||||
.SH EXAMPLES
|
||||
To check a
|
||||
.B DN
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@
|
|||
slaptest \- Check the suitability of the slapd.conf file.
|
||||
.SH SYNOPSIS
|
||||
.B SBINDIR/slaptest
|
||||
.B [\-v]
|
||||
.B [\-d level]
|
||||
.B [\-f slapd.conf]
|
||||
.B [\-F confdir]
|
||||
.B [\-u]
|
||||
.B [\-v]
|
||||
.LP
|
||||
.SH DESCRIPTION
|
||||
.LP
|
||||
|
|
@ -22,9 +24,6 @@ and the backend-specific rules, checking its sanity.
|
|||
.LP
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-v
|
||||
enable verbose mode.
|
||||
.TP
|
||||
.BI \-d " level"
|
||||
enable debugging messages as defined by the specified
|
||||
.IR level .
|
||||
|
|
@ -33,6 +32,16 @@ enable debugging messages as defined by the specified
|
|||
specify an alternative
|
||||
.BR slapd.conf (5)
|
||||
file.
|
||||
.TP
|
||||
.BI \-F " confdir"
|
||||
specify a config directory.
|
||||
.TP
|
||||
.B \-u
|
||||
enable dryrun mode (i.e. don't fail if databases cannot be opened,
|
||||
but config is fine).
|
||||
.TP
|
||||
.B \-v
|
||||
enable verbose mode.
|
||||
.SH EXAMPLES
|
||||
To check a
|
||||
.BR slapd.conf (5)
|
||||
|
|
|
|||
|
|
@ -597,6 +597,10 @@ LBER_F( char * )
|
|||
ber_strdup LDAP_P((
|
||||
LDAP_CONST char * ));
|
||||
|
||||
LBER_F( struct berval * )
|
||||
ber_bvreplace LDAP_P((
|
||||
struct berval *dst, LDAP_CONST struct berval *src ));
|
||||
|
||||
LBER_F( void )
|
||||
ber_bvarray_free LDAP_P(( BerVarray p ));
|
||||
|
||||
|
|
|
|||
|
|
@ -135,6 +135,10 @@ LBER_F( char * )
|
|||
ber_strdup_x LDAP_P((
|
||||
LDAP_CONST char *, void *ctx ));
|
||||
|
||||
LBER_F( struct berval * )
|
||||
ber_bvreplace_x LDAP_P((
|
||||
struct berval *dst, LDAP_CONST struct berval *src, void *ctx ));
|
||||
|
||||
LBER_F( void )
|
||||
ber_bvarray_free_x LDAP_P(( BerVarray p, void *ctx ));
|
||||
|
||||
|
|
|
|||
|
|
@ -221,13 +221,20 @@ typedef struct ldapcontrol {
|
|||
#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"
|
||||
|
||||
#if 0
|
||||
/* LDAP Duplicated Entry Control Extension *//* not implemented in slapd(8) */
|
||||
#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
|
||||
#define LDAP_CONTROL_DUPENT_RESPONSE "2.16.840.1.113719.1.27.101.2"
|
||||
#define LDAP_CONTROL_DUPENT_ENTRY "2.16.840.1.113719.1.27.101.3"
|
||||
#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
|
||||
#endif
|
||||
|
||||
/* LDAP Persistent Search Control *//* not implemented in slapd(8) */
|
||||
/* draft-ietf-ldapext-psearch-03.txt (expired) */
|
||||
#define LDAP_CONTROL_PERSIST_REQUEST "2.16.840.1.113730.3.4.3"
|
||||
#define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_NOTICE "2.16.840.1.113730.3.4.7"
|
||||
#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_ADD 0x1
|
||||
#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_DELETE 0x2
|
||||
#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_MODIFY 0x4
|
||||
#define LDAP_CONTROL_PERSSIT_ENTRY_CHANGE_RENAME 0x8
|
||||
|
||||
/* LDAP VLV *//* not implemented in slapd(8) */
|
||||
#define LDAP_CONTROL_VLVREQUEST "2.16.840.1.113730.3.4.9"
|
||||
|
|
|
|||
|
|
@ -44,9 +44,13 @@ ldap_pvt_thread_set_concurrency LDAP_P(( int ));
|
|||
#define LDAP_PVT_THREAD_CREATE_JOINABLE 0
|
||||
#define LDAP_PVT_THREAD_CREATE_DETACHED 1
|
||||
|
||||
#define LDAP_PVT_THREAD_SET_STACK_SIZE
|
||||
#ifndef LDAP_PVT_THREAD_STACK_SIZE
|
||||
/* LARGE stack */
|
||||
#define LDAP_PVT_THREAD_STACK_SIZE (4*1024*1024)
|
||||
/* LARGE stack. Will be twice as large on 64 bit machine. */
|
||||
#define LDAP_PVT_THREAD_STACK_SIZE ( 1 * 1024 * 1024 * sizeof(void *) )
|
||||
/* May be explicitly defined to zero to disable it */
|
||||
#elif LDAP_PVT_THREAD_STACK_SIZE == 0
|
||||
#undef LDAP_PVT_THREAD_SET_STACK_SIZE
|
||||
#endif
|
||||
|
||||
LDAP_F( int )
|
||||
|
|
@ -198,6 +202,9 @@ ldap_pvt_thread_pool_setkey LDAP_P((
|
|||
void *data,
|
||||
ldap_pvt_thread_pool_keyfree_t *kfree ));
|
||||
|
||||
LDAP_F( void )
|
||||
ldap_pvt_thread_pool_purgekey LDAP_P(( void *key ));
|
||||
|
||||
LDAP_F( void *)
|
||||
ldap_pvt_thread_pool_context LDAP_P(( void ));
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ typedef struct re_s {
|
|||
LDAP_STAILQ_ENTRY(re_s) rnext;
|
||||
ldap_pvt_thread_start_t *routine;
|
||||
void *arg;
|
||||
char *tname;
|
||||
char *tspec;
|
||||
} re_t;
|
||||
|
||||
typedef struct runqueue_s {
|
||||
|
|
@ -35,11 +37,20 @@ typedef struct runqueue_s {
|
|||
ldap_pvt_thread_mutex_t rq_mutex;
|
||||
} runqueue_t;
|
||||
|
||||
LDAP_F( void )
|
||||
LDAP_F( struct re_s* )
|
||||
ldap_pvt_runqueue_insert(
|
||||
struct runqueue_s* rq,
|
||||
time_t interval,
|
||||
ldap_pvt_thread_start_t* routine,
|
||||
void *arg,
|
||||
char *tname,
|
||||
char *tspec
|
||||
);
|
||||
|
||||
LDAP_F( struct re_s* )
|
||||
ldap_pvt_runqueue_find(
|
||||
struct runqueue_s* rq,
|
||||
ldap_pvt_thread_start_t* routine,
|
||||
void *arg
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,13 @@ ldif_read_record LDAP_P((
|
|||
char **bufp,
|
||||
int *buflen ));
|
||||
|
||||
LDAP_LDIF_F( int )
|
||||
ldif_must_b64_encode_register LDAP_P((
|
||||
LDAP_CONST char *name,
|
||||
LDAP_CONST char *oid ));
|
||||
|
||||
LDAP_LDIF_F( void )
|
||||
ldif_must_b64_encode_release LDAP_P(( void ));
|
||||
|
||||
#define LDIF_PUT_NOVALUE 0x0000 /* no value */
|
||||
#define LDIF_PUT_VALUE 0x0001 /* value w/ auto detection */
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ lutil_progname LDAP_P((
|
|||
int argc,
|
||||
char *argv[] ));
|
||||
|
||||
struct lutil_tm {
|
||||
typedef struct lutil_tm {
|
||||
int tm_sec; /* seconds 0-60 (1 leap second) */
|
||||
int tm_min; /* minutes 0-59 */
|
||||
int tm_hour; /* hours 0-23 */
|
||||
|
|
@ -160,7 +160,7 @@ struct lutil_tm {
|
|||
int tm_usec; /* microseconds */
|
||||
} lutil_tm;
|
||||
|
||||
struct lutil_timet {
|
||||
typedef struct lutil_timet {
|
||||
unsigned int tt_sec; /* seconds since 1900 */
|
||||
int tt_gsec; /* seconds since 1900, high 7 bits */
|
||||
unsigned int tt_usec; /* microseconds */
|
||||
|
|
|
|||
|
|
@ -629,9 +629,6 @@
|
|||
/* Define if you have the V3 library (-lV3). */
|
||||
#undef HAVE_LIBV3
|
||||
|
||||
/* Define if you have the bind library (-lbind). */
|
||||
#undef HAVE_LIBBIND
|
||||
|
||||
/* Define if you have the gen library (-lgen). */
|
||||
#undef HAVE_LIBGEN
|
||||
|
||||
|
|
@ -647,9 +644,6 @@
|
|||
/* Define if you have the nsl_s library (-lnsl_s). */
|
||||
#undef HAVE_LIBNSL_S
|
||||
|
||||
/* Define if you have the resolv library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define if you have the socket library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
|
|
@ -1046,6 +1040,9 @@
|
|||
/* define for Dynamic Group overlay */
|
||||
#undef SLAPD_OVER_DYNGROUP
|
||||
|
||||
/* define for Dynamic List overlay */
|
||||
#undef SLAPD_OVER_DYNLIST
|
||||
|
||||
/* define for Backend Glue overlay */
|
||||
#undef SLAPD_OVER_GLUE
|
||||
|
||||
|
|
|
|||
|
|
@ -713,6 +713,32 @@ ber_strndup( LDAP_CONST char *s, ber_len_t l )
|
|||
return ber_strndup_x( s, l, NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* dst is resized as required by src and the value of src is copied into dst
|
||||
* dst->bv_val must be NULL (and dst->bv_len must be 0), or it must be
|
||||
* alloc'ed with the context ctx
|
||||
*/
|
||||
struct berval *
|
||||
ber_bvreplace_x( struct berval *dst, LDAP_CONST struct berval *src, void *ctx )
|
||||
{
|
||||
assert( dst != NULL );
|
||||
|
||||
if ( dst->bv_len < src->bv_len ) {
|
||||
dst->bv_val = ber_memrealloc_x( dst->bv_val, src->bv_len + 1, ctx );
|
||||
}
|
||||
|
||||
AC_MEMCPY( dst->bv_val, src->bv_val, src->bv_len + 1 );
|
||||
dst->bv_len = src->bv_len;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
struct berval *
|
||||
ber_bvreplace( struct berval *dst, LDAP_CONST struct berval *src )
|
||||
{
|
||||
return ber_bvreplace_x( dst, src, NULL );
|
||||
}
|
||||
|
||||
void
|
||||
ber_bvarray_free_x( BerVarray a, void *ctx )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,10 +25,22 @@
|
|||
#include <ac/ctype.h>
|
||||
#include <ac/unistd.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "ldap-int.h"
|
||||
|
||||
#ifdef HAVE_CYRUS_SASL
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef INT_MAX
|
||||
#define INT_MAX 2147483647 /* 32 bit signed max */
|
||||
#endif
|
||||
|
||||
#ifdef LDAP_R_COMPILE
|
||||
ldap_pvt_thread_mutex_t ldap_int_sasl_mutex;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@
|
|||
#include <ac/ctype.h>
|
||||
#include <ac/time.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "ldap-int.h"
|
||||
#include "ldap_defaults.h"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
#include "portable.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include <ac/stdlib.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s,
|
|||
fd_set efds;
|
||||
#endif
|
||||
|
||||
#ifdef FD_SETSIZE
|
||||
#if defined( FD_SETSIZE ) && !defined( HAVE_WINSOCK )
|
||||
if ( s >= FD_SETSIZE ) {
|
||||
rc = AC_SOCKET_ERROR;
|
||||
tcp_close( s );
|
||||
|
|
@ -871,14 +871,14 @@ int ldap_int_tblsize = 0;
|
|||
void
|
||||
ldap_int_ip_init( void )
|
||||
{
|
||||
int tblsize;
|
||||
|
||||
#if defined( HAVE_SYSCONF )
|
||||
tblsize = sysconf( _SC_OPEN_MAX );
|
||||
long tblsize = sysconf( _SC_OPEN_MAX );
|
||||
if( tblsize > INT_MAX ) tblsize = INT_MAX;
|
||||
|
||||
#elif defined( HAVE_GETDTABLESIZE )
|
||||
tblsize = getdtablesize();
|
||||
int tblsize = getdtablesize();
|
||||
#else
|
||||
tblsize = FD_SETSIZE;
|
||||
int tblsize = FD_SETSIZE;
|
||||
#endif /* !USE_SYSCONF */
|
||||
|
||||
#ifdef FD_SETSIZE
|
||||
|
|
|
|||
|
|
@ -33,24 +33,47 @@
|
|||
#include "ldap_queue.h"
|
||||
#include "ldap_rq.h"
|
||||
|
||||
void
|
||||
struct re_s *
|
||||
ldap_pvt_runqueue_insert(
|
||||
struct runqueue_s* rq,
|
||||
time_t interval,
|
||||
ldap_pvt_thread_start_t *routine,
|
||||
void *arg
|
||||
void *arg,
|
||||
char *tname,
|
||||
char *tspec
|
||||
)
|
||||
{
|
||||
struct re_s* entry;
|
||||
|
||||
entry = (struct re_s *) LDAP_CALLOC( 1, sizeof( struct re_s ));
|
||||
entry->interval.tv_sec = interval;
|
||||
entry->interval.tv_usec = 0;
|
||||
entry->next_sched.tv_sec = time( NULL );
|
||||
entry->next_sched.tv_usec = 0;
|
||||
entry->routine = routine;
|
||||
entry->arg = arg;
|
||||
LDAP_STAILQ_INSERT_TAIL( &rq->task_list, entry, tnext );
|
||||
if ( entry ) {
|
||||
entry->interval.tv_sec = interval;
|
||||
entry->interval.tv_usec = 0;
|
||||
entry->next_sched.tv_sec = time( NULL );
|
||||
entry->next_sched.tv_usec = 0;
|
||||
entry->routine = routine;
|
||||
entry->arg = arg;
|
||||
entry->tname = tname;
|
||||
entry->tspec = tspec;
|
||||
LDAP_STAILQ_INSERT_HEAD( &rq->task_list, entry, tnext );
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
struct re_s *
|
||||
ldap_pvt_runqueue_find(
|
||||
struct runqueue_s *rq,
|
||||
ldap_pvt_thread_start_t *routine,
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
struct re_s* e;
|
||||
|
||||
LDAP_STAILQ_FOREACH( e, &rq->task_list, tnext ) {
|
||||
if ( e->routine == routine && e->arg == arg )
|
||||
return e;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ ldap_pvt_thread_create( ldap_pvt_thread_t * thread,
|
|||
pthread_attr_create(&attr);
|
||||
#endif
|
||||
|
||||
#if defined(LDAP_PVT_THREAD_STACK_SIZE) && LDAP_PVT_THREAD_STACK_SIZE > 0
|
||||
#ifdef LDAP_PVT_THREAD_SET_STACK_SIZE
|
||||
/* this should be tunable */
|
||||
pthread_attr_setstacksize( &attr, LDAP_PVT_THREAD_STACK_SIZE );
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ ldap_int_thread_initialize( void )
|
|||
}
|
||||
detach_attr = pth_attr_new();
|
||||
joined_attr = pth_attr_new();
|
||||
#if LDAP_PVT_THREAD_STACK_SIZE
|
||||
#ifdef LDAP_PVT_THREAD_SET_STACK_SIZE
|
||||
pth_attr_set( joined_attr, PTH_ATTR_STACK_SIZE, LDAP_PVT_THREAD_STACK_SIZE );
|
||||
pth_attr_set( detach_attr, PTH_ATTR_STACK_SIZE, LDAP_PVT_THREAD_STACK_SIZE );
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -616,6 +616,30 @@ int ldap_pvt_thread_pool_setkey(
|
|||
return ENOMEM;
|
||||
}
|
||||
|
||||
/* Free all elements with this key, no matter which thread they're in.
|
||||
* May only be called while the pool is paused.
|
||||
*/
|
||||
void ldap_pvt_thread_pool_purgekey( void *key )
|
||||
{
|
||||
int i, j;
|
||||
ldap_int_thread_key_t *ctx;
|
||||
|
||||
for ( i=0; i<LDAP_MAXTHR; i++ ) {
|
||||
if ( thread_keys[i].ctx ) {
|
||||
ctx = thread_keys[i].ctx;
|
||||
for ( j=0; j<MAXKEYS; j++ ) {
|
||||
if ( ctx[j].ltk_key == key ) {
|
||||
if (ctx[j].ltk_free)
|
||||
ctx[j].ltk_free( ctx[j].ltk_key, ctx[j].ltk_data );
|
||||
ctx[j].ltk_key = NULL;
|
||||
ctx[j].ltk_free = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This is necessary if the caller does not have access to the
|
||||
* thread context handle (for example, a slapd plugin calling
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ ldif_parse_line2(
|
|||
if ( s == NULL ) {
|
||||
ber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
|
||||
_("ldif_parse_line: missing ':' after %s\n"),
|
||||
type );
|
||||
type->bv_val );
|
||||
if ( !freeval ) ber_memfree( line );
|
||||
return( -1 );
|
||||
}
|
||||
|
|
@ -190,7 +190,8 @@ ldif_parse_line2(
|
|||
if ( *s == '\0' ) {
|
||||
/* no value is present, error out */
|
||||
ber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
|
||||
_("ldif_parse_line: %s missing base64 value\n"), type );
|
||||
_("ldif_parse_line: %s missing base64 value\n"),
|
||||
type->bv_val );
|
||||
if ( !freeval ) ber_memfree( line );
|
||||
return( -1 );
|
||||
}
|
||||
|
|
@ -205,7 +206,7 @@ ldif_parse_line2(
|
|||
ber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
|
||||
_("ldif_parse_line: %s: invalid base64 encoding"
|
||||
" char (%c) 0x%x\n"),
|
||||
type, p[i], p[i] );
|
||||
type->bv_val, p[i], p[i] );
|
||||
if ( !freeval ) ber_memfree( line );
|
||||
return( -1 );
|
||||
}
|
||||
|
|
@ -242,7 +243,8 @@ ldif_parse_line2(
|
|||
if ( *s == '\0' ) {
|
||||
/* no value is present, error out */
|
||||
ber_pvt_log_printf( LDAP_DEBUG_PARSE, ldif_debug,
|
||||
_("ldif_parse_line: %s missing URL value\n"), type );
|
||||
_("ldif_parse_line: %s missing URL value\n"),
|
||||
type->bv_val );
|
||||
if ( !freeval ) ber_memfree( line );
|
||||
return( -1 );
|
||||
}
|
||||
|
|
@ -250,7 +252,7 @@ ldif_parse_line2(
|
|||
if( ldif_fetch_url( s, &value->bv_val, &value->bv_len ) ) {
|
||||
ber_pvt_log_printf( LDAP_DEBUG_ANY, ldif_debug,
|
||||
_("ldif_parse_line: %s: URL \"%s\" fetch failed\n"),
|
||||
type, s );
|
||||
type->bv_val, s );
|
||||
if ( !freeval ) ber_memfree( line );
|
||||
return( -1 );
|
||||
}
|
||||
|
|
@ -359,6 +361,131 @@ ldif_getline( char **next )
|
|||
return( line );
|
||||
}
|
||||
|
||||
/*
|
||||
* name and OID of attributeTypes that must be base64 encoded in any case
|
||||
*/
|
||||
typedef struct must_b64_encode_s {
|
||||
struct berval name;
|
||||
struct berval oid;
|
||||
} must_b64_encode_s;
|
||||
|
||||
static must_b64_encode_s default_must_b64_encode[] = {
|
||||
{ BER_BVC( "userPassword" ), BER_BVC( "2.5.4.35" ) },
|
||||
{ BER_BVNULL, BER_BVNULL }
|
||||
};
|
||||
|
||||
static must_b64_encode_s *must_b64_encode = default_must_b64_encode;
|
||||
|
||||
/*
|
||||
* register name and OID of attributeTypes that must always be base64
|
||||
* encoded
|
||||
*
|
||||
* NOTE: this routine mallocs memory in a static struct which must
|
||||
* be explicitly freed when no longer required
|
||||
*/
|
||||
int
|
||||
ldif_must_b64_encode_register( LDAP_CONST char *name, LDAP_CONST char *oid )
|
||||
{
|
||||
int i;
|
||||
ber_len_t len;
|
||||
|
||||
assert( must_b64_encode );
|
||||
assert( name );
|
||||
assert( oid );
|
||||
|
||||
len = strlen( name );
|
||||
|
||||
for ( i = 0; !BER_BVISNULL( &must_b64_encode[i].name ); i++ ) {
|
||||
if ( len != must_b64_encode[i].name.bv_len ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( strcasecmp( name, must_b64_encode[i].name.bv_val ) == 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !BER_BVISNULL( &must_b64_encode[i].name ) ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
for ( i = 0; !BER_BVISNULL( &must_b64_encode[i].name ); i++ )
|
||||
/* just count */ ;
|
||||
|
||||
if ( must_b64_encode == default_must_b64_encode ) {
|
||||
must_b64_encode = ber_memalloc( sizeof( must_b64_encode_s ) * ( i + 2 ) );
|
||||
|
||||
for ( i = 0; !BER_BVISNULL( &default_must_b64_encode[i].name ); i++ ) {
|
||||
ber_dupbv( &must_b64_encode[i].name, &default_must_b64_encode[i].name );
|
||||
ber_dupbv( &must_b64_encode[i].oid, &default_must_b64_encode[i].oid );
|
||||
}
|
||||
|
||||
} else {
|
||||
must_b64_encode_s *tmp;
|
||||
|
||||
tmp = ber_memrealloc( must_b64_encode,
|
||||
sizeof( must_b64_encode_s ) * ( i + 2 ) );
|
||||
if ( tmp == NULL ) {
|
||||
return 1;
|
||||
}
|
||||
must_b64_encode = tmp;
|
||||
}
|
||||
|
||||
ber_str2bv( name, len, 1, &must_b64_encode[i].name );
|
||||
ber_str2bv( oid, 0, 1, &must_b64_encode[i].oid );
|
||||
|
||||
BER_BVZERO( &must_b64_encode[i + 1].name );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ldif_must_b64_encode_release( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
assert( must_b64_encode );
|
||||
|
||||
if ( must_b64_encode == default_must_b64_encode ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; !BER_BVISNULL( &must_b64_encode[i].name ); i++ ) {
|
||||
ber_memfree( must_b64_encode[i].name.bv_val );
|
||||
ber_memfree( must_b64_encode[i].oid.bv_val );
|
||||
}
|
||||
|
||||
ber_memfree( must_b64_encode );
|
||||
|
||||
must_b64_encode = default_must_b64_encode;
|
||||
}
|
||||
|
||||
/*
|
||||
* returns 1 iff the string corresponds to the name or the OID of any
|
||||
* of the attributeTypes listed in must_b64_encode
|
||||
*/
|
||||
static int
|
||||
ldif_must_b64_encode( LDAP_CONST char *s )
|
||||
{
|
||||
int i;
|
||||
struct berval bv;
|
||||
|
||||
assert( must_b64_encode );
|
||||
assert( s );
|
||||
|
||||
ber_str2bv( s, 0, 0, &bv );
|
||||
|
||||
for ( i = 0; !BER_BVISNULL( &must_b64_encode[i].name ); i++ ) {
|
||||
if ( ber_bvstrcasecmp( &must_b64_encode[i].name, &bv ) == 0
|
||||
|| ber_bvcmp( &must_b64_encode[i].oid, &bv ) == 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* compatibility with U-Mich off by one bug */
|
||||
#define LDIF_KLUDGE 1
|
||||
|
||||
|
|
@ -479,10 +606,7 @@ ldif_sput(
|
|||
&& strstr( name, ";binary" ) == NULL
|
||||
#endif
|
||||
#ifndef LDAP_PASSWD_DEBUG
|
||||
&& (namelen != (sizeof("userPassword")-1)
|
||||
|| strcasecmp( name, "userPassword" ) != 0) /* encode userPassword */
|
||||
&& (namelen != (sizeof("2.5.4.35")-1)
|
||||
|| strcasecmp( name, "2.5.4.35" ) != 0) /* encode userPassword */
|
||||
&& !ldif_must_b64_encode( name )
|
||||
#endif
|
||||
) {
|
||||
int b64 = 0;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ SLAPTOOLS=slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl
|
|||
PROGRAMS=slapd $(SLAPTOOLS)
|
||||
XPROGRAMS=sslapd libbackends.a .backend liboverlays.a
|
||||
XSRCS=version.c
|
||||
STRIP=-s
|
||||
|
||||
SUBDIRS=back-* shell-backends slapi overlays
|
||||
|
||||
|
|
@ -361,7 +362,7 @@ install-local-srv: install-slapd install-tools \
|
|||
install-slapd: FORCE
|
||||
-$(MKDIR) $(DESTDIR)$(libexecdir)
|
||||
-$(MKDIR) $(DESTDIR)$(localstatedir)/run
|
||||
$(LTINSTALL) $(INSTALLFLAGS) -s -m 755 \
|
||||
$(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \
|
||||
slapd$(EXEEXT) $(DESTDIR)$(libexecdir)
|
||||
@for i in $(SUBDIRS); do \
|
||||
if test -d $$i -a -f $$i/Makefile ; then \
|
||||
|
|
|
|||
|
|
@ -108,10 +108,7 @@ do_abandon( Operation *op, SlapReply *rs )
|
|||
int
|
||||
fe_op_abandon( Operation *op, SlapReply *rs )
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < nbackends; i++ ) {
|
||||
op->o_bd = &backends[i];
|
||||
LDAP_STAILQ_FOREACH( op->o_bd, &backendDB, be_next ) {
|
||||
if ( op->o_bd->be_abandon ) {
|
||||
(void)op->o_bd->be_abandon( op, rs );
|
||||
}
|
||||
|
|
|
|||
1164
servers/slapd/acl.c
1164
servers/slapd/acl.c
File diff suppressed because it is too large
Load diff
|
|
@ -45,7 +45,11 @@ static char *style_strings[] = {
|
|||
"one",
|
||||
"subtree",
|
||||
"children",
|
||||
"level",
|
||||
"attrof",
|
||||
"anonymous",
|
||||
"users",
|
||||
"self",
|
||||
"ip",
|
||||
"path",
|
||||
NULL
|
||||
|
|
@ -59,7 +63,6 @@ static void acl_regex_normalized_dn(const char *src, struct berval *pat);
|
|||
|
||||
#ifdef LDAP_DEBUG
|
||||
static void print_acl(Backend *be, AccessControl *a);
|
||||
static void print_access(Access *b);
|
||||
#endif
|
||||
|
||||
static int check_scope( BackendDB *be, AccessControl *a );
|
||||
|
|
@ -302,7 +305,8 @@ parse_acl(
|
|||
const char *fname,
|
||||
int lineno,
|
||||
int argc,
|
||||
char **argv )
|
||||
char **argv,
|
||||
int pos )
|
||||
{
|
||||
int i;
|
||||
char *left, *right, *style, *next;
|
||||
|
|
@ -585,14 +589,39 @@ parse_acl(
|
|||
|
||||
/* get <who> */
|
||||
for ( ; i < argc; i++ ) {
|
||||
slap_style_t sty = ACL_STYLE_REGEX;
|
||||
char *style_modifier = NULL;
|
||||
int expand = 0;
|
||||
slap_style_t sty = ACL_STYLE_REGEX;
|
||||
char *style_modifier = NULL;
|
||||
char *style_level = NULL;
|
||||
int level = 0;
|
||||
int expand = 0;
|
||||
slap_dn_access *bdn = &b->a_dn;
|
||||
int is_realdn = 0;
|
||||
|
||||
split( argv[i], '=', &left, &right );
|
||||
split( left, '.', &left, &style );
|
||||
if ( style ) {
|
||||
split( style, ',', &style, &style_modifier);
|
||||
split( style, ',', &style, &style_modifier );
|
||||
|
||||
if ( strncasecmp( style, "level", STRLENOF( "level" ) ) == 0 ) {
|
||||
split( style, '{', &style, &style_level );
|
||||
if ( style_level != NULL ) {
|
||||
char *p = strchr( style_level, '}' );
|
||||
if ( p == NULL ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: premature eol: "
|
||||
"expecting closing '}' in \"level{n}\"\n",
|
||||
fname, lineno );
|
||||
acl_usage();
|
||||
} else if ( p == style_level ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: empty level "
|
||||
"in \"level{n}\"\n",
|
||||
fname, lineno );
|
||||
acl_usage();
|
||||
}
|
||||
p[0] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( style == NULL || *style == '\0' ||
|
||||
|
|
@ -615,6 +644,21 @@ parse_acl(
|
|||
} else if ( strcasecmp( style, "children" ) == 0 ) {
|
||||
sty = ACL_STYLE_CHILDREN;
|
||||
|
||||
} else if ( strcasecmp( style, "level" ) == 0 )
|
||||
{
|
||||
char *next;
|
||||
|
||||
level = strtol( style_level, &next, 10 );
|
||||
if ( next[0] != '\0' ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: unable to parse level "
|
||||
"in \"level{n}\"\n",
|
||||
fname, lineno );
|
||||
acl_usage();
|
||||
}
|
||||
|
||||
sty = ACL_STYLE_LEVEL;
|
||||
|
||||
} else if ( strcasecmp( style, "regex" ) == 0 ) {
|
||||
sty = ACL_STYLE_REGEX;
|
||||
|
||||
|
|
@ -679,38 +723,48 @@ parse_acl(
|
|||
fname, lineno );
|
||||
}
|
||||
|
||||
if ( strcasecmp( argv[i], "*" ) == 0 ) {
|
||||
if ( strncasecmp( left, "real", STRLENOF( "real" ) ) == 0 ) {
|
||||
is_realdn = 1;
|
||||
bdn = &b->a_realdn;
|
||||
left += STRLENOF( "real" );
|
||||
}
|
||||
|
||||
if ( strcasecmp( left, "*" ) == 0 ) {
|
||||
if ( is_realdn ) {
|
||||
acl_usage();
|
||||
}
|
||||
|
||||
ber_str2bv( "*", STRLENOF( "*" ), 1, &bv );
|
||||
sty = ACL_STYLE_REGEX;
|
||||
|
||||
} else if ( strcasecmp( argv[i], "anonymous" ) == 0 ) {
|
||||
} else if ( strcasecmp( left, "anonymous" ) == 0 ) {
|
||||
ber_str2bv("anonymous", STRLENOF( "anonymous" ), 1, &bv);
|
||||
sty = ACL_STYLE_ANONYMOUS;
|
||||
|
||||
} else if ( strcasecmp( argv[i], "users" ) == 0 ) {
|
||||
} else if ( strcasecmp( left, "users" ) == 0 ) {
|
||||
ber_str2bv("users", STRLENOF( "users" ), 1, &bv);
|
||||
sty = ACL_STYLE_USERS;
|
||||
|
||||
} else if ( strcasecmp( argv[i], "self" ) == 0 ) {
|
||||
} else if ( strcasecmp( left, "self" ) == 0 ) {
|
||||
ber_str2bv("self", STRLENOF( "self" ), 1, &bv);
|
||||
sty = ACL_STYLE_SELF;
|
||||
|
||||
} else if ( strcasecmp( left, "dn" ) == 0 ) {
|
||||
if ( sty == ACL_STYLE_REGEX ) {
|
||||
b->a_dn_style = ACL_STYLE_REGEX;
|
||||
bdn->a_style = ACL_STYLE_REGEX;
|
||||
if ( right == NULL ) {
|
||||
/* no '=' */
|
||||
ber_str2bv("users",
|
||||
STRLENOF( "users" ),
|
||||
1, &bv);
|
||||
b->a_dn_style = ACL_STYLE_USERS;
|
||||
bdn->a_style = ACL_STYLE_USERS;
|
||||
|
||||
} else if (*right == '\0' ) {
|
||||
/* dn="" */
|
||||
ber_str2bv("anonymous",
|
||||
STRLENOF( "anonymous" ),
|
||||
1, &bv);
|
||||
b->a_dn_style = ACL_STYLE_ANONYMOUS;
|
||||
bdn->a_style = ACL_STYLE_ANONYMOUS;
|
||||
|
||||
} else if ( strcmp( right, "*" ) == 0 ) {
|
||||
/* dn=* */
|
||||
|
|
@ -718,7 +772,7 @@ parse_acl(
|
|||
ber_str2bv("users",
|
||||
STRLENOF( "users" ),
|
||||
1, &bv);
|
||||
b->a_dn_style = ACL_STYLE_USERS;
|
||||
bdn->a_style = ACL_STYLE_USERS;
|
||||
|
||||
} else if ( strcmp( right, ".+" ) == 0
|
||||
|| strcmp( right, "^.+" ) == 0
|
||||
|
|
@ -730,7 +784,7 @@ parse_acl(
|
|||
ber_str2bv("users",
|
||||
STRLENOF( "users" ),
|
||||
1, &bv);
|
||||
b->a_dn_style = ACL_STYLE_USERS;
|
||||
bdn->a_style = ACL_STYLE_USERS;
|
||||
|
||||
} else if ( strcmp( right, ".*" ) == 0
|
||||
|| strcmp( right, "^.*" ) == 0
|
||||
|
|
@ -766,7 +820,7 @@ parse_acl(
|
|||
}
|
||||
|
||||
if ( !BER_BVISNULL( &bv ) ) {
|
||||
if ( !BER_BVISEMPTY( &b->a_dn_pat ) ) {
|
||||
if ( !BER_BVISEMPTY( &bdn->a_pat ) ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: dn pattern already specified.\n",
|
||||
fname, lineno );
|
||||
|
|
@ -780,7 +834,7 @@ parse_acl(
|
|||
expand == 0 )
|
||||
{
|
||||
rc = dnNormalize(0, NULL, NULL,
|
||||
&bv, &b->a_dn_pat, NULL);
|
||||
&bv, &bdn->a_pat, NULL);
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: bad DN \"%s\" in by DN clause\n",
|
||||
|
|
@ -790,10 +844,34 @@ parse_acl(
|
|||
free( bv.bv_val );
|
||||
|
||||
} else {
|
||||
b->a_dn_pat = bv;
|
||||
bdn->a_pat = bv;
|
||||
}
|
||||
bdn->a_style = sty;
|
||||
bdn->a_expand = expand;
|
||||
if ( sty == ACL_STYLE_SELF ) {
|
||||
bdn->a_self_level = level;
|
||||
|
||||
} else {
|
||||
if ( level < 0 ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: bad negative level \"%d\" "
|
||||
"in by DN clause\n",
|
||||
fname, lineno, level );
|
||||
acl_usage();
|
||||
} else if ( level == 1 ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: \"onelevel\" should be used "
|
||||
"instead of \"level{1}\" in by DN clause\n",
|
||||
fname, lineno, 0 );
|
||||
} else if ( level == 0 && sty == ACL_STYLE_LEVEL ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: \"base\" should be used "
|
||||
"instead of \"level{0}\" in by DN clause\n",
|
||||
fname, lineno, 0 );
|
||||
}
|
||||
|
||||
bdn->a_level = level;
|
||||
}
|
||||
b->a_dn_style = sty;
|
||||
b->a_dn_expand = expand;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -806,14 +884,14 @@ parse_acl(
|
|||
acl_usage();
|
||||
}
|
||||
|
||||
if( b->a_dn_at != NULL ) {
|
||||
if( bdn->a_at != NULL ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: dnattr already specified.\n",
|
||||
fname, lineno );
|
||||
acl_usage();
|
||||
}
|
||||
|
||||
rc = slap_str2ad( right, &b->a_dn_at, &text );
|
||||
rc = slap_str2ad( right, &bdn->a_at, &text );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
fprintf( stderr,
|
||||
|
|
@ -823,20 +901,20 @@ parse_acl(
|
|||
}
|
||||
|
||||
|
||||
if( !is_at_syntax( b->a_dn_at->ad_type,
|
||||
if( !is_at_syntax( bdn->a_at->ad_type,
|
||||
SLAPD_DN_SYNTAX ) &&
|
||||
!is_at_syntax( b->a_dn_at->ad_type,
|
||||
!is_at_syntax( bdn->a_at->ad_type,
|
||||
SLAPD_NAMEUID_SYNTAX ))
|
||||
{
|
||||
fprintf( stderr,
|
||||
"%s: line %d: dnattr \"%s\": "
|
||||
"inappropriate syntax: %s\n",
|
||||
fname, lineno, right,
|
||||
b->a_dn_at->ad_type->sat_syntax_oid );
|
||||
bdn->a_at->ad_type->sat_syntax_oid );
|
||||
acl_usage();
|
||||
}
|
||||
|
||||
if( b->a_dn_at->ad_type->sat_equality == NULL ) {
|
||||
if( bdn->a_at->ad_type->sat_equality == NULL ) {
|
||||
fprintf( stderr,
|
||||
"%s: line %d: dnattr \"%s\": "
|
||||
"inappropriate matching (no EQUALITY)\n",
|
||||
|
|
@ -1584,9 +1662,13 @@ parse_acl(
|
|||
}
|
||||
|
||||
/* get <access> */
|
||||
if ( strncasecmp( left, "self", 4 ) == 0 ) {
|
||||
if ( strncasecmp( left, "self", STRLENOF( "self" ) ) == 0 ) {
|
||||
b->a_dn_self = 1;
|
||||
ACL_PRIV_ASSIGN( b->a_access_mask, str2accessmask( &left[4] ) );
|
||||
ACL_PRIV_ASSIGN( b->a_access_mask, str2accessmask( &left[ STRLENOF( "self" ) ] ) );
|
||||
|
||||
} else if ( strncasecmp( left, "realself", STRLENOF( "realself" ) ) == 0 ) {
|
||||
b->a_realdn_self = 1;
|
||||
ACL_PRIV_ASSIGN( b->a_access_mask, str2accessmask( &left[ STRLENOF( "realself" ) ] ) );
|
||||
|
||||
} else {
|
||||
ACL_PRIV_ASSIGN( b->a_access_mask, str2accessmask( left ) );
|
||||
|
|
@ -1690,10 +1772,10 @@ parse_acl(
|
|||
default:
|
||||
break;
|
||||
}
|
||||
acl_append( &be->be_acl, a );
|
||||
acl_append( &be->be_acl, a, pos );
|
||||
|
||||
} else {
|
||||
acl_append( &frontendDB->be_acl, a );
|
||||
acl_append( &frontendDB->be_acl, a, pos );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1734,6 +1816,12 @@ accessmask2str( slap_mask_t mask, char *buf, int debug )
|
|||
} else if ( ACL_LVL_IS_WRITE(mask) ) {
|
||||
ptr = lutil_strcopy( ptr, "write" );
|
||||
|
||||
} else if ( ACL_LVL_IS_WADD(mask) ) {
|
||||
ptr = lutil_strcopy( ptr, "add" );
|
||||
|
||||
} else if ( ACL_LVL_IS_WDEL(mask) ) {
|
||||
ptr = lutil_strcopy( ptr, "delete" );
|
||||
|
||||
} else if ( ACL_LVL_IS_MANAGE(mask) ) {
|
||||
ptr = lutil_strcopy( ptr, "manage" );
|
||||
|
||||
|
|
@ -1766,6 +1854,14 @@ accessmask2str( slap_mask_t mask, char *buf, int debug )
|
|||
if ( ACL_PRIV_ISSET(mask, ACL_PRIV_WRITE) ) {
|
||||
none = 0;
|
||||
*ptr++ = 'w';
|
||||
|
||||
} else if ( ACL_PRIV_ISSET(mask, ACL_PRIV_WADD) ) {
|
||||
none = 0;
|
||||
*ptr++ = 'a';
|
||||
|
||||
} else if ( ACL_PRIV_ISSET(mask, ACL_PRIV_WDEL) ) {
|
||||
none = 0;
|
||||
*ptr++ = 'z';
|
||||
}
|
||||
|
||||
if ( ACL_PRIV_ISSET(mask, ACL_PRIV_READ) ) {
|
||||
|
|
@ -1795,7 +1891,7 @@ accessmask2str( slap_mask_t mask, char *buf, int debug )
|
|||
|
||||
if ( none && ACL_PRIV_ISSET(mask, ACL_PRIV_NONE) ) {
|
||||
none = 0;
|
||||
*ptr++ = 'n';
|
||||
*ptr++ = '0';
|
||||
}
|
||||
|
||||
if ( none ) {
|
||||
|
|
@ -1840,6 +1936,12 @@ str2accessmask( const char *str )
|
|||
} else if( TOLOWER((unsigned char) str[i]) == 'w' ) {
|
||||
ACL_PRIV_SET(mask, ACL_PRIV_WRITE);
|
||||
|
||||
} else if( TOLOWER((unsigned char) str[i]) == 'a' ) {
|
||||
ACL_PRIV_SET(mask, ACL_PRIV_WADD);
|
||||
|
||||
} else if( TOLOWER((unsigned char) str[i]) == 'z' ) {
|
||||
ACL_PRIV_SET(mask, ACL_PRIV_WDEL);
|
||||
|
||||
} else if( TOLOWER((unsigned char) str[i]) == 'r' ) {
|
||||
ACL_PRIV_SET(mask, ACL_PRIV_READ);
|
||||
|
||||
|
|
@ -1882,6 +1984,12 @@ str2accessmask( const char *str )
|
|||
} else if ( strcasecmp( str, "read" ) == 0 ) {
|
||||
ACL_LVL_ASSIGN_READ(mask);
|
||||
|
||||
} else if ( strcasecmp( str, "add" ) == 0 ) {
|
||||
ACL_LVL_ASSIGN_WADD(mask);
|
||||
|
||||
} else if ( strcasecmp( str, "delete" ) == 0 ) {
|
||||
ACL_LVL_ASSIGN_WDEL(mask);
|
||||
|
||||
} else if ( strcasecmp( str, "write" ) == 0 ) {
|
||||
ACL_LVL_ASSIGN_WRITE(mask);
|
||||
|
||||
|
|
@ -1905,13 +2013,18 @@ acl_usage( void )
|
|||
"<attrlist> ::= <attr> [val[.<attrstyle>]=<value>] | <attr> , <attrlist>\n"
|
||||
"<attr> ::= <attrname> | entry | children\n",
|
||||
"<who> ::= [ * | anonymous | users | self | dn[.<dnstyle>]=<DN> ]\n"
|
||||
"\t[ realanonymous | realusers | realself | realdn[.<dnstyle>]=<DN> ]\n"
|
||||
"\t[dnattr=<attrname>]\n"
|
||||
"\t[realdnattr=<attrname>]\n"
|
||||
"\t[group[/<objectclass>[/<attrname>]][.<style>]=<group>]\n"
|
||||
"\t[peername[.<peernamestyle>]=<peer>] [sockname[.<style>]=<name>]\n"
|
||||
"\t[domain[.<domainstyle>]=<domain>] [sockurl[.<style>]=<url>]\n"
|
||||
#ifdef SLAPD_ACI_ENABLED
|
||||
"\t[aci=<attrname>]\n"
|
||||
"\t[aci=[<attrname>]]\n"
|
||||
#endif
|
||||
#ifdef SLAP_DYNACL
|
||||
"\t[dynacl/<name>[.<dynstyle>][=<pattern>]]\n"
|
||||
#endif /* SLAP_DYNACL */
|
||||
"\t[ssf=<n>] [transport_ssf=<n>] [tls_ssf=<n>] [sasl_ssf=<n>]\n",
|
||||
"<style> ::= exact | regex | base(Object)\n"
|
||||
"<dnstyle> ::= base(Object) | one(level) | sub(tree) | children | "
|
||||
|
|
@ -1920,9 +2033,9 @@ acl_usage( void )
|
|||
"sub(tree) | children\n"
|
||||
"<peernamestyle> ::= exact | regex | ip | path\n"
|
||||
"<domainstyle> ::= exact | regex | base(Object) | sub(tree)\n"
|
||||
"<access> ::= [self]{<level>|<priv>}\n"
|
||||
"<level> ::= none|disclose|auth|compare|search|read|write|manage\n"
|
||||
"<priv> ::= {=|+|-}{0|d|x|c|s|r|w|m}+\n"
|
||||
"<access> ::= [[real]self]{<level>|<priv>}\n"
|
||||
"<level> ::= none|disclose|auth|compare|search|read|{write|add|delete}|manage\n"
|
||||
"<priv> ::= {=|+|-}{0|d|x|c|s|r|{w|a|z}|m}+\n"
|
||||
"<control> ::= [ stop | continue | break ]\n"
|
||||
);
|
||||
exit( EXIT_FAILURE );
|
||||
|
|
@ -1999,12 +2112,15 @@ access_append( Access **l, Access *a )
|
|||
}
|
||||
|
||||
void
|
||||
acl_append( AccessControl **l, AccessControl *a )
|
||||
acl_append( AccessControl **l, AccessControl *a, int pos )
|
||||
{
|
||||
for ( ; *l != NULL; l = &(*l)->acl_next ) {
|
||||
int i;
|
||||
|
||||
for (i=0 ; i != pos && *l != NULL; l = &(*l)->acl_next, i++ ) {
|
||||
; /* Empty */
|
||||
}
|
||||
|
||||
if ( *l && a )
|
||||
a->acl_next = *l;
|
||||
*l = a;
|
||||
}
|
||||
|
||||
|
|
@ -2014,6 +2130,9 @@ access_free( Access *a )
|
|||
if ( !BER_BVISNULL( &a->a_dn_pat ) ) {
|
||||
free( a->a_dn_pat.bv_val );
|
||||
}
|
||||
if ( !BER_BVISNULL( &a->a_realdn_pat ) ) {
|
||||
free( a->a_realdn_pat.bv_val );
|
||||
}
|
||||
if ( !BER_BVISNULL( &a->a_peername_pat ) ) {
|
||||
free( a->a_peername_pat.bv_val );
|
||||
}
|
||||
|
|
@ -2102,6 +2221,12 @@ access2str( slap_access_t access )
|
|||
} else if ( access == ACL_WRITE ) {
|
||||
return "write";
|
||||
|
||||
} else if ( access == ACL_WADD ) {
|
||||
return "add";
|
||||
|
||||
} else if ( access == ACL_WDEL ) {
|
||||
return "delete";
|
||||
|
||||
} else if ( access == ACL_MANAGE ) {
|
||||
return "manage";
|
||||
|
||||
|
|
@ -2117,6 +2242,10 @@ str2access( const char *str )
|
|||
return ACL_NONE;
|
||||
|
||||
} else if ( strcasecmp( str, "disclose" ) == 0 ) {
|
||||
#ifndef SLAP_ACL_HONOR_DISCLOSE
|
||||
fprintf( stderr, "str2access: warning, "
|
||||
"\"disclose\" privilege disabled.\n" );
|
||||
#endif /* SLAP_ACL_HONOR_DISCLOSE */
|
||||
return ACL_DISCLOSE;
|
||||
|
||||
} else if ( strcasecmp( str, "auth" ) == 0 ) {
|
||||
|
|
@ -2134,6 +2263,12 @@ str2access( const char *str )
|
|||
} else if ( strcasecmp( str, "write" ) == 0 ) {
|
||||
return ACL_WRITE;
|
||||
|
||||
} else if ( strcasecmp( str, "add" ) == 0 ) {
|
||||
return ACL_WADD;
|
||||
|
||||
} else if ( strcasecmp( str, "delete" ) == 0 ) {
|
||||
return ACL_WDEL;
|
||||
|
||||
} else if ( strcasecmp( str, "manage" ) == 0 ) {
|
||||
return ACL_MANAGE;
|
||||
}
|
||||
|
|
@ -2145,6 +2280,52 @@ str2access( const char *str )
|
|||
|
||||
static char aclbuf[ACLBUF_MAXLEN];
|
||||
|
||||
static char *
|
||||
dnaccess2text( slap_dn_access *bdn, char *ptr, int is_realdn )
|
||||
{
|
||||
*ptr++ = ' ';
|
||||
|
||||
if ( is_realdn ) {
|
||||
ptr = lutil_strcopy( ptr, "real" );
|
||||
}
|
||||
|
||||
if ( ber_bvccmp( &bdn->a_pat, '*' ) ||
|
||||
bdn->a_style == ACL_STYLE_ANONYMOUS ||
|
||||
bdn->a_style == ACL_STYLE_USERS ||
|
||||
bdn->a_style == ACL_STYLE_SELF )
|
||||
{
|
||||
if ( is_realdn ) {
|
||||
assert( ! ber_bvccmp( &bdn->a_pat, '*' ) );
|
||||
}
|
||||
|
||||
ptr = lutil_strcopy( ptr, bdn->a_pat.bv_val );
|
||||
if ( bdn->a_style == ACL_STYLE_SELF && bdn->a_self_level != 0 ) {
|
||||
int n = sprintf( ptr, ".level{%d}", bdn->a_self_level );
|
||||
if ( n > 0 ) {
|
||||
ptr += n;
|
||||
} /* else ? */
|
||||
}
|
||||
|
||||
} else {
|
||||
ptr = lutil_strcopy( ptr, "dn." );
|
||||
ptr = lutil_strcopy( ptr, style_strings[bdn->a_style] );
|
||||
if ( bdn->a_style == ACL_STYLE_LEVEL ) {
|
||||
int n = sprintf( ptr, "{%d}", bdn->a_level );
|
||||
if ( n > 0 ) {
|
||||
ptr += n;
|
||||
} /* else ? */
|
||||
}
|
||||
if ( bdn->a_expand ) {
|
||||
ptr = lutil_strcopy( ptr, ",expand" );
|
||||
}
|
||||
*ptr++ = '=';
|
||||
*ptr++ = '"';
|
||||
ptr = lutil_strcopy( ptr, bdn->a_pat.bv_val );
|
||||
*ptr++ = '"';
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
||||
static char *
|
||||
access2text( Access *b, char *ptr )
|
||||
{
|
||||
|
|
@ -2153,29 +2334,21 @@ access2text( Access *b, char *ptr )
|
|||
ptr = lutil_strcopy( ptr, "\tby" );
|
||||
|
||||
if ( !BER_BVISEMPTY( &b->a_dn_pat ) ) {
|
||||
*ptr++ = ' ';
|
||||
if ( ber_bvccmp( &b->a_dn_pat, '*' ) ||
|
||||
b->a_dn_style == ACL_STYLE_ANONYMOUS ||
|
||||
b->a_dn_style == ACL_STYLE_USERS ||
|
||||
b->a_dn_style == ACL_STYLE_SELF )
|
||||
{
|
||||
ptr = lutil_strcopy( ptr, b->a_dn_pat.bv_val );
|
||||
|
||||
} else {
|
||||
ptr = lutil_strcopy( ptr, "dn." );
|
||||
ptr = lutil_strcopy( ptr, style_strings[b->a_dn_style] );
|
||||
*ptr++ = '=';
|
||||
*ptr++ = '"';
|
||||
ptr = lutil_strcopy( ptr, b->a_dn_pat.bv_val );
|
||||
*ptr++ = '"';
|
||||
}
|
||||
ptr = dnaccess2text( &b->a_dn, ptr, 0 );
|
||||
}
|
||||
|
||||
if ( b->a_dn_at != NULL ) {
|
||||
if ( b->a_dn_at ) {
|
||||
ptr = lutil_strcopy( ptr, " dnattr=" );
|
||||
ptr = lutil_strcopy( ptr, b->a_dn_at->ad_cname.bv_val );
|
||||
}
|
||||
|
||||
if ( !BER_BVISEMPTY( &b->a_realdn_pat ) ) {
|
||||
ptr = dnaccess2text( &b->a_realdn, ptr, 1 );
|
||||
}
|
||||
if ( b->a_realdn_at ) {
|
||||
ptr = lutil_strcopy( ptr, " realdnattr=" );
|
||||
ptr = lutil_strcopy( ptr, b->a_realdn_at->ad_cname.bv_val );
|
||||
}
|
||||
|
||||
if ( !BER_BVISEMPTY( &b->a_group_pat ) ) {
|
||||
ptr = lutil_strcopy( ptr, " group/" );
|
||||
ptr = lutil_strcopy( ptr, b->a_group_oc ?
|
||||
|
|
@ -2261,7 +2434,11 @@ access2text( Access *b, char *ptr )
|
|||
}
|
||||
|
||||
*ptr++ = ' ';
|
||||
if ( b->a_dn_self ) ptr = lutil_strcopy( ptr, "self" );
|
||||
if ( b->a_dn_self ) {
|
||||
ptr = lutil_strcopy( ptr, "self" );
|
||||
} else if ( b->a_realdn_self ) {
|
||||
ptr = lutil_strcopy( ptr, "realself" );
|
||||
}
|
||||
ptr = lutil_strcopy( ptr, accessmask2str( b->a_access_mask, maskbuf, 0 ));
|
||||
if ( !maskbuf[0] ) ptr--;
|
||||
|
||||
|
|
@ -2284,10 +2461,9 @@ access2text( Access *b, char *ptr )
|
|||
void
|
||||
acl_unparse( AccessControl *a, struct berval *bv )
|
||||
{
|
||||
Access *b;
|
||||
char *ptr;
|
||||
int to = 0;
|
||||
struct berval abv;
|
||||
Access *b;
|
||||
char *ptr;
|
||||
int to = 0;
|
||||
|
||||
bv->bv_val = aclbuf;
|
||||
bv->bv_len = 0;
|
||||
|
|
@ -2364,8 +2540,6 @@ acl_unparse( AccessControl *a, struct berval *bv )
|
|||
static void
|
||||
print_acl( Backend *be, AccessControl *a )
|
||||
{
|
||||
int to = 0;
|
||||
Access *b;
|
||||
struct berval bv;
|
||||
|
||||
acl_unparse( a, &bv );
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue