int0x21 / rpms / dlm

Forked from rpms/dlm 4 years ago
Clone

Blame SOURCES/0004-dlm_controld-ignore-unwanted-uevent-strings.patch

11c6eb
From 58f1d500b6da18d62eef35b5f55a030ce8b9b0ce Mon Sep 17 00:00:00 2001
11c6eb
From: David Teigland <teigland@redhat.com>
11c6eb
Date: Mon, 14 Jan 2019 15:47:07 -0600
11c6eb
Subject: [PATCH] dlm_controld: ignore unwanted uevent strings
11c6eb
11c6eb
---
11c6eb
 dlm_controld/main.c | 5 ++++-
11c6eb
 1 file changed, 4 insertions(+), 1 deletion(-)
11c6eb
11c6eb
diff --git a/dlm_controld/main.c b/dlm_controld/main.c
11c6eb
index 40816aae3b24..ca1349bae241 100644
11c6eb
--- a/dlm_controld/main.c
11c6eb
+++ b/dlm_controld/main.c
11c6eb
@@ -350,7 +350,10 @@ static void process_uevent(int ci)
11c6eb
 	act = argv[0];
11c6eb
 	sys = argv[2];
11c6eb
 
11c6eb
-	if ((strlen(sys) != strlen("dlm")) || strcmp(sys, "dlm"))
11c6eb
+	if (!act || !sys || !argv[3])
11c6eb
+		return;
11c6eb
+
11c6eb
+	if (strncmp(sys, "dlm", 3))
11c6eb
 		return;
11c6eb
 
11c6eb
 	log_debug("kernel: %s %s", act, argv[3]);
11c6eb
-- 
11c6eb
2.7.5
11c6eb