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 276401 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]
cvs diffs
231093.diffs (text/plain), 10.05 KB, created by
Noriko Hosoi
on 2007-12-03 23:21:18 UTC
(
hide
)
Description:
cvs diffs
Filename:
MIME Type:
Creator:
Noriko Hosoi
Created:
2007-12-03 23:21:18 UTC
Size:
10.05 KB
patch
obsolete
>Index: ldbm_instance_config.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c,v >retrieving revision 1.9 >diff -t -w -U4 -r1.9 ldbm_instance_config.c >--- ldbm_instance_config.c 14 Nov 2007 15:04:51 -0000 1.9 >+++ ldbm_instance_config.c 3 Dec 2007 22:48:42 -0000 >@@ -479,10 +479,14 @@ > LDAPDebug(LDAP_DEBUG_ANY, "Error accessing the config DSE\n", > 0, 0, 0); > return 1; > } >- parse_ldbm_instance_config_entry(inst, entries[0], >- ldbm_instance_config); >+ if (0 != parse_ldbm_instance_config_entry(inst, entries[0], >+ ldbm_instance_config)) { >+ LDAPDebug(LDAP_DEBUG_ANY, "Error parsing the config DSE\n", >+ 0, 0, 0); >+ return 1; >+ } > } > > if (search_pb) > { >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 3 Dec 2007 22:48:42 -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 configuration\n", >+ CONFIG_DIRECTORY, 0, 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 == PR_strcmp(s, "(null)")) { >+ LDAPDebug(LDAP_DEBUG_ANY, >+ "ERROR: db directory is not set; check %s in the db configuration\n", >+ CONFIG_DIRECTORY, 0, 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; > >Index: ldbm_config.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_config.h,v >retrieving revision 1.6 >diff -t -w -U4 -r1.6 ldbm_config.h >--- ldbm_config.h 10 Nov 2006 23:45:39 -0000 1.6 >+++ ldbm_config.h 3 Dec 2007 22:48:42 -0000 >@@ -71,8 +71,9 @@ > > #define CONFIG_FLAG_PREVIOUSLY_SET 1 > #define CONFIG_FLAG_ALWAYS_SHOW 2 > #define CONFIG_FLAG_ALLOW_RUNNING_CHANGE 4 >+#define CONFIG_FLAG_SKIP_DEFAULT_SETTING 8 > > struct config_info { > char *config_name; > int config_type; >Index: dblayer.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v >retrieving revision 1.25 >diff -t -w -U4 -r1.25 dblayer.c >--- dblayer.c 18 Oct 2007 00:08:34 -0000 1.25 >+++ dblayer.c 3 Dec 2007 22:48:43 -0000 >@@ -1408,8 +1408,13 @@ > } > > /* DBDB we should pick these up in our config routine, and do away with > * the li_ one */ >+ if (NULL == li->li_directory || '\0' == *li->li_directory) { >+ LDAPDebug(LDAP_DEBUG_ANY, >+ "Error: DB directory is not specified.\n", 0, 0, 0); >+ return -1; >+ } > PR_Lock(li->li_config_mutex); > priv->dblayer_home_directory = li->li_directory; /* nsslapd-directory */ > priv->dblayer_cachesize = li->li_dbcachesize; > priv->dblayer_file_mode = li->li_mode; >Index: start.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/start.c,v >retrieving revision 1.7 >diff -t -w -U4 -r1.7 start.c >--- start.c 15 Mar 2007 21:34:32 -0000 1.7 >+++ start.c 3 Dec 2007 22:48:43 -0000 >@@ -62,9 +62,13 @@ > > slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li ); > > /* parse the config file here */ >- ldbm_config_load_dse_info(li); >+ if (0 != ldbm_config_load_dse_info(li)) { >+ LDAPDebug( LDAP_DEBUG_ANY, "start: Loading database configuration failed\n", >+ 0, 0, 0 ); >+ return SLAPI_FAIL_GENERAL; >+ } > > /* register with the binder-based resource limit subsystem so that */ > /* lookthroughlimit can be supported on a per-connection basis. */ > if ( slapi_reslimit_register( SLAPI_RESLIMIT_TYPE_INT, >@@ -76,9 +80,9 @@ > } > > /* If the db directory hasn't been set yet, we need to set it to > * the default. */ >- if ('\0' == li->li_directory[0]) { >+ if (NULL == li->li_directory || '\0' == li->li_directory[0]) { > /* "get default" is a special string that tells the config > * routines to figure out the default db directory by > * reading cn=config. */ > ldbm_config_internal_set(li, CONFIG_DIRECTORY, "get default");
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