Blame SOURCES/quota-4.06-quota_nld-Initialize-sa_mask-when-registering-PID-fi.patch
|
|
97c04e |
From 25f16b1de313ce0d411f754572f94f051bfbe3c8 Mon Sep 17 00:00:00 2001
|
|
|
97c04e |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
97c04e |
Date: Tue, 16 Mar 2021 17:28:15 +0100
|
|
|
97c04e |
Subject: [PATCH] quota_nld: Initialize sa_mask when registering PID file
|
|
|
97c04e |
removal
|
|
|
97c04e |
MIME-Version: 1.0
|
|
|
97c04e |
Content-Type: text/plain; charset=UTF-8
|
|
|
97c04e |
Content-Transfer-Encoding: 8bit
|
|
|
97c04e |
|
|
|
97c04e |
term_action.sa_mask is an automatic variable and and thus unitialized.
|
|
|
97c04e |
This patch empties the signal mask.
|
|
|
97c04e |
|
|
|
97c04e |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
97c04e |
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
97c04e |
---
|
|
|
97c04e |
quota_nld.c | 2 +-
|
|
|
97c04e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
97c04e |
|
|
|
97c04e |
diff --git a/quota_nld.c b/quota_nld.c
|
|
|
97c04e |
index 72d99a9..09c4775 100644
|
|
|
97c04e |
--- a/quota_nld.c
|
|
|
97c04e |
+++ b/quota_nld.c
|
|
|
97c04e |
@@ -466,7 +466,7 @@ static void use_pid_file(void)
|
|
|
97c04e |
|
|
|
97c04e |
term_action.sa_handler = remove_pid;
|
|
|
97c04e |
term_action.sa_flags = 0;
|
|
|
97c04e |
- if (sigaction(SIGTERM, &term_action, NULL))
|
|
|
97c04e |
+ if (sigemptyset(&term_action.sa_mask) || sigaction(SIGTERM, &term_action, NULL))
|
|
|
97c04e |
errstr(_("Could not register PID file removal on SIGTERM.\n"));
|
|
|
97c04e |
if (store_pid())
|
|
|
97c04e |
errstr(_("Could not store my PID %jd.\n"), (intmax_t )getpid());
|
|
|
97c04e |
--
|
|
|
97c04e |
2.26.3
|
|
|
97c04e |
|