diff options
Diffstat (limited to 'ldap/servers/slapd/back-ldbm/import.c')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/import.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c index 0c643721..0b7684a4 100644 --- a/ldap/servers/slapd/back-ldbm/import.c +++ b/ldap/servers/slapd/back-ldbm/import.c @@ -137,7 +137,7 @@ static void import_fifo_destroy(ImportJob *job) /********** logging stuff **********/ -#define LOG_BUFFER 256 +#define LOG_BUFFER 512 /* this changes the 'nsTaskStatus' value, which is transient (anything logged * here wipes out any previous status) @@ -262,11 +262,25 @@ static int import_attr_callback(void *node, void *param) * attribute type. (except entrydn -- taken care below) */ int rc = 0; Slapi_Attr attr = {0}; - slapi_attr_init(&attr, a->ai_type); - rc = slapi_attr_is_dn_syntax_attr(&attr); - attr_done(&attr); - if (0 == rc) { - return 0; + + /* + * Treat cn and ou specially. Bring up the import workers for + * cn and ou even though they are not DN syntax attribute. + * This is done because they have some exceptional case to store + * DN format in the admin entries such as UserPreferences. + */ + if ((0 == PL_strcasecmp("cn", a->ai_type)) || + (0 == PL_strcasecmp("commonname", a->ai_type)) || + (0 == PL_strcasecmp("ou", a->ai_type)) || + (0 == PL_strcasecmp("organizationalUnit", a->ai_type))) { + ; + } else { + slapi_attr_init(&attr, a->ai_type); + rc = slapi_attr_is_dn_syntax_attr(&attr); + attr_done(&attr); + if (0 == rc) { + return 0; + } } } @@ -1334,6 +1348,11 @@ int import_main_offline(void *arg) if (!entryrdn_get_noancestorid()) { /* And the ancestorid index */ + /* Creating ancestorid from the scratch; delete the index file first. */ + struct attrinfo *ai = NULL; + ainfo_get(be, "ancestorid", &ai); + dblayer_erase_index_file(be, ai, 0); + if ((ret = ldbm_ancestorid_create_index(be)) != 0) { import_log_notice(job, "Failed to create ancestorid index"); goto error; |