Просмотр исходного кода

config: Handle totem_set_volatile_defaults errors

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@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 12 лет назад
Родитель
Сommit
2f0cad20a9
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      exec/totemconfig.c

+ 3 - 1
exec/totemconfig.c

@@ -1007,7 +1007,9 @@ int totem_config_validate (
 		goto parse_error;
 		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
 	 * RRP values validation