integ/base/systemd/centos/patches/0703-fix-build-error-for-CentOS7.6.patch
Mawrer Ramirez b05bad2e19 Update for systemd patches (CVE-2018-15688)
This commit is a complement for the change in the stx-tools repo
(link: https://review.openstack.org/#/c/651340/), the upgrade is
required to fix the CVE-2018-15688.

The fix was done in Jan 2019 by the community and requires the
update of systemd packages.

System-config needs to be updated in order to be aligned with the
new version of systemd-219-62.el7_6.5.

systemd-config.spec:
	Update 'BuildRequires' value for the new systemd version.

update-package-versioning-for-TIS-format.patch:
	Update 'Release' value for the new version of systemd.

0703-fix-build-error-for-CentOS7.6.patch:
	Update process_http_upload function in order to support the
	new type of value '-ENOBUFS' and changes in the index file.

srpm_path:
	Update the 'mirror' value with the new systemd version.

Change-Id: I8f69532833c216f7a369f1b0596dc6607b0f2a7c
Closes-Bug: #1820756
Depends-On: I3fd97d9dabe2350a7af887a0c7de26ec95f7a7d9
Signed-off-by: Mawrer Ramirez <mawrer.a.ramirez.martinez@intel.com>
2019-04-10 11:00:11 -05:00

76 lines
3.4 KiB
Diff

From bcfe2b0e50fed2a445f4e0dd43f33aee45d9ac5f Mon Sep 17 00:00:00 2001
From: Shuicheng Lin <shuicheng.lin@intel.com>
Date: Tue, 2 Apr 2019 16:43:03 +0000
Subject: [PATCH] Fix compile failure due to deprecated value
Issue occur after upgrade build tool chain. Fix it per tool chain's
suggestion.
Error message is like below:
"
Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated,
use MHD_HTTP_PAYLOAD_TOO_LARGE [-Werror]
Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated,
use MHD_HTTP_NOT_ACCEPTABLE [-Werror]
"
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Signed-off-by: Mawrer Ramirez <mawrer.a.ramirez.martinez@intel.com>
---
src/journal-remote/journal-gatewayd.c | 4 ++--
src/journal-remote/journal-remote.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
index d1f0ce3..8364044 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/journal-remote/journal-gatewayd.c
@@ -684,7 +684,7 @@ static int request_handler_file(
if (fstat(fd, &st) < 0)
return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to stat file: %m\n");
- response = MHD_create_response_from_fd_at_offset(st.st_size, fd, 0);
+ response = MHD_create_response_from_fd_at_offset64(st.st_size, fd, 0);
if (!response)
return respond_oom(connection);
@@ -824,7 +824,7 @@ static int request_handler(
assert(method);
if (!streq(method, "GET"))
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
"Unsupported method.\n");
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index e65daf6..9780ecb 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -526,13 +526,13 @@ static int process_http_upload(
log_warning("Failed to process data for connection %p", connection);
if (r == -ENOBUFS)
return mhd_respondf(connection,
- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+ MHD_HTTP_PAYLOAD_TOO_LARGE,
"Entry is too large, maximum is %u bytes.\n",
DATA_SIZE_MAX);
else if (r == -E2BIG)
return mhd_respondf(connection,
- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
+ MHD_HTTP_PAYLOAD_TOO_LARGE,
"Entry with more fields than the maximum of %u\n",
ENTRY_FIELD_COUNT_MAX);
@@ -586,7 +586,7 @@ static int request_handler(
*connection_cls);
if (!streq(method, "POST"))
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
"Unsupported method.\n");
if (!streq(url, "/upload"))
--
1.8.3.1