When totem_set_volatile_defaults is called from totem_config_validate
return code is unchecked.

It's then perfectly possible to set (for example) join timeout to very
small value (1) and consensus value is then set to 0 making corosync
unable to create membership.

Signed-off-by: Jan Friesse <[email protected]>
---
 exec/totemconfig.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index c17c673..7180646 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -1007,7 +1007,9 @@ int totem_config_validate (
                goto parse_error;
        }
 
-       totem_set_volatile_defaults(totem_config, error_string);
+       if (totem_set_volatile_defaults(totem_config, error_string) == -1) {
+               return (-1);
+       }
 
        /*
         * RRP values validation
-- 
1.7.1

_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss

Reply via email to