fix dynacl compile

This commit is contained in:
Pierangelo Masarati 2004-11-26 00:34:48 +00:00
parent 90cc409325
commit e891dbcdc4
3 changed files with 23 additions and 30 deletions

View File

@ -2845,28 +2845,11 @@ static slap_dynacl_t dynacl_aci = {
NULL
};
#endif /* SLAP_DYNACL */
#endif /* SLAPD_ACI_ENABLED */
int
aci_init( void )
{
slap_dynacl_t *known_dynacl[] = {
#ifdef SLAPD_ACI_ENABLED
&dynacl_aci,
#endif /* SLAPD_ACI_ENABLED */
NULL
};
int i, rc;
for ( i = 0; known_dynacl[ i ]; i++ ) {
rc = slap_dynacl_register( known_dynacl[ i ] );
if ( rc ) {
return rc;
}
}
return 0;
}
#ifdef SLAP_DYNACL
/*
* dynamic ACL infrastructure
@ -2926,23 +2909,26 @@ slap_dynacl_get( const char *name )
int
acl_init( void )
{
int i, rc;
#ifdef SLAP_DYNACL
int rc;
da_list = NULL;
slap_dynacl_t *known_dynacl[] = {
#ifdef SLAPD_ACI_ENABLED
rc = aci_init();
if ( rc ) {
return rc;
&dynacl_aci,
#endif /* SLAPD_ACI_ENABLED */
NULL
};
for ( i = 0; known_dynacl[ i ]; i++ ) {
rc = slap_dynacl_register( known_dynacl[ i ] );
if ( rc ) {
return rc;
}
}
#endif /* SLAPD_ACI_ENABLED */
#endif /* SLAP_DYNACL */
return 0;
}
static int
string_expand(
struct berval *bv,

View File

@ -46,6 +46,12 @@ LDAP_SLAPD_F (int) acl_check_modlist LDAP_P((
LDAP_SLAPD_F (void) acl_append( AccessControl **l, AccessControl *a );
#ifdef SLAP_DYNACL
LDAP_SLAPD_F (int) slap_dynacl_register LDAP_P(( slap_dynacl_t *da ));
LDAP_SLAPD_F (slap_dynacl_t *) slap_dynacl_get LDAP_P(( const char *name ));
#endif /* SLAP_DYNACL */
LDAP_SLAPD_F (int) acl_init LDAP_P(( void ));
/*
* aclparse.c
*/
@ -62,6 +68,7 @@ LDAP_SLAPD_F (slap_mask_t) str2accessmask LDAP_P(( const char *str ));
LDAP_SLAPD_F (void) acl_destroy LDAP_P(( AccessControl*, AccessControl* ));
LDAP_SLAPD_F (void) acl_free LDAP_P(( AccessControl *a ));
/*
* ad.c
*/

View File

@ -1157,7 +1157,7 @@ typedef struct slap_authz_info {
} AuthorizationInformation;
#if 0 /* LDAP_DEVEL */
#ifdef LDAP_DEVEL
#define SLAP_DYNACL
#endif /* LDAP_DEVEL */