ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Zbigniew Jędrzejewski-Szmek 62fe94
From f461c8073dee9cd10bfae5ae3586e785ec8a5d07 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek 62fe94
From: Lennart Poettering <lennart@poettering.net>
Zbigniew Jędrzejewski-Szmek 62fe94
Date: Thu, 21 Aug 2014 17:35:19 +0200
Zbigniew Jędrzejewski-Szmek 62fe94
Subject: [PATCH] execute: explain in a comment, why close_all_fds() is invoked
Zbigniew Jędrzejewski-Szmek 62fe94
 the second time differently
Zbigniew Jędrzejewski-Szmek 62fe94
Zbigniew Jędrzejewski-Szmek 62fe94
---
Zbigniew Jędrzejewski-Szmek 62fe94
 src/core/execute.c | 4 +++-
Zbigniew Jędrzejewski-Szmek 62fe94
 1 file changed, 3 insertions(+), 1 deletion(-)
Zbigniew Jędrzejewski-Szmek 62fe94
Zbigniew Jędrzejewski-Szmek 62fe94
diff --git a/src/core/execute.c b/src/core/execute.c
Zbigniew Jędrzejewski-Szmek 62fe94
index 2544a2470c..b5b22472d5 100644
Zbigniew Jędrzejewski-Szmek 62fe94
--- a/src/core/execute.c
Zbigniew Jędrzejewski-Szmek 62fe94
+++ b/src/core/execute.c
Zbigniew Jędrzejewski-Szmek 62fe94
@@ -1635,7 +1635,9 @@ int exec_spawn(ExecCommand *command,
Zbigniew Jędrzejewski-Szmek 62fe94
                 }
Zbigniew Jędrzejewski-Szmek 62fe94
 
Zbigniew Jędrzejewski-Szmek 62fe94
                 /* We repeat the fd closing here, to make sure that
Zbigniew Jędrzejewski-Szmek 62fe94
-                 * nothing is leaked from the PAM modules */
Zbigniew Jędrzejewski-Szmek 62fe94
+                 * nothing is leaked from the PAM modules. Note that
Zbigniew Jędrzejewski-Szmek 62fe94
+                 * we are more aggressive this time since socket_fd
Zbigniew Jędrzejewski-Szmek 62fe94
+                 * and the netns fds we don#t need anymore. */
Zbigniew Jędrzejewski-Szmek 62fe94
                 err = close_all_fds(fds, n_fds);
Zbigniew Jędrzejewski-Szmek 62fe94
                 if (err >= 0)
Zbigniew Jędrzejewski-Szmek 62fe94
                         err = shift_fds(fds, n_fds);