Do not access DB_CONFIG when db_home is not set

Resolves: #1464033
This commit is contained in:
Petr Kubat 2017-06-26 13:01:41 +02:00
parent 62dc81833b
commit 8047fa8580
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- db-5.3.28/src/env/env_open.c.old 2017-06-26 10:32:11.011419981 +0200
+++ db-5.3.28/src/env/env_open.c 2017-06-26 10:32:46.893721233 +0200
@@ -473,7 +473,7 @@
env->db_mode = mode == 0 ? DB_MODE_660 : mode;
/* Read the DB_CONFIG file. */
- if ((ret = __env_read_db_config(env)) != 0)
+ if (env->db_home != NULL && (ret = __env_read_db_config(env)) != 0)
return (ret);
/*

View File

@ -40,6 +40,8 @@ Patch31: db-5.3.28-condition-variable-ppc.patch
# downstream patch that adds a check for rpm transaction lock in order to be able to update libdb
# FIXME: remove when able
Patch32: db-5.3.28-rpm-lock-check.patch
# downstream patch to hotfix rhbz#1464033, sent upstream
Patch33: db-5.3.28-cwd-db_config.patch
URL: http://www.oracle.com/database/berkeley-db/
License: BSD and LGPLv2 and Sleepycat
@ -235,6 +237,7 @@ popd
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
cd dist
./s_config
@ -446,6 +449,7 @@ rm -rf ${RPM_BUILD_ROOT}
* Mon Jun 26 2017 Petr Kubat <pkubat@redhat.com> - 5.3.28-23
- Try looking at env lock via /proc/locks during env_attach (#1460003)
- Check rpm's transaction lock via /proc/locks
- Do not access DB_CONFIG when db_home is not set (#1464033)
* Tue Jun 13 2017 Petr Kubat <pkubat@redhat.com> - 5.3.28-23
- Reintroduce patches removed in 5.3.28-22