Blame SOURCES/bz1809864-2-quorumtool-exit-on-invalid-expected-votes.patch
|
|
354091 |
From 5f543465bb3506b7f4929a426f1c22a9c854cecd Mon Sep 17 00:00:00 2001
|
|
|
354091 |
From: Jan Friesse <jfriesse@redhat.com>
|
|
|
354091 |
Date: Wed, 4 Mar 2020 08:53:41 +0100
|
|
|
354091 |
Subject: [PATCH] quorumtool: exit on invalid expected votes
|
|
|
354091 |
|
|
|
354091 |
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
|
|
|
354091 |
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
|
|
|
354091 |
---
|
|
|
354091 |
tools/corosync-quorumtool.c | 3 ++-
|
|
|
354091 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
354091 |
|
|
|
354091 |
diff --git a/tools/corosync-quorumtool.c b/tools/corosync-quorumtool.c
|
|
|
354091 |
index 9bef844..44bf181 100644
|
|
|
354091 |
--- a/tools/corosync-quorumtool.c
|
|
|
354091 |
+++ b/tools/corosync-quorumtool.c
|
|
|
354091 |
@@ -1,5 +1,5 @@
|
|
|
354091 |
/*
|
|
|
354091 |
- * Copyright (c) 2009-2019 Red Hat, Inc.
|
|
|
354091 |
+ * Copyright (c) 2009-2020 Red Hat, Inc.
|
|
|
354091 |
*
|
|
|
354091 |
* All rights reserved.
|
|
|
354091 |
*
|
|
|
354091 |
@@ -937,6 +937,7 @@ int main (int argc, char *argv[]) {
|
|
|
354091 |
votes = strtol(optarg, &endptr, 0);
|
|
|
354091 |
if ((votes == 0 && endptr == optarg) || votes <= 0) {
|
|
|
354091 |
fprintf(stderr, "New expected votes value was not valid, try a positive number\n");
|
|
|
354091 |
+ exit(EXIT_FAILURE);
|
|
|
354091 |
} else {
|
|
|
354091 |
command_opt = CMD_SETEXPECTED;
|
|
|
354091 |
}
|
|
|
354091 |
--
|
|
|
354091 |
1.8.3.1
|
|
|
354091 |
|