Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 276451 Details for
Bug 231093
db2bak: crash bug
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
revised ldbm_config.c
ldbm_config.c.diff (text/plain), 6.48 KB, created by
Noriko Hosoi
on 2007-12-04 00:49:23 UTC
(
hide
)
Description:
revised ldbm_config.c
Filename:
MIME Type:
Creator:
Noriko Hosoi
Created:
2007-12-04 00:49:23 UTC
Size:
6.48 KB
patch
obsolete
>Index: ldbm_config.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.c,v >retrieving revision 1.13 >diff -t -w -U4 -r1.13 ldbm_config.c >--- ldbm_config.c 28 Nov 2007 19:03:42 -0000 1.13 >+++ ldbm_config.c 4 Dec 2007 00:47:59 -0000 >@@ -242,9 +242,17 @@ > li->li_new_directory = rel2abspath(val); /* normalize the path; > strdup'ed in rel2abspath */ > LDAPDebug(LDAP_DEBUG_ANY, "New db directory location will not take affect until the server is restarted\n", 0, 0, 0); > } else { >- if (!strcmp(val, "get default")) { >+ slapi_ch_free((void **) &(li->li_new_directory)); >+ slapi_ch_free((void **) &(li->li_directory)); >+ if (NULL == val || '\0' == *val) { >+ LDAPDebug(LDAP_DEBUG_ANY, >+ "ERROR: db directory is not set; check %s in the db config: %s\n", >+ CONFIG_DIRECTORY, CONFIG_LDBM_DN, 0); >+ retval = LDAP_PARAM_ERROR; >+ } else { >+ if (0 == strcmp(val, "get default")) { > /* We use this funky "get default" string for the caller to > * tell us that it has no idea what the db directory should > * be. This code figures it out be reading "cn=config,cn=ldbm > * database,cn=plugins,cn=config" entry. */ >@@ -265,26 +273,27 @@ > if (res != LDAP_SUCCESS) { > LDAPDebug(LDAP_DEBUG_ANY, > "ERROR: ldbm plugin unable to read %s\n", > CONFIG_LDBM_DN, 0, 0); >+ retval = res; > goto done; > } > > slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries); > if (NULL == entries) { > LDAPDebug(LDAP_DEBUG_ANY, > "ERROR: ldbm plugin unable to read %s\n", > CONFIG_LDBM_DN, 0, 0); >- res = LDAP_OPERATIONS_ERROR; >+ retval = LDAP_OPERATIONS_ERROR; > goto done; > } > > res = slapi_entry_attr_find(entries[0], "nsslapd-directory", &attr); > if (res != 0 || attr == NULL) { > LDAPDebug(LDAP_DEBUG_ANY, > "ERROR: ldbm plugin unable to read attribute nsslapd-directory from %s\n", > CONFIG_LDBM_DN, 0, 0); >- res = LDAP_OPERATIONS_ERROR; >+ retval = LDAP_OPERATIONS_ERROR; > goto done; > } > > if ( slapi_attr_first_value(attr,&v) != 0 >@@ -292,27 +301,29 @@ > || ( NULL == ( s = slapi_value_get_string( v )))) { > LDAPDebug(LDAP_DEBUG_ANY, > "ERROR: ldbm plugin unable to read attribute nsslapd-directory from %s\n", > CONFIG_LDBM_DN, 0, 0); >- res = LDAP_OPERATIONS_ERROR; >+ retval = LDAP_OPERATIONS_ERROR; > goto done; > } >- >-done: > slapi_pblock_destroy(search_pb); >- if (res != LDAP_SUCCESS) { >- return res; >+ if (NULL == s || '\0' == s || 0 == PL_strcmp(s, "(null)")) { >+ LDAPDebug(LDAP_DEBUG_ANY, >+ "ERROR: db directory is not set; check %s in the db config: %s\n", >+ CONFIG_DIRECTORY, CONFIG_LDBM_DN, 0); >+ retval = LDAP_PARAM_ERROR; >+ goto done; > } > PR_snprintf(tmpbuf, BUFSIZ, "%s", s); > val = tmpbuf; > } >- slapi_ch_free((void **) &(li->li_new_directory)); >- slapi_ch_free((void **) &(li->li_directory)); > li->li_new_directory = rel2abspath(val); /* normalize the path; >- strdup'ed in rel2abspath */ >+ strdup'ed in >+ rel2abspath */ > li->li_directory = rel2abspath(val); /* ditto */ > } >- >+ } >+done: > return retval; > } > > static void *ldbm_config_dbcachesize_get(void *arg) >@@ -1192,9 +1203,9 @@ > static config_info ldbm_config[] = { > {CONFIG_LOOKTHROUGHLIMIT, CONFIG_TYPE_INT, "5000", &ldbm_config_lookthroughlimit_get, &ldbm_config_lookthroughlimit_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE}, > {CONFIG_MODE, CONFIG_TYPE_INT_OCTAL, "0600", &ldbm_config_mode_get, &ldbm_config_mode_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE}, > {CONFIG_IDLISTSCANLIMIT, CONFIG_TYPE_INT, "4000", &ldbm_config_allidsthreshold_get, &ldbm_config_allidsthreshold_set, CONFIG_FLAG_ALWAYS_SHOW}, >- {CONFIG_DIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_directory_get, &ldbm_config_directory_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE}, >+ {CONFIG_DIRECTORY, CONFIG_TYPE_STRING, "", &ldbm_config_directory_get, &ldbm_config_directory_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE|CONFIG_FLAG_SKIP_DEFAULT_SETTING}, > {CONFIG_DBCACHESIZE, CONFIG_TYPE_SIZE_T, "10000000", &ldbm_config_dbcachesize_get, &ldbm_config_dbcachesize_set, CONFIG_FLAG_ALWAYS_SHOW|CONFIG_FLAG_ALLOW_RUNNING_CHANGE}, > {CONFIG_DBNCACHE, CONFIG_TYPE_INT, "0", &ldbm_config_dbncache_get, &ldbm_config_dbncache_set, CONFIG_FLAG_ALLOW_RUNNING_CHANGE}, > {CONFIG_MAXPASSBEFOREMERGE, CONFIG_TYPE_INT, "100", &ldbm_config_maxpassbeforemerge_get, &ldbm_config_maxpassbeforemerge_set, 0}, > >@@ -1318,9 +1329,13 @@ > LDAPDebug(LDAP_DEBUG_ANY, "Error accessing the ldbm config DSE\n", > 0, 0, 0); > return 1; > } >- parse_ldbm_config_entry(li, entries[0], ldbm_config); >+ if (0 != parse_ldbm_config_entry(li, entries[0], ldbm_config)) { >+ LDAPDebug(LDAP_DEBUG_ANY, "Error parsing the ldbm config DSE\n", >+ 0, 0, 0); >+ return 1; >+ } > } > > if (search_pb) { > slapi_free_search_results_internal(search_pb); >@@ -1519,8 +1534,11 @@ > > /* If the config phase is initialization or if bval is NULL, we will use > * the default value for the attribute. */ > if (CONFIG_PHASE_INITIALIZATION == phase || NULL == bval) { >+ if (CONFIG_FLAG_SKIP_DEFAULT_SETTING & config->config_flags) { >+ return LDAP_SUCCESS; /* Skipping the default config setting */ >+ } > use_default = 1; > } else { > use_default = 0; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 231093
:
149315
|
276401
|
276431
| 276451 |
276461