andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0027-Issue-4734-import-of-entry-with-no-parent-warning-47.patch

5d81fc
From a2a51130b2f95316237b85da099a8be734969e54 Mon Sep 17 00:00:00 2001
5d81fc
From: James Chapman <jachapma@redhat.com>
5d81fc
Date: Sat, 24 Apr 2021 21:37:54 +0100
5d81fc
Subject: [PATCH] Issue 4734 - import of entry with no parent warning (#4735)
5d81fc
5d81fc
Description:    Online import of ldif file that contains an entry with
5d81fc
                no parent doesnt generate a task warning.
5d81fc
5d81fc
Fixes:          https://github.com/389ds/389-ds-base/issues/4734
5d81fc
5d81fc
Author: vashirov@redhat.com (Thanks)
5d81fc
5d81fc
Reviewed by: mreynolds, jchapma
5d81fc
---
5d81fc
 ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c | 6 ++++++
5d81fc
 1 file changed, 6 insertions(+)
5d81fc
5d81fc
diff --git a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c
5d81fc
index 905a84e74..35183ed59 100644
5d81fc
--- a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c
5d81fc
+++ b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c
5d81fc
@@ -2767,8 +2767,14 @@ import_foreman(void *param)
5d81fc
         if (job->flags & FLAG_ABORT) {
5d81fc
             goto error;
5d81fc
         }
5d81fc
+
5d81fc
+        /* capture skipped entry warnings for this task */
5d81fc
+        if((job) && (job->skipped)) {
5d81fc
+            slapi_task_set_warning(job->task, WARN_SKIPPED_IMPORT_ENTRY);
5d81fc
+        }
5d81fc
     }
5d81fc
 
5d81fc
+
5d81fc
     slapi_pblock_destroy(pb);
5d81fc
     info->state = FINISHED;
5d81fc
     return;
5d81fc
-- 
5d81fc
2.31.1
5d81fc