فهرست منبع

Ticket #47919 - ldbm_back_modify SLAPI_PLUGIN_BE_PRE_MODIFY_FN does not return even if one of the preop plugins fails.

Bug Description: In ldbm_back_modify, if one of the be_preop plugins
called at SLAPI_PLUGIN_BE_PRE_MODIFY_FN fail, ldbm_back_modify does
not return there but go to the real modify operation.

Fix Description: If an error is returned from be_preop plugins in
ldbm_back_modify, it returns the error there and does not proceed
the modify operation.

https://fedorahosted.org/389/ticket/47919

Reviewed by [email protected] (Thank you, Mark!!)
Noriko Hosoi 11 سال پیش
والد
کامیت
cb173814ec
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      ldap/servers/slapd/back-ldbm/ldbm_modify.c

+ 2 - 2
ldap/servers/slapd/back-ldbm/ldbm_modify.c

@@ -641,11 +641,11 @@ ldbm_back_modify( Slapi_PBlock *pb )
 				if (SLAPI_PLUGIN_NOOP == opreturn) {
 				if (SLAPI_PLUGIN_NOOP == opreturn) {
 					not_an_error = 1;
 					not_an_error = 1;
 					rc = opreturn = LDAP_SUCCESS;
 					rc = opreturn = LDAP_SUCCESS;
-					goto error_return;
 				} else if (!opreturn) {
 				} else if (!opreturn) {
-					opreturn = -1;
+					opreturn = SLAPI_PLUGIN_FAILURE;
 					slapi_pblock_set(pb, SLAPI_PLUGIN_OPRETURN, &opreturn);
 					slapi_pblock_set(pb, SLAPI_PLUGIN_OPRETURN, &opreturn);
 				}
 				}
+				goto error_return;
 			}
 			}
 			/* The Plugin may have messed about with some of the PBlock parameters... ie. mods */
 			/* The Plugin may have messed about with some of the PBlock parameters... ie. mods */
 			slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
 			slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );