Commit d29ed440 authored by Luke Howard's avatar Luke Howard
Browse files

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()
parent c9e134f0
......@@ -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 "
......
......@@ -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:
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment