| |
@@ -2342,36 +2342,16 @@
|
| |
{
|
| |
struct plugin_state *state;
|
| |
|
| |
+ if (backend_shr_write_ignore(pb)) {
|
| |
+ #if DEBUG_MAP_LOCK
|
| |
+ slapi_log_error(SLAPI_LOG_FATAL, "schemacompat",
|
| |
+ "backend_betxn_pre_write_cb: (%p) operation is not impacting schema compat\n", PR_MyThreadId(), 1);
|
| |
+ #endif
|
| |
+ return 0;
|
| |
+ }
|
| |
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &state);
|
| |
return state->use_be_txns ? backend_write_cb(pb, state) : 0;
|
| |
}
|
| |
- static PRBool
|
| |
- backend_be_write_ignore(Slapi_PBlock *pb)
|
| |
- {
|
| |
- char *dn = NULL;
|
| |
- Slapi_DN *target_sdn = NULL;
|
| |
- int check;
|
| |
- int i = 0;
|
| |
- PRBool ignore = PR_FALSE;
|
| |
-
|
| |
- /* Check if the target DN is a subordinates of
|
| |
- * on of the ignored containers
|
| |
- */
|
| |
- slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET, &dn);
|
| |
- target_sdn = slapi_sdn_new_dn_byval(dn);
|
| |
-
|
| |
- for (i = 0; ignored_containers_sdn[i]; i++) {
|
| |
- check = slapi_sdn_issuffix(target_sdn, ignored_containers_sdn[i]);
|
| |
- if (check != 0) {
|
| |
- /* This entry is an ignored container */
|
| |
- ignore = PR_TRUE;
|
| |
- break;
|
| |
- }
|
| |
- }
|
| |
- slapi_sdn_free(&target_sdn);
|
| |
- return ignore;
|
| |
- }
|
| |
-
|
| |
|
| |
static int
|
| |
backend_be_pre_write_cb(Slapi_PBlock *pb) {
|
| |
@@ -2392,7 +2372,7 @@
|
| |
if (rw_monitor_enabled() == MAP_MONITOR_DISABLED) {
|
| |
return 0;
|
| |
}
|
| |
- if (backend_be_write_ignore(pb)) {
|
| |
+ if (backend_shr_write_ignore(pb)) {
|
| |
#if DEBUG_MAP_LOCK
|
| |
slapi_log_error(SLAPI_LOG_FATAL, "schemacompat",
|
| |
"backend_be_pre_write_cb: (%p) operation is not impacting schema compat\n", PR_MyThreadId(), 1);
|
| |
@@ -2484,7 +2464,7 @@
|
| |
if (rw_monitor_enabled() == MAP_MONITOR_DISABLED) {
|
| |
return 0;
|
| |
}
|
| |
- if (backend_be_write_ignore(pb)) {
|
| |
+ if (backend_shr_write_ignore(pb)) {
|
| |
#if DEBUG_MAP_LOCK
|
| |
slapi_log_error(SLAPI_LOG_FATAL, "schemacompat",
|
| |
"backend_be_post_write_cb: (%p) operation was not impacting schema compat\n", PR_MyThreadId(), 1);
|
| |
Bug Description:
Note: same description as original fix for 1751295
Fix Description:
All slapi-nis plugin callbacks (be_pre/post and betxn_pre/post) should ignore
updates on suffixes like cn=changelog, cn=config and cn=schema.
Up to now, only be_pre/post checked if the update can be ignored.
https://bugzilla.redhat.com/show_bug.cgi?id=1751295