mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05:00
Do not attempt to map positive error codes returned by plugins to
negative error codes. Plugins should never return positive error codes except in the case of bind pre-operation plugins, where they should return SLAPI_BIND_XXX. This should fix ITS #2616 ...
This commit is contained in:
parent
2f5fbeb180
commit
281627d81d
2 changed files with 6 additions and 3 deletions
|
|
@ -637,8 +637,11 @@ doPluginFNs(
|
|||
* failure (confirmed with SLAPI specification).
|
||||
*/
|
||||
if ( !SLAPI_PLUGIN_IS_POST_FN( funcType ) && rc != 0 ) {
|
||||
/* make sure errors are negative */
|
||||
if ( rc > 0 ) rc = 0 - rc;
|
||||
/*
|
||||
* Plugins generally return negative error codes
|
||||
* to indicate failure, although in the case of
|
||||
* bind plugins they may return SLAPI_BIND_xxx
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ int slapi_x_clear_object_extensions(int objecttype, void *object)
|
|||
}
|
||||
|
||||
for ( i = 0; i < registered_extensions.extensions[objecttype].count; i++ ) {
|
||||
newExtension( eblock, objecttype, object, parent, i );
|
||||
newExtension( eblock, objecttype, object, parent, i );
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue