mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 23:29:34 -05:00
ITS#10188 autogroup: allow groups to be members of other groups
But doesn't support recursion - modifications on one autogroup will not trigger further updates on other autogroups that reference it.
This commit is contained in:
parent
cb399d6379
commit
e62c5d80b1
2 changed files with 8 additions and 7 deletions
|
|
@ -802,7 +802,7 @@ autogroup_add_entry_cb( Operation *op, SlapReply *rs )
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
op->o_bd->bd_info = (BackendInfo *)on;
|
op->o_bd->bd_info = (BackendInfo *)on;
|
||||||
if ( !aa->agd ) {
|
{
|
||||||
autogroup_entry_t *age;
|
autogroup_entry_t *age;
|
||||||
autogroup_filter_t *agf;
|
autogroup_filter_t *agf;
|
||||||
struct berval odn, ondn;
|
struct berval odn, ondn;
|
||||||
|
|
@ -1211,17 +1211,15 @@ autogroup_response( Operation *op, SlapReply *rs )
|
||||||
for ( age = agi->agi_entry ; age ; age = age->age_next ) {
|
for ( age = agi->agi_entry ; age ; age = age->age_next ) {
|
||||||
if ( dn_match( &age->age_ndn, &op->o_req_ndn )) {
|
if ( dn_match( &age->age_ndn, &op->o_req_ndn )) {
|
||||||
Debug( LDAP_DEBUG_TRACE, "autogroup_response MODRDN updating group's DN to <%s>\n", op->orr_newDN.bv_val );
|
Debug( LDAP_DEBUG_TRACE, "autogroup_response MODRDN updating group's DN to <%s>\n", op->orr_newDN.bv_val );
|
||||||
ber_dupbv( &age->age_dn, &op->orr_newDN );
|
ber_bvreplace( &age->age_dn, &op->orr_newDN );
|
||||||
ber_dupbv( &age->age_ndn, &op->orr_nnewDN );
|
ber_bvreplace( &age->age_ndn, &op->orr_nnewDN );
|
||||||
|
goto break1;
|
||||||
overlay_entry_release_ov( op, e, 0, on );
|
|
||||||
ldap_pvt_thread_mutex_unlock( &agi->agi_mutex );
|
|
||||||
return SLAP_CB_CONTINUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break1:
|
||||||
|
|
||||||
/* For each group:
|
/* For each group:
|
||||||
1. check if the original entry's DN is in the group.
|
1. check if the original entry's DN is in the group.
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ tested for compliance with the filters, and its membership is accordingly
|
||||||
updated. For searches and compares, it behaves like a static group.
|
updated. For searches and compares, it behaves like a static group.
|
||||||
If the attribute part of the URI is filled, the group entry is populated by
|
If the attribute part of the URI is filled, the group entry is populated by
|
||||||
the values of this attribute in the entries resulting from the search.
|
the values of this attribute in the entries resulting from the search.
|
||||||
|
|
||||||
|
Note that filters that use attributes that are themselves dynamically
|
||||||
|
computed may not work consistently, and should be avoided.
|
||||||
.SH CONFIGURATION
|
.SH CONFIGURATION
|
||||||
Either
|
Either
|
||||||
.BR \FCslapd.conf\FT (5)
|
.BR \FCslapd.conf\FT (5)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue