[devel] [PATCH hasher-priv v3 3/7] chrootuid: explicitly reset signal mask before forking off payload

Arseny Maslennikov arseny на altlinux.org
Вт Авг 24 11:24:32 MSK 2021


Signed-off-by: Arseny Maslennikov <arseny на altlinux.org>
---
 hasher-priv/chrootuid.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hasher-priv/chrootuid.c b/hasher-priv/chrootuid.c
index 89c112e..357d3ef 100644
--- a/hasher-priv/chrootuid.c
+++ b/hasher-priv/chrootuid.c
@@ -134,6 +134,11 @@ chrootuid(uid_t uid, gid_t gid, const char *ehome,
 	/* Set close-on-exec flag on all non-standard descriptors. */
 	cloexec_fds();
 
+	sigset_t sigmask;
+
+	sigemptyset(&sigmask);
+	sigprocmask(SIG_SETMASK, &sigmask, NULL);
+
 	block_signal_handler(SIGCHLD, SIG_BLOCK);
 
 	if ((pid = fork()) < 0)
-- 
2.32.0



Подробная информация о списке рассылки Devel