summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreportnov <eportnov@ibs.ru>2022-10-20 16:33:18 +0300
committereportnov <eportnov@ibs.ru>2022-10-20 16:33:18 +0300
commit20320d68e29a575a0c63d13632a633dbd1f44130 (patch)
tree0b336d89e2d9b9f9423f2a21984af92ef9574a31
parent35f779df39abbd3d6c7cf5b8a13b0b2aed976165 (diff)
downloadopenbmc-20320d68e29a575a0c63d13632a633dbd1f44130.tar.xz
bmcweb-smtp disable from field
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0023-smtp-disable-from-field.patch66
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend1
2 files changed, 67 insertions, 0 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0023-smtp-disable-from-field.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0023-smtp-disable-from-field.patch
new file mode 100644
index 0000000000..d2d9c8c0a1
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0023-smtp-disable-from-field.patch
@@ -0,0 +1,66 @@
+From 1d097f5df898fc1be12bcf793aab8c000903c03b Mon Sep 17 00:00:00 2001
+From: claiff <claiff@mail.ru>
+Date: Thu, 20 Oct 2022 16:29:32 +0300
+Subject: [PATCH] smtp disable from field
+
+---
+ redfish-core/lib/smtp.hpp | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/redfish-core/lib/smtp.hpp b/redfish-core/lib/smtp.hpp
+index 83bbf9b5..16e3898a 100644
+--- a/redfish-core/lib/smtp.hpp
++++ b/redfish-core/lib/smtp.hpp
+@@ -33,7 +33,7 @@ namespace redfish
+ return function_with_parameters.substr( ZERO_POSITION, position );
+ }
+
+- inline void SendMail( std::string const& from, std::string const& subject,
++ inline void SendMail( std::string const& subject,
+ std::string const& text, std::shared_ptr<bmcweb::AsyncResp> const& asyncResp )
+ {
+ static const std::string SEND_MAIL_METHOD_NAME = "SendMail";
+@@ -56,7 +56,6 @@ namespace redfish
+ },
+ SERVICE_PATH, OBJECT_MESSENGER_PATH, INTERFACE_MESSENGER_PATH,
+ SEND_MAIL_METHOD_NAME,
+- from,
+ subject,
+ text);
+ }
+@@ -247,7 +246,6 @@ namespace redfish
+ const std::string& params)
+ {
+ static constexpr std::string_view SEND_MAIL_METHOD_NAME = "SendMail";
+- static constexpr std::string_view FROM_FIELD = "from";
+ static constexpr std::string_view SUBJECT_FIELD = "subject";
+ static constexpr std::string_view TEXT_FIELD = "text";
+
+@@ -262,16 +260,15 @@ namespace redfish
+ return;
+ }
+
+- std::string from, subject, text;
++ std::string subject, text;
+ if (!json_util::readJsonPatch(req, asyncResp->res,
+- FROM_FIELD, from,
+ SUBJECT_FIELD, subject,
+ TEXT_FIELD, text))
+ {
+ asyncResp->res.jsonValue["result"] = false;
+ return;
+ }
+- smtp::SendMail(from, subject, text, asyncResp);
++ smtp::SendMail(subject, text, asyncResp);
+ return;
+
+ });
+@@ -286,8 +283,6 @@ namespace redfish
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& params)
+ {
+-
+-
+ static constexpr std::string_view GET_SETTINGS_METHOD_NAME = "GetSettings";
+ static constexpr std::string_view SET_SETTINGS_METHOD_NAME = "SetSettings";
+
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
index 8dfebfc08d..a35c7eb7c9 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -19,6 +19,7 @@ SRC_URI += "\
file://0020-set-smtp-send-post-request.patch \
file://0021-Fix-getting-properties-from-DBUS-for-CPU-and-DIMM.patch \
file://0022-add-caching-pcie.patch \
+ file://0023-smtp-disable-from-field.patch \
"
EXTRA_OEMESON += "\