[PATCH] config: Handle totem_set_volatile_defaults errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jfriesse@xxxxxxxxxx>
---
 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
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss




[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux