master - config: fix some settings incorrectly marked as CFG_DEFAULT_COMMENTED instead of CFG_DEFAULT_UNDEFINED and causing segfault
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a9bc53d5f33afd5c4c3ad36450146f753c568a7c Commit: a9bc53d5f33afd5c4c3ad36450146f753c568a7c Parent: da1f88706060baf03bceb9e4d788c65646b831b7 Author: Peter Rajnoha <[email protected]> AuthorDate: Wed Jun 17 13:26:11 2015 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Wed Jun 17 13:34:31 2015 +0200
config: fix some settings incorrectly marked as CFG_DEFAULT_COMMENTED instead of CFG_DEFAULT_UNDEFINED and causing segfault
This patch fixes segfault which was caused by incorrectly marking some settings CFG_DEFAULT_COMMENTED instead of CFG_DEFAULT_UNDEFINED - the ones which have NULL default value, hence they're really undefined. A regression caused by a98ceceb1d101f0b19a6115f406e23f13feab5ae.
For example:
$ lvmconfig log/file file="/a"
Before this patch:
$ lvmconfig --type diff Segmentation fault (core dumped)
With this patch applied:
$ lvmconfig --type diff
log {
file="/a"
}The same applies for these settings:
log/activate_file
global/library_dir
global/system_id_file
<disk_area>/disk_area_id
There were also other settings with NULL default value and marked as CFG_DEFAULT_COMMENTED instead of CFG_DEFAULT_UNDEFINED, but they were cfg_array config settings where the NULL value was not causing segfault (NULL == empty array).
--- WHATS_NEW | 1 + lib/config/config_settings.h | 52 +++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 26 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.122 - ================================= + Fix lvmconfig segfault on settings with undefined default value (2.02.120). Version 2.02.121 - 12th June 2015 =================================
lib/config/config_settings.h +26 -26
176 lines not on this page · raw message