diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-06-24 02:18:49 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2021-06-24 03:07:59 +0300 |
commit | defdca82c107f46e980c84bffb1b2c1263522fa0 (patch) | |
tree | c31fba338a65c86741b16e061d66e0e060e3b768 /meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch | |
parent | 5565c9abcc817b88098b849b2de5c017a8fb559f (diff) | |
download | openbmc-defdca82c107f46e980c84bffb1b2c1263522fa0.tar.xz |
Update to internal 0.57
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch deleted file mode 100644 index bc023839f..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0039-Fix-bmcweb-crashes-if-socket-directory-not-present.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 48fe2a68d634970795f9ff13903afbedca801088 Mon Sep 17 00:00:00 2001 -From: Nidhin MS <nidhin.ms@intel.com> -Date: Wed, 14 Apr 2021 11:28:44 +0530 -Subject: [PATCH] Fix: bmcweb crashes if socket directory not present - -When trying to mount virtual media image bmcweb tries to create unix -socket and if the parent directory does not exist -stream_protocol::acceptor throws error and bmcweb crashes. Fix the same - -Tested: -Removed directory and mounted the vm image. bmcweb crash was not -observed - -Change-Id: I3aea1d8e197c06238f425a97435c01d3c80552a9 -Signed-off-by: Nidhin MS <nidhin.ms@intel.com> ---- - include/nbd_proxy.hpp | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp -index 7b90e90..3b28823 100644 ---- a/include/nbd_proxy.hpp -+++ b/include/nbd_proxy.hpp -@@ -397,6 +397,17 @@ inline void requestRoutes(App& app) - // If the socket file exists (i.e. after bmcweb crash), - // we cannot reuse it. - std::remove((*socketValue).c_str()); -+ std::filesystem::path socketPath(*socketValue); -+ std::error_code fsErr; -+ if (!std::filesystem::exists(socketPath.parent_path(), -+ fsErr)) -+ { -+ BMCWEB_LOG_ERROR -+ << "VirtualMedia socket directory not present. " -+ << socketPath.parent_path(); -+ conn.close("Unable to create unix socket"); -+ return; -+ } - - sessions[&conn] = std::make_shared<NbdProxyServer>( - conn, *socketValue, *endpointValue, --- -2.17.1 - |