From f46f7dc94139c0bafe10361622416d7dc343d31f Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 27 Oct 2015 10:12:34 -0400 Subject: [PATCH 1/2] run_cmd: close parent process console file descriptors Signed-off-by: Jason Dillaman --- src/common/run_cmd.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/run_cmd.cc b/src/common/run_cmd.cc index 5f5cc3cca3235..81e41712b9b38 100644 --- a/src/common/run_cmd.cc +++ b/src/common/run_cmd.cc @@ -47,6 +47,9 @@ std::string run_cmd(const char *cmd, ...) } else if (fret == 0) { // execvp doesn't modify its arguments, so the const-cast here is safe. + close(STDIN_FILENO); + close(STDOUT_FILENO); + close(STDERR_FILENO); execvp(cmd, (char * const*)&arr[0]); _exit(127); } From 4300f2a9fe29627eea580564ff2d576de3647467 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Tue, 27 Oct 2015 10:13:27 -0400 Subject: [PATCH 2/2] krbd: remove deprecated --quiet param from udevadm This parameter has been removed since systemd 213, so this effects Fedora 21+, Debian Jessie, and potentially future releases of RHEL 7. Fixes: #13560 Backport: hammer, infernalis Signed-off-by: Jason Dillaman --- src/krbd.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/krbd.cc b/src/krbd.cc index 9901edbfb154f..778c109fe4c97 100644 --- a/src/krbd.cc +++ b/src/krbd.cc @@ -521,8 +521,7 @@ static int do_unmap(struct udev *udev, dev_t devno, const string& id) * libudev does not provide the "wait until the queue is empty" * API or the sufficient amount of primitives to build it from. */ - string err = run_cmd("udevadm", "settle", "--timeout", "10", "--quiet", - NULL); + string err = run_cmd("udevadm", "settle", "--timeout", "10", NULL); if (!err.empty()) cerr << "rbd: " << err << std::endl; }