From: Luke Howard Date: Thu, 3 Jul 2003 23:17:54 +0000 (+0000) Subject: Always call modification postoperation plugins even if a X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~835 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d29ed4407c10e9b65b251a7073e42e4e782adef8;p=openldap Always call modification postoperation plugins even if a preoperation plugin has removed all modifications and thus there are none to pass to the backend. Accept SSF as a valid parameter block value. Fix completely broken slapi_access_allowed() --- diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 0ca45624ca..589c4c4194 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -374,12 +374,14 @@ do_modify( * attribute types were included in the modification request, * then slapi_x_ldapmods2modifications() above will return * NULL). + * + * However, the post-operation plugin should still be + * called. */ if ( modlist == NULL ) { rs->sr_err = LDAP_SUCCESS; send_ldap_result( op, rs ); - goto cleanup; - } + } else { #endif /* defined( LDAP_SLAPI ) */ /* @@ -478,6 +480,8 @@ do_modify( } #if defined( LDAP_SLAPI ) + } /* modlist != NULL */ + if ( doPluginFNs( op->o_bd, SLAPI_PLUGIN_POST_MODIFY_FN, pb ) < 0 ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, INFO, "do_modify: modify postoperation plugins " diff --git a/servers/slapd/slapi/slapi_pblock.c b/servers/slapd/slapi/slapi_pblock.c index 5ddd3fb8d8..dc0897d146 100644 --- a/servers/slapd/slapi/slapi_pblock.c +++ b/servers/slapd/slapi/slapi_pblock.c @@ -44,6 +44,7 @@ isOkNetscapeParam( int param ) case SLAPI_X_CONN_IS_UDP: case SLAPI_X_CONN_CLIENTPATH: case SLAPI_X_CONN_SERVERPATH: + case SLAPI_X_CONN_SSF: case SLAPI_IBM_CONN_DN_ALT: case SLAPI_IBM_CONN_DN_ORIG: case SLAPI_IBM_GSSAPI_CONTEXT: diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 4b61808a7c..a8230f0b82 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -3085,14 +3085,14 @@ void slapi_valueset_set_valueset(Slapi_ValueSet *vs1, const Slapi_ValueSet *vs2) int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr, struct berval *val, int access ) { -#ifdef LDAPI_SLAPI +#ifdef LDAP_SLAPI Backend *be; Connection *conn; Operation *op; int ret; slap_access_t slap_access; AttributeDescription *ad = NULL; - char *text; + const char *text; ret = slap_str2ad( attr, &ad, &text ); if ( ret != LDAP_SUCCESS ) { @@ -3132,7 +3132,7 @@ int slapi_access_allowed( Slapi_PBlock *pb, Slapi_Entry *e, char *attr, return LDAP_PARAM_ERROR; } - ret = access_allowed( be, conn, op, e, desc, val, slap_access, NULL ); + ret = access_allowed( op, e, ad, val, slap_access, NULL ); return ret ? LDAP_SUCCESS : LDAP_INSUFFICIENT_ACCESS; #else