diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-08-11 15:11:45 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-08-12 14:33:14 +0200 |
commit | 533ac4d47dcecc976c05ba503acff11b9546b67c (patch) | |
tree | 6625a366fd4a659c5a5b275d8263239291426dca /lib/cache_segtype | |
parent | f0c18fceb43d77b0a79685fc7b1c8bbe64df7e97 (diff) | |
download | lvm2-533ac4d47dcecc976c05ba503acff11b9546b67c.tar.gz |
cache: add more validation
Diffstat (limited to 'lib/cache_segtype')
-rw-r--r-- | lib/cache_segtype/cache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cache_segtype/cache.c b/lib/cache_segtype/cache.c index 052617317..53c867e00 100644 --- a/lib/cache_segtype/cache.c +++ b/lib/cache_segtype/cache.c @@ -100,6 +100,9 @@ static int _cache_pool_text_import(struct lv_segment *seg, * If the policy is not present, default policy is used. */ if ((sn = dm_config_find_node(sn, "policy_settings"))) { + if (!seg->policy_name) + return SEG_LOG_ERROR("policy_settings must have a policy_name in"); + if (sn->v) return SEG_LOG_ERROR("policy_settings must be a section in"); |